/* =====================================================
   Integration Landing Pages
   /integrationer/ + de 8 medlemssystem-undersider
   Genbruger styles.css-klasser - dette er kun det
   sidespecifikke lag (hero, logokort, kortgrid m.m.)
   ===================================================== */

/* Hero - samme baggrund som forsidens hero */
.integration-hero {
    padding: 180px 0 70px;
    background: url('../img/bg.webp') center center / cover no-repeat;
    border-bottom: 1px solid var(--color-border-light);
    position: relative;
    overflow: hidden;
}

.integration-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--color-blue-light) 0%, transparent 70%);
    pointer-events: none;
}

/* Wide hero like the front page (1400px); content above the glow */
.integration-hero .container {
    max-width: var(--container-wide);
    position: relative;
    z-index: 1;
}

.integration-hero .legal-breadcrumb {
    margin-bottom: 36px;
}

.integration-hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.integration-hero-text {
    flex: 1 1 0;
    min-width: 0;
}

/* Live TV-preview i hero (samme demo-slideshow som forsiden) */
.integration-hero-visual {
    position: relative;
    flex: 0 0 48%;
    min-width: 0;
}

/* Systemlogo som badge, der overlapper TV'ets hjørne - øverst til VENSTRE,
   så det ikke dækker slideshowets fuldskærmsknap i højre side.
   Eksplicit width/height: flere af logo-SVG'erne har kun viewBox (ingen
   width/height-attributter), og med max-* alene kollapser de til 0 bredde */
.integration-hero-badge {
    position: absolute;
    top: -22px;
    left: -10px;
    z-index: 5;
    width: 150px;
    height: 62px;
    padding: 10px 18px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.integration-hero-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.integration-hero-text h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 16px;
}

.integration-hero-lead {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    max-width: 720px;
    margin-bottom: 0;
}

.integration-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 28px;
}

/* Brødtekst-sektioner */
.integration-prose {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.integration-prose p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.integration-prose p:last-child {
    margin-bottom: 0;
}

/* Two-column variant of the "Godt at vide" block: intro prose on the left,
   the data-field table on the right, stacked again on smaller screens. */
.integration-prose-split {
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    align-items: start;
    text-align: left;
}

/* Grid items default to min-width:auto, so the data table's min-width:560px
   would force the column (and the page) wider than the viewport instead of
   scrolling inside its own wrapper. Let both columns shrink below content. */
.integration-prose-split .integration-prose-text,
.integration-prose-split .integration-prose-aside {
    min-width: 0;
}

.integration-prose-split .integration-prose-aside h3 {
    margin: 0 0 16px;
    font-size: 1.15rem;
}

.integration-prose-split .legal-table-wrapper {
    margin: 0;
    max-width: 100%;
    /* these narrow 2-col tables never need horizontal scroll — legal.css's
       560px table min-width was forcing a pointless scrollbar + edge fade
       whenever the split column is narrower (tablet AND the 2-col desktop) */
    overflow-x: visible;
}

.integration-prose-split .legal-table-wrapper::after,
.integration-prose-split .legal-table-wrapper::before {
    display: none;
}

.integration-prose-split .legal-table-wrapper {
    -webkit-mask-image: none;
            mask-image: none;
}

.integration-prose-split .legal-table {
    min-width: 0;
    width: 100%;
}

.integration-prose-split .legal-table td,
.integration-prose-split .legal-table th {
    white-space: normal;
    overflow-wrap: break-word;
}

@media (max-width: 900px) {
    .integration-prose-split {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* Decision-aid under the logo grid on the integrations hub: the Q&A sits on a
   card (same look as the integration cards above it), and the two follow-up
   pointers become highlight strips a la .legal-highlight. */
.integration-decision {
    margin-top: 48px;
}

.integration-decision a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.integration-decision-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 32px 36px;
}

.integration-decision-card h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    margin: 0 0 14px;
}

.integration-decision-card h3 i {
    color: var(--color-blue);
}

.integration-decision-card p {
    margin: 0;
    line-height: 1.7;
}

.integration-decision-pointers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.integration-decision-pointer {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--color-blue-light);
    border-left: 4px solid var(--color-blue);
    border-radius: var(--radius-md);
    padding: 18px 20px;
}

