/**
 * FAQ Page Styles (Часті запитання)
 * Modern accordion design
 */

/* ===================================
   BASE STYLES
   =================================== */

.faq-page {
    position: relative;
    width: 100%;
    background: var(--color-bg, #F9F6F0);
    padding: 0;
}

.site-main.faq-page {
    margin-bottom: 0 !important;
}

body.page-faq-template .footer-section {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.page-faq-template #page {
    padding: 0 40px;
    box-sizing: border-box;
}

.faq-page .container {
    position: relative;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   ARTICLE & HEADER
   =================================== */

.faq-page .faq-article {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 40px 0 60px;
}

.faq-page .faq-header {
    text-align: center;
    margin-bottom: 40px;
}

.faq-page .faq-title {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 1.2;
    color: var(--color-black, #1A1A1A);
    margin: 0;
}

/* ===================================
   FAQ LIST
   =================================== */

.faq-page .faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 50px;
}

.faq-page .faq-item {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-page .faq-item:hover {
    box-shadow: 0 6px 20px rgba(128, 194, 66, 0.12);
}

.faq-page .faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 28px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.faq-page .faq-question:hover {
    background: rgba(128, 194, 66, 0.05);
}

.faq-page .faq-question h3 {
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 17px;
    line-height: 1.4;
    color: var(--color-black, #1A1A1A);
    margin: 0;
    flex: 1;
}

.faq-page .faq-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: #F5F5F5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #80C242;
    transition: all 0.3s ease;
}

.faq-page .faq-item.active .faq-icon {
    background: #80C242;
    color: #FFFFFF;
    transform: rotate(45deg);
}

.faq-page .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 28px;
    border-top: 1px solid transparent;
}

.faq-page .faq-item.active .faq-answer {
    max-height: 500px;
    padding: 20px 28px 24px 28px;
    border-top: 1px solid #F0F0F0;
}

.faq-page .faq-answer p {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.7;
    color: #666666;
    margin: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}

.faq-page .faq-item.active .faq-answer p {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   CTA SECTION
   =================================== */

.faq-page .faq-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 35px 40px;
    background: linear-gradient(135deg, #80C242 0%, #6BA832 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(128, 194, 66, 0.3);
}

.faq-page .faq-cta__content {
    flex: 1;
}

.faq-page .faq-cta__title {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 28px;
    line-height: 1.2;
    color: #FFFFFF;
    margin: 0 0 6px 0;
}

.faq-page .faq-cta__text {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.faq-page .faq-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: #FFFFFF;
    color: #80C242;
    border-radius: 12px;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.faq-page .faq-cta__btn:hover {
    background: #FFEAC4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-page .faq-item {
    animation: fadeInUp 0.5s ease both;
}

.faq-page .faq-item:nth-child(1) { animation-delay: 0.05s; }
.faq-page .faq-item:nth-child(2) { animation-delay: 0.1s; }
.faq-page .faq-item:nth-child(3) { animation-delay: 0.15s; }
.faq-page .faq-item:nth-child(4) { animation-delay: 0.2s; }
.faq-page .faq-item:nth-child(5) { animation-delay: 0.25s; }
.faq-page .faq-item:nth-child(6) { animation-delay: 0.3s; }
.faq-page .faq-item:nth-child(7) { animation-delay: 0.35s; }

.faq-page .faq-cta {
    animation: fadeInUp 0.5s ease 0.4s both;
}

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

@media (max-width: 1024px) {
    body.page-faq-template #page {
        padding: 0 20px;
    }

    .faq-page .faq-article {
        padding: 30px 0 50px;
    }

    .faq-page .faq-title {
        font-size: 40px;
    }

    .faq-page .faq-cta {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    .faq-page .faq-cta__content {
        text-align: center;
    }

    .faq-page .faq-cta__title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    body.page-faq-template #page {
        padding: 0 15px;
    }

    .faq-page .container {
        padding: 0 10px;
    }

    .faq-page .faq-header {
        margin-bottom: 30px;
    }

    .faq-page .faq-title {
        font-size: 32px;
    }

    .faq-page .faq-list {
        gap: 12px;
        margin-bottom: 40px;
    }

    .faq-page .faq-question {
        padding: 20px;
        gap: 12px;
    }

    .faq-page .faq-question h3 {
        font-size: 15px;
    }

    .faq-page .faq-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .faq-page .faq-icon svg {
        width: 20px;
        height: 20px;
    }

    .faq-page .faq-item.active .faq-answer {
        padding: 0 20px 20px 20px;
    }

    .faq-page .faq-answer p {
        font-size: 14px;
    }

    .faq-page .faq-cta {
        padding: 24px 20px;
        gap: 20px;
        border-radius: 16px;
    }

    .faq-page .faq-cta__title {
        font-size: 22px;
    }

    .faq-page .faq-cta__text {
        font-size: 14px;
    }

    .faq-page .faq-cta__btn {
        padding: 14px 24px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body.page-faq-template #page {
        padding: 0 10px;
    }

    .faq-page .faq-article {
        padding: 20px 0 40px;
    }

    .faq-page .faq-header {
        margin-bottom: 24px;
    }

    .faq-page .faq-title {
        font-size: 26px;
    }

    .faq-page .faq-list {
        gap: 10px;
        margin-bottom: 30px;
    }

    .faq-page .faq-item {
        border-radius: 12px;
    }

    .faq-page .faq-question {
        padding: 16px;
    }

    .faq-page .faq-question h3 {
        font-size: 14px;
    }

    .faq-page .faq-icon {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }

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

    .faq-page .faq-item.active .faq-answer {
        padding: 0 16px 16px 16px;
    }

    .faq-page .faq-answer p {
        font-size: 13px;
    }

    .faq-page .faq-cta {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .faq-page .faq-cta__title {
        font-size: 20px;
    }

    .faq-page .faq-cta__text {
        font-size: 13px;
    }

    .faq-page .faq-cta__btn {
        padding: 12px 20px;
        font-size: 13px;
    }
}

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

.faq-page .faq-question:focus {
    outline: 3px solid #80C242;
    outline-offset: 2px;
}

.faq-page .faq-cta__btn:focus {
    outline: 3px solid #FFFFFF;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .faq-page .faq-item,
    .faq-page .faq-cta {
        animation: none;
    }

    .faq-page .faq-answer {
        transition: none;
    }

    .faq-page .faq-icon,
    .faq-page .faq-cta__btn {
        transition: none;
    }
}
