/**
 * FAQ Page Styles
 * Klasyczny akordeon FAQ z obracającą się strzałką
 * 
 * @package Alfabetmarki_Theme
 * @since 1.0.0
 */

/* ==============================================
   FAQ Page Header
   ============================================== */
.faq-page .entry-header {
    padding: 60px 0 40px;
    text-align: center;
}

.faq-page .entry-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 20px;
    line-height: 1.2;
}

.faq-page .entry-excerpt {
    font-size: 18px;
    line-height: 1.6;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* ==============================================
   FAQ Page Content
   ============================================== */
.faq-page .entry-content {
    padding: 40px 0 80px;
}

.faq-page .entry-content .container {
    max-width: 900px;
}

/* ==============================================
   FAQ Accordion
   ============================================== */
.faq-accordion {
    margin: 40px 0;
}

.faq-item {
    border-bottom: 1px solid #ddd;
}

.faq-item:first-child {
    border-top: 1px solid #ddd;
}

/* ==============================================
   FAQ Question (Button)
   ============================================== */
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: color 0.2s ease;
    gap: 20px;
}

.faq-question:hover {
    color: #0073aa;
}

.faq-question:focus {
    outline: 2px solid #0073aa;
    outline-offset: -2px;
}

.faq-question-text {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: inherit;
    flex: 1;
}

/* ==============================================
   FAQ Arrow Icon
   ============================================== */
.faq-arrow {
    flex-shrink: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
}

.faq-question:hover .faq-arrow {
    color: #0073aa;
}

/* Obrócenie strzałki gdy akordeon jest otwarty */
.faq-question[aria-expanded="true"] .faq-arrow {
    transform: rotate(180deg);
}

/* ==============================================
   FAQ Answer (Collapsible Content)
   ============================================== */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.5s ease-in-out;
    opacity: 0;
}

.faq-answer.faq-active {
    max-height: 3000px; /* Wystarczająco duża wartość */
    opacity: 1;
}

.faq-answer-content {
    padding: 0 0 24px 0;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-content p {
    margin: 0 0 16px;
}

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

.faq-answer-content ul,
.faq-answer-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

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

.faq-answer-content a {
    color: #0073aa;
    text-decoration: underline;
}

.faq-answer-content a:hover {
    color: #005a87;
}

/* ==============================================
   FAQ Empty State
   ============================================== */
.faq-empty {
    padding: 60px 20px;
    text-align: center;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
    margin: 40px 0;
}

.faq-empty p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* ==============================================
   Responsive Styles
   ============================================== */
@media (max-width: 768px) {
    .faq-page .entry-header {
        padding: 40px 0 30px;
    }
    
    .faq-page .entry-title {
        font-size: 36px;
    }
    
    .faq-page .entry-excerpt {
        font-size: 16px;
    }
    
    .faq-page .entry-content {
        padding: 30px 0 60px;
    }
    
    .faq-question {
        padding: 20px 0;
        gap: 15px;
    }
    
    .faq-question-text {
        font-size: 16px;
    }
    
    .faq-answer-content {
        padding: 0 0 20px 0;
        font-size: 15px;
    }
    
    .faq-arrow {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .faq-page .entry-title {
        font-size: 28px;
    }
    
    .faq-question {
        padding: 16px 0;
    }
    
    .faq-question-text {
        font-size: 15px;
    }
    
    .faq-answer-content {
        font-size: 14px;
    }
}

/* ==============================================
   Print Styles
   ============================================== */
@media print {
    .faq-arrow {
        display: none;
    }
    
    .faq-answer {
        max-height: none !important;
        display: block !important;
    }
    
    .faq-item {
        page-break-inside: avoid;
    }
}
