/* ========================================
   FAQ SECTION - DELIGHT EDITION
   Designed for joy and engagement
   ======================================== */

.faq-section {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 50%, #e3f2fd 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

/* Subtle diagonal pattern overlay */
.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(45deg,
            transparent,
            transparent 40px,
            rgba(40, 167, 69, 0.02) 40px,
            rgba(40, 167, 69, 0.02) 80px);
    pointer-events: none;
    z-index: 0;
}

/* Floating decorative shapes - RIGHT (bigger, more visible) */
.faq-section::after {
    content: '';
    position: absolute;
    top: 5%;
    right: 2%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.15) 0%, rgba(129, 199, 132, 0.08) 50%, transparent 70%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    pointer-events: none;
    z-index: 0;
    animation: floatShapeRight 15s ease-in-out infinite;
}

/* Floating decorative shape - LEFT */
.faq-section .container::before {
    content: '';
    position: absolute;
    top: 30%;
    left: -15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(102, 187, 106, 0.12) 0%, rgba(165, 214, 167, 0.06) 50%, transparent 70%);
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    pointer-events: none;
    z-index: 0;
    animation: floatShapeLeft 18s ease-in-out infinite;
}

@keyframes floatShapeRight {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    25% { transform: translate(-20px, 30px) rotate(15deg) scale(1.05); }
    50% { transform: translate(-40px, 50px) rotate(0deg) scale(1.1); }
    75% { transform: translate(-20px, 30px) rotate(-15deg) scale(1.05); }
}

@keyframes floatShapeLeft {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(30px, -30px) rotate(-10deg) scale(1.08); }
    66% { transform: translate(20px, -50px) rotate(10deg) scale(1.15); }
}

/* ========================================
   WAVE DIVIDER STYLES
   ======================================== */

.wave-divider {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
    background: #ffffff;
    margin-top: -1px;
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
}

.faq-section .container {
    position: relative;
    z-index: 1;
}

.faq-section h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #1a365d;
    position: relative;
    display: inline-block;
}

/* Animated underline accent */
.faq-section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #8BC34A, #66BB6A);
    border-radius: 2px;
    animation: underlinePulse 6s ease-in-out infinite;
}

@keyframes underlinePulse {
    0%, 100% { width: 80px; opacity: 0.8; }
    50% { width: 150px; opacity: 1; }
}

.faq-section .lead {
    color: #666;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

/* ========================================
   FAQ ITEM - BASE STYLES
   ======================================== */

.faq-item {
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

/* Hover effect - subtle lift */
.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(40, 167, 69, 0.12);
}

/* Active item gets green glow */
.faq-item.active {
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* ========================================
   FAQ HEADER - INTERACTIVE ZONE
   ======================================== */

.faq-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    position: relative;
    background: #ffffff;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
    text-align: left;
}

/* Hover state - green tint */
.faq-header:hover {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.03) 0%, rgba(32, 201, 151, 0.03) 100%);
}

/* Active state - full green gradient */
.faq-header[aria-expanded="true"],
.faq-header.active {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #ffffff;
}

.faq-header[aria-expanded="true"] .faq-question,
.faq-header.active .faq-question {
    color: #ffffff;
}

/* ========================================
   FAQ ICON - LEFT ACCENT
   ======================================== */

.faq-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-icon i {
    font-size: 1.25rem;
    color: #28a745;
    transition: all 0.3s ease;
}

/* Hover - icon bounces */
.faq-header:hover .faq-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15) 0%, rgba(32, 201, 151, 0.15) 100%);
}

/* Active - icon becomes white circle */
.faq-header[aria-expanded="true"] .faq-icon,
.faq-header.active .faq-icon {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05) rotate(5deg);
}

.faq-header[aria-expanded="true"] .faq-icon i,
.faq-header.active .faq-icon i {
    color: #ffffff;
    transform: scale(1.1);
}

/* ========================================
   FAQ QUESTION TEXT
   ======================================== */

.faq-question {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    transition: color 0.3s ease;
    margin: 0;
    text-align: left;
}

/* ========================================
   FAQ ARROW - ROTATE ANIMATION
   ======================================== */

