/* =====================================================
   Stories Overview Page Styles
   Kundehistorier landing page
   ===================================================== */

/* Stories Hero Section */
.stories-hero {
    padding: 170px 0 60px;
    background: url('../img/bg.webp') center center / cover no-repeat;
    text-align: left;
}

.stories-hero .legal-breadcrumb {
    justify-content: flex-start;
    margin-bottom: 32px;
}

.stories-hero-content {
    max-width: none;
}

/* Keep the lead paragraph at a readable line length even though the content
   block spans the full container (the points row below uses the width). */
.stories-hero-content > .stories-hero-description {
    max-width: 700px;
}

.stories-hero .section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--color-red);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.stories-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.stories-hero-description {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* Three scannable points under the hero lead instead of a wall of text.
   Spans the full container width - the cards get the room. */
.stories-hero-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 28px;
}

.stories-hero-point {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.stories-hero-point > i {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Red to match the "Kundehistorier" section-label accent above */
    background: var(--color-red);
    color: #fff;
    font-size: 1rem;
}

.stories-hero-point strong {
    display: block;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.stories-hero-point p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--color-text-secondary);
}

@media (max-width: 900px) {
    .stories-hero-points {
        grid-template-columns: 1fr;
    }
}

/* Stories Page Layout */
.stories-page {
    padding: 80px 0;
    background: var(--color-bg);
    min-height: 50vh;
}

.stories-section-title {
    font-size: 1.8rem;
    margin-bottom: 28px;
    color: var(--color-text-primary);
}

/* Stories Grid */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

/* Featured layout: the (currently single) story card on the left, the club's
   quotes on the right so the row doesn't sit half-empty. Collapses to one
   column on smaller screens. */
.stories-featured {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
}

.stories-featured .story-card {
    height: 100%;
}

.stories-featured .stories-quotes {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

/* Let the single merged quote card fill the column height so it lines up with
   the story card next to it. */
.stories-featured .stories-quotes .stories-quote {
    flex: 1;
}

@media (max-width: 900px) {
    .stories-featured {
        grid-template-columns: 1fr;
    }
}

/* Story Card */
.story-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.story-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* Story Card Image */
.story-card-image {
    position: relative;
    aspect-ratio: 2.5;
    overflow: hidden;
}

.story-card-image picture {
    display: block;
    width: 100%;
    height: 100%;
}

.story-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform var(--transition-normal);
}

.story-card:hover .story-card-image img {
    transform: scale(1.05);
}

.story-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.story-card:hover .story-card-overlay {
    opacity: 1;
}

.story-card-read {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-white);
    color: var(--color-text-primary);
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-lg);
}

.story-card-read i {
    color: var(--color-blue);
}

/* Story Card Content */
.story-card-content {
    padding: 24px;
    display: flex;
    gap: 20px;
    flex: 1;
}

.story-card-logo {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.story-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.story-card-info {
    flex: 1;
}

.story-card-info h2 {
    font-size: 1.3rem;
    margin-bottom: 4px;
    color: var(--color-text-primary);
}

.story-card-tagline {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.story-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.story-card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.story-card-meta i {
    color: var(--color-blue);
    font-size: 0.8rem;
}

/* Persistent "Læs historien" affordance so it's clear the card is clickable
   (the dark hover overlay alone isn't obvious on touch or at a glance). */
.story-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    color: var(--color-link);
    font-weight: 600;
    font-size: 0.9rem;
}

.story-card-cta i:first-child {
    font-size: 0.85rem;
}

.story-card-cta i:last-child {
    font-size: 0.8rem;
    transition: transform var(--transition-fast);
}

.story-card:hover .story-card-cta i:last-child {
    transform: translateX(4px);
}

.story-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.story-card-feature {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-bg);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.story-card-feature i {
    font-size: 0.75rem;
    color: var(--color-green);
}

/* Story Card Placeholder */
.story-card-placeholder {
    background: var(--color-white);
    border: 2px dashed var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.story-card-placeholder:hover {
    transform: none;
    box-shadow: var(--shadow-md);
}

.story-card-placeholder-content {
    text-align: center;
    padding: 40px;
    color: var(--color-text-muted);
}

.story-card-placeholder-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.story-card-placeholder-icon i {
    font-size: 2rem;
    color: var(--color-border);
}

.story-card-placeholder-content h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--color-text-secondary);
}