.integration-decision-pointer i {
    color: var(--color-blue);
    font-size: 1.1rem;
    margin-top: 3px;
}

.integration-decision-pointer p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
}

@media (max-width: 600px) {
    .integration-decision-pointers {
        grid-template-columns: 1fr;
    }

    .integration-decision-card {
        padding: 24px;
    }
}

/* "…kun én af 15+ slides" note under the automatic-content feature grid. */
.integration-more-note {
    text-align: center;
    margin: 40px auto 0;
    max-width: 720px;
    font-size: 1.05rem;
    color: var(--color-text-secondary);
}

/* Founder card under the intro prose - same width as the text column */
.integration-prose + .founder-card {
    max-width: 800px;
    margin: 36px auto 0;
}

/* 2x2-variant af features-grid til de fire integrationskort */
.features-grid.integration-features {
    grid-template-columns: repeat(2, 1fr);
    max-width: 860px;
    margin: 0 auto;
}

/* "Mere end holdkalender"-tjekliste: each item is a small card with a circular
   check badge, so the list of extra slides reads as a tidy set of feature cards
   rather than a plain bulleted list. */
.integration-checklist {
    list-style: none;
    padding: 0;
    max-width: 860px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.integration-checklist li {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.integration-checklist li:hover {
    border-color: var(--color-blue);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.integration-checklist li i {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(76, 175, 80, 0.12);
    color: var(--color-green);
    font-size: 0.7rem;
}

.integration-checklist li a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--color-border);
    text-underline-offset: 2px;
    transition: text-decoration-color var(--transition-fast);
}

.integration-checklist li a:hover {
    text-decoration-color: var(--color-blue);
}

/* Relaterede sider (pill-links) */
.integration-related {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

.integration-related a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.integration-related a:hover {
    border-color: var(--color-blue);
    color: var(--color-blue-dark);
    box-shadow: var(--shadow-sm);
}

/* Closing CTA: demo pitch on the left, supporting notes as cards on the right. */
.integration-cta-split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    max-width: 1040px;
    margin: 0 auto;
}

.integration-cta-main .section-label {
    margin-bottom: 12px;
}

.integration-cta-main h2 {
    margin: 0 0 16px;
}

.integration-cta-main p {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin: 0 0 24px;
}

.integration-cta-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.integration-aside-card {
    padding: 20px 24px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-blue);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.integration-aside-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: var(--color-text-primary);
}

.integration-aside-card h3 i {
    color: var(--color-blue);
    font-size: 0.95em;
}

.integration-aside-card p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Small legal/attribution line, sitting in the aside column directly under the
   "Bruger I et andet system?" card. */
.integration-cta-disclaimer {
    margin: 14px 2px 0;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--color-text-muted);
}

/* "Trin for trin": intro copy on the left, the centered step timeline on the
   right. */
.integration-timeline-split {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 56px;
    align-items: center;
    max-width: 1040px;
    margin: 0 auto;
}

.integration-timeline-intro .section-label {
    margin-bottom: 12px;
}

.integration-timeline-intro h2 {
    margin: 0 0 16px;
}

.integration-timeline-intro p {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin: 0 0 16px;
}

.integration-timeline-intro p:last-child {
    margin-bottom: 0;
}

/* The centered step timeline. Distinct from the card-grid used in the "Sådan
   kommer I i gang" section on the same page. Each step is centered under a
   marker, with a short connecting line between steps. */
.integration-timeline {
    list-style: none;
    max-width: 460px;
    margin: 0 auto;
    padding: 0;
    counter-reset: integration-step;
}

.integration-timeline-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 40px;
}

.integration-timeline-step:last-child {
    padding-bottom: 0;
}

