/* ==========================================================================
   Roam Balkan — journal stylesheet (blog index, post detail, topic pages)
   ========================================================================== */

.journal-masthead {
    padding: 4rem 0 2.5rem;
    background: linear-gradient(180deg, var(--bg-alt) 0%, #ffffff 100%);
}
body:not(:has(.hero-section)) .journal-masthead {
    margin-top: -84px;
    padding-top: calc(4rem + 84px);
}
/* The filter row carries its own bottom padding, so drop the masthead's */
.journal-masthead:has(.journal-filters) {
    padding-bottom: 0;
}

.journal-title {
    font-size: clamp(2.4rem, 5vw + 0.5rem, 4rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-wrap: balance;
}

/* Right-aligned on desktop so it reads as a masthead stat, not body copy */
.journal-count {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.journal-count-num {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--accent-teal);
    line-height: 1;
    letter-spacing: normal;
}
@media (min-width: 992px) {
    .journal-count {
        justify-content: flex-end;
    }
}

.journal-filters {
    padding-bottom: 2.5rem;
}
/* The "all stories" pill is a state, not a link — it renders as a <span> */
.journal-filters span.badge-outline {
    cursor: default;
    background-color: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
}

.journal-subhead {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(15, 42, 74, 0.1);
}

.journal-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
    background: var(--bg-light);
    border-radius: 1.5rem;
}
.journal-empty .bi {
    font-size: 2.5rem;
    color: var(--accent-teal);
    display: block;
    margin-bottom: 1rem;
}

/* -----------------------------------
   JOURNAL: LEAD STORY
   ----------------------------------- */
.lead-story {
    display: grid;
    grid-template-columns: 1fr;
    background: #ffffff;
    border: 1px solid rgba(15, 42, 74, 0.06);
    border-radius: 1.5rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 12px 36px rgba(15, 42, 74, 0.06);
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.lead-story:hover,
.lead-story:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 24px 56px rgba(15, 42, 74, 0.14);
    color: inherit;
}
@media (min-width: 992px) {
    .lead-story {
        grid-template-columns: 1.15fr 1fr;
    }
}

.lead-story-media {
    position: relative;
    overflow: hidden;
    min-height: 260px;
}
.lead-story-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}
.lead-story:hover .lead-story-media img {
    transform: scale(1.05);
}

.lead-story-flag {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    background: var(--accent-teal);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.45rem 1rem;
    border-radius: 50px;
    box-shadow: 0 6px 18px rgba(0, 119, 130, 0.35);
}
/* 12px floor on phones, as with the other uppercase eyebrows */
@media (max-width: 767.98px) {
    .lead-story-flag {
        font-size: 0.75rem;
    }
}

.lead-story-body {
    padding: clamp(1.75rem, 4vw, 3.25rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.lead-story-title {
    font-size: clamp(1.6rem, 2.5vw + 0.5rem, 2.4rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    text-wrap: balance;
}
.lead-story-excerpt {
    margin-bottom: 0;
}
.lead-story .tour-link {
    margin-top: 1.5rem;
    color: var(--accent-teal);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.lead-story:hover .tour-link i {
    transform: translateX(5px);
}
.lead-story .tour-link i {
    transition: transform 0.3s ease;
}

/* -----------------------------------
   JOURNAL: STORY CARDS
   ----------------------------------- */
.story-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.story-meta-cat {
    color: var(--accent-teal);
    font-weight: 600;
}
/* Dot separator only between two meta items, never leading */
.story-meta-cat + time::before {
    content: '·';
    margin-right: 0.5rem;
}

.story-title {
    font-size: 1.35rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}
.story-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 0;
}

/* -----------------------------------
   JOURNAL: POST HERO
   ----------------------------------- */
/* Like the tour page, the hero owns the top of the screen, so the navbar
   sits over it and scrolls away instead of staying fixed. */
body.post-detail .top-navbar {
    position: absolute;
}

.hero-post {
    background-color: var(--primary-dark);
    background-size: cover;
    background-position: center;
    align-items: flex-end;
    text-align: left;
    height: auto;
    min-height: min(68vh, 640px);
    padding: 9rem 0 3.5rem;
}
.hero-post-short {
    min-height: min(52vh, 480px);
}
.hero-post .container {
    max-width: 900px;
}

.post-hero-title {
    font-size: clamp(2.1rem, 4vw + 0.5rem, 3.75rem);
    margin-bottom: 1.25rem;
}

.post-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}
.post-breadcrumb li + li::before {
    content: '/';
    margin-right: 0.5rem;
    color: rgba(255, 255, 255, 0.45);
}
.post-breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}
.post-breadcrumb a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.post-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
}
.post-hero-meta i {
    color: var(--accent-teal-bright);
    margin-right: 0.35rem;
}

