/* =============================================
   FAQ Block — taubenloft/faq
   Pixel-perfect from Figma desktop node 81:7539 (1920×1096)
   + mobile counterpart 81:7635 (440×1013, inside frame 81:7542)
   ─────────────────────────────────────────────
   Section bg:   #EAEBE6
   Padding:      96 top / 96 bottom (desktop) — inner content capped 1200
   Section gap:  64 (titles ↔ accordion ↔ video-titles ↔ carousel ↔ button)
   Eyebrow:      dot 20×20 #333A42 + text 16/21.824 w500 UPPER, gap 12
   Heading:      36/50.4 w500 #333A42
   Title gap:    32 (eyebrow ↔ heading)
   Accordion:    item gap 16; item border 1px #D5D7DA, radius 2, pad 32
                 question 20/27.28 w600; answer 16/24 w400; toggle 32×32 plus/minus
   Carousel:     poster aspect 1200/550, side arrows = 34px dark circle, play = 80px glass
   Button:       pill r50 bg #333A42, text #EAEBE6 16/24 w400 + ↗ arrow
   Mobile (440): padding 48/16, gap 48; eyebrow 14/19.096; heading 24/28.8
                 item pad 16(open)/24(closed); question 20/27.28 open, 16/22.4 closed
                 answer 14/19.6
   ============================================= */

.tl-faq {
    background: #eaebe6;
    color: #333a42;
    font-family: 'Nunito Sans', 'Nunito Sans Fallback', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    padding: 96px 24px;
}

/* Defensive */
.tl-faq img { max-width: 100%; height: auto; display: block; }
.tl-faq svg { max-width: 100%; }

.tl-faq__container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 64px;                       /* Figma section itemSpacing 64 */
}

/* ── Split variant: category title (LEFT) + accordion (RIGHT) ────────────
   Add the block class "tl-faq--split" to lay the faq heading beside the
   accordion — used for grouped FAQ sections (one group = one faq block). */
/* Standalone Video block reuses .tl-faq; trim top padding so it nests tightly
   under a section-intro header. */
.tl-video { padding-top: 24px; padding-bottom: 24px; }

.tl-faq--split { padding-top: 0; padding-bottom: 48px; }
.tl-faq--split .tl-faq__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 96px;
    align-items: start;
}
.tl-faq--split .tl-faq__titles { width: 100%; }
.tl-faq--split .tl-faq__list { width: 100%; margin: 0; }
@media (max-width: 1024px) {
    .tl-faq--split .tl-faq__container { gap: 56px; }
}
@media (max-width: 767px) {
    .tl-faq--split { padding-bottom: 32px; }
    .tl-faq--split .tl-faq__container { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Title group (eyebrow + heading) ─────────────── */
.tl-faq__titles {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;                       /* Figma title itemSpacing 32 */
}
.tl-faq__eyebrow {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 12px;                       /* Figma eyebrow itemSpacing 12 */
    font-size: 16px;
    line-height: 21.824px;           /* Figma lineHeightPx */
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;       /* Figma textCase UPPER */
    color: #333a42;
}
.tl-faq__dot {
    flex: 0 0 auto;
    width: 20px;                     /* Figma Ellipse 7 */
    height: 20px;
    border-radius: 50%;
    background: #333a42;
}
.tl-faq__heading {
    margin: 0;
    font-weight: 500;
    font-size: 36px;
    line-height: 50.4px;             /* Figma lineHeightPx */
    letter-spacing: 0;
    color: #333a42;
}

/* ── Accordion ───────────────────────────────────── */
.tl-faq__list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;                       /* Figma FAQ itemSpacing 16 */
}
.tl-faq__item {
    border: 1px solid #d5d7da;       /* Figma stroke #D5D7DA weight 1 */
    border-radius: 2px;              /* Figma cornerRadius 2 */
    background: transparent;
}
.tl-faq__q {
    width: 100%;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;                       /* Figma closed-item text↔arrow itemSpacing 48 */
    padding: 32px;                   /* Figma item padding 32 */
    text-align: left;
    color: #333a42;
    font-family: inherit;
}
.tl-faq__q-text {
    font-size: 20px;
    line-height: 27.28px;            /* Figma lineHeightPx 27.279… */
    font-weight: 600;                /* Figma NunitoSans-SemiBold */
    letter-spacing: 0;
    color: #333a42;
}
/* + / − icon — same as the problem block: 24×24 hit area, 14×1.5px lines,
   '+' via rotated ::after, animates to '−' on open (transition 0.25s). */
.tl-faq__toggle {
    position: relative;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
}
.tl-faq__toggle::before,
.tl-faq__toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 1.5px;
    background: #333a42;
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease;
    transform-origin: center;
}
.tl-faq__toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
}
.tl-faq__item--open .tl-faq__toggle::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.tl-faq__a {
    padding: 0 32px 32px;            /* aligns with question 32 padding; open item top gap = question itemSpacing 16 handled by question pad */
}
.tl-faq__a[hidden] { display: none; }
.tl-faq__a-text {
    margin: 0;
    font-size: 16px;
    line-height: 24px;               /* Figma lineHeightPx 24 */
    font-weight: 400;                /* Figma NunitoSans-Regular */
    letter-spacing: 0;
    color: #333a42;
}