/* Short connecting line in the gap below each step's text, leading to the next
   marker – so the steps read as one sequence without a line crossing the text. */
.integration-timeline-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 12px;
    height: 16px;
    width: 2px;
    background: var(--color-border);
}

.integration-timeline-marker {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-blue-light, rgba(59, 180, 196, 0.12));
    color: var(--color-blue);
    font-size: 1.2rem;
}

/* Step number badge on the marker. */
.integration-timeline-marker::after {
    counter-increment: integration-step;
    content: counter(integration-step);
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-blue);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--color-white);
}

.integration-timeline-body {
    padding-top: 16px;
    max-width: 460px;
}

.integration-timeline-body h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
}

.integration-timeline-body p {
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* "Mere end holdkalender": screenshot on the left, the extra slides as a stack
   of feature cards on the right. */
.integration-more-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: stretch;
    max-width: 1040px;
    margin: 0 auto;
}

/* Right column fills the cell height and pushes its cards to the bottom, so the
   card stack aligns with the bottom of the taller image column. */
.integration-more-list {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.integration-more-visual .audience-screenshot {
    margin: 0;
    max-width: none;
}

/* "Se alle funktioner" button sits under the note in the left column – tighter
   top spacing and left-aligned to the column rather than centered. */
.integration-more-visual .section-cta {
    margin-top: 32px;
}

/* Full-width "Se alle funktioner" button under the note in this section. */
.integration-more-visual .section-cta .btn {
    display: flex;
    width: 100%;
    justify-content: center;
}

/* Cards run in a single column in the right half of the split. */
.integration-more-list .integration-checklist {
    max-width: none;
    margin: 0;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (max-width: 640px) {
    .integration-more-list .integration-checklist,
    .integration-checklist {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .integration-cta-split,
    .integration-more-split,
    .integration-timeline-split {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Centre the intro copy when it stacks above the timeline on mobile. */
    .integration-timeline-intro {
        text-align: center;
    }
}

/* Hub: grid med de 8 systemkort */
.integration-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: stretch;
}

.integration-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px 24px 28px;
    height: 100%;
    transition: all var(--transition-fast);
}

.integration-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-blue);
}

.integration-card-logo {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.integration-card-logo img {
    width: 160px;
    height: 60px;
    object-fit: contain;
}

.integration-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--color-text-primary);
}

.integration-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    flex-grow: 1;
}

.integration-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-blue);
}

.integration-card:hover .integration-card-link {
    color: var(--color-blue-dark);
}

