/* ==========================================================================
   AM FAQ ACCORDION v1.1 — Arins Media Design System
   Fixed: hover fills entire card, smooth plus/minus transition
   ========================================================================== */

/* Container */
.am-faq-wrap {
    background-color: rgba(255, 192, 132, 0.5);
    border-radius: 16px;
    padding: 40px 32px;
}

/* Title */
.am-faq-title {
    font-family: 'General Sans', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 32px;
    letter-spacing: -0.8px;
    line-height: 1.1;
    color: #2b3136;
    margin: 0 0 28px 0;
    padding: 0;
    text-align: center;
}

/* FAQ List */
.am-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Single FAQ item */
.am-faq-item {
    background-color: #fff;
    border: 1px solid #879baa;
    border-radius: 16px;
    overflow: hidden;
    transition: background-color 0.3s ease, box-shadow 0.2s ease;
}

/* HOVER — fills entire card area (background on the item itself) */
.am-faq-item:hover {
    /* Default: no hover color. Customizable via Elementor Style tab. */
}

/* Smooth text color transition on hover */
.am-faq-q-text {
    transition: color 0.3s ease;
}

/* Question button — transparent, fills 100% of card top */
.am-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 18px 24px;
    margin: 0;
    border: none;
    background: transparent !important;
    cursor: pointer;
    text-align: left;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

/* Remove any Elementor/browser default button backgrounds */
.am-faq-q:hover,
.am-faq-q:focus,
.am-faq-q:active {
    background: transparent !important;
    outline: none;
}

.am-faq-q:focus-visible {
    outline: 2px solid #b5d0e5;
    outline-offset: -2px;
    border-radius: 16px;
}

.am-faq-q-text {
    flex: 1;
    min-width: 0;
    font-family: 'General Sans', 'Inter', sans-serif;
    font-weight: 500;
    font-size: 20px;
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: #2b3136;
}

/* Icon circle */
.am-faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    background-color: #b5d0e5;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.am-faq-icon svg {
    display: block;
    stroke: #2b3136;
}

/* ===== SMOOTH PLUS → MINUS ANIMATION =====
   Uses two <line> elements:
   - .am-icon-h = horizontal bar (always visible)
   - .am-icon-v = vertical bar (rotates 90° to collapse into horizontal)
   Result: smooth morph from + to – and back
   ========================================== */

.am-faq-icon .am-icon-h {
    transition: opacity 0.3s ease;
}

.am-faq-icon .am-icon-v {
    transform-origin: center center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* When open: rotate vertical line 90° (collapses into horizontal = minus) */
.am-faq-item.am-open .am-faq-icon .am-icon-v {
    transform: rotate(90deg);
    opacity: 0;
}

/* Subtle icon circle darkening when open */
.am-faq-item.am-open .am-faq-icon {
    background-color: #9bc4de;
}

/* Answer wrapper — animated */
.am-faq-a-wrap {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.am-faq-item.am-open .am-faq-a-wrap {
    opacity: 1;
}

/* Answer text */
.am-faq-a {
    padding: 0 24px 20px 24px;
    font-family: 'General Sans', 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #5d5d5d;
    margin: 0;
}

.am-faq-a p {
    margin: 0 0 8px 0;
}
.am-faq-a p:last-child {
    margin-bottom: 0;
}

/* Open state — subtle shadow */
.am-faq-item.am-open {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 767px) {
    .am-faq-wrap {
        padding: 28px 16px;
        border-radius: 12px;
    }

    .am-faq-title {
        font-size: 26px;
        margin-bottom: 20px;
    }

    .am-faq-q {
        font-size: 17px;
        padding: 16px 16px;
        gap: 12px;
    }

    .am-faq-q-text {
        font-size: 17px;
    }

    .am-faq-a {
        padding: 0 16px 16px 16px;
        font-size: 15px;
    }

    .am-faq-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .am-faq-list {
        gap: 8px;
    }
}
