/* =============================================================================
   ESTATIKA CLEAN — Expert Insights Blog
   Listing page (template-blog.php) + single post (single.php)
============================================================================= */

:root {
    --blog-section-py: 80px;
    --blog-max-w:      1160px;
    --blog-card-radius: 12px;
}

/* ── Shared wrapper ──────────────────────────────────────────────────────── */
.blog-wrap {
    max-width: var(--blog-max-w);
    margin:    0 auto;
    padding:   0 24px;
}

.blog-label {
    display:        block;
    font-family:    'Inter', sans-serif;
    font-size:      11px;
    font-weight:    600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color:          var(--green, #7FB13D);
    margin-bottom:  12px;
}

.blog-section-hd {
    margin-bottom: 48px;
}
.blog-section-hd h2 {
    font-family: 'Playfair Display', serif;
    font-size:   clamp(26px, 3vw, 36px);
    font-weight: 600;
    color:       var(--dark, #1C2B20);
    margin:      0;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.blog-hero {
    background:  var(--beige, #FAF8F5);
    padding:     72px 0 48px;
    border-bottom: 1px solid #EAE6E1;
}

.blog-hero__inner {
    max-width: 680px;
    margin-bottom: 44px;
}

.blog-hero__title {
    font-family: 'Playfair Display', serif;
    font-size:   clamp(36px, 5vw, 56px);
    font-weight: 700;
    color:       var(--dark, #1C2B20);
    margin:      0 0 16px;
    line-height: 1.12;
}

.blog-hero__sub {
    font-family: 'Inter', sans-serif;
    font-size:   17px;
    line-height: 1.65;
    color:       #555;
    margin:      0;
    max-width:   580px;
}

/* ── Category Filter Tabs ────────────────────────────────────────────────── */
.blog-cats {
    display:    flex;
    flex-wrap:  wrap;
    gap:        8px;
}

.blog-cat-tab {
    font-family:    'Inter', sans-serif;
    font-size:      13px;
    font-weight:    500;
    color:          #555;
    background:     #fff;
    border:         1.5px solid #DDD;
    border-radius:  100px;
    padding:        7px 18px;
    text-decoration: none;
    transition:     color 0.15s, border-color 0.15s, background 0.15s;
    white-space:    nowrap;
}
.blog-cat-tab:hover {
    color:        var(--dark, #1C2B20);
    border-color: #AAA;
}
.blog-cat-tab--active {
    color:        #fff;
    background:   var(--green, #7FB13D);
    border-color: var(--green, #7FB13D);
}
.blog-cat-tab--active:hover {
    background:   #6a9a33;
    border-color: #6a9a33;
}

/* ── Posts Grid Section ──────────────────────────────────────────────────── */
.blog-grid-section {
    padding: var(--blog-section-py) 0;
}

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

/* ── Post Card ───────────────────────────────────────────────────────────── */
.blog-card {
    background:    #fff;
    border-radius: var(--blog-card-radius);
    overflow:      hidden;
    box-shadow:    0 2px 16px rgba(0,0,0,0.06);
    display:       flex;
    flex-direction: column;
    transition:    transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-card:hover {
    transform:  translateY(-3px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}

.blog-card__img-link {
    display: block;
    flex-shrink: 0;
}

.blog-card__img {
    height:      220px;
    overflow:    hidden;
    background:  #EAE6E1;
    flex-shrink: 0;
}
.blog-card__img img {
    width:       100%;
    height:      100%;
    object-fit:  cover;
    display:     block;
    transition:  transform 0.4s ease;
}
.blog-card:hover .blog-card__img img {
    transform: scale(1.03);
}
.blog-card__img--placeholder {
    background: linear-gradient(135deg, #EAE6E1 0%, #D5CFC7 100%);
    position:   relative;
}
.blog-card__img--placeholder::after {
    content:     'Expert Insights';
    position:    absolute;
    inset:       0;
    display:     flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size:   15px;
    color:       #999;
    font-style:  italic;
}

.blog-card__body {
    padding: 24px 24px 0;
    flex:    1;
}

.blog-card__cat {
    display:        inline-block;
    font-family:    'Inter', sans-serif;
    font-size:      10.5px;
    font-weight:    600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color:          var(--green, #7FB13D);
    margin-bottom:  10px;
}

.blog-card__title {
    font-family:   'Playfair Display', serif;
    font-size:     19px;
    font-weight:   600;
    line-height:   1.35;
    color:         var(--dark, #1C2B20);
    margin:        0 0 12px;
}
.blog-card__title a {
    text-decoration: none;
    color:           inherit;
}
.blog-card__title a:hover {
    color: var(--green, #7FB13D);
}

.blog-card__excerpt {
    font-family: 'Inter', sans-serif;
    font-size:   14px;
    line-height: 1.65;
    color:       #666;
    margin:      0 0 16px;
}

.blog-card__meta {
    font-family: 'Inter', sans-serif;
    font-size:   12.5px;
    color:       #999;
    display:     flex;
    gap:         6px;
    align-items: center;
    margin-bottom: 20px;
}
.blog-card__sep { color: #CCC; }

.blog-card__link {
    display:     block;
    padding:     14px 24px;
    border-top:  1px solid #EAE6E1;
    font-family: 'Inter', sans-serif;
    font-size:   13px;
    font-weight: 600;
    color:       var(--green, #7FB13D);
    text-decoration: none;
    transition:  color 0.15s, background 0.15s;
}
.blog-card__link:hover {
    background: var(--beige, #FAF8F5);
    color:      #5a8c28;
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.blog-empty {
    text-align:  center;
    padding:     80px 24px;
    color:       #777;
    font-family: 'Inter', sans-serif;
    font-size:   16px;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.blog-pagination {
    display:         flex;
    justify-content: center;
    gap:             8px;
    margin-top:      64px;
    flex-wrap:       wrap;
}
.blog-pagination .page-numbers {
    font-family:    'Inter', sans-serif;
    font-size:      14px;
    font-weight:    500;
    color:          #555;
    background:     #fff;
    border:         1.5px solid #DDD;
    border-radius:  8px;
    padding:        8px 16px;
    text-decoration: none;
    transition:     all 0.15s;
    min-width:      40px;
    text-align:     center;
}
.blog-pagination .page-numbers:hover {
    border-color: var(--green, #7FB13D);
    color:        var(--green, #7FB13D);
}
.blog-pagination .page-numbers.current {
    background:   var(--green, #7FB13D);
    border-color: var(--green, #7FB13D);
    color:        #fff;
}
.blog-pagination .page-numbers.dots {
    border-color: transparent;
    background:   transparent;
}

/* ── Blog CTA ────────────────────────────────────────────────────────────── */
.blog-cta {
    background:  var(--dark, #1C2B20);
    padding:     80px 24px;
    text-align:  center;
}

.blog-cta__inner {
    max-width: 600px;
    margin:    0 auto;
}

.blog-cta__heading {
    font-family: 'Playfair Display', serif;
    font-size:   clamp(26px, 3.5vw, 38px);
    font-weight: 600;
    color:       #fff;
    margin:      0 0 16px;
    line-height: 1.2;
}

.blog-cta__sub {
    font-family: 'Inter', sans-serif;
    font-size:   16px;
    line-height: 1.65;
    color:       rgba(255,255,255,0.72);
    margin:      0 0 36px;
}

/* ── Shared buttons ──────────────────────────────────────────────────────── */
.blog-btn {
    display:         inline-flex;
    align-items:     center;
    gap:             8px;
    font-family:     'Inter', sans-serif;
    font-size:       14px;
    font-weight:     600;
    letter-spacing:  0.02em;
    padding:         14px 32px;
    border-radius:   6px;
    text-decoration: none;
    transition:      background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.blog-btn--gold {
    background: var(--gold, #C7A87A);
    color:      #1C2B20;
}
.blog-btn--gold:hover {
    background: #b8976b;
    transform:  translateY(-1px);
}
.blog-btn--outline {
    background:  transparent;
    color:       #fff;
    border:      1.5px solid rgba(255,255,255,0.4);
}
.blog-btn--outline:hover {
    border-color: #fff;
    background:   rgba(255,255,255,0.08);
}

/* ── Single Post Hero ────────────────────────────────────────────────────── */
.post-hero {
    position:   relative;
    min-height: 480px;
    display:    flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow:   hidden;
    background: var(--dark, #1C2B20);
}

.post-hero__img {
    position: absolute;
    inset:    0;
    z-index:  0;
}
.post-hero__img img {
    width:      100%;
    height:     100%;
    object-fit: cover;
    display:    block;
    opacity:    0.55;
}

.post-hero__overlay {
    position:  relative;
    z-index:   1;
    padding:   64px 0 52px;
}

.post-hero__cat {
    display:        inline-block;
    font-family:    'Inter', sans-serif;
    font-size:      11px;
    font-weight:    600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color:          var(--gold, #C7A87A);
    text-decoration: none;
    margin-bottom:  16px;
    border:         1px solid rgba(199,168,122,0.4);
    padding:        5px 14px;
    border-radius:  100px;
    transition:     border-color 0.15s;
}
.post-hero__cat:hover { border-color: var(--gold, #C7A87A); }

.post-hero__title {
    font-family: 'Playfair Display', serif;
    font-size:   clamp(28px, 4.5vw, 52px);
    font-weight: 700;
    color:       #fff;
    line-height: 1.15;
    margin:      0 0 20px;
    max-width:   820px;
}

.post-hero__meta {
    font-family: 'Inter', sans-serif;
    font-size:   13px;
    color:       rgba(255,255,255,0.65);
    display:     flex;
    gap:         10px;
    align-items: center;
}

/* ── Single Post Content ─────────────────────────────────────────────────── */
.post-wrap {
    max-width: 760px;
    margin:    0 auto;
    padding:   64px 24px;
}

.post-content__body {
    font-family: 'Inter', sans-serif;
    font-size:   16.5px;
    line-height: 1.8;
    color:       #333;
}
.post-content__body h2 {
    font-family: 'Playfair Display', serif;
    font-size:   clamp(22px, 2.5vw, 28px);
    font-weight: 600;
    color:       var(--dark, #1C2B20);
    margin:      48px 0 16px;
    line-height: 1.25;
}
.post-content__body h3 {
    font-family: 'Playfair Display', serif;
    font-size:   clamp(18px, 2vw, 22px);
    font-weight: 600;
    color:       var(--dark, #1C2B20);
    margin:      36px 0 12px;
}
.post-content__body p { margin: 0 0 24px; }
.post-content__body ul,
.post-content__body ol {
    margin:  0 0 24px 24px;
    padding: 0;
}
.post-content__body li { margin-bottom: 8px; }
.post-content__body img {
    max-width:    100%;
    border-radius: 10px;
    margin:       24px 0;
    display:      block;
}
.post-content__body blockquote {
    border-left:  4px solid var(--gold, #C7A87A);
    margin:       32px 0;
    padding:      16px 24px;
    background:   var(--beige, #FAF8F5);
    border-radius: 0 8px 8px 0;
    font-style:   italic;
    color:        #555;
}
.post-content__body a {
    color:           var(--green, #7FB13D);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.post-content__body strong { color: var(--dark, #1C2B20); }

/* Tags */
.post-tags {
    display:   flex;
    gap:       8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #EAE6E1;
    font-family: 'Inter', sans-serif;
    font-size:  13px;
}
.post-tags__label {
    font-weight: 600;
    color:       #555;
    margin-right: 4px;
}
.post-tags a {
    color:           #555;
    border:          1px solid #DDD;
    border-radius:   100px;
    padding:         4px 12px;
    text-decoration: none;
    font-size:       12px;
    transition:      all 0.15s;
}
.post-tags a:hover {
    border-color: var(--green, #7FB13D);
    color:        var(--green, #7FB13D);
}

/* Author box */
.post-author {
    display:       flex;
    gap:           20px;
    align-items:   center;
    margin-top:    40px;
    padding:       28px 28px;
    background:    var(--beige, #FAF8F5);
    border-radius: 12px;
    border:        1px solid #EAE6E1;
}
.post-author__avatar { flex-shrink: 0; }
.post-author__img {
    width:         56px;
    height:        56px;
    border-radius: 50%;
    display:       block;
    object-fit:    cover;
}
.post-author__name {
    font-family: 'Inter', sans-serif;
    font-size:   15px;
    font-weight: 600;
    color:       var(--dark, #1C2B20);
    margin-bottom: 4px;
}
.post-author__bio {
    font-family: 'Inter', sans-serif;
    font-size:   13.5px;
    line-height: 1.5;
    color:       #666;
}

/* ── Related Posts ───────────────────────────────────────────────────────── */
.post-related {
    background:  var(--beige, #FAF8F5);
    padding:     80px 0;
    border-top:  1px solid #EAE6E1;
}

/* ── Tablet ──────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    :root { --blog-section-py: 60px; }

    .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }

    .blog-hero  { padding: 56px 0 36px; }
    .blog-cta   { padding: 60px 24px; }

    .post-hero  { min-height: 380px; }
    .post-hero__overlay { padding: 48px 0 40px; }
    .post-wrap  { padding: 52px 24px; }

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

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    :root { --blog-section-py: 48px; }

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

    .blog-hero { padding: 44px 0 32px; }
    .blog-hero__inner { margin-bottom: 28px; }
    .blog-hero__title { font-size: 34px; }

    .blog-cats { gap: 6px; }
    .blog-cat-tab { font-size: 12px; padding: 6px 14px; }

    .blog-cta { padding: 48px 20px; }

    .post-hero { min-height: 300px; }
    .post-hero__title { font-size: 26px; }
    .post-hero__overlay { padding: 36px 0 28px; }

    .post-wrap { padding: 40px 20px; }
    .post-author { flex-direction: column; align-items: flex-start; gap: 14px; }

    .post-related { padding: 48px 0; }
    .blog-section-hd { margin-bottom: 32px; }
}

/* ── Small mobile ────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .blog-hero__title { font-size: 28px; }
    .blog-card__img   { height: 180px; }
    .post-hero__title { font-size: 22px; }
    .blog-cta__heading { font-size: 24px; }
}
