/* =========================================================================
   GeoTown Blog — Editorial-grade typography
   Fraunces for headings, Inter for body. Forest green (#1F6B3A) accent.
   ========================================================================= */

/* ── Layout ──────────────────────────────────────────────────────────── */

.blog-page main.flex-shrink-0 {
    padding: 0;
}
.blog-page main .container {
    max-width: 100%;
    padding: 0;
}

/* ── Blog Index ──────────────────────────────────────────────────────── */

.blog-index {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 24px 60px;
}

.blog-index-header {
    margin-bottom: 48px;
}

.blog-index-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2.8rem;
    font-weight: 800;
    color: #1A1A1A;
    letter-spacing: -0.03em;
    margin: 0 0 8px;
    line-height: 1.1;
}

.blog-index-subtitle {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1.05rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* ── Post Cards ──────────────────────────────────────────────────────── */

.blog-post-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.blog-card {
    display: flex;
    gap: 28px;
    padding: 32px 0;
    border-bottom: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease;
}
.blog-card:first-child {
    padding-top: 0;
}
.blog-card:last-child {
    border-bottom: none;
}
.blog-card:hover {
    transform: translateY(-1px);
}
.blog-card:hover .blog-card-title {
    color: #1F6B3A;
}
.blog-card:hover .blog-arrow {
    transform: translateX(3px);
}

.blog-card-image {
    flex-shrink: 0;
    width: 280px;
    height: 187px;
    border-radius: 4px;
    overflow: hidden;
}
.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.blog-card-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.3;
    margin: 0 0 8px;
    transition: color 0.15s ease;
    letter-spacing: -0.01em;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.82rem;
    color: #9ca3af;
    margin-bottom: 10px;
}

.blog-card-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
}

.blog-card-excerpt {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-link {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1F6B3A;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.blog-arrow {
    display: inline-block;
    transition: transform 0.15s ease;
}

.blog-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 1.05rem;
    margin-top: 80px;
}

/* ── Individual Post — Hero ──────────────────────────────────────────── */

.blog-post-hero {
    position: relative;
    width: 100%;
    max-height: 420px;
    overflow: hidden;
    margin-top: 44px; /* navbar height */
}
.blog-post-hero img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}
.blog-post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.55) 40%, rgba(0,0,0,0.15) 75%, transparent 100%);
}
.blog-post-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 24px 36px;
    max-width: 760px;
    margin: 0 auto;
}

/* Compound selector + dark-theme override below — keeps title white over the
   hero image regardless of source order or theme. */
.blog-post-title.blog-post-title--over-image,
[data-theme="dark"] .blog-post-title.blog-post-title--over-image {
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.85), 0 1px 3px rgba(0,0,0,0.7);
}
.blog-post-meta--over-image {
    color: rgba(255,255,255,0.92);
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
.blog-post-meta--over-image .blog-card-dot {
    background: rgba(255,255,255,0.5);
}

/* ── Individual Post — No-image header ───────────────────────────────── */

.blog-post-header {
    max-width: 720px;
    margin: 0 auto;
    padding: 100px 24px 0;
}

.blog-post-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2.6rem;
    font-weight: 800;
    color: #1A1A1A;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0 0 14px;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.88rem;
    color: #9ca3af;
    margin-bottom: 16px;
}

.blog-post-accent {
    width: 48px;
    height: 3px;
    background: #1F6B3A;
    border-radius: 2px;
    margin-top: 4px;
}

/* ── Post Body ───────────────────────────────────────────────────────── */

.blog-post-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px 40px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1.08rem;
    line-height: 1.8;
    color: #1A1A1A;
}

.blog-post-body h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: #1A1A1A;
    margin: 56px 0 16px;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.blog-post-body h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1A1A1A;
    margin: 40px 0 12px;
    line-height: 1.3;
}

.blog-post-body p {
    margin: 0 0 24px;
}

.blog-post-body a {
    color: #1F6B3A;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}
.blog-post-body a:hover {
    border-bottom-color: #1F6B3A;
}

.blog-post-body strong {
    font-weight: 650;
}

/* Block quotes */
.blog-post-body blockquote {
    border-left: 3px solid #1F6B3A;
    margin: 32px 0;
    padding: 16px 24px;
    background: #f9fafb;
    border-radius: 0 4px 4px 0;
    font-style: italic;
    color: #374151;
}
.blog-post-body blockquote p:last-child {
    margin-bottom: 0;
}

/* Lists */
.blog-post-body ul {
    padding-left: 0;
    margin: 0 0 24px;
    list-style: none;
}
.blog-post-body ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
}
.blog-post-body ul li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: #1F6B3A;
}
.blog-post-body ol {
    padding-left: 20px;
    margin: 0 0 24px;
}
.blog-post-body ol li {
    margin-bottom: 8px;
    padding-left: 4px;
}

