/* ==========================================================================
   Мирчев Студио — FAQ page redesign (faq-v1)
   Builds on the shared v1 design system in index-v1.css. Only FAQ-specific
   parts live here. Scoped to body.v1-page-faq.
   ========================================================================== */

/* ---------- Hero: static image, a little shorter than other inner pages ---------- */
.v1-page-faq .v1-hero--short {
    min-height: 60vh;
    min-height: 60svh;
}

.v1-page-faq .v1-hero__bg {
    object-position: 50% 50%;
}

.v1-page-faq .v1-hero--short .v1-hero__title {
    max-width: 16ch;
}

/* ---------- Intro ---------- */
.v1-faq-intro__lead {
    font-family: var(--v1-serif);
    font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem);
    font-weight: 500;
    line-height: 1.25;
    color: var(--v1-text);
    margin-bottom: 26px !important;
    text-wrap: pretty;
}

.v1-faq-intro .v1-split__text > p:not(.v1-eyebrow):not(.v1-faq-intro__lead) {
    color: var(--v1-muted);
}

.v1-faq-intro__media {
    position: relative;
}

.v1-faq-intro__media img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    border-radius: var(--v1-radius-lg);
    box-shadow: var(--v1-shadow);
}

.v1-faq-intro__media::before {
    content: "";
    position: absolute;
    inset: 18px -18px -18px 18px;
    z-index: -1;
    border: 1px solid rgba(234, 166, 54, .55);
    border-radius: var(--v1-radius-lg);
}

@media (max-width: 991.98px) {
    .v1-faq-intro__media::before { display: none; }
}

/* ---------- Layout: sticky aside + list ---------- */
.v1-faq__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
}

@media (min-width: 992px) {
    .v1-faq__layout {
        grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
        gap: 64px;
        align-items: start;
    }

    .v1-faq__aside-inner {
        position: sticky;
        top: calc(var(--v1-header-h) + 32px);
    }
}

.v1-faq__count {
    margin-bottom: 24px !important;
    font-family: var(--v1-serif);
    font-size: clamp(1.7rem, 1.4rem + 1vw, 2.2rem);
    font-weight: 600;
    line-height: 1.15;
    color: var(--v1-text);
}

.v1-faq__count span {
    color: var(--v1-gold-text);
}

.v1-faq__toggle-all {
    min-height: 44px;
    padding: 10px 20px;
    font-size: .88rem;
}

.v1-faq__toggle-all[hidden] {
    display: none;
}

/* Help card */
.v1-faq__help {
    margin-top: 32px;
    padding: 28px;
    border-radius: var(--v1-radius-lg);
    background: var(--v1-ink);
    color: var(--v1-on-dark-muted);
    box-shadow: var(--v1-shadow-sm);
}

.v1-faq__help-title {
    margin-bottom: 10px !important;
    font-family: var(--v1-serif);
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--v1-on-dark);
}

.v1-faq__help p:not(.v1-faq__help-title) {
    font-size: .98rem;
}

.v1-faq__help-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    margin-top: 6px;
}

.v1-link--light {
    color: var(--v1-gold);
}

@media (max-width: 991.98px) {
    /* On small screens the help card follows the questions */
    .v1-faq__aside { display: contents; }
    .v1-faq__aside-inner { display: contents; }
    .v1-faq__aside-inner > .v1-eyebrow,
    .v1-faq__count,
    .v1-faq__toggle-all { grid-column: 1; }
    .v1-faq__count { margin-bottom: 0 !important; }
    .v1-faq__help { order: 2; margin-top: 8px; }
    .v1-faq__list { order: 1; }
    .v1-faq__layout { gap: 18px; }
    .v1-faq__toggle-all { justify-self: start; margin-bottom: 14px; }
}

/* ---------- Accordion ---------- */
.v1-faq__list {
    display: grid;
    gap: 12px;
    counter-reset: none;
}

