/**
 * Gorillah FAQ - Frontend Accordion Styles 3.5.2
 */

.gorillah-faq-accordion {
    width: 100%;
}

.gorillah-faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #fff;
}

.gorillah-faq-item:last-child {
    margin-bottom: 0;
}

.gorillah-faq-question {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 15px 20px;
    margin: 0;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease;
    user-select: none;
}

.gorillah-faq-question:hover,
.gorillah-faq-question.active {
    background: #e9ecef;
}

.gorillah-faq-question:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: -2px;
}

.gorillah-faq-question-text {
    flex: 1;
    text-align: left;
    font-weight: 500;
    line-height: 1.4;
}

.gorillah-faq-icon-left .gorillah-faq-icon {
    order: -1;
    margin-right: 10px;
}

.gorillah-faq-icon-right .gorillah-faq-icon {
    order: 1;
    margin-left: 10px;
}

.gorillah-faq-icon {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 1em;
    height: 1em;
    flex: 0 0 1em;
}

.gorillah-faq-icon-closed,
.gorillah-faq-icon-opened {
    grid-area: 1 / 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: opacity 180ms ease, transform 280ms cubic-bezier(.2, .7, .2, 1);
    transform-origin: center;
}

.gorillah-faq-icon-closed {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.gorillah-faq-icon-opened {
    opacity: 0;
    transform: rotate(-90deg) scale(.82);
}

.gorillah-faq-question.active .gorillah-faq-icon-closed {
    opacity: 0;
    transform: rotate(90deg) scale(.82);
}

.gorillah-faq-question.active .gorillah-faq-icon-opened {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.gorillah-faq-icon svg,
.gorillah-faq-icon i {
    display: block;
}

/*
 * The JS owns the panel geometry with inline !important declarations.
 * These rules are deliberately simple fallbacks, not the animation engine.
 */
.gorillah-faq-answer {
    box-sizing: border-box;
    display: none !important;
    height: 0;
    max-height: none !important;
    overflow: hidden;
    padding: 0;
    visibility: hidden;
    background: #fff;
    border-top: 1px solid transparent;
    opacity: 0;
    transform: translateY(-4px);
}

.gorillah-faq-answer.active {
    display: block !important;
    height: auto;
    max-height: none !important;
    visibility: visible;
    border-top-color: #e0e0e0;
    opacity: 1;
    transform: translateY(0);
}

.gorillah-faq-answer-inner {
    box-sizing: border-box;
    display: block !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0;
    padding: 15px 20px;
    visibility: visible !important;
}

.gorillah-faq-answer-inner p {
    min-height: 0;
    margin: 0 0 .75em;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.gorillah-faq-answer-inner > *:first-child {
    margin-top: 0;
}

.gorillah-faq-answer-inner > *:last-child,
.gorillah-faq-answer-inner p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .gorillah-faq-question {
        padding: 12px 15px;
    }

    .gorillah-faq-answer-inner {
        padding: 12px 15px;
    }

    .gorillah-faq-question-text {
        font-size: 14px;
    }
}

.elementor-editor-active .gorillah-faq-accordion {
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .gorillah-faq-icon-closed,
    .gorillah-faq-icon-opened,
    .gorillah-faq-question {
        transition: none !important;
    }
}

@media print {
    .gorillah-faq-accordion .gorillah-faq-answer {
        display: block !important;
        height: auto !important;
        max-height: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        border-top-color: #e0e0e0 !important;
    }

    .gorillah-faq-icon {
        display: none !important;
    }
}


/* FAQ body isolation: keep saved answer content in normal visible flow even
 * under aggressive Elementor/theme selectors. */
.gorillah-faq-answer-content {
    box-sizing: border-box;
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    min-height: 1px;
    max-height: none !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
    color: inherit;
}

.gorillah-faq-answer-content p,
.gorillah-faq-answer-content ul,
.gorillah-faq-answer-content ol,
.gorillah-faq-answer-content li,
.gorillah-faq-answer-content blockquote,
.gorillah-faq-answer-content figure,
.gorillah-faq-answer-content img,
.gorillah-faq-answer-content a,
.gorillah-faq-answer-content strong,
.gorillah-faq-answer-content em,
.gorillah-faq-answer-content span {
    visibility: visible !important;
    opacity: 1 !important;
}
