/* =========================================================
   BLOG + INNER PAGES  (load after responsive.css)
   Uses the same variables as reset.css
========================================================= */

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* ---------- Page hero / breadcrumb ---------- */
.page-hero {
    background:
        radial-gradient(circle at 85% 0%, rgba(231,169,0,.14), transparent 35%),
        linear-gradient(135deg, #f7faff 0%, #ffffff 65%);
    padding: 56px 0 48px;
    border-bottom: 1px solid var(--border);
}

.page-hero h1 {
    font-size: clamp(30px, 4.6vw, 46px);
    line-height: 1.15;
    letter-spacing: -1px;
    max-width: 860px;
    margin-bottom: 14px;
}

.page-hero-desc {
    color: var(--muted);
    font-size: 17px;
    max-width: 680px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 18px;
}

.breadcrumb a { color: var(--primary); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 6px;
    font-size: 14px;
    color: var(--muted);
}

.post-meta i { color: var(--primary); margin-right: 4px; }

/* ---------- Search form ---------- */
.search-form {
    display: flex;
    gap: 10px;
    max-width: 480px;
}

.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(7,59,120,.12);
}

.search-form .btn { padding: 12px 20px; }
.page-hero-search { margin-top: 24px; }

/* ---------- Category pills ---------- */
.cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 34px;
}

.cat-pills a {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    transition: all .2s ease;
}

.cat-pills a:hover,
.cat-pills a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---------- Blog grid + cards ---------- */
.blog-section { padding: 60px 0 85px; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(7,35,70,.10);
    border-color: #d5deea;
}

.blog-card-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--light);
    overflow: hidden;
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.blog-card:hover .blog-card-thumb img { transform: scale(1.04); }

.blog-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    color: var(--primary);
    background: linear-gradient(135deg, #eaf1fb, #f7faff);
}

.blog-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px 22px 20px;
}

.blog-card-cat {
    align-self: flex-start;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.blog-card-title {
    font-size: 20px;
    line-height: 1.3;
    letter-spacing: -.3px;
    margin-bottom: 10px;
}

.blog-card-title a:hover { color: var(--primary); }

.blog-card-excerpt {
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 18px;
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--muted);
}

.blog-card-meta i { color: var(--primary); margin-right: 3px; }

/* Featured (first post on page 1) */
.blog-card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
}

.blog-card--featured .blog-card-thumb {
    flex: 1.1;
    aspect-ratio: auto;
    min-height: 320px;
}

.blog-card--featured .blog-card-body {
    flex: 1;
    justify-content: center;
    padding: 38px;
}

.blog-card--featured .blog-card-title { font-size: 30px; }
.blog-card--featured .blog-card-excerpt { font-size: 16px; }
.blog-card--featured .blog-card-meta { margin-top: 6px; }

/* ---------- Pagination ---------- */
.pagination { margin-top: 46px; }

.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

/* theme header uses .nav-links too – undo mobile-menu styles inside pagination */
.pagination .nav-links {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    box-shadow: none;
    padding: 0;
    background: none;
    flex-direction: row;
    width: auto;
}

.pagination .page-numbers {
    min-width: 42px;
    padding: 10px 14px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-weight: 600;
    background: #fff;
}

.pagination a.page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination .page-numbers.dots { border: 0; background: none; }

/* ---------- Empty state ---------- */
.empty-state {
    text-align: center;
    padding: 70px 20px;
    background: var(--light);
    border: 1px dashed #cfd9e6;
    border-radius: 16px;
}

.empty-state h2 { font-size: 28px; margin-bottom: 10px; }
.empty-state p { color: var(--muted); margin-bottom: 22px; }

/* ---------- Single post layout ---------- */
.post-section,
.page-section { padding: 60px 0 70px; }

.post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 48px;
    align-items: start;
}

.page-content {
    max-width: 820px;
    margin: 0 auto;
}

.post-featured {
    margin-bottom: 32px;
    border-radius: 16px;
    overflow: hidden;
}

.post-featured img { width: 100%; height: auto; }

/* ---------- Entry content typography ---------- */
.entry-content {
    font-size: 17px;
    line-height: 1.8;
    color: #26324a;
    overflow-wrap: break-word;
}

.entry-content > * + * { margin-top: 1.2em; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: var(--text);
    line-height: 1.25;
    letter-spacing: -.5px;
    margin-top: 1.9em;
}

.entry-content h2 { font-size: 30px; }
.entry-content h3 { font-size: 23px; }
.entry-content h4 { font-size: 19px; font-family: "Manrope", sans-serif; }

.entry-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.entry-content a:hover { color: var(--primary-dark); }

