/**
 * PyziTheme - faq.css (pyzitheme/assets/css/faq.css)
 * 
 * Styl dla sekcji FAQ na stronie (osobna strona
 * z wykorzystaniem tepmlatki
 *
 * @package     PyziTheme
 * @subpackage  Assets/CSS
 * @author      Patryk Kowalski <p.kowalski@kamikstudio.pl>
 * @copyright   2025 KamikStudio & PyziPyzi
 * @license     Proprietary
 * @version     1.0.0
 * @since       1.0.0
 * 
 * Client: PyziPyzi - Domowe wyroby cukiernicze
 * Website: https://pyzipyzi.pl
 * 
 * This file is part of PyziTheme.
 * Unauthorized copying or distribution is prohibited.
 */

/* ==========================================================================
   FAQ PAGE HEADER
   ========================================================================== */

.faq-page {
    background: #fff;
}

.faq-header {
    padding: 60px 0 40px;
    background: linear-gradient(135deg, #fef8f4 0%, #fff 100%);
    border-bottom: 1px solid #f0f0f0;
}

.faq-page-title {
    font-size: clamp(32px, 5vw, 48px);
    color: #5e341c;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.faq-intro {
    font-size: 18px;
    line-height: 1.6;
    color: #666;
    max-width: 800px;
}

/* ==========================================================================
   FAQ CONTENT
   ========================================================================== */

.faq-content {
    padding: 60px 0;
}

.faq-sections {
    max-width: 900px;
    margin: 0 auto;
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */

.faq-section {
    margin-bottom: 60px;
}

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

.faq-section-title {
    font-size: clamp(24px, 3vw, 32px);
    color: #5e341c;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #ef6341;
    font-weight: 600;
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* FAQ Item */
.faq-item {
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #ef6341;
    box-shadow: 0 4px 15px rgba(239, 99, 65, 0.1);
}

.faq-item.is-active {
    border-color: #ef6341;
    box-shadow: 0 6px 20px rgba(239, 99, 65, 0.15);
}

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

.faq-question:hover {
    background: #fef8f4;
}

.faq-item.is-active .faq-question {
    background: #fef8f4;
    color: #ef6341;
    padding-bottom: 20px; /* Zmniejszony padding gdy otwarty */
}

.faq-question-text {
    font-size: 18px;
    font-weight: 600;
    color: #5e341c;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.faq-item.is-active .faq-question-text {
    color: #ef6341;
}

/* FAQ Icon */
.faq-icon {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: #ef6341;
}

.faq-icon svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.icon-plus {
    opacity: 1;
    transform: rotate(0deg);
}

.icon-minus {
    opacity: 0;
    transform: rotate(-90deg);
}

.faq-item.is-active .icon-plus {
    opacity: 0;
    transform: rotate(90deg);
}

.faq-item.is-active .icon-minus {
    opacity: 1;
    transform: rotate(0deg);
}

/* FAQ Answer */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-item.is-active .faq-answer {
    max-height: 2000px;
}

.faq-answer-inner {
    padding: 10px 30px 30px; /* Dodany padding-top 10px dla spacingu */
    color: #666;
    font-size: 16px;
    line-height: 1.7;
}

/* Formatowanie treści w odpowiedzi */
.faq-answer-inner p {
    margin-bottom: 15px;
}

.faq-answer-inner p:first-child {
    margin-top: 10px; /* Dodatkowy spacing na początku */
}

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

.faq-answer-inner ul,
.faq-answer-inner ol {
    margin: 15px 0;
    padding-left: 25px;
}

.faq-answer-inner li {
    margin-bottom: 10px;
}

.faq-answer-inner a {
    color: #ef6341;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.faq-answer-inner a:hover {
    color: #d94f2e;
    text-decoration: underline;
}

.faq-answer-inner strong {
    color: #5e341c;
    font-weight: 600;
}

/* ==========================================================================
   ADDITIONAL CONTENT
   ========================================================================== */

.faq-additional-content {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 40px;
    background: #fef8f4;
    border-radius: 12px;
    border-left: 4px solid #ef6341;
}

.faq-additional-content h2,
.faq-additional-content h3 {
    color: #5e341c;
    margin-bottom: 20px;
}

.faq-additional-content p {
    margin-bottom: 20px;
    line-height: 1.7;
    color: #666;
}

.faq-additional-content a {
    color: #ef6341;
    text-decoration: none;
    font-weight: 500;
}

.faq-additional-content a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   NO CONTENT STATE
   ========================================================================== */

.no-faq-content {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-faq-content p {
    font-size: 18px;
    margin: 0;
}

/* ==========================================================================
   ANIMATION UTILITIES
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item.is-active .faq-answer-inner {
    animation: fadeIn 0.4s ease;
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

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

.faq-question:focus-visible {
    outline: 2px solid #ef6341;
    outline-offset: 2px;
}

.faq-item:focus-within {
    box-shadow: 0 0 0 3px rgba(239, 99, 65, 0.2);
}

/* ==========================================================================
   RESPONSIVE - TABLET
   ========================================================================== */

@media (max-width: 1024px) {
    .faq-header {
        padding: 50px 0 30px;
    }
    
    .faq-content {
        padding: 50px 0;
    }
    
    .faq-section {
        margin-bottom: 50px;
    }
}

/* ==========================================================================
   RESPONSIVE - MOBILE
   ========================================================================== */

@media (max-width: 768px) {
    .faq-header {
        padding: 40px 0 30px;
    }
    
    .faq-page-title {
        margin-bottom: 15px;
    }
    
    .faq-intro {
        font-size: 16px;
    }
    
    .faq-content {
        padding: 40px 0;
    }
    
    .faq-section {
        margin-bottom: 40px;
    }
    
    .faq-section-title {
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .faq-accordion {
        gap: 12px;
    }
    
    .faq-question {
        padding: 20px;
        gap: 15px;
    }
    
    .faq-item.is-active .faq-question {
        padding-bottom: 15px;
    }
    
    .faq-question-text {
        font-size: 16px;
    }
    
    .faq-answer-inner {
        padding: 10px 20px 20px;
        font-size: 15px;
    }
    
    .faq-additional-content {
        padding: 30px 20px;
        margin-top: 40px;
    }
}

@media (max-width: 480px) {
    .faq-question {
        padding: 18px 15px;
    }
    
    .faq-item.is-active .faq-question {
        padding-bottom: 12px;
    }
    
    .faq-question-text {
        font-size: 15px;
    }
    
    .faq-answer-inner {
        padding: 8px 15px 18px;
        font-size: 14px;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .faq-icon {
        display: none;
    }
    
    .faq-answer {
        max-height: none !important;
    }
    
    .faq-item {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 20px;
    }
}