/* =========================================
   ADVANTAGES & SEO & FAQ (page-specific: home page)
   ========================================= */
/* Class names are "perk-*", never "adv-*": ad blockers (EasyList, used by
   AdBlock / AdGuard / uBlock, incl. Safari content blockers) hide any
   ".adv-text" as an advert, which is why the headings kept vanishing while
   the icons stayed. Don't rename these back to anything ad-like. */
.perks-row {
    display: flex; justify-content: space-between; padding: 60px 0;
    border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light);
}
.perk-item { display: flex; align-items: center; gap: 20px; min-width: 200px; }
/* desktop: four equal columns with real gaps, so a long description wraps under its own
   heading instead of running into the next item's icon */
@media (min-width: 993px) {
    .perks-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 56px; }
    .perk-item { min-width: 0; }
}
.perk-icon { font-size: 32px; color: var(--accent-gold); flex-shrink: 0; }
.perk-text h4 { font-size: 14px; text-transform: uppercase; margin-bottom: 8px; color: var(--text-main); font-weight: 700; letter-spacing: 0.5px; }
.perk-text p { font-size: 12px; line-height: 1.55; color: var(--text-secondary); margin: 0; font-weight: 300; }

.seo-content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; padding-top: 40px; border-top: 1px solid var(--border-light); margin-top: 40px; }
/* Moved from an inline style so the aspect ratio reserves the video's
   space before it (lazily, see initLazyVideo() in js/app.js) loads. */
.seo-video-col { min-width: 0; }
.seo-video { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 16px; opacity: 0.8; background: var(--bg-card); object-fit: cover; }
.seo-text-col p { margin-bottom: 25px; color: var(--text-secondary); font-size: 15px; line-height: 1.8; font-weight: 300; }
/* Compound selector (not just .seo-highlight) — the highlight <p> is
   also matched by ".seo-text-col p" above, which has higher specificity
   (class+element beats a single class) and was silently winning
   regardless of source order, so the "highlight" paragraph was
   rendering as plain 15px gray body text like every other paragraph. */
.seo-text-col p.seo-highlight { color: var(--navy); font-size: 20px; line-height: 1.5; font-weight: 500; margin-bottom: 30px; letter-spacing: 0.5px; }

.faq-wrapper { display: flex; gap: 30px; align-items: flex-start; width: 100%; }
.faq-col { flex: 1; display: flex; flex-direction: column; }
/* Flat accordion rows — same visual language as the mobile footer accordion
   (.footer-accordion-header in css/footer.css): bold uppercase title, plus
   icon at the right, a single hairline divider below, no per-item "pill"
   box/border/rounded-corner background. The .active toggle logic itself is
   unchanged (still js/components/faq.js) — only the presentation changed. */
.faq-item { border-bottom: 1px solid var(--border-light); background: transparent; }
.faq-item:last-child { border-bottom: none; }
.faq-question {
    font-size: 15px; color: var(--text-main); width: 100%; text-align: left; display: flex;
    justify-content: space-between; align-items: center; gap: 20px; font-weight: 500;
    letter-spacing: 1px; padding: 20px 6px; background: transparent; cursor: pointer;
    text-transform: uppercase; box-sizing: border-box;
}
/* min-width:0 overrides the flex default of "never shrink below your own
   content's natural width" — without it, a long question (see "Який
   китайський чай підійде новачку?" in the screenshot) refuses to wrap
   early enough, eating into the icon's space and visibly dragging the +
   left of where every other row's + sits. This lets the text wrap freely
   instead, so .faq-icon (flex-shrink:0 below) stays pinned at the exact
   same right-edge position on every row regardless of question length. */
.faq-question span { flex: 1; min-width: 0; }
.faq-item.active .faq-question { color: var(--accent-gold); }
.faq-icon { font-size: 14px; color: var(--text-secondary); transition: 0.3s; flex-shrink: 0; }
.faq-item.active .faq-icon { transform: rotate(45deg); color: var(--accent-gold); }
/* Height is animated by js/components/faq.js (measured, so it unfolds at
   one even speed instead of racing through a max-height guess); the
   spacer below keeps the bottom gap inside that height. */