.v1-faq__item {
    scroll-margin-top: calc(var(--v1-header-h) + 24px);
    background: var(--v1-paper);
    border: 1px solid transparent;
    border-radius: var(--v1-radius-lg);
    box-shadow: 0 1px 0 rgba(42, 34, 28, .06);
    transition: border-color .3s, box-shadow .4s var(--v1-ease), background-color .3s;
}

.v1-faq__item:hover {
    box-shadow: var(--v1-shadow-sm);
}

.v1-faq__item.is-open {
    border-color: rgba(234, 166, 54, .55);
    box-shadow: var(--v1-shadow-sm);
}

.v1-faq__q {
    margin: 0;
    font-family: var(--v1-sans);
    font-size: inherit;
}

.v1-faq__btn {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    width: 100%;
    min-height: 72px;
    padding: 18px 22px;
    border: 0;
    border-radius: var(--v1-radius-lg);
    background: transparent;
    color: var(--v1-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.v1-faq__num {
    font-family: var(--v1-serif);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    color: var(--v1-gold-text);
    min-width: 2ch;
}

.v1-faq__text {
    font-size: 1.06rem;
    font-weight: 700;
    line-height: 1.4;
}

.v1-faq__btn:hover .v1-faq__text {
    color: var(--v1-gold-text);
}

/* plus / minus */
.v1-faq__icon {
    position: relative;
    width: 36px;
    height: 36px;
    border: 1px solid var(--v1-line);
    border-radius: 50%;
    transition: background-color .3s, border-color .3s, transform .4s var(--v1-ease);
}

.v1-faq__icon::before,
.v1-faq__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 1.5px;
    background: var(--v1-text);
    border-radius: 2px;
    transform: translate(-50%, -50%);
    transition: transform .4s var(--v1-ease), background-color .3s;
}

.v1-faq__icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.v1-faq__btn[aria-expanded="true"] .v1-faq__icon {
    background: var(--v1-gold);
    border-color: var(--v1-gold);
    transform: rotate(180deg);
}

.v1-faq__btn[aria-expanded="true"] .v1-faq__icon::before,
.v1-faq__btn[aria-expanded="true"] .v1-faq__icon::after {
    background: var(--v1-ink);
}

.v1-faq__btn[aria-expanded="true"] .v1-faq__icon::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

/* Panel: open by default (no JS = everything readable, like the original);
   faq-v1.js adds .is-enhanced and controls the state. */
.v1-faq__panel {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows .45s var(--v1-ease);
}

.v1-faq__answer {
    min-height: 0;
    overflow: hidden;
}

.v1-faq__answer p {
    margin: 0;
    padding: 0 22px 24px calc(22px + 2ch + 18px + 4px);
    color: var(--v1-muted);
    max-width: 72ch;
}

.v1-faq__answer strong {
    color: var(--v1-text);
}

.v1-faq__list.is-enhanced .v1-faq__item:not(.is-open) .v1-faq__panel {
    grid-template-rows: 0fr;
}

.v1-faq__list.is-enhanced .v1-faq__item:not(.is-open) .v1-faq__answer {
    visibility: hidden;
    transition: visibility 0s linear .45s;
}

/* Highlight an answer opened from a link (#faq-3 etc.) */
.v1-faq__item.is-target {
    animation: v1-faq-flash 1.6s var(--v1-ease) 1;
}

@keyframes v1-faq-flash {
    0%, 30% { background: rgba(234, 166, 54, .16); }
    100% { background: var(--v1-paper); }
}

@media (max-width: 575.98px) {
    .v1-faq__btn {
        gap: 12px;
        padding: 16px;
        min-height: 64px;
    }

    .v1-faq__num { font-size: 1.25rem; }

    .v1-faq__text { font-size: 1rem; }

    .v1-faq__icon { width: 32px; height: 32px; }

    .v1-faq__answer p { padding: 0 16px 20px 16px; }

    .v1-faq__help { padding: 22px; }
}
