/* ==========================================================================
   FAQ Accordion Widget - CSS
   ========================================================================== */

/* CSS Variables */
:root {
    --faq-bg: #ffffff;
    --faq-item-bg: #f8f9fa;
    --faq-item-bg-active: #f0f4f0;
    --faq-border: #e0e0e0;
    --faq-text-primary: #1a1a1a;
    --faq-text-secondary: #666666;
    --faq-accent: #2d5a27;
}

/* ==========================================================================
   Section
   ========================================================================== */
.faq-section {
    background-color: var(--faq-bg);
    padding: 80px 20px;
}

.faq-container {
    max-width: 1200px;
    margin: 0 auto;
}

.faq-wrapper {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

/* ==========================================================================
   Header (Left Side)
   ========================================================================== */
.faq-header {
    width: 35%;
    flex: 0 0 35%;
    position: sticky;
    top: 100px;
}

.faq-decoration {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #17468A 0%, #1E5AAD 50%, #2A7BD8 100%);
    border-radius: 2px;
    margin-bottom: 20px;
}

.faq-header-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Tag Badge - Hero Eyebrow Style */
.faq-tag-wrapper {
    display: flex;
}

.faq-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #17468A;
    background: linear-gradient(135deg,
        rgba(23, 70, 138, 0.08) 0%,
        rgba(30, 90, 173, 0.08) 100%);
    border: 1px solid rgba(23, 70, 138, 0.2);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Shimmer effect */
.faq-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(23, 70, 138, 0.15),
        transparent);
    animation: faq-shimmer 3s infinite;
}

@keyframes faq-shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

.faq-title {
    color: var(--faq-text-primary);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}

.faq-description {
    color: var(--faq-text-secondary);
    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   FAQ Columns
   ========================================================================== */
.faq-columns {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

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

/* ==========================================================================
   FAQ Item
   ========================================================================== */
.faq-item {
    background-color: var(--faq-item-bg);
    border: 1px solid var(--faq-border);
    border-radius: 12px;
    overflow: hidden;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.faq-item.is-open {
    background-color: var(--faq-item-bg-active);
}

/* Item Header (Question) */
.faq-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.faq-item-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.faq-question {
    color: var(--faq-text-primary);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    flex: 1;
    transition: color 0.3s ease;
}

.faq-item.is-open .faq-question {
    color: var(--faq-accent);
}

/* ==========================================================================
   Icon - Plus/Minus
   ========================================================================== */
.faq-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-icon-plus {
    position: relative;
}

.faq-icon-bar {
    position: absolute;
    background-color: var(--faq-text-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
}

.faq-icon-horizontal {
    width: 14px;
    height: 2px;
}

.faq-icon-vertical {
    width: 2px;
    height: 14px;
}

/* Active state - rotate to minus */
.faq-item.is-open .faq-icon-vertical {
    transform: rotate(90deg);
    opacity: 0;
}

.faq-item.is-open .faq-icon-bar {
    background-color: var(--faq-accent);
}

/* ==========================================================================
   Icon - Arrow
   ========================================================================== */
.faq-icon-arrow-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-icon-arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--faq-text-primary);
    border-bottom: 2px solid var(--faq-text-primary);
    transform: rotate(45deg);
    transition: transform 0.3s ease, border-color 0.3s ease;
    margin-top: -4px;
}

.faq-item.is-open .faq-icon-arrow {
    transform: rotate(-135deg);
    margin-top: 4px;
    border-color: var(--faq-accent);
}

/* ==========================================================================
   Answer
   ========================================================================== */
.faq-answer-wrapper {
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
}

.faq-answer {
    padding: 0 24px 20px;
    color: var(--faq-text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

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

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

.faq-answer ul,
.faq-answer ol {
    margin: 0 0 12px;
    padding-left: 20px;
}

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

/* ==========================================================================
   Animations - Entrance
   ========================================================================== */
.faq-header,
.faq-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.faq-header.faq-visible,
.faq-item.faq-visible {
    opacity: 1;
    transform: translateY(0);
}

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

.faq-column-right .faq-item:nth-child(1) { transition-delay: 0.15s; }
.faq-column-right .faq-item:nth-child(2) { transition-delay: 0.25s; }
.faq-column-right .faq-item:nth-child(3) { transition-delay: 0.35s; }
.faq-column-right .faq-item:nth-child(4) { transition-delay: 0.45s; }
.faq-column-right .faq-item:nth-child(5) { transition-delay: 0.55s; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .faq-wrapper {
        flex-direction: column;
        gap: 40px;
    }

    .faq-header {
        width: 100%;
        flex: none;
        position: static;
        max-width: 600px;
    }

    .faq-decoration {
        margin-bottom: 16px;
    }

    .faq-columns {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .faq-section {
        padding: 60px 16px;
    }

    .faq-tag {
        padding: 10px 18px;
        font-size: 12px;
    }

    .faq-header-content {
        gap: 12px;
    }

    .faq-columns {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .faq-column {
        gap: 12px;
    }

    .faq-item-header {
        padding: 16px 20px;
    }

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

    .faq-answer {
        padding: 0 20px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .faq-decoration {
        width: 50px;
        height: 3px;
        margin-bottom: 12px;
    }

    .faq-tag {
        padding: 8px 14px;
        font-size: 11px;
    }

    .faq-title {
        font-size: 24px;
    }

    .faq-description {
        font-size: 14px;
    }

    .faq-item-header {
        padding: 14px 16px;
        gap: 12px;
    }

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

    .faq-answer {
        padding: 0 16px 14px;
        font-size: 13px;
    }

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

    .faq-icon-horizontal {
        width: 12px;
    }

    .faq-icon-vertical {
        height: 12px;
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .faq-header,
    .faq-item {
        opacity: 1;
        transform: none;
        transition: background-color 0.3s ease, box-shadow 0.3s ease;
    }

    .faq-tag::before {
        animation: none;
    }

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

    .faq-icon-bar,
    .faq-icon-arrow,
    .faq-question {
        transition: none;
    }
}

/* ==========================================================================
   Elementor Editor
   ========================================================================== */
.elementor-editor-active .faq-header,
.elementor-editor-active .faq-item {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   Dark Theme
   ========================================================================== */
.faq-section[data-theme="dark"] {
    --faq-bg: #0f0f0f;
    --faq-item-bg: #1a1a1a;
    --faq-item-bg-active: #242424;
    --faq-border: #333333;
    --faq-text-primary: #f5f5f5;
    --faq-text-secondary: #a0a0a0;
    --faq-accent: #7cb876;
}

.faq-section[data-theme="dark"] .faq-decoration {
    background: linear-gradient(90deg, #7cb876 0%, #5a9b54 50%, #3d7d38 100%);
}

.faq-section[data-theme="dark"] .faq-tag {
    color: #7cb876;
    background: linear-gradient(135deg,
        rgba(124, 184, 118, 0.1) 0%,
        rgba(90, 155, 84, 0.1) 100%);
    border-color: rgba(124, 184, 118, 0.2);
}

.faq-section[data-theme="dark"] .faq-tag::before {
    background: linear-gradient(90deg,
        transparent,
        rgba(124, 184, 118, 0.15),
        transparent);
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .faq-section {
        padding: 20px 0;
    }
    
    .faq-wrapper {
        display: block;
    }
    
    .faq-header {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .faq-columns {
        display: block;
    }
    
    .faq-column {
        display: block;
    }
    
    .faq-item {
        page-break-inside: avoid;
        margin-bottom: 10px;
    }
    
    .faq-answer-wrapper {
        height: auto !important;
    }
    
    .faq-icon {
        display: none;
    }
}
