/* ============================================ */
/* FAQ SECTION - AARIF BLOG WRITER (IMPROVED)   */
/* ============================================ */

/* Main Container */
.faq-container-advanced {
    max-width: 100%;
    margin: 40px auto 20px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Master Toggle Button (Frequently Asked Questions) */
.faq-toggle-btn {
    width: 100%;
    padding: 24px 32px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff !important; /* Force white text visibility here */
    border: none;
    text-align: left;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.faq-toggle-btn:hover {
    background: #2563eb;
}

/* Dropdown Content Area */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

.faq-content.active {
    max-height: 5000px; /* High value to accommodate all text */
}

/* Subsection Header (AI Blog Writer Studio) */
.faq-content h3 {
    padding: 25px 30px;
    margin: 0;
    background: #f8fafc;
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 800;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Individual FAQ Row */
.faq-item-advanced {
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}

.faq-item-advanced:last-child {
    border-bottom: none;
}

/* Hide Native Checkbox */
.faq-item-advanced input[type="checkbox"] {
    display: none;
}

/* Question Label - FIXED VISIBILITY */
.faq-question {
    padding: 22px 30px 22px 75px;
    cursor: pointer;
    position: relative;
    font-weight: 600;
    color: #1e293b; /* Dark slate for perfect readability */
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.faq-question:hover {
    color: #2563eb;
    background: #f8fafc;
}

/* Question Icon (Q) */
.faq-question::before {
    content: 'Q';
    position: absolute;
    left: 25px;
    font-weight: 800;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Plus/Minus Indicator */
.faq-question::after {
    content: '+';
    position: absolute;
    right: 30px;
    font-size: 1.6rem;
    font-weight: 300;
    color: #94a3b8;
    transition: all 0.3s ease;
}

/* Answer Area */
.faq-answer {
    padding: 0 30px 0 75px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #475569; /* Balanced grey for long-form reading */
    font-size: 1rem;
    line-height: 1.7;
    position: relative;
}

/* Answer Icon (A) */
.faq-answer::before {
    content: 'A';
    position: absolute;
    left: 25px;
    top: 0px; /* Aligns with the first line of text */
    font-weight: 800;
    color: #059669; /* Professional Emerald Green */
    background: rgba(5, 150, 105, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Open State Animations */
.faq-item-advanced input[type="checkbox"]:checked ~ .faq-question {
    color: #2563eb;
    background: #f1f7ff;
}

.faq-item-advanced input[type="checkbox"]:checked ~ .faq-question::after {
    content: '−';
    transform: rotate(180deg);
    color: #2563eb;
}

.faq-item-advanced input[type="checkbox"]:checked ~ .faq-answer {
    max-height: 800px;
    padding-bottom: 25px;
    padding-top: 10px;
}

.faq-item-advanced input[type="checkbox"]:checked ~ .faq-answer::before {
    opacity: 1;
    top: 10px; /* Slides into place slightly */
}

/* Responsive Mobile Optimization */
@media (max-width: 768px) {
    .faq-toggle-btn { padding: 18px 24px; font-size: 1.15rem; }
    .faq-question { padding: 18px 20px 18px 65px; font-size: 1rem; }
    .faq-answer { padding-left: 65px; padding-right: 20px; }
    
    .faq-question::before, 
    .faq-answer::before {
        left: 15px;
        width: 32px;
        height: 32px;
    }
}