/**
 * WPW FAQ Accordion Styles
 * Version: 1.1.3
 * Matches WPW site design
 */

/* Container */
.wpw-faq-container {
    max-width: 1140px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

/* Introduction Section */
.wpw-faq-intro {
    margin-bottom: 40px;
    text-align: left;
}

.wpw-faq-intro-heading {
    font-size: 1.875rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 20px;
    line-height: 1.4;
    font-family: inherit;
}

.wpw-faq-intro-text {
    font-size: 1rem;
    line-height: 1.625;
    color: #333333;
    max-width: none;
    margin: 0;
}

/* Accordion Container */
.wpw-faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 30px;
}

/* FAQ Item */
.wpw-faq-item {
    border-bottom: 1px solid #dddddd;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.wpw-faq-item:hover {
    border-bottom-color: #2d5a8f;
}

.wpw-faq-item:first-child {
    border-top: 1px solid #dddddd;
    transition: border-color 0.2s ease;
}

.wpw-faq-item:first-child:hover {
    border-top-color: #2d5a8f;
}

/* Question Button */
.wpw-faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 20px 0;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.wpw-faq-question:hover {
    color: #1e3d5f;
    background: rgba(45, 90, 143, 0.05);
    padding-left: 12px;
    padding-right: 12px;
    margin-left: -12px;
    margin-right: -12px;
}

.wpw-faq-question:active {
    background: rgba(45, 90, 143, 0.1);
    color: #1a3350;
    transform: scale(0.995);
}

.wpw-faq-question:focus {
    outline: 2px solid #2d5a8f;
    outline-offset: 2px;
}

.wpw-faq-question[aria-expanded="true"] {
    color: #1e3d5f;
    font-weight: 700;
}

.wpw-faq-question-text {
    flex: 1;
    line-height: 1.4;
}

/* Icons */
.wpw-faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #2d5a8f;
    transition: transform 0.2s ease, color 0.2s ease;
}

.wpw-faq-question:hover .wpw-faq-icon {
    color: #1e3d5f;
    transform: scale(1.1);
}

.wpw-faq-question:active .wpw-faq-icon {
    transform: scale(0.95);
}

.wpw-faq-icon svg {
    display: none;
    transition: transform 0.2s ease;
}

/* Show/hide icons based on aria-expanded */
.wpw-faq-question[aria-expanded="false"] .wpw-faq-icon-closed {
    display: block;
}

.wpw-faq-question[aria-expanded="true"] .wpw-faq-icon-open {
    display: block;
}

/* Answer Container */
.wpw-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.wpw-faq-answer-content {
    padding: 0 0 24px 0;
    background: transparent;
    font-size: 1rem;
    line-height: 1.625;
    color: #333333;
}

/* Short Answer (Bold intro) */
.wpw-faq-short-answer {
    font-size: 1rem;
    margin-bottom: 16px;
    color: #333333;
    line-height: 1.625;
}

.wpw-faq-short-answer strong {
    font-weight: 600;
}

/* Detailed Answer */
.wpw-faq-detailed-answer p {
    margin-bottom: 16px;
    font-size: 1rem;
    line-height: 1.625;
}

.wpw-faq-detailed-answer p:last-child {
    margin-bottom: 0;
}

.wpw-faq-detailed-answer ul,
.wpw-faq-detailed-answer ol {
    margin: 16px 0;
    padding-left: 28px;
}

.wpw-faq-detailed-answer li {
    margin-bottom: 8px;
    line-height: 1.625;
    font-size: 1rem;
}

.wpw-faq-detailed-answer strong {
    color: #333333;
    font-weight: 700;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wpw-faq-intro-heading {
        font-size: 1.5rem;
    }

    .wpw-faq-intro-text {
        font-size: 0.9375rem;
    }

    .wpw-faq-question {
        padding: 16px 0;
        font-size: 1rem;
    }

    .wpw-faq-answer-content {
        padding: 0 0 20px 0;
        font-size: 0.9375rem;
    }

    .wpw-faq-short-answer {
        font-size: 0.9375rem;
    }

    .wpw-faq-detailed-answer p,
    .wpw-faq-detailed-answer li {
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .wpw-faq-container {
        padding: 0 16px;
    }

    .wpw-faq-intro-heading {
        font-size: 1.375rem;
    }

    .wpw-faq-question {
        padding: 14px 0;
        font-size: 0.9375rem;
        gap: 12px;
    }

    .wpw-faq-icon {
        width: 18px;
        height: 18px;
    }
}
