/**
 * Mirae FAQ Styles
 */

/* Base FAQ Wrapper */
.mirae-faq-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Header */
.faq-header {
    text-align: center;
    margin-bottom: 40px;
}

.faq-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    line-height: 1.2;
}

.faq-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* FAQ Items Container */
.faq-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* FAQ Item Base */
.faq-item {
    transition: all 0.3s ease;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: all 0.3s ease;
}

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

.faq-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.faq-answer-content {
    padding: 20px 20px 20px 20px;
    color: #555;
    line-height: 1.7;
    font-size: 1rem;
}

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

.faq-item.active .faq-answer {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
}

/* ========================================
   STYLE 1: Accordion (Classic)
   ======================================== */
.faq-style-accordion .faq-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.faq-style-accordion .faq-item:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
}

.faq-style-accordion .faq-item.active {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.15);
}

.faq-style-accordion .faq-question {
    background: #f8f9fa;
}

.faq-style-accordion .faq-item.active .faq-question {
    background: #0073aa;
}

.faq-style-accordion .faq-item.active .faq-question-text {
    color: #fff;
}

.faq-style-accordion .faq-toggle {
    color: #0073aa;
}

.faq-style-accordion .faq-item.active .faq-toggle {
    color: #fff;
}

/* ========================================
   STYLE 2: Card
   ======================================== */
.faq-style-card .faq-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
}

.faq-style-card .faq-item:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.faq-style-card .faq-item.active {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.faq-style-card .faq-question {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.faq-style-card .faq-question-text {
    color: #fff;
}

.faq-style-card .faq-toggle {
    color: #fff;
}

.faq-style-card .faq-answer {
    background: #fff;
}

/* ========================================
   STYLE 3: Minimal
   ======================================== */
.faq-style-minimal .faq-item {
    border-bottom: 2px solid #e0e0e0;
}

.faq-style-minimal .faq-item:last-child {
    border-bottom: none;
}

.faq-style-minimal .faq-item:hover {
    border-color: #0073aa;
}

.faq-style-minimal .faq-item.active {
    border-color: #0073aa;
}

.faq-style-minimal .faq-question {
    padding: 25px 10px;
    background: transparent;
}

.faq-style-minimal .faq-question:hover .faq-question-text {
    color: #0073aa;
}

.faq-style-minimal .faq-toggle {
    color: #666;
}

.faq-style-minimal .faq-item.active .faq-toggle {
    color: #0073aa;
}

.faq-style-minimal .faq-answer-content {
    padding: 0 10px 25px 10px;
}

/* ========================================
   STYLE 4: Bordered
   ======================================== */
.faq-style-bordered .faq-item {
    border: 3px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
}

.faq-style-bordered .faq-item:hover {
    border-color: #ff6b6b;
}

.faq-style-bordered .faq-item.active {
    border-color: #ff6b6b;
    background: #fff5f5;
}

.faq-style-bordered .faq-question {
    background: transparent;
}

.faq-style-bordered .faq-question:hover .faq-question-text {
    color: #ff6b6b;
}

.faq-style-bordered .faq-item.active .faq-question-text {
    color: #ff6b6b;
}

.faq-style-bordered .faq-toggle {
    background: #e0e0e0;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: #666;
}

.faq-style-bordered .faq-item.active .faq-toggle {
    background: #ff6b6b;
    color: #fff;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .faq-title {
        font-size: 2rem;
    }
    
    .faq-description {
        font-size: 1rem;
    }
    
    .faq-question {
        padding: 15px;
    }
    
    .faq-question-text {
        font-size: 1.1rem;
    }
    
    .faq-answer-content {
        padding: 15px 15px 15px 15px;
        font-size: 0.95rem;
    }
    
    .faq-toggle {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .mirae-faq-wrapper {
        padding: 0 15px;
        margin: 30px auto;
    }
    
    .faq-header {
        margin-bottom: 30px;
    }
    
    .faq-title {
        font-size: 1.75rem;
    }
    
    .faq-question {
        padding: 12px;
    }
    
    .faq-question-text {
        font-size: 1rem;
    }
    
    .faq-answer-content {
        padding: 12px 12px 12px 12px;
    }
}

/* ========================================
   Animation helpers
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item.active .faq-answer-content {
    animation: fadeIn 0.3s ease-out;
}