/* ── Video carousel ──────────────────────────────── */
.tl-faq__carousel {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;                       /* Figma gallery variations itemSpacing 14 */
}
.tl-faq__viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1200 / 550;        /* Figma photo 1200×550 */
    border-radius: 8px;
    overflow: hidden;
}
.tl-faq__track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
}
.tl-faq__slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}
.tl-faq__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.91);        /* Figma exposure -0.09 */
}
/* Play button — Figma: white fill 10% + radius 50, 80×80, arrow #EAEBE6 */
.tl-faq__play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 0.5px solid rgba(234, 235, 230, 0.6);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #eaebe6;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}
.tl-faq__play svg { width: 24px; height: 24px; margin-left: 4px; }
.tl-faq__play:hover,
.tl-faq__play:focus { transform: translate(-50%, -50%) scale(1.06); }

/* Side nav arrows — dark circle 34px, white chevron */
.tl-faq__nav {
    width: 34px;
    height: 34px;
    border-radius: 50%;              /* Figma r 17 → 34px circle */
    border: 0;
    background: #333a42;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, transform 0.2s;
}
.tl-faq__nav:hover,
.tl-faq__nav:focus { opacity: 0.85; }
.tl-faq__nav svg { width: 11px; height: 11px; display: block; }

/* Overlay side arrows sit inside the viewport, centered vertically */
.tl-faq__viewport > .tl-faq__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}
.tl-faq__viewport > .tl-faq__nav--prev { left: 8px; }
.tl-faq__viewport > .tl-faq__nav--next { right: 8px; }
.tl-faq__viewport > .tl-faq__nav:hover,
.tl-faq__viewport > .tl-faq__nav:focus { transform: translateY(-50%); opacity: 0.85; }