/* Responsivt - matcher styles.css' breakpoints */
@media (max-width: 1024px) {
    .integration-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Stacked hero (phones + the 769-900 tablet band): centered single column in
   the front-page order — label → headline → lead → live TV → CTA. Only the
   TEXT column flattens; the visual stays one box because the vendor badge is
   absolutely anchored to it (display:contents would break its positioning),
   so the testimonial rides with the TV. */
@media (max-width: 900px) {
    .integration-hero .legal-breadcrumb {
        justify-content: center;
    }

    .integration-hero-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .integration-hero-text {
        display: contents;
    }

    .integration-hero-text > * {
        order: 9;
    }

    .integration-hero-text .section-label {
        order: 1;
        align-self: center;
    }

    .integration-hero-text h1 {
        order: 2;
        text-align: center;
    }

    .integration-hero-lead {
        order: 3;
        text-align: center;
        /* base sets margin-bottom:0 and the flattened column has gap:0 — the
           TV below needs this gap */
        margin: 0 auto 24px;
    }

    .integration-hero-visual {
        order: 4;
        width: 100%;
        max-width: 720px;
        flex: none;
        align-self: center;
        margin-bottom: 8px;
    }

    /* CTA row mirrors the TV width above it, two equal halves */
    .integration-hero-cta {
        order: 5;
        justify-content: center;
        width: 100%;
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }

    .integration-hero-cta .btn {
        flex: 1 1 0;
        min-width: 0;
    }

    /* Stacked: the badge becomes its own full-width strip ABOVE the TV
       instead of overlapping the screen */
    .integration-hero-badge {
        position: static;
        transform: none;
        width: 100%;
        height: 56px;
        margin-bottom: 14px;
    }
}

@media (max-width: 768px) {
    .integration-hero {
        padding: 125px 0 50px;
    }

    .integration-checklist {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Keep the four feature cards 2-up on tablet (768px has room); only collapse to
   a single column on phones so the cards don't stretch to full width. */
@media (max-width: 600px) {
    .features-grid.integration-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .integration-grid {
        grid-template-columns: 1fr;
    }

    .integration-hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .integration-hero-cta .btn {
        justify-content: center;
        text-align: center;
    }
}

/* On phones the related-page pills otherwise wrap to centred rows of mostly one
   pill each with ragged left/right edges. Stack them full-width with centered
   labels — same treatment as the audience-switcher pills. */
@media (max-width: 600px) {
    .integration-related a {
        width: 100%;
        justify-content: center;
    }
}

.audience-screenshot { max-width: 720px; margin: 32px auto 0; }
.audience-screenshot img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,0.12); display: block; }
.audience-screenshot figcaption { text-align: center; font-size: 0.9rem; color: var(--color-text-muted); margin-top: 12px; }

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

/* "Bag om integrationen": prose on the left, a unique slide-screenshot with an
   onboarding-testimonial from the founder underneath on the right. */
.integration-underhood-split {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
    text-align: left;
}

.integration-underhood-split .integration-prose {
    max-width: none;
    margin: 0;
    text-align: left;
}

/* Each paragraph is a sub-topic: icon chip + micro-heading, thin dividers in
   between. Breaks the wall of text without touching the SEO copy. */
.integration-underhood-point + .integration-underhood-point {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.integration-underhood-point h3 {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0 0 10px;
    font-size: 1.02rem;
}

.integration-underhood-point h3 i {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-blue-light);
    color: var(--color-blue);
    font-size: 0.78rem;
}

.integration-underhood-point p {
    margin: 0;
}

.integration-underhood-aside .audience-screenshot {
    margin: 0;
    max-width: none;
}

.integration-underhood-aside .founder-card {
    margin: 28px 0 0;
}

/* Second showcase stacked between the first figure and the testimonial. */
.integration-underhood-aside .audience-screenshot + .audience-screenshot {
    margin-top: 28px;
}

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

/* Long "Godt at vide" sections: the intro stays as prose, the remaining points
   become a scannable two-column card grid, and the closing link-paragraph gets
   a "read next" callout. All copy is kept verbatim – only the wrapping changes. */
.integration-facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 40px auto 0;
    text-align: left;
}

.integration-fact {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 24px 26px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.integration-fact:hover {
    border-color: var(--color-yellow);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

/* An odd trailing card spans the full row, so the grid never ends ragged. */
.integration-facts .integration-fact:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.integration-fact-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* Section color identity: "Bag om integrationen" is blue, "Godt at vide" is
   yellow, the green check-badges stay on "kun én af 15+ slides" – so the three
   long sections on a page don't repeat the same accent. */
.integration-fact-head i {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-yellow-light);
    color: var(--color-yellow);
    font-size: 0.85rem;
}

.integration-fact-head h3 {
    margin: 0;
    font-size: 1.02rem;
}

.integration-fact p {
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.65;
    font-size: 0.95rem;
}

.integration-readnext {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 1100px;
    margin: 20px auto 0;
    padding: 18px 22px;
    background: rgba(33, 150, 243, 0.06);
    border: 1px solid rgba(33, 150, 243, 0.25);
    border-radius: var(--radius-md);
    text-align: left;
}

.integration-readnext i {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--color-blue);
}

.integration-readnext p {
    margin: 0;
    color: var(--color-text-secondary);
    line-height: 1.65;
    font-size: 0.95rem;
}

.integration-readnext p a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Keep the fact cards 2-up on tablet width; only stack to one column on phones,
   where two columns would be too narrow to read. */