/* -----------------------------------
   JOURNAL: READING PROGRESS
   ----------------------------------- */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1040;
    background: transparent;
    pointer-events: none;
}
.reading-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent-teal) 0%, var(--accent-teal-bright) 100%);
    transition: width 0.1s linear;
}

/* -----------------------------------
   JOURNAL: ARTICLE TYPOGRAPHY
   ----------------------------------- */
.post-body-section {
    padding: clamp(3rem, 6vw, 5rem) 0;
}

.post-prose {
    color: var(--primary-dark);
    font-size: 1.08rem;
    line-height: 1.85;
    /* Comfortable measure for long-form reading, even on wide screens */
    max-width: 68ch;
}
.post-prose p {
    margin-bottom: 1.6rem;
}

/* Standfirst: the opening paragraph sets the scene, so it gets the drop cap
   and a size step up from body copy. */
.post-prose > p:first-of-type {
    font-size: 1.25rem;
    line-height: 1.7;
}
.post-prose > p:first-of-type::first-letter {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3.9rem;
    line-height: 0.82;
    font-weight: 700;
    color: var(--accent-teal);
    float: left;
    padding: 0.25rem 0.7rem 0 0;
}

.post-prose h2,
.post-prose h3,
.post-prose h4 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    line-height: 1.25;
    text-wrap: balance;
}
.post-prose h2 {
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    padding-top: 0.75rem;
}
/* Short teal rule above every H2 — a quiet section marker */
.post-prose h2::before {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent-teal);
    margin-bottom: 1.25rem;
}
.post-prose h3 {
    font-size: 1.3rem;
}

.post-prose a {
    color: var(--accent-teal);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.post-prose a:hover {
    color: var(--accent-teal-hover);
}

.post-prose ul,
.post-prose ol {
    margin-bottom: 1.6rem;
    padding-left: 0;
    list-style: none;
}
.post-prose li {
    position: relative;
    padding-left: 1.9rem;
    margin-bottom: 0.85rem;
}
.post-prose ul > li::before {
    content: "\F26E"; /* check-circle, matching the tour pages */
    font-family: "bootstrap-icons";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-teal);
    font-size: 1rem;
}
.post-prose ol {
    counter-reset: prose-steps;
}
.post-prose ol > li {
    counter-increment: prose-steps;
}
.post-prose ol > li::before {
    content: counter(prose-steps);
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: var(--accent-teal);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    display: grid;
    place-items: center;
    line-height: 1;
}

/* Images and figures break past the text measure — a photo wants the full
   column even when the words do not. */