.faq-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(40, 167, 69, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-arrow i {
    font-size: 0.875rem;
    color: #28a745;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover - arrow pulses */
.faq-header:hover .faq-arrow {
    background: rgba(40, 167, 69, 0.12);
    transform: scale(1.05);
}

/* Active - arrow rotates 180deg */
.faq-header[aria-expanded="true"] .faq-arrow,
.faq-header.active .faq-arrow {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(180deg);
}

.faq-header[aria-expanded="true"] .faq-arrow i,
.faq-header.active .faq-arrow i {
    color: #ffffff;
}

/* ========================================
   FAQ BODY - CONTENT AREA
   ======================================== */

.faq-body {
    padding: 1.5rem 1.5rem 1.5rem 4.75rem;
    color: #495057;
    line-height: 1.7;
    background: #ffffff;
    border-top: 1px solid rgba(40, 167, 69, 0.1);
}

.faq-body p {
    margin-bottom: 0;
}

/* ========================================
   COLLAPSE ANIMATION SMOOTHNESS
   ======================================== */

.faq-item .collapse {
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item .collapsing {
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   STAGGER ANIMATION ON PAGE LOAD
   CSS-only entrance with stagger effect
   ======================================== */

/* CSS-only entrance animation */
.faq-item {
    animation: faqItemEntrance 0.6s ease-out backwards;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes faqItemEntrance {
    from {
        opacity: 0;
        transform: translateY(25px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* JS-enhanced version (if JS available) */
.js-enabled .faq-item {
    opacity: 0;
    transform: translateY(20px);
    animation: none;
}

.js-enabled .faq-item.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-enabled .faq-item:nth-child(1) { transition-delay: 0.1s; }
.js-enabled .faq-item:nth-child(2) { transition-delay: 0.15s; }
.js-enabled .faq-item:nth-child(3) { transition-delay: 0.2s; }
.js-enabled .faq-item:nth-child(4) { transition-delay: 0.25s; }
.js-enabled .faq-item:nth-child(5) { transition-delay: 0.3s; }

/* ========================================
   SECTION HEADER GLOW EFFECT
   ======================================== */

.faq-section .text-center {
    position: relative;
}

.faq-section .text-center::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 80px;
    background: radial-gradient(ellipse, rgba(76, 175, 80, 0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: headerGlow 4s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.8; transform: translateX(-50%) scale(1.1); }
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

@media (max-width: 768px) {
    .faq-section {
        padding: 3rem 0;
    }

    .faq-header {
        padding: 1.25rem;
    }

    .faq-icon {
        width: 40px;
        height: 40px;
        margin-right: 1rem;
    }

    .faq-icon i {
        font-size: 1rem;
    }

    .faq-question {
        font-size: 1rem;
    }

    .faq-body {
        padding: 1.25rem 1.25rem 1.25rem 3.5rem;
        font-size: 0.9375rem;
    }

    .faq-arrow {
        width: 32px;
        height: 32px;
        margin-left: 0.75rem;
    }
}

@media (max-width: 576px) {
    .faq-body {
        padding: 1.25rem;
    }

    .faq-question {
        font-size: 0.95rem;
    }
}

/* ========================================
   ACCESSIBILITY - REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .faq-item,
    .faq-header,
    .faq-icon,
    .faq-icon i,
    .faq-arrow,
    .faq-arrow i,
    .faq-item .collapse,
    .faq-item .collapsing {
        transition: none !important;
        animation: none !important;
    }

    .js-enabled .faq-item {
        opacity: 1;
        transform: none;
    }

    .faq-header[aria-expanded="true"] .faq-arrow,
    .faq-header.active .faq-arrow {
        transform: rotate(180deg);
    }
}

/* ========================================
   FOCUS STATES FOR KEYBOARD NAV
   ======================================== */

.faq-header:focus {
    outline: 2px solid #28a745;
    outline-offset: 2px;
}

.faq-header:focus:not(:focus-visible) {
    outline: none;
}

/* ========================================
   SHINE EFFECT ON HOVER
   ======================================== */

.faq-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.faq-item:hover .faq-header::before {
    left: 100%;
}

.faq-header[aria-expanded="true"]::before,
.faq-header.active::before {
    display: none;
}

/* ========================================
   WAVE DIVIDERS - KORE PAGES ONLY
   ======================================== */

/* Wave Divider: Hero → Content */
.wave-divider-hero {
    position: relative;
    width: 100%;
    height: 100px;
    overflow: hidden;
    background: transparent;
    margin-top: -100px;
    margin-bottom: -1px;
    z-index: 1;
}

.wave-divider-hero svg {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
}

/* Wave Divider: K.O.R.E. → White section */
.wave-divider-kore {
    position: relative;
    width: 100%;
    height: 100px;
    overflow: hidden;
    background: #000000;
    margin-top: -1px;
    margin-bottom: -1px;
}

.wave-divider-kore svg {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
}

/* Wave Divider: Content → FAQ */
.wave-divider-faq {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: transparent;
    margin-top: -1px;
}

.wave-divider-faq svg {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
}

/* Wave Divider: FAQ → CTA */
.wave-divider-cta {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
    background: linear-gradient(180deg, #0f0f0f 0%, #0f0f0f 100%);
    margin-bottom: -1px;
}

.wave-divider-cta svg {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
}

/* Wave Divider: CTA → Footer */
.wave-divider-footer {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
    background: #1a4a2a;
    margin-bottom: -1px;
}

.wave-divider-footer svg {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
}

/* ========================================
   FAQ DARK THEME - KORE PAGES ONLY
   ======================================== */

.faq-section.faq-dark {
    background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
    padding: 4rem 0 5rem;
}

/* Remove light theme decorations */
.faq-section.faq-dark::before,
.faq-section.faq-dark::after,
.faq-section.faq-dark .container::before {
    display: none;
}

/* Subtle texture overlay for depth */
.faq-section.faq-dark .container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect fill="none" width="100" height="100"/><rect fill="rgba(255,255,255,0.008)" x="0" y="0" width="50" height="50"/><rect fill="rgba(255,255,255,0.008)" x="50" y="50" width="50" height="50"/></svg>');
    pointer-events: none;
    z-index: 0;
}

/* Dark theme header */
.faq-section.faq-dark h2 {
    color: #ffffff;
}

.faq-section.faq-dark h2::after {
    display: none; /* No pulsing underline - calm design */
}

.faq-section.faq-dark .lead {
    color: rgba(255, 255, 255, 0.7);
}

/* Dark theme items - calm, balanced design */
.faq-section.faq-dark .faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    transition: border-color 0.4s ease, background-color 0.4s ease;
}

.faq-section.faq-dark .faq-item:hover {
    border-color: rgba(40, 167, 69, 0.3);
    background: rgba(255, 255, 255, 0.035);
    transform: none;
}

.faq-section.faq-dark .faq-item.active,
.faq-section.faq-dark .faq-item:has(.collapse.show) {
    border-color: rgba(40, 167, 69, 0.5);
    background: rgba(40, 167, 69, 0.05);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.1);
}

/* Dark theme header - gentle transitions */
.faq-section.faq-dark .faq-header {
    background: transparent;
    transition: background-color 0.4s ease;
}

.faq-section.faq-dark .faq-header:hover {
    background: rgba(255, 255, 255, 0.015);
}

.faq-section.faq-dark .faq-header[aria-expanded="true"] {
    background: rgba(40, 167, 69, 0.08);
}

/* Dark theme icon - no scale animation */
.faq-section.faq-dark .faq-icon {
    background: rgba(40, 167, 69, 0.1);
    transition: background-color 0.4s ease;
    transform: none !important;
}

.faq-section.faq-dark .faq-icon i {
    color: #28a745;
    transform: none !important;
}

.faq-section.faq-dark .faq-header:hover .faq-icon {
    background: rgba(40, 167, 69, 0.12);
    transform: none !important;
}

.faq-section.faq-dark .faq-header[aria-expanded="true"] .faq-icon {
    background: rgba(40, 167, 69, 0.18);
    transform: none !important;
}

.faq-section.faq-dark .faq-header[aria-expanded="true"] .faq-icon i {
    color: #28a745;
    transform: none !important;
}

/* Dark theme question text */
.faq-section.faq-dark .faq-question {
    color: #ffffff;
}

.faq-section.faq-dark .faq-header[aria-expanded="true"] .faq-question {
    color: #ffffff;
}

/* Dark theme arrow - gentle rotation only */
.faq-section.faq-dark .faq-arrow {
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.4s ease, background-color 0.4s ease;
}

.faq-section.faq-dark .faq-arrow i {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.4s ease;
}

.faq-section.faq-dark .faq-header:hover .faq-arrow {
    background: rgba(255, 255, 255, 0.06);
    transform: none;
}

.faq-section.faq-dark .faq-header[aria-expanded="true"] .faq-arrow {
    background: rgba(40, 167, 69, 0.15);
    transform: rotate(180deg);
}

.faq-section.faq-dark .faq-header[aria-expanded="true"] .faq-arrow i {
    color: #28a745;
}

/* Dark theme body */
.faq-section.faq-dark .faq-body {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dark theme header glow */
.faq-section.faq-dark .text-center::before {
    background: radial-gradient(ellipse, rgba(40, 167, 69, 0.15) 0%, transparent 70%);
}

/* Dark theme focus */
.faq-section.faq-dark .faq-header:focus {
    outline: 2px solid #28a745;
}

/* Dark theme - no accent line on hover (calm design) */
.faq-section.faq-dark .faq-header::after {
    display: none;
}

/* Dark theme - disable shine effect */
.faq-section.faq-dark .faq-header::before {
    display: none;
}
