/* FAQ Accordion Component (Shared)
   - Native <details>/<summary> based (JS-free)
   - RTL/LTR supported via logical properties
   - Cross-browser marker resets (Chrome/Safari)
*/

.egl-faq {
    padding-block: 4rem;
    max-width: 64rem;
    margin-inline: auto;
}

.egl-faq__title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-color-primary, #111827);
    margin-block-end: 3rem;
    text-align: center;
}

@media (min-width: 1024px) {
    .egl-faq__title {
        text-align: start;
    }
}

.egl-faq__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.egl-faq__item {
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.egl-faq__item[open] {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: rgba(5, 150, 105, 0.2); /* color-primary with low opacity */
}

.egl-faq__summary {
    list-style: none; /* Reset standard markers */
    cursor: pointer;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: var(--text-color-primary, #111827);
    outline: none;
    transition: color 0.2s ease;
}

.egl-faq__summary::-webkit-details-marker {
    display: none; /* Reset WebKit specific markers */
}

.egl-faq__summary:hover {
    color: var(--color-primary, #059669);
}

.egl-faq__summary:focus-visible {
    box-shadow: inset 0 0 0 2px var(--color-primary, #059669);
}

.egl-faq__question {
    padding-inline-end: 1rem; /* Logical padding for custom icon spacing */
    flex: 1;
}

.egl-faq__icon {
    position: relative;
    inline-size: 1.5rem;
    block-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    flex-shrink: 0;
}

.egl-faq__icon::before,
.egl-faq__icon::after {
    content: "";
    position: absolute;
    background-color: currentColor;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Horizontal line */
.egl-faq__icon::before {
    inline-size: 1rem;
    block-size: 2px;
}

/* Vertical line (Plus sign) */
.egl-faq__icon::after {
    inline-size: 2px;
    block-size: 1rem;
}

.egl-faq__item[open] .egl-faq__icon::after {
    transform: rotate(90deg); /* Transition to minus sign (overlap) */
    opacity: 0;
}

.egl-faq__item[open] .egl-faq__icon::before {
    transform: rotate(180deg);
}

.egl-faq__answer {
    padding-inline: 1.5rem;
    padding-block-end: 1.5rem;
    color: var(--text-color-secondary, #4b5563);
    font-size: 1rem;
    line-height: 1.625;
}

/* RTL Specific Overrides if needed (logical props handle most) */
[dir="rtl"] .egl-faq__summary {
    text-align: right;
}