.post-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 1.25rem;
    box-shadow: 0 16px 40px rgba(15, 42, 74, 0.1);
}
.post-prose figure {
    margin: 2.5rem 0;
    max-width: none;
    width: 100%;
}
.post-prose figcaption {
    margin-top: 0.85rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* Pull quote */
.post-prose blockquote {
    margin: 2.75rem 0;
    padding: 2.25rem clamp(1.5rem, 4vw, 2.5rem) 1.75rem;
    background: linear-gradient(135deg, #f0f7f9 0%, #ffffff 100%);
    border: 1px solid rgba(0, 119, 130, 0.14);
    border-radius: 1.25rem;
    position: relative;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.5;
    color: var(--primary-dark);
}
.post-prose blockquote::before {
    content: '\201C';
    position: absolute;
    top: -0.35rem;
    left: 1.25rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 5rem;
    line-height: 1;
    color: rgba(0, 119, 130, 0.22);
}
.post-prose blockquote p:last-child {
    margin-bottom: 0;
}
.post-prose blockquote cite {
    display: block;
    margin-top: 1rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    font-style: normal;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-teal);
}

/* Section break: three dots rather than a rule */
.post-prose hr {
    border: 0;
    margin: 3rem 0;
    text-align: center;
    opacity: 1;
}
.post-prose hr::after {
    content: '• • •';
    color: var(--accent-teal);
    letter-spacing: 0.75rem;
    font-size: 0.9rem;
}

/* A table in a travel post is usually a timetable or a price list. The editor
   emits a bare <table>, so the table itself has to be the scroll container —
   otherwise a wide one drags the whole page sideways on a phone. */
.post-prose table {
    display: block;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    margin-bottom: 1.75rem;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.post-prose .table-scroll,
.post-prose figure.table {
    overflow-x: auto;
}
.post-prose th,
.post-prose td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(15, 42, 74, 0.1);
    text-align: left;
}
.post-prose thead th {
    background: var(--bg-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-teal);
}

/* Editor-authored callout: <p class="tip"> or <div class="tip"> */
.post-prose .tip {
    background: var(--bg-alt);
    border-left: 3px solid var(--accent-teal);
    border-radius: 0 1rem 1rem 0;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
    font-size: 1rem;
}

.post-prose > *:last-child {
    margin-bottom: 0;
}

/* Topic-page intro copy: prose styling without the magazine drop cap */
.post-prose-intro > p:first-of-type {
    font-size: 1.08rem;
}
.post-prose-intro > p:first-of-type::first-letter {
    font-size: inherit;
    font-weight: inherit;
    float: none;
    padding: 0;
    color: inherit;
    font-family: inherit;
    line-height: inherit;
}

/* -----------------------------------
   JOURNAL: SHARE & SIDEBAR
   ----------------------------------- */
.post-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(15, 42, 74, 0.1);
}
.post-share-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--text-muted);
}
.post-share-links {
    display: flex;
    gap: 0.5rem;
}
.share-btn {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(15, 42, 74, 0.15);
    background: #ffffff;
    color: var(--primary-dark);
    font-size: 1.05rem;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.share-btn:hover,
.share-btn:focus-visible {
    background: var(--accent-teal);
    border-color: var(--accent-teal);
    color: #ffffff;
    transform: translateY(-2px);
}
.share-btn.is-copied {
    background: var(--accent-teal);
    border-color: var(--accent-teal);
    color: #ffffff;
}

.back-to-journal {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
}
.back-to-journal:hover {
    color: var(--accent-teal);
}
/* The one way out of a post on a phone, and it sat 24px tall */
@media (max-width: 991.98px) {
    .back-to-journal {
        min-height: 44px;
    }
}

.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
@media (min-width: 992px) {
    .post-sidebar {
        position: sticky;
        top: 100px;
    }
}

.sidebar-card {
    background: var(--bg-light);
    border: 1px solid rgba(15, 42, 74, 0.07);
    border-radius: 1.25rem;
    padding: 1.5rem;
}
.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}
.sidebar-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.sidebar-chips .badge-outline {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    background: #ffffff;
}

.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-links li + li {
    border-top: 1px solid rgba(15, 42, 74, 0.08);
}
.sidebar-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.sidebar-links a i {
    color: var(--accent-teal);
    transition: transform 0.3s ease;
}
.sidebar-links a:hover {
    color: var(--accent-teal);
}
.sidebar-links a:hover i {
    transform: translateX(4px);
}

.sidebar-cta {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a3c61 100%);
    border-radius: 1.25rem;
    padding: 1.75rem;
    color: #ffffff;
}
.sidebar-cta .section-tag {
    color: var(--accent-teal-bright);
}
.sidebar-cta-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.35rem;
    margin-bottom: 0.6rem;
}
.sidebar-cta-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.keep-reading {
    background: var(--bg-light);
    border-top: 1px solid rgba(15, 42, 74, 0.06);
    padding: clamp(3rem, 6vw, 5rem) 0;
}