/* Arrow row beneath the poster — Figma arrows itemSpacing 16 */
.tl-faq__arrows {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* ── Button (pill CTA) ───────────────────────────── */
.tl-faq__button {
    display: inline-flex;
    align-items: center;
    gap: 10px;                       /* Figma button itemSpacing 10 */
    padding: 10px 20px;              /* Figma button padding 10/20 */
    border-radius: 50px;             /* Figma cornerRadius 50 → pill */
    background: #333a42;             /* Figma fill */
    color: #eaebe6;                  /* Figma text fill */
    font-size: 16px;
    line-height: 24px;               /* Figma lineHeightPx 24 */
    font-weight: 400;
    text-decoration: none;
    transition: opacity 0.2s;
}
.tl-faq__button:hover,
.tl-faq__button:focus { opacity: 0.88; color: #eaebe6; text-decoration: none; }
.tl-faq__button svg {
    width: 24px; height: 24px;
    color: #ffffff;
    transition: transform 0.25s ease-out;
}
.tl-faq__button:hover svg,
.tl-faq__button:focus svg { transform: translate(2px, 2px); }   /* ↘ nudge */

/* ── Video modal (popup) ─────────────────────────── */
.tl-faq__modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.tl-faq__modal[aria-hidden="false"] { display: flex; opacity: 1; }
.tl-faq__modal-close {
    position: absolute;
    top: 16px; right: 24px;
    width: 40px; height: 40px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.15s;
}
.tl-faq__modal-close:hover,
.tl-faq__modal-close:focus { opacity: 0.7; }
.tl-faq__modal-frame {
    width: 100%;
    max-width: 1280px;
    aspect-ratio: 16 / 9;
    position: relative;
    background: #000;
}
.tl-faq__modal-frame iframe,
.tl-faq__modal-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
body.tl-faq-modal-open { overflow: hidden; }

/* ── Laptop ≤1440 ─────────────────────────────────── */
@media (max-width: 1440px) {
    .tl-faq { padding: 80px 32px; }
}

/* ── ≤1280 ───────────────────────────────────────── */
@media (max-width: 1280px) {
    .tl-faq__container { gap: 56px; }
}

/* ── Tablet ≤1024 ─────────────────────────────────── */
@media (max-width: 1024px) {
    .tl-faq { padding: 64px 32px; }
    .tl-faq__container { gap: 48px; }
    .tl-faq__heading { font-size: 30px; line-height: 38px; }
    .tl-faq__q { padding: 28px; }
}

/* ── Mobile ≤767 — Figma node 81:7635 (440×1013) ───
   padding 48/16, section gap 48; eyebrow 14/19.096; heading 24/28.8
   accordion: open item pad 16, closed item pad 24; toggle 36→ keep 32
   question open 20/27.28, closed 16/22.4; answer 14/19.6
*/
@media (max-width: 767px) {
    .tl-faq { padding: 48px 16px; }
    .tl-faq__container { gap: 48px; }            /* RESET desktop 64 */

    .tl-faq__titles { gap: 32px; }
    .tl-faq__eyebrow {
        font-size: 14px;
        line-height: 19.096px;                   /* RESET desktop 16/21.824 */
        gap: 12px;
    }
    .tl-faq__heading {
        font-size: 24px;
        line-height: 28.8px;                     /* RESET desktop 36/50.4 */
    }

    .tl-faq__q { padding: 24px; gap: 24px; }     /* RESET desktop 32 pad / 48 gap (closed items) */
    .tl-faq__q-text {
        font-size: 16px;
        line-height: 22.4px;                     /* RESET desktop 20/27.28 — closed items shrink on mobile */
    }
    /* Open item: Figma pads 16 and keeps question at 20/27.28 */
    .tl-faq__item--open .tl-faq__q { padding: 16px; }
    .tl-faq__item--open .tl-faq__q-text { font-size: 20px; line-height: 27.28px; }
    .tl-faq__a { padding: 0 16px 16px; }         /* RESET desktop 0 32 32 */
    .tl-faq__a-text {
        font-size: 14px;
        line-height: 19.6px;                     /* RESET desktop 16/24 */
    }

    .tl-faq__play { width: 56px; height: 56px; }
    .tl-faq__play svg { width: 18px; height: 18px; }
    .tl-faq__button { width: 100%; justify-content: center; }
}

/* ── Narrow ≤480 ─────────────────────────────────── */
@media (max-width: 480px) {
    .tl-faq__viewport > .tl-faq__nav { display: none; }   /* keep only the arrow row below the poster */
    .tl-faq__play { width: 48px; height: 48px; }
}