/* Code */
.blog-post-body code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.88em;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    color: #1F6B3A;
}
.blog-post-body pre {
    background: #0A0F0C;
    color: #e2e8f0;
    border-radius: 6px;
    padding: 20px 24px;
    overflow-x: auto;
    margin: 32px 0;
    font-size: 0.88rem;
    line-height: 1.65;
}
.blog-post-body pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Images */
.blog-post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 32px 0;
    display: block;
}

/* Tables */
.blog-post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    font-size: 0.92rem;
}
.blog-post-body th,
.blog-post-body td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}
.blog-post-body th {
    font-weight: 600;
    color: #374151;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Horizontal rule */
.blog-post-body hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 48px 0;
}

/* ── Post Footer ─────────────────────────────────────────────────────── */

.blog-post-footer {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.blog-post-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.blog-back-link {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1F6B3A;
    text-decoration: none;
    transition: opacity 0.15s ease;
}
.blog-back-link:hover {
    opacity: 0.75;
}

.blog-share-btn {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.blog-share-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

/* ── Dark Theme ──────────────────────────────────────────────────────── */

[data-theme="dark"] .blog-index-title,
[data-theme="dark"] .blog-card-title,
[data-theme="dark"] .blog-post-title {
    color: #f0ede8;
}

[data-theme="dark"] .blog-index-subtitle,
[data-theme="dark"] .blog-card-meta {
    color: #7a7a80;
}

[data-theme="dark"] .blog-card-excerpt {
    color: #a0a0a8;
}

[data-theme="dark"] .blog-card {
    border-bottom-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .blog-card:hover .blog-card-title {
    color: #4ade80;
}

[data-theme="dark"] .blog-card-link {
    color: #4ade80;
}

[data-theme="dark"] .blog-post-body {
    color: #d4d4d8;
}
[data-theme="dark"] .blog-post-body h2,
[data-theme="dark"] .blog-post-body h3 {
    color: #f0ede8;
}
[data-theme="dark"] .blog-post-body a {
    color: #4ade80;
}
[data-theme="dark"] .blog-post-body a:hover {
    border-bottom-color: #4ade80;
}
[data-theme="dark"] .blog-post-body blockquote {
    background: rgba(255,255,255,0.03);
    border-left-color: #4ade80;
    color: #a0a0a8;
}
[data-theme="dark"] .blog-post-body code {
    background: rgba(255,255,255,0.06);
    color: #4ade80;
}
[data-theme="dark"] .blog-post-body th {
    color: #a0a0a8;
}
[data-theme="dark"] .blog-post-body td,
[data-theme="dark"] .blog-post-body th {
    border-bottom-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .blog-post-body hr {
    border-top-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .blog-post-body ul li::before {
    background: #4ade80;
}

[data-theme="dark"] .blog-post-accent {
    background: #4ade80;
}
[data-theme="dark"] .blog-post-footer-inner {
    border-top-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .blog-back-link {
    color: #4ade80;
}
[data-theme="dark"] .blog-share-btn {
    background: rgba(255,255,255,0.06);
    color: #a0a0a8;
}
[data-theme="dark"] .blog-share-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #d4d4d8;
}
[data-theme="dark"] .blog-empty {
    color: #6b6860;
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .blog-index {
        padding: 72px 20px 40px;
    }
    .blog-index-title {
        font-size: 2rem;
    }
    .blog-card {
        flex-direction: column;
        gap: 16px;
        padding: 24px 0;
    }
    .blog-card-image {
        width: 100%;
        height: 200px;
    }
    .blog-card-title {
        font-size: 1.25rem;
    }

    .blog-post-hero img {
        height: 260px;
    }
    .blog-post-hero-content {
        padding: 24px 20px 28px;
    }
    .blog-post-title--over-image {
        font-size: 1.6rem;
    }
    .blog-post-header {
        padding-top: 80px;
    }
    .blog-post-title {
        font-size: 1.8rem;
    }
    .blog-post-body {
        font-size: 1rem;
        padding: 32px 20px 32px;
    }
    .blog-post-body h2 {
        font-size: 1.4rem;
        margin-top: 40px;
    }
    .blog-post-body h3 {
        font-size: 1.15rem;
    }
    .blog-post-footer {
        padding: 0 20px 40px;
    }
    .blog-post-footer-inner {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}