.entry-content ul,
.entry-content ol { padding-left: 1.5em; }
.entry-content li + li { margin-top: .45em; }

.entry-content blockquote {
    padding: 18px 24px;
    background: var(--light);
    border-left: 4px solid var(--accent);
    border-radius: 0 10px 10px 0;
    font-style: italic;
}

.entry-content img {
    height: auto;
    border-radius: 12px;
}

.entry-content figure { margin-top: 1.6em; }
.entry-content figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

.entry-content .alignleft  { float: left;  margin: 6px 24px 14px 0; }
.entry-content .alignright { float: right; margin: 6px 0 14px 24px; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    display: block;
    overflow-x: auto;
}

.entry-content th,
.entry-content td {
    padding: 12px 14px;
    border: 1px solid var(--border);
    text-align: left;
}

.entry-content th { background: var(--light); }

.entry-content hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2em 0;
}

.entry-content iframe,
.entry-content video { max-width: 100%; }

.entry-content .wp-block-button__link {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.page-links { margin-top: 24px; font-weight: 600; }

/* ---------- Tags / share / post nav ---------- */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 34px;
}

.post-tags a {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--light);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.post-tags a:hover { background: var(--primary); color: #fff; }

.post-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.post-share a {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-weight: 600;
    color: var(--primary);
    transition: all .2s ease;
}

.post-share a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 30px;
}

.post-nav a {
    display: block;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-weight: 600;
    line-height: 1.4;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.post-nav a:hover { border-color: var(--primary); box-shadow: 0 8px 20px rgba(7,35,70,.08); }

.post-nav span {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .8px;
}

.post-nav-next { grid-column: 2; text-align: right; }
.post-nav-prev:only-child { grid-column: 1; }

/* ---------- Sidebar ---------- */
.post-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.side-card {
    padding: 26px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
}

.side-card h3 { font-size: 19px; line-height: 1.3; margin-bottom: 12px; }

.side-cta {
    background: linear-gradient(135deg, #f7faff, #fff);
}

.side-cta p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.side-cta .btn { width: 100%; padding: 12px 22px; }
.side-cta .btn + .btn { margin-top: 10px; }

.side-list { list-style: none; }

.side-list li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.side-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.side-list li:first-child { padding-top: 0; }

.side-list a { display: block; font-size: 15px; font-weight: 600; line-height: 1.4; }
.side-list a:hover { color: var(--primary); }
.side-list small { color: var(--muted); font-size: 12.5px; }

/* ---------- Related + CTA ---------- */
.related-section { padding: 70px 0; background: var(--light); }
.related-section .section-head { margin-bottom: 32px; }
.post-cta { padding: 70px 0 85px; }

/* ---------- 404 ---------- */
.error-section { padding: 90px 0 100px; }

.error-box { max-width: 560px; margin: 0 auto; text-align: center; }

.error-code {
    font-family: "Manrope", sans-serif;
    font-size: clamp(90px, 18vw, 150px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -4px;
    color: var(--primary);
    opacity: .9;
}

.error-box h1 { font-size: 34px; margin: 10px 0 12px; }
.error-box p { color: var(--muted); margin-bottom: 26px; }

.error-box .buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.error-box .btn { padding: 12px 24px; }
.error-search { margin: 34px auto 0; display: flex; justify-content: center; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .post-layout { grid-template-columns: 1fr; gap: 40px; }
    .post-sidebar { position: static; }
}

@media (max-width: 767px) {
    .blog-card--featured { flex-direction: column; }
    .blog-card--featured .blog-card-thumb { min-height: 0; aspect-ratio: 16 / 10; flex: none; }
    .blog-card--featured .blog-card-body { padding: 24px 22px; }
    .blog-card--featured .blog-card-title { font-size: 24px; }
}

@media (max-width: 600px) {
    .page-hero { padding: 40px 0 34px; }
    .page-hero-desc { font-size: 16px; }

    .blog-section,
    .post-section,
    .page-section { padding: 40px 0 55px; }

    .related-section { padding: 50px 0; }
    .post-cta { padding: 50px 0 60px; }

    .blog-grid { grid-template-columns: 1fr; gap: 22px; }

    .entry-content { font-size: 16px; }
    .entry-content h2 { font-size: 25px; }
    .entry-content h3 { font-size: 20px; }
    .entry-content .alignleft,
    .entry-content .alignright { float: none; margin: 0 auto 14px; display: block; }

    .post-nav { grid-template-columns: 1fr; }
    .post-nav-next { grid-column: 1; text-align: left; }

    .search-form { flex-direction: column; }
    .error-section { padding: 60px 0 70px; }
}
