/**
 * FAQ Section Styles
 * Accordion-style FAQ with smooth animations and accessibility features
 * 
 * @package TablyClub
 */

/* ===== FAQ SECTION ===== */
.tc-faq {
    /* Padding controlled by .tc-section in style.css */
    padding-left: 20px;
    padding-right: 20px;
}

.tc-faq__header {
    max-width: 800px;
    margin: 0 auto clamp(2.5rem, 6vw, 4rem);
    text-align: center;
}

/* Override global title margin for consistent spacing */
.tc-faq .tc-section__title {
    margin-bottom: 1rem;
}

.tc-faq__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin: 0;
    opacity: 0.85;
    line-height: 1.6;
}

/* FAQ List */
.tc-faq__list {
    max-width: 900px;
    margin: 0 auto;
}

/* FAQ Item */
.tc-faq-item {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* cursor: pointer is set via JS */
}

.tc-faq-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.tc-faq-item.is-active {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(0);
}

/* FAQ Question (Button) - Accessible & Interactive */
.tc-faq-item__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: clamp(1.25rem, 3vw, 1.5rem) clamp(1.5rem, 4vw, 1.75rem);
    background: transparent;
    border: none;
    font-family: var(--tc-font-heading);
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    font-weight: 600;
    text-align: left;
    color: inherit;
    cursor: inherit;
    transition: all 0.3s ease;
}

.tc-faq-item__question:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.tc-faq-item__question:focus-visible {
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3);
}

.tc-faq-item__question-text {
    flex: 1;
}

.tc-faq-item__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

.tc-faq-item.is-active .tc-faq-item__icon {
    transform: rotate(180deg);
}

.tc-faq-item__icon svg {
    display: block;
}

/* FAQ Answer - Smooth Accordion Effect */
.tc-faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.4s ease;
    opacity: 0;
}

.tc-faq-item.is-active .tc-faq-item__answer {
    max-height: 1500px;
    opacity: 1;
}

.tc-faq-item__answer-content {
    padding: clamp(0.5rem, 2vw, 0.75rem) clamp(1.5rem, 4vw, 1.75rem) clamp(1.25rem, 3vw, 1.5rem);
    font-size: clamp(0.9375rem, 2vw, 1.05rem);
    line-height: 1.7;
    color: inherit;
    opacity: 0.9;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    margin-top: clamp(0.25rem, 1.5vw, 0.5rem);
}

.tc-faq-item__answer-content p {
    margin: 0 0 15px 0;
}

.tc-faq-item__answer-content p:last-child {
    margin-bottom: 0;
}

.tc-faq-item__answer-content ul,
.tc-faq-item__answer-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.tc-faq-item__answer-content li {
    margin-bottom: 8px;
}

/* Responsive - Most sizing handled by clamp() above */
@media (max-width: 767px) {
    .tc-faq__list {
        max-width: 100%;
    }
    
    .tc-faq-item {
        margin-bottom: 15px;
    }
    
    .tc-faq-item__icon {
        width: 28px;
        height: 28px;
    }
}