.faq-answer { height: 0; overflow: hidden; color: var(--text-secondary); font-size: 14px; line-height: 1.8; opacity: 0; transition: height 0.32s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s ease-out; }
.faq-answer::after { content: ''; display: block; height: 20px; }
.faq-item.active .faq-answer { opacity: 1; }
.faq-answer ul { list-style: none; padding-left: 0; margin-top: 10px; }
.faq-answer li { position: relative; padding-left: 15px; margin-bottom: 5px; }
.faq-answer li::before { content: '•'; position: absolute; left: 0; color: var(--accent-gold); }

/* =========================================
   TEA FEATURE BLOCK (home page, below FAQ)
   Three-column: big title | body copy | circular photo + caption —
   matches the reference layout the user provided (title-left, text-
   middle, round image-right with an italic caption under it).
   ========================================= */
.tea-feature { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 50px; align-items: start; }
.tf-title h2 {
    font-size: var(--block-title-size); font-weight: 600; line-height: 1.25; color: var(--text-main);
    text-transform: uppercase; letter-spacing: var(--block-title-ls);
}
.tf-text { color: var(--text-secondary); font-size: 15px; line-height: 1.8; font-weight: 300; }
.tf-text p { margin-bottom: 20px; }
.tf-text p:last-child { margin-bottom: 0; }
.tf-photo { display: flex; flex-direction: column; align-items: center; text-align: center; }
.tf-photo-circle {
    width: 100%; max-width: 240px; aspect-ratio: 1 / 1; border-radius: 50%;
    overflow: hidden; border: 1px solid var(--border-light);
}
.tf-photo-circle img { width: 100%; height: 100%; object-fit: cover; }
.tf-caption { margin-top: 18px; font-size: 13px; font-style: italic; color: var(--text-secondary); line-height: 1.6; max-width: 220px; }

@media (max-width: 992px) {
    .tea-feature { grid-template-columns: 1fr; gap: 30px; }
    .tf-photo { flex-direction: row; gap: 20px; text-align: left; }
    .tf-photo-circle { max-width: 130px; flex-shrink: 0; }
    .tf-caption { margin-top: 0; max-width: none; }
}

@media (max-width: 600px) {
    .tf-title { text-align: center; }
    /* Desktop deliberately stacks the title across 3 lines (one word
       each) via <br class="tf-break"> — on mobile that reads as three
       disjointed centered fragments instead of a single heading, so the
       breaks are hidden here. The space placed right before each <br> in
       the markup stays either way, so hiding the tags just lets the
       title flow/wrap normally instead of forcing those 3 lines. */
    .tf-break { display: none; }
    .tf-photo { flex-direction: column; text-align: center; }
    .tf-photo-circle { max-width: 180px; }
    .tf-caption { margin-top: 14px; max-width: 220px; }

    /* FAQ accordion rows a touch more compact on mobile — smaller text,
       tighter row padding and icon, than the desktop/tablet default
       (.faq-question etc. earlier in this file). */
    .faq-question { font-size: 13.5px; padding: 16px 6px; letter-spacing: 0.5px; }
    .faq-icon { font-size: 12px; }
    .faq-answer { font-size: 13px; }
    .faq-answer::after { height: 16px; }
}


/* =========================================
   SEO TEXT BLOCKS (home page): «Магазин…», «Традиції…», «Питання…»
   Full container width like the rest of the home page (same layout as
   the chapters on «Про нас»): heading on the left edge of the grid, text
   on the right, a hairline between blocks. No media, no effects.
   ========================================= */
.seo-block { display: grid; grid-template-columns: 4fr 8fr; column-gap: 64px; align-items: start; padding-bottom: 72px; }
.seo-block + .seo-block { padding-top: 32px; border-top: 1px solid var(--border-light); }
.seo-block .section-header { text-align: left; margin: 0; }
.seo-block .section-title { margin: 0; line-height: 1.3; }
.seo-col { min-width: 0; }
.seo-col > p { max-width: none; color: var(--text-secondary); font-size: 16px; line-height: 1.85; font-weight: 400; }
.seo-col > p + p { margin-top: 18px; }
.seo-col > p.seo-lead { color: var(--text-main); font-size: 19px; line-height: 1.6; font-weight: 400; margin-bottom: 26px; }

