/* =========================================================
   OPG Kostešić — FAQ
   - Desktop: slika lijevo, accordion desno
   - Mobile: slika gore, accordion ispod
   - Cream pozadina
   ========================================================= */

.opg-faq {
    position: relative;
    background: var(--opg-cream, #f9f4f0);
    color: var(--opg-ink, #5a3733);
    font-family: var(--opg-font-body, 'Open Sans', system-ui, sans-serif);
    padding-block: 64px;
    overflow: hidden; /* skriva dio decorative slike koja izvire izvan sekcije */
}

/* =========================================================
   Decorativna grančica na lijevom rubu (samo desktop)
   - Pozicionirana apsolutno s negativnim left
   - Polovica slike izvan sekcije (clipped overflow:hidden gore)
   ========================================================= */
.opg-faq__deco {
    display: none;
}
@media (min-width: 1024px) {
    .opg-faq__deco {
        display: block;
        position: absolute;
        left: -90px;
        top: 50%;
        transform: translateY(-50%);
        width: 240px;
        height: auto;
        z-index: 0;
        pointer-events: none;
        user-select: none;
    }
}
@media (min-width: 1280px) {
    .opg-faq__deco {
        left: -70px;
        width: 280px;
    }
}

@media (min-width: 1024px) {
    .opg-faq { padding-block: 100px; }
}

.opg-faq__container {
    position: relative;
    z-index: 1; /* iznad decorative slike */
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(20px, 4vw, 32px);
    display: grid;
    grid-template-columns: 1fr;
    gap: 36px;
    align-items: center;
}

@media (min-width: 1024px) {
    .opg-faq__container {
        grid-template-columns: 1fr 1.4fr;
        gap: 64px;
        align-items: center;
    }
}

/* =========================================================
   Lijevi stupac: slika
   ========================================================= */

.opg-faq__media {
    width: 100%;
    display: flex;
    justify-content: center;
}
.opg-faq__media img {
    max-width: 460px;
    width: 100%;
    height: auto;
    display: block;
}

.opg-faq__placeholder {
    width: 100%;
    max-width: 460px;
    aspect-ratio: 1 / 1;
    background: rgba(90, 55, 51, 0.04);
    border: 2px dashed rgba(90, 55, 51, 0.18);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--opg-ink-soft, #8b6a63);
    font-size: 13px;
    padding: 24px;
}

/* =========================================================
   Desni stupac: header + accordion
   ========================================================= */

.opg-faq__content { width: 100%; }

.opg-faq__eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--opg-brand-dark, #eb6d2f);
    margin: 0 0 12px;
}

.opg-faq__heading {
    font-family: var(--opg-font-heading, 'Signika Negative', system-ui, sans-serif);
    font-size: clamp(28px, 4.2vw, 42px);
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.15;
    letter-spacing: -0.005em;
    color: var(--opg-ink, #5a3733);
    margin: 0 0 12px;
}

.opg-faq__heading-bar {
    display: block;
    width: 60px;
    height: 3px;
    background: var(--opg-brand-dark, #eb6d2f);
    border-radius: 2px;
    margin: 0 0 18px;
}

.opg-faq__lead {
    font-size: 15px;
    line-height: 1.65;
    color: var(--opg-ink-soft, #8b6a63);
    margin: 0 0 28px;
}

/* =========================================================
   Accordion
   ========================================================= */

.opg-faq__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.opg-faq__item {
    border-bottom: 1px solid rgba(90, 55, 51, 0.12);
}
.opg-faq__item:first-child {
    border-top: 1px solid rgba(90, 55, 51, 0.12);
}

.opg-faq__q {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 4px;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    color: var(--opg-ink, #5a3733);
    font-family: var(--opg-font-body, 'Open Sans', system-ui, sans-serif);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    transition: color 0.2s ease;
}
.opg-faq__q:hover,
.opg-faq__q:focus-visible {
    color: var(--opg-brand-dark, #eb6d2f);
    outline: none;
}

/* + ikona koja postaje × kad je otvoreno (vertikalna crta rotira u horizontalnu) */
.opg-faq__plus {
    position: relative;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--opg-brand-dark, #eb6d2f);
}
.opg-faq__plus::before,
.opg-faq__plus::after {
    content: "";
    position: absolute;
    background: currentColor;
    border-radius: 1px;
}
.opg-faq__plus::before {
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    transform: translateY(-1px);
}
.opg-faq__plus::after {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-1px);
    transition: transform 0.25s ease;
}
.opg-faq__item.is-open .opg-faq__plus::after {
    transform: translateX(-1px) rotate(90deg);
}

/* Answer panel — animacija kroz max-height */
.opg-faq__a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.opg-faq__a[hidden] {
    /* Ne koristimo HTML hidden semantiku — u JS-u toggleamo class. */
    display: block;
}
.opg-faq__item.is-open .opg-faq__a {
    max-height: 1000px;
}
.opg-faq__a > p {
    margin: 0 4px 16px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--opg-ink-soft, #8b6a63);
}

@media (prefers-reduced-motion: reduce) {
    .opg-faq__plus::after,
    .opg-faq__a,
    .opg-faq__q { transition: none; }
}
