/* ====================================================
   FAQ Page â€“ Futuristic Glassmorphism Design
   LINK ACADEMY â€” Premium Edition
   ==================================================== */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

/* ---------- CSS Variables ---------- */
:root {
    --faq-primary: #0B1F33;
    --faq-accent: #00A8E8;
    --faq-gold: #F0B429;
    --faq-glass: rgba(255, 255, 255, 0.06);
    --faq-glass-border: rgba(255, 255, 255, 0.12);
    --faq-glow: rgba(0, 168, 232, 0.4);
    --faq-dark-bg: #060e1a;
}

/* ---------- Page Base ---------- */
.faq-page-wrapper {
    background: var(--faq-dark-bg);
    min-height: 100vh;
    color: white;
    font-family: 'Tajawal', sans-serif;
    overflow-x: hidden;
}

/* ---------- Hero Section ---------- */
.faq-hero {
    position: relative;
    padding: 120px 20px 100px;
    text-align: center;
    background: linear-gradient(135deg, var(--faq-primary) 0%, #112240 60%, #0d1b2a 100%);
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}

.faq-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 168, 232, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.faq-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -60px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(240, 180, 41, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.faq-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.faq-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 168, 232, 0.15);
    border: 1px solid rgba(0, 168, 232, 0.3);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--faq-accent);
    margin-bottom: 24px;
    letter-spacing: 1px;
}

.faq-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #ffffff 0%, var(--faq-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.faq-hero p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.7);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---------- Main Content ---------- */
.faq-content {
    padding: 80px 0 80px;
    position: relative;
    background: linear-gradient(180deg, #060e1a 0%, #0b1624 100%);
}

/* glowing orb decorations */
.faq-content::before {
    content: '';
    position: absolute;
    top: 100px;
    left: -80px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(0, 168, 232, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.faq-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -60px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(240, 180, 41, 0.07) 0%, transparent 70%);
    pointer-events: none;
}

.faq-content .container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Category Tabs ---------- */
.faq-categories {
    padding: 0 0 60px;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.tab-btn {
    background: var(--faq-glass);
    border: 1px solid var(--faq-glass-border);
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 26px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(6px);
}

.tab-btn:hover,
.tab-btn.active {
    background: linear-gradient(135deg, var(--faq-accent), #0076a8);
    border-color: var(--faq-accent);
    color: white;
    box-shadow: 0 0 18px var(--faq-glow);
}

/* ---------- Section Title ---------- */
.category-panel h2 {
    display: none;
    /* Hidden â€” the badge shows the context */
}

/* ---------- FAQ Items ---------- */
.category-content {
    display: grid;
    gap: 16px;
}

.faq-item {
    background: var(--faq-glass);
    border: 1px solid var(--faq-glass-border);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.35s ease;
}

.faq-item:hover {
    border-color: rgba(0, 168, 232, 0.35);
    box-shadow: 0 8px 32px rgba(0, 168, 232, 0.12);
    transform: translateY(-2px);
}

.faq-item.active {
    border-color: rgba(0, 168, 232, 0.5);
    box-shadow: 0 10px 40px rgba(0, 168, 232, 0.18);
}

.faq-question {
    padding: 22px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    gap: 16px;
}

.faq-question h3 {
    margin: 0;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.5;
    flex: 1;
    text-align: right;
}

.toggle-btn {
    background: rgba(0, 168, 232, 0.12);
    border: 1px solid rgba(0, 168, 232, 0.25);
    color: var(--faq-accent);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.faq-item.active .toggle-btn {
    background: var(--faq-accent);
    color: white;
    transform: rotate(45deg);
    box-shadow: 0 0 14px var(--faq-glow);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
    max-height: 800px;
}

.faq-answer-inner {
    padding: 0 26px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.faq-answer-inner p {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.97rem;
    line-height: 1.8;
}

/* If we are rendering without the inner wrapper (legacy) */
.faq-answer>p {
    margin: 0;
    padding: 16px 26px 26px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.97rem;
    line-height: 1.8;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ---------- Empty State ---------- */
.faq-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.1rem;
}

.faq-empty i {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
    color: var(--faq-accent);
    opacity: 0.5;
}

/* ---------- CTA / Contact Section ---------- */
.contact-faq {
    padding: 60px 20px 80px;
    text-align: center;
    background: linear-gradient(135deg, #0b1624 0%, #06111e 100%);
    position: relative;
    overflow: hidden;
}

.contact-faq::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 168, 232, 0.07) 0%, transparent 70%);
    pointer-events: none;
}

.contact-faq-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
    background: var(--faq-glass);
    border: 1px solid var(--faq-glass-border);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    padding: 50px 40px;
}

.contact-faq-content h2 {
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 800;
    margin-bottom: 14px;
    color: white;
}

.contact-faq-content p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 30px;
    font-size: 1rem;
    line-height: 1.6;
}

.contact-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--faq-accent) 0%, #0076a8 100%);
    color: white;
    padding: 14px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px var(--faq-glow);
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0, 168, 232, 0.5);
    color: white;
}

/* ====================================================
   Mobile & Responsive Breakpoints
   ==================================================== */

/* Tablet */
@media (max-width: 768px) {
    .faq-hero {
        padding: 90px 16px 80px;
        clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    }

    .faq-content {
        padding: 50px 0;
    }

    .faq-content .container {
        padding: 0 14px;
    }

    .category-tabs {
        gap: 8px;
    }

    .tab-btn {
        padding: 8px 18px;
        font-size: 0.88rem;
    }

    .faq-question {
        padding: 18px 18px;
    }

    .faq-item:hover {
        transform: none;
    }

    .contact-faq-content {
        padding: 36px 24px;
    }
}

/* Phone â€” small */
@media (max-width: 480px) {
    .faq-hero {
        padding: 80px 14px 70px;
    }

    .faq-hero-badge {
        font-size: 0.78rem;
        padding: 6px 16px;
    }

    .category-tabs {
        flex-direction: row;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        scrollbar-width: none;
    }

    .category-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .faq-question {
        padding: 16px 14px;
        gap: 12px;
    }

    .faq-question h3 {
        font-size: 0.9rem;
        color: var(--faq-primary);
        /* Changed to dark for light background */
    }

    .toggle-btn {
        width: 32px;
        height: 32px;
    }

    .faq-answer>p,
    .faq-answer-inner p {
        font-size: 0.9rem;
        padding: 12px 14px 20px;
        color: #334155;
        /* Dark gray for readability */
    }

    .contact-faq-content {
        padding: 28px 16px;
        border-radius: 18px;
    }

    .contact-btn {
        padding: 12px 28px;
        font-size: 0.9rem;
    }
}