@media (max-width: 640px) {
    .integration-facts {
        grid-template-columns: 1fr;
    }
}

/* Stacked layouts: standalone screenshot figures follow the container width
   (same convention as the audience pages; split-column contexts already
   release the cap themselves) */
@media (max-width: 900px) {
    .audience-screenshot {
        max-width: none;
    }
}

/* Same fix as the front page: hide the CTA rocket icon in the narrow 50/50
   band so the label stays on one line */
@media (max-width: 600px) {
    .integration-hero-cta .btn .fa-rocket {
        display: none;
    }
}

@media (min-width: 481px) and (max-width: 600px) {
    .integration-hero-cta .btn {
        padding-left: 14px;
        padding-right: 14px;
        white-space: nowrap;
    }
}

/* Screenshot figures inside alt sections: on stacked layouts the full 16:9
   frame towers over the copy — crop to a shorter 2:1 band, centered */
@media (max-width: 900px) {
    .section-alt .audience-screenshot img {
        aspect-ratio: 2 / 1;
        object-fit: cover;
        object-position: center;
    }
}

/* Same as the audience hero: graduated headline cap while the two-column
   text column is narrow (901-1200px); hyphenation only in the stacked range
   where it can only fire on ~320px phones */
@media (min-width: 901px) and (max-width: 1200px) {
    .integration-hero-text h1 {
        font-size: clamp(2rem, 3.3vw, 2.8rem);
    }
}

@media (max-width: 340px) {
    .integration-hero-text h1 {
        font-size: 1.85rem;
    }
}

/* Demo-CTA section: centered content when stacked, like the other landing
   CTAs (heading, copy, button and the small disclaimer) */
@media (max-width: 768px) {
    .integration-cta-main {
        text-align: center;
    }

    .integration-cta-main .btn {
        margin-left: auto;
        margin-right: auto;
    }

    .integration-cta-disclaimer {
        text-align: center;
    }
}

/* Stacked prose sections read centered like the rest of the page; tables and
   lists inside keep left alignment (centered cells/bullets are unreadable) */
@media (max-width: 900px) {
    /* the underhood-split variant sets text-align:left with two classes and
       would outrank the plain selector */
    .integration-prose,
    .integration-underhood-split .integration-prose {
        text-align: center;
    }

    /* flex-row micro-headings (icon chip + text) ignore text-align */
    .integration-underhood-point h3 {
        justify-content: center;
    }

    .integration-prose .legal-table-wrapper,
    .integration-prose table,
    .integration-prose ul,
    .integration-prose ol {
        text-align: left;
    }
}

/* Stacked underhood aside: the founder quote leads, the two screenshots
   follow (DOM keeps screenshots first for the desktop column; margins on the
   reordered items provide the 28px rhythm) */
@media (max-width: 900px) {
    .integration-underhood-aside {
        display: flex;
        flex-direction: column;
    }

    .integration-underhood-aside > * {
        order: 4;
    }

    .integration-underhood-aside > .founder-card {
        order: 1;
        margin: 0;
    }

    .integration-underhood-aside > .audience-screenshot {
        order: 2;
        margin-top: 28px;
    }

    .integration-underhood-aside > .audience-screenshot + .audience-screenshot {
        order: 3;
    }
}

/* Fact cards read centered on stacked layouts like the surrounding sections */
@media (max-width: 900px) {
    .integration-fact {
        text-align: center;
    }

    /* the heading row is the flex container (icon chip + h3) */
    .integration-fact-head {
        justify-content: center;
    }
}

/* The 2-column data tables (Felt | beskrivelse) shouldn't scroll on phones —
   fixed layout with a narrow label column makes the prose column wrap inside
   the viewport instead of clipping mid-word behind a scroll edge */
@media (max-width: 580px) {
    .integration-prose-split .legal-table {
        table-layout: fixed;
    }

    .integration-prose-split .legal-table th:first-child,
    .integration-prose-split .legal-table td:first-child {
        width: 96px;
        overflow-wrap: break-word;
    }
}
