/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --gold:        #b8941f;
    --dark:        #1a1a2e;
    --text:        #2d3748;
    --muted:       #718096;
    --border:      #e2e8f0;
    --bg:          #faf9f7;
    --card-bg:     #ffffff;
    --serif:       'Playfair Display', Georgia, serif;
    --sans:        'Plus Jakarta Sans', system-ui, sans-serif;
}

body {
    font-family: var(--sans);
    font-size: 16px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    margin: 0;
}

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.blog-navbar {
    background: var(--dark);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--gold);
}

.blog-navbar .brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
}

.blog-navbar .brand-icon {
    width: 36px;
    height: 36px;
    background: var(--gold);
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    color: #fff;
}

.blog-navbar .brand-text {
    color: #fff;
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.1;
}

.blog-navbar .brand-text small {
    display: block;
    font-family: var(--sans);
    font-size: .65rem;
    font-weight: 400;
    color: rgba(255,255,255,.55);
    letter-spacing: .08em;
    text-transform: uppercase;
}

.blog-navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.blog-navbar .nav-links a {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: color .2s;
}

.blog-navbar .nav-links a:hover { color: var(--gold); }

.blog-navbar .btn-main-site {
    background: var(--gold);
    color: #fff !important;
    padding: .4rem 1rem;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 600;
    transition: opacity .2s;
}

.blog-navbar .btn-main-site:hover { opacity: .85; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.blog-hero {
    background: linear-gradient(135deg, var(--dark) 0%, #16213e 60%, #0f3460 100%);
    padding: 4rem 2rem;
    text-align: center;
}

.blog-hero .eyebrow {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: .75rem;
}

.blog-hero h1 {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    color: #fff;
    margin: 0 auto .75rem;
    max-width: 700px;
    line-height: 1.2;
}

.blog-hero p {
    color: rgba(255,255,255,.65);
    font-size: 1.05rem;
    max-width: 540px;
    margin: 0 auto;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.blog-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    padding: 3rem 0;
}

@media (max-width: 900px) {
    .blog-grid { grid-template-columns: 1fr; }
    .blog-sidebar { order: -1; }
}

/* ── Post Cards ───────────────────────────────────────────────────────────── */
.post-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }

.post-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,0,0,.1);
}

.post-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e2d5b0, #c9a84c);
    display: grid;
    place-items: center;
    font-size: 2rem;
    color: rgba(255,255,255,.7);
}

.post-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-category {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    margin-bottom: .5rem;
    display: block;
}

.post-card-title {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: .75rem;
    flex: 1;
}

.post-card-excerpt {
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    font-size: .75rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    padding-top: .75rem;
    margin-top: auto;
}

/* ── Category Filter Pills ────────────────────────────────────────────────── */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.75rem;
}

.category-pill {
    padding: .35rem .9rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid var(--border);
    color: var(--muted);
    background: var(--card-bg);
    transition: all .2s;
}

.category-pill:hover,
.category-pill.active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(184,148,31,.06);
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.sidebar-card-title {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 1rem 1.25rem .5rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem 1.25rem;
    text-decoration: none;
    color: var(--text);
    font-size: .875rem;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

.sidebar-cat-link:last-child { border-bottom: none; }
.sidebar-cat-link:hover { background: rgba(184,148,31,.05); }

.sidebar-cat-count {
    background: var(--bg);
    color: var(--muted);
    font-size: .7rem;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.sidebar-tag {
    display: inline-block;
    padding: .3rem .75rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 500;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
    text-decoration: none;
    margin: .25rem .2rem;
    transition: all .2s;
}

.sidebar-tag:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ── Single Post ──────────────────────────────────────────────────────────── */
.post-hero-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.post-category-badge {
    display: inline-block;
    padding: .3rem .85rem;
    background: rgba(184,148,31,.12);
    color: var(--gold);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 1rem;
}

.post-title {
    font-family: var(--serif);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 1.25rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: .85rem;
    color: var(--muted);
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.post-excerpt-lead {
    font-size: 1.15rem;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 2rem;
    font-style: italic;
}

/* ── Article Content ──────────────────────────────────────────────────────── */
.article-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text);
}

.article-body h2 {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark);
    margin: 2.5rem 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--border);
}

.article-body h3 {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin: 2rem 0 .75rem;
}

.article-body p  { margin-bottom: 1.5rem; }

.article-body ul, .article-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-body li { margin-bottom: .5rem; }

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.article-body blockquote {
    border-left: 4px solid var(--gold);
    padding: .75rem 1.5rem;
    margin: 2rem 0;
    background: rgba(184,148,31,.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--muted);
    font-size: 1.05rem;
}

.article-body strong { color: var(--dark); }

.article-body a { color: var(--gold); }
.article-body a:hover { text-decoration: underline; }

.article-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.article-body table th, .article-body table td { padding: .6rem .9rem; border: 1px solid var(--border); }
.article-body table th { background: var(--bg); font-weight: 600; }

/* ── Tags ─────────────────────────────────────────────────────────────────── */
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }

.tag-badge {
    padding: .3rem .75rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 500;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--muted);
    text-decoration: none;
    transition: all .2s;
}

.tag-badge:hover { border-color: var(--gold); color: var(--gold); }

/* ── Share Bar ────────────────────────────────────────────────────────────── */
.share-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.share-btn {
    padding: .4rem 1rem;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .2s;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.share-btn:hover { opacity: .8; }
.share-btn.twitter  { background: #000; color: #fff; }
.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.whatsapp { background: #25d366; color: #fff; }

/* ── Related Posts ────────────────────────────────────────────────────────── */
.related-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.related-section h3 { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; margin-bottom: 1.5rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }

.related-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    text-decoration: none;
    color: inherit;
    transition: transform .2s;
}

.related-card:hover { transform: translateY(-2px); }
.related-card img { width: 100%; height: 130px; object-fit: cover; }
.related-card-body { padding: .9rem; }
.related-card-title { font-size: .9rem; font-weight: 600; line-height: 1.35; color: var(--dark); }
.related-card-meta  { font-size: .72rem; color: var(--muted); margin-top: .4rem; }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: .35rem; margin-top: 2.5rem; }
.page-link { padding: .4rem .85rem; border-radius: 6px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .875rem; transition: all .2s; }
.page-link:hover, .page-link.active { background: var(--gold); border-color: var(--gold); color: #fff; }
.page-item.disabled .page-link { opacity: .4; pointer-events: none; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.blog-footer {
    background: var(--dark);
    color: rgba(255,255,255,.55);
    text-align: center;
    padding: 2rem 1.5rem;
    font-size: .82rem;
    margin-top: 4rem;
    border-top: 3px solid var(--gold);
}

.blog-footer a { color: var(--gold); text-decoration: none; }
.blog-footer a:hover { text-decoration: underline; }

/* ── Breadcrumb ───────────────────────────────────────────────────────────── */
.blog-breadcrumb {
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}

.blog-breadcrumb a { color: var(--muted); text-decoration: none; }
.blog-breadcrumb a:hover { color: var(--gold); }
.blog-breadcrumb .sep { opacity: .4; }

/* ── Back link ────────────────────────────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--muted);
    font-size: .85rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color .2s;
}

.back-link:hover { color: var(--gold); }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; opacity: .4; }
