/* ============================================
   FAQ SECTION STYLES
   HYDROPRO PLUMBING & WATER LTD
   ============================================ */

/* FAQ Section Variables */
:root {
    --faq-bg: #FFFFFF;                  /* White background */
    --faq-question-bg: #FFFFFF;         /* Question header background */
    --faq-question-hover: #F0FFFE;      /* Light cyan hover */
    --faq-question-active: #E0F9F7;     /* Active state */
    --faq-answer-bg: #F8F9FA;           /* Light gray answer */
    --faq-border: #E0E0E0;              /* Border color */
    --faq-text: #2B2D42;                /* Charcoal text */
    --faq-question-text: #14213D;       /* Navy question text */
}

/* FAQ Section Container */
.faq-section {
    padding: 5rem 0;
    background: var(--faq-bg);
}

/* FAQ Heading */
.faq-heading {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-navy);
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.faq-heading::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--primary-navy));
    margin: 1.5rem auto 0;
    border-radius: 2px;
}

/* FAQ Container */
.faq-container {
    max-width: 900px;
    margin: 3rem auto 0;
}

/* FAQ Item */
.faq-item {
    border: 1px solid var(--faq-border);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--faq-question-bg);
}

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

/* FAQ Question Button */
.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--faq-question-bg);
    border: none;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--faq-question-text);
}

.faq-question:hover {
    background: var(--faq-question-hover);
}

.faq-question:focus {
    outline: 3px solid var(--accent-cyan);
    outline-offset: -3px;
}

.faq-question.active {
    background: var(--faq-question-active);
    border-bottom: 1px solid var(--faq-border);
}

/* FAQ Question Text */
.faq-question-text {
    flex: 1;
    padding-right: 1rem;
}

/* FAQ Icon (Chevron) */
.faq-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--accent-cyan);
    width: 24px;
    height: 24px;
}

.faq-question.active .faq-icon {
    transform: rotate(180deg);
}

/* FAQ Answer Panel */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: var(--faq-answer-bg);
    padding: 0 1.5rem;
}

.faq-answer.active {
    max-height: 2000px; /* Increased for longer content */
    padding: 1.5rem;
    overflow: visible; /* Allow full content to show when expanded */
}

/* FAQ Answer Content */
.faq-answer p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--faq-text);
    margin: 0;
}

.faq-answer p + p {
    margin-top: 1rem;
}

.faq-answer strong {
    color: var(--primary-navy);
    font-weight: 600;
}

.faq-answer ul,
.faq-answer ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

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

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .faq-heading {
        font-size: 2.25rem;
    }

    .faq-container {
        margin-top: 2.5rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .faq-section {
        padding: 3rem 0;
    }

    .faq-heading {
        font-size: 2rem;
    }

    .faq-container {
        margin-top: 2rem;
    }

    .faq-question {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .faq-question-text {
        flex: 1;
        padding-right: 0.5rem;
        line-height: 1.4;
        word-break: break-word;
    }

    .faq-icon {
        flex-shrink: 0;
        margin-top: 0.1rem;
    }

    .faq-answer {
        padding: 0 1.25rem;
    }

    .faq-answer.active {
        padding: 1.25rem;
    }

    .faq-answer p {
        font-size: 0.95rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .faq-heading {
        font-size: 1.75rem;
    }

    .faq-heading::after {
        width: 60px;
        height: 3px;
    }

    .faq-question {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
        gap: 0.5rem;
    }

    .faq-question-text {
        padding-right: 0.25rem;
        line-height: 1.5;
    }

    .faq-icon {
        width: 20px;
        height: 20px;
        margin-top: 0.15rem;
    }

    .faq-answer {
        padding: 0 1rem;
    }

    .faq-answer.active {
        padding: 1rem;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .faq-item,
    .faq-question,
    .faq-icon,
    .faq-answer {
        transition: none;
    }

    .faq-question.active .faq-icon {
        transform: none;
    }
}

/* Keyboard Navigation: Enhanced Focus States */
.faq-question:focus-visible {
    outline: 3px solid var(--accent-cyan);
    outline-offset: -3px;
    box-shadow: 0 0 0 4px rgba(95, 227, 208, 0.2);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .faq-item {
        border-width: 2px;
    }

    .faq-question:focus {
        outline-width: 4px;
    }
}

/* Print Styles */
@media print {
    .faq-section {
        padding: 2rem 0;
    }

    .faq-item {
        page-break-inside: avoid;
        border: 1px solid #ccc;
    }

    .faq-answer {
        max-height: none;
        padding: 1rem 1.5rem;
        display: block;
    }

    .faq-icon {
        display: none;
    }
}