.story-card-placeholder-content p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* "Hvad foreningerne fremhæver" prose section under the featured story. */
.stories-highlights {
    max-width: 1000px;
    margin-top: 56px;
}

/* In its own band the highlights need no extra top margin (the band has its
   own padding) and can use the full container width. */
.stories-highlights-band .stories-highlights {
    margin: 0;
    max-width: none;
}

.stories-highlights h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--color-text-primary);
}

.stories-highlights p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 18px;
}

.stories-highlights p:last-child {
    margin-bottom: 0;
}

/* Two columns: the takeaway cards on the left, a live TV preview + the
   "same recipe" note on the right (mirrors the front-page hero pairing). */
.stories-highlights-split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: start;
}

/* Fact cards for the "hvad foreningerne fremhæver" section - one concrete
   takeaway per card instead of three dense paragraphs. In the split layout
   they stack in a single column beside the TV. */
.stories-highlights-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 0;
}

.stories-highlights-aside {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Live TV preview reuses the shared hero-tv-frame markup; cap its width so it
   sits comfortably in the right column. */
.stories-highlights-tv .hero-tv-frame {
    max-width: 460px;
    margin: 0 auto;
}

.stories-highlight-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.stories-highlight-card > i {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 180, 196, 0.12);
    color: var(--color-blue);
    font-size: 1rem;
}

.stories-highlight-card strong {
    display: block;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.stories-highlight-card p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.stories-highlights-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border-light);
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.stories-highlights-note i {
    color: var(--color-blue);
    margin-top: 3px;
}

@media (max-width: 900px) {
    .stories-highlights-split {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Once the split has stacked, the four takeaway cards have the full width -
       lay them out 2x2 on tablet so they don't become a tall single column
       that pushes the TV preview far down. Phones drop back to 1fr below. */
    .stories-highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .stories-highlights-grid {
        grid-template-columns: 1fr;
    }
}

/* Full-width section bands (mirrors the front-page .section / .section-alt
   rhythm: white band, then gray band, edge to edge). */
.section-band {
    padding: 80px 0;
    background: var(--color-white);
}

.section-band-alt {
    background: var(--color-bg);
}

/* Quotes stays inside the gray featured area; process/audience are now their
   own centered bands. */
.stories-quotes {
    margin-bottom: 60px;
}

.stories-audience {
    text-align: center;
}

/* Keep the intro copy narrow/centered, but let the CTA below use full width. */
.stories-audience > .container > h2,
.stories-audience > .container > p,
.stories-audience > .container > .audience-switcher-links {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Process: text on the left, "flere på vej" teaser on the right. */
.stories-process-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
    align-items: center;
}

@media (max-width: 860px) {
    .stories-process-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

.stories-quotes h2,
.stories-process h2,
.stories-audience h2 {
    font-size: 1.8rem;
    margin-bottom: 24px;
    color: var(--color-text-primary);
}

.stories-quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.stories-quote {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 28px;
    margin: 0;
    position: relative;
}

.stories-quote-body {
    margin-bottom: 20px;
}

/* When two quotes share one card, put a light divider between them. */
.stories-quote-body + .stories-quote-body {
    padding-top: 20px;
    border-top: 1px solid var(--color-border-light);
}

.stories-quote-body > i {
    color: var(--color-yellow);
    font-size: 1rem;
    opacity: 0.6;
    margin-right: 8px;
    float: left;
}

.stories-quote-body p {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--color-text-secondary);
    font-style: italic;
    margin: 0;
}

/* Author row reuses the shared .testimonial-* styles from styles.css so the
   design matches the front-page testimonial. Add a top divider for separation. */
.stories-quote .testimonial-author-row {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--color-border-light);
}

.stories-quote .testimonial-author-info span a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.stories-quote .testimonial-author-info span a:hover {
    color: var(--color-blue);
}

.stories-process-text h2 {
    text-align: left;
}

.stories-process p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin: 0;
}

.stories-teaser {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    text-align: left;
    /* White card so it stands out on the gray band (was gray-on-gray). */
    background: var(--color-white);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin: 0;
    box-shadow: var(--shadow-sm);
}

