/**
 * FAQ Block - Modern 2025 Design
 * Clean, professional, with smooth micro-interactions
 */

/* =================== BASE STYLES =================== */
.faq-section {
    padding: 5rem 1.5rem;
    position: relative;
}

@media (min-width: 768px) {
    .faq-section {
        padding: 7rem 2rem;
    }
}

/* Background Variations */
.faq-bg-white {
    background: #ffffff;
}

.faq-bg-gray-50 {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.faq-bg-blue-50 {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

/* Container */
.faq-container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.faq-container.narrow {
    max-width: 52rem;
}

.faq-container.wide {
    max-width: 90rem;
}

/* =================== HEADER STYLES =================== */
.faq-header {
    margin-bottom: 4rem;
    animation: fadeInUp 0.6s ease-out;
}

.faq-header.text-center {
    text-align: center;
}

.faq-header.text-left {
    text-align: left;
}

.faq-header .subtitle {
    display: inline-block;
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    position: relative;
    padding: 0.25rem 0;
}

.faq-header .subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    transform: scaleX(0.3);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.faq-header:hover .subtitle::after {
    transform: scaleX(1);
}

.faq-header h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1.25rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .faq-header h2 {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .faq-header h2 {
        font-size: 3.5rem;
    }
}

.faq-header .description {
    font-size: 1.125rem;
    color: #64748b;
    line-height: 1.75;
    max-width: 42rem;
}

.text-center .description {
    margin-left: auto;
    margin-right: auto;
}

/* =================== ACCORDION STYLE - MODERN 2025 =================== */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.faq-accordion .faq-item {
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.faq-accordion .faq-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.faq-accordion .faq-item:hover {
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.faq-accordion .faq-item:hover::before {
    opacity: 1;
}

.faq-accordion .faq-trigger {
    width: 100%;
    text-align: left;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
}

.faq-accordion .faq-trigger:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.02) 0%, rgba(139, 92, 246, 0.02) 100%);
}

.faq-accordion .faq-trigger:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.faq-accordion .faq-trigger span:first-child {
    font-weight: 600;
    font-size: 1.125rem;
    color: #1e293b;
    padding-right: 2.5rem;
    flex: 1;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

@media (min-width: 768px) {
    .faq-accordion .faq-trigger span:first-child {
        font-size: 1.25rem;
    }
}

/* Icon Animation */
.faq-accordion .faq-trigger svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #3b82f6;
}

.faq-accordion .faq-trigger svg.rotate-180 {
    transform: rotate(180deg);
    color: #8b5cf6;
}

/* Answer Content */
.faq-accordion .faq-content {
    background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
}

.faq-accordion .faq-content.hidden {
    max-height: 0;
    opacity: 0;
}

.faq-accordion .faq-content:not(.hidden) {
    max-height: 1000px; /* Adjust based on content */
    opacity: 1;
    transition: max-height 0.3s ease-in, opacity 0.25s ease-in 0.05s;
}

.faq-accordion .faq-content > div {
    padding: 1.5rem 2rem 2rem 2rem;
    color: #475569;
    line-height: 1.8;
    font-size: 1.0625rem;
}

.faq-accordion .faq-content > div::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2rem;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 2px;
}

/* =================== CARDS STYLE - MODERN GRID =================== */
.faq-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@media (min-width: 768px) {
    .faq-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

.faq-cards .faq-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 12px 24px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.faq-cards .faq-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.faq-cards .faq-card:hover::before {
    transform: scaleX(1);
}

.faq-cards .faq-card:hover {
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.04),
        0 24px 48px rgba(0, 0, 0, 0.06);
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.1);
}

.faq-cards .faq-card h3 {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    font-size: 1.25rem;
    line-height: 1.4;
}

.faq-cards .faq-card h3 .q-marker {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.faq-cards .faq-card .answer {
    color: #64748b;
    line-height: 1.75;
    padding-left: 3rem;
    font-size: 1.0625rem;
}

/* =================== MINIMAL STYLE - CLEAN & SIMPLE =================== */
.faq-minimal {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.faq-minimal .faq-item {
    padding: 1.5rem;
    padding-left: 2rem;
    border-left: 3px solid transparent;
    border-image: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%) 1;
    transition: all 0.3s ease;
    position: relative;
}

.faq-minimal .faq-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.03) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.faq-minimal .faq-item:hover {
    padding-left: 2.5rem;
}

.faq-minimal .faq-item:hover::after {
    opacity: 1;
}

.faq-minimal .faq-item h3 {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.faq-minimal .faq-item p {
    color: #64748b;
    line-height: 1.75;
    font-size: 1.0625rem;
}

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

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

/* =================== RESPONSIVE ADJUSTMENTS =================== */
@media (max-width: 640px) {
    .faq-accordion .faq-trigger {
        padding: 1.25rem 1.5rem;
    }

    .faq-accordion .faq-content > div {
        padding: 1.25rem 1.5rem 1.5rem 1.5rem;
    }

    .faq-cards .faq-card {
        padding: 1.5rem;
    }

    .faq-minimal .faq-item {
        padding: 1.25rem;
        padding-left: 1.5rem;
    }
}

/* =================== ACCESSIBILITY =================== */
.faq-trigger:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .faq-accordion .faq-item,
    .faq-accordion .faq-trigger,
    .faq-accordion .faq-content,
    .faq-cards .faq-card,
    .faq-minimal .faq-item {
        transition: none;
    }

    .faq-accordion .faq-content:not(.hidden) {
        animation: none;
    }
}

/* =================== PRINT STYLES =================== */
@media print {
    .faq-accordion .faq-content {
        display: block !important;
    }

    .faq-accordion .faq-trigger svg {
        display: none;
    }
}