/* FAQ as one calm list: sentence case, hairlines between questions */
.seo-faq .faq-wrapper { display: block; }
.seo-faq .faq-col { display: contents; }
.seo-faq .faq-item { border-bottom: 1px solid var(--border-light); }
.seo-faq .faq-item:last-child { border-bottom: 1px solid var(--border-light); }
.seo-faq .faq-col + .faq-col .faq-item:last-child { border-bottom: 0; }
.seo-faq .faq-question { text-transform: none; letter-spacing: 0; font-size: 16px; font-weight: 500; padding: 18px 2px; }
.seo-faq .faq-col:first-child .faq-item:first-child .faq-question { padding-top: 4px; }
.seo-faq .faq-answer { font-size: 15px; padding: 0 2px; }
@media (max-width: 900px) {
    .seo-block { grid-template-columns: 1fr; row-gap: 20px; padding-bottom: 48px; }
    .seo-block .section-header { position: static; }
    .seo-col > p { font-size: 15px; }
    .seo-col > p.seo-lead { font-size: 16px; margin-bottom: 18px; }
}

/* «Магазин…» — the one block with a surface: text + a real product photo
   in a card, same surface as the category tiles and product cards. */
.seo-block--card { display: block; }
.seo-card {
    display: grid; grid-template-columns: 7fr 5fr; align-items: stretch;
    background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 4px; overflow: hidden;
}
.seo-card-text { padding: 48px 56px; }
.seo-card-text .section-title { margin: 0 0 24px; line-height: 1.3; }
.seo-card-text > p { max-width: 62ch; color: var(--text-secondary); font-size: 16px; line-height: 1.85; font-weight: 400; }
.seo-card-text > p + p { margin-top: 16px; }
.seo-card-text > p.seo-lead { color: var(--text-main); font-size: 19px; line-height: 1.6; font-weight: 400; margin-bottom: 22px; }
.seo-link { display: inline-block; margin-top: 28px; color: var(--accent-gold); font-size: 13px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }
@media (hover: hover) { .seo-link:hover { color: var(--accent-hover); } }
.seo-card-photo { margin: 0; min-height: 100%; }
.seo-card-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.seo-card-photo--empty { display: grid; place-items: center; min-height: 420px; background: var(--bg-soft); border-left: 1px solid var(--border-light); color: var(--text-muted); font-size: 12px; text-align: center; padding: 24px; }

@media (max-width: 1024px) {
    .seo-card { grid-template-columns: 1fr; }
    .seo-card-photo { order: -1; max-height: 340px; overflow: hidden; }
    .seo-card-text { padding: 28px 22px 32px; }
}
@media (max-width: 600px) {
    .seo-card-text > p { font-size: 15px; }
    .seo-card-text > p.seo-lead { font-size: 16px; }
}

/* Card with a generated photo as its whole background (text on the dark
   left side of the picture, the subject on the right). The picture is
   swappable: only the files in <picture class="seo-card-bg"> change. */
.seo-card--photo { position: relative; display: block; background: var(--bg-soft); isolation: isolate; }
.seo-card--photo .seo-card-bg { position: absolute; inset: 0; z-index: -1; }
.seo-card--photo .seo-card-bg img { width: 100%; height: 100%; object-fit: cover; object-position: right center; display: block; }
/* keep the text side light (dark text) whatever the picture does */
.seo-card--photo::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.85) 38%, rgba(255,255,255,0) 62%); }
.seo-card--photo .seo-card-text { max-width: 640px; padding: 64px 0 64px 64px; }
@media (max-width: 1024px) {
    .seo-card--photo { display: flex; flex-direction: column; }
    .seo-card--photo .seo-card-bg { order: -1; position: relative; inset: auto; display: block; aspect-ratio: 4 / 3; max-height: 360px; overflow: hidden; }
    .seo-card--photo::before { background: linear-gradient(0deg, #fff 0%, rgba(255,255,255,0) 20%); bottom: auto; height: min(75vw, 360px); }
    .seo-card--photo .seo-card-text { max-width: none; padding: 8px 22px 32px; }
}
/* the last text block closes with the same hairline it opened with, so
   «Відгуки клієнтів» doesn't float straight out of the FAQ */
.seo-block:has(.seo-faq) { border-bottom: 1px solid var(--border-light); }