.stories-teaser > i {
    color: var(--color-blue);
    font-size: 1.6rem;
    margin-top: 4px;
}

.stories-teaser strong {
    display: block;
    margin-bottom: 6px;
    color: var(--color-text-primary);
}

.stories-teaser p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.stories-audience > .container > p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

/* Stories CTA Section */
.stories-cta-section {
    background: linear-gradient(135deg, var(--color-blue) 0%, #2f8f9d 100%);
    border-radius: var(--radius-lg);
    padding: 60px;
    margin-top: 56px;
    text-align: center;
    color: white;
}

.stories-cta-content h2 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: white;
}

.stories-cta-content p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: white;
}

.stories-cta-section .btn-primary {
    background: white;
    color: var(--color-link);
    padding: 16px 32px;
    font-size: 1.05rem;
}

.stories-cta-section .btn-primary:hover {
    background: var(--color-bg);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 900px) {
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .stories-hero h1 {
        font-size: 2.2rem;
    }
    
    .stories-cta-section {
        padding: 40px 24px;
    }
    
    .stories-cta-content h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 600px) {
    .stories-hero {
        padding: 120px 0 40px;
    }

    /* Center the hero heading + lead on phones; the structured point cards
       below keep their left-aligned icon/text layout. */
    .stories-hero .legal-breadcrumb {
        justify-content: center;
    }

    .stories-hero .section-label {
        display: flex;
        justify-content: center;
    }

    .stories-hero h1 {
        font-size: 1.8rem;
        text-align: center;
    }

    .stories-hero-content > .stories-hero-description {
        max-width: none;
    }

    .stories-hero-description {
        font-size: 1rem;
        text-align: center;
    }

    /* Center the story card content (logo above info) on phones. */
    .story-card-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }

    .story-card-meta {
        justify-content: center;
    }

    .story-card-logo {
        width: 56px;
        height: 56px;
    }

    .stories-cta-content h2 {
        font-size: 1.4rem;
    }

    .stories-cta-content p {
        font-size: 1rem;
    }

}

/* Links inside prose must not rely on color alone to be distinguishable
   (WCAG 1.4.1 / Lighthouse link-in-text-block). */
.stories-hero-point p a,
.stories-process-text p a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.stories-teaser p a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Hero breadcrumb centers with the rest of the (already centered) hero */
@media (max-width: 768px) {
    .stories-hero .legal-breadcrumb {
        justify-content: center;
    }
}

/* Stacked layouts (phones + tablet to 900): one centered rhythm across the
   page — hero, section titles, process copy — and the icon note-cards stack
   their icon on top instead of floating left of centered text. The audience
   band was previously left-aligned to match left siblings; now everything
   centers instead (site-wide convention). */
@media (max-width: 900px) {
    .stories-hero {
        text-align: center;
    }

    .stories-section-title,
    .stories-quotes h2,
    .stories-process h2 {
        text-align: center;
    }

    .stories-process-text {
        text-align: center;
    }

    .stories-teaser,
    .stories-highlights-note {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .stories-teaser i,
    .stories-highlights-note i {
        margin-top: 0;
    }

    /* Hero point cards: icon chip on top of centered text (the left-floating
       chip fought the centered hero) */
    .stories-hero-point {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* the list-check icons add nothing on the stacked layout (owner) */
    .stories-hero-point > .fa-list-check,
    .stories-highlights-note > .fa-list-check {
        display: none;
    }

    /* the description's 700px readable-measure box needs centering itself —
       inherited text-align centers the text inside a left-anchored box once
       the container is wider than 700px (720-900 band) */
    .stories-hero-content > .stories-hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    /* Divider above "Det siger foreningen", same pattern as the other pages'
       stacked-section dividers */
    .stories-quotes {
        border-top: 1px solid var(--color-border-light);
        padding-top: 32px;
    }
}

/* Quote cards: the author row inherits the hero-testimonial's centered mobile
   treatment from styles.css — left-align it like the rest of the card */
@media (max-width: 900px) {
    .stories-quote .testimonial-author-row {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
    }
}

/* The live TV example fills the column once the highlights split stacks
   (~500-900px) instead of freezing at the desktop 460px column cap */
@media (min-width: 500px) and (max-width: 900px) {
    .stories-highlights-tv .hero-tv-frame {
        max-width: none;
    }
}
