.faq-with-images-block {
    width: 100%;
    overflow: visible;
}

.faq-with-images-container {
    display: flex;
    flex-direction: column;
}

/* Image Section */
.faq-with-images-image-wrapper {
    height: fit-content;
    order: 2;
    margin-left: auto;
    margin-right: auto;
}

.faq-with-images-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.faq-image-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.faq-image-item.active {
    opacity: 1;
    pointer-events: auto;
}

.faq-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.faq-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-image-placeholder svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Content Section */
.faq-with-images-content {
    display: flex;
    flex-direction: column;
    position: relative;
    order: 1;
}

.faq-with-images-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gold-200);
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.faq-with-images-title:has(+ .faq-with-images-intro) {
    margin-bottom: 18px;
}

.faq-with-images-intro {
    margin-top: 0;
    margin-bottom: 1.5rem;
    max-width: 42rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.55;
    color: var(--neautral-250);
}

.faq-with-images-intro > :first-child {
    margin-top: 0;
}

.faq-with-images-intro > :last-child {
    margin-bottom: 0;
}

.faq-with-images-intro a {
    color: var(--gold-500);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.faq-with-images-intro a:hover {
    color: var(--gold-200);
}

.faq-with-images-divider {
    width: 60px;
    height: 2px;
    background-color: var(--wp--preset--color--base);
    margin-bottom: 2rem;
}

/* Accordion */
.faq-accordion {
    display: flex;
    flex-direction: column;
}

.faq-accordion-item {
    border-bottom: 1px solid var(--gold-600);
    overflow: hidden;
}

.faq-accordion-item:last-child {
    border-bottom: none;
}

.faq-accordion-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;

    /* FIX: Removed the active padding-bottom override that was causing layout shift.
       Keep padding consistent so the button height never changes on toggle. */
    padding-top: 28px;
    padding-bottom: 28px;

    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: opacity 0.3s ease;
}

.faq-accordion-button:hover {
    opacity: 0.8;
}

.faq-accordion-title {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gold-600);
    flex: 1;
    padding-right: 1rem;
    transition: color 0.3s ease;
}

.faq-accordion-item.active .faq-accordion-title {
    color: var(--gold-200);
}

.faq-accordion-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-600);
    transition: transform 0.3s ease;
    background-image: url(../../../assets/images/accordion-inactive.svg);
    background-repeat: no-repeat;
    background-position: center;
}

.faq-accordion-item.active .faq-accordion-icon {
    background-image: url(../../../assets/images/accordion-active.svg);
}

.faq-accordion-icon svg {
    width: 100%;
    height: 100%;
}

/* FIX: Replaced max-height animation with grid-template-rows trick.
   This animates over the actual content height, eliminating the snap/jump. */
.faq-accordion-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: 0;
}

.faq-accordion-content > * {
    overflow: hidden;
}

.faq-accordion-item.active .faq-accordion-content {
    grid-template-rows: 1fr;
    padding-bottom: 1.5rem;
}

/* Required for grid row collapse to work — min-height: 0 allows the child to shrink */
.faq-accordion-inner-wrapper {
    overflow: hidden;
    min-height: 0;
}

.faq-accordion-inner {
    color: #D7D7D7;
    font-size: 0.875rem;
    padding-top: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}

.faq-accordion-item.active .faq-accordion-inner {
    opacity: 1;
    transform: translateY(0);
}

.faq-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--wp--preset--color--base);
}

.faq-empty p {
    margin: 0;
    font-size: 1rem;
}

@media (max-width: 540px) {
    .faq-with-images-image-wrapper {
        height: 405px;
        width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 541px) and (max-width: 640px) {
    .faq-with-images-image-wrapper {
        height: 454px;
        width: 340px;
    }
}

@media (min-width: 641px) and (max-width: 767px) {
    .faq-with-images-image-wrapper {
        height: 520px;
        width: 380px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 768px) {
    .faq-with-images-title {
        font-size: 2rem;
    }
    .faq-with-images-container {
        flex-direction: row;
        justify-content: center;
        column-gap: 30px;
    }
    .faq-with-images-image-wrapper {
        order: 1;
        width: 45%;
        height: 540px;
    }
    .faq-with-images-content {
        order: 2;
        width: 55%;
    }

    .faq-with-images-block.image-on-right .faq-with-images-content {
        order: 1;
    }
    .faq-with-images-block.image-on-right .faq-with-images-image-wrapper {
        order: 2;
        width: 45%;
    }
}

@media (min-width: 1024px) {
    .faq-accordion-title {
        font-weight: 800;
    }

    .faq-with-images-image-wrapper {
        height: 620px;
    }
}

@media (min-width: 1280px) {
    .faq-home .faq-with-images-container {
        justify-content: flex-start;
    }
    .faq-with-images-image-wrapper {
        height: 670px;
        width: 100%;
        max-width: 492px;
        margin-right: 0;
    }
    .faq-home .faq-with-images-image-wrapper {
        margin-left: 0;
    }
    .faq-with-images-title {
        margin-bottom: 44px;
    }
    .faq-accordion-title {
        font-size: 1.125rem;
    }
    .faq-with-images-title {
        font-size: 2.25rem;
    }
    .faq-with-images-image-container {
        height: 100%;
        aspect-ratio: unset;
    }

    .faq-with-images-content {
        order: 2;
        width: 100%;
        max-width: 480px;
    }
}

@media (min-width: 1440px) {
    .faq-with-images-title {
        font-size: 2.5rem;
        margin-bottom: 54px;
    }
    .faq-with-images-image-wrapper {
        width: calc(41% + 3px);
        height: 670px;
    }
    .faq-with-images-content {
        width: calc(37% + 1px);
        margin-left: 92px;
    }

    .faq-with-images-block.image-on-right .faq-with-images-content {
        margin-left: 0;
        margin-right: 92px;
        width: calc(43% + 1px);
    }
    .faq-with-images-block.image-on-right .faq-with-images-image-wrapper {
        width: 40%;
    }
}