/* ===== CURRENT AFFAIRS HEADER (Premium Gradient) ===== */
.ca-header {
    padding: 140px 0 100px;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.4), rgba(15, 23, 42, 0.9)),
        linear-gradient(135deg, var(--bg-main), #020617);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 60px;
}

.ca-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>');
    opacity: 0.5;
    z-index: 1;
}

.ca-header h1 {
    font-size: 3rem;
    margin-bottom: 16px;
    font-weight: 900;
    letter-spacing: -1px;
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.ca-header p {
    font-size: 1.15rem;
    opacity: 0.8;
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
    color: var(--text-muted);
}

/* ===== CA TABS (Premium Pill Design) ===== */
.ca-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: -85px;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 99px;
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 50px -10px rgba(0, 0, 0, 0.5);
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.ca-tab {
    padding: 14px 28px;
    background: transparent;
    border-radius: 99px;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-muted);
    border: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 0.95rem;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.ca-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    z-index: -1;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ca-tab:hover::before {
    opacity: 1;
    transform: scale(1);
}

.ca-tab:hover {
    color: var(--primary);
}

.ca-tab.active {
    background: var(--grad-primary);
    color: white;
    box-shadow: 0 8px 24px -6px rgba(16, 185, 129, 0.4);
}

.ca-tab.active::before {
    display: none;
}

/* ===== CA GRID & PREMIUM CARDS (2026) ===== */
.ca-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
    margin-top: 60px;
    padding-bottom: 80px;
}

.ca-card {
    opacity: 0;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.3);
}

.ca-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(30, 41, 59, 0.6);
    border-color: var(--primary);
    box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.5), 0 0 25px rgba(16, 185, 129, 0.1);
}

.ca-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.1), transparent 70%);
    pointer-events: none;
}

.ca-icon-box {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 15px -5px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
}

.ca-card:hover .ca-icon-box {
    background: var(--grad-primary);
    color: white;
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.3);
}

.ca-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.4;
    margin: 0;
}

.ca-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.ca-tag {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.ca-download-btn {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--secondary);
    padding: 16px;
    border-radius: 18px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ca-card:hover .ca-download-btn {
    background: var(--grad-primary);
    color: white;
    border-color: transparent;
    transform: scale(1.02);
    box-shadow: 0 12px 24px -8px rgba(16, 185, 129, 0.4);
}

/* ===== QUIZ SECTION (Premium Quiz UI) ===== */
.quiz-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 48px;
    border-radius: 40px;
    display: none;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.5);
}

.quiz-q {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 32px;
    color: var(--secondary);
    line-height: 1.6;
}

.quiz-opt {
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 600;
    text-align: left;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.quiz-opt:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
}

.quiz-opt.correct {
    background: rgba(34, 197, 94, 0.1) !important;
    border-color: #22c55e !important;
    color: #4ade80 !important;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.quiz-opt.wrong {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: #ef4444 !important;
    color: #f87171 !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

/* Tablet Responsiveness */
@media (max-width: 992px) {
    .ca-header {
        padding: 125px 16px 65px !important;
        margin-bottom: 25px !important;
    }

    .ca-header h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .ca-tabs {
        margin-top: -50px !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        width: 100% !important;
        max-width: none !important;
        padding: 8px 16px !important;
        border-radius: 0 !important;
        background: transparent !important;
        border: none !important;
        -ms-overflow-style: none;
        /* IE/Edge */
        scrollbar-width: none;
        /* Firefox */
        gap: 8px !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }

    .ca-tabs::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .ca-tab {
        flex: 0 0 auto !important;
        width: auto !important;
        text-align: center;
        border-radius: 12px !important;
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .ca-tab.active {
        background: var(--grad-primary) !important;
        border-color: transparent !important;
        color: white !important;
        box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3) !important;
    }
}

/* Mobile Responsiveness */
@media (max-width: 650px) {
    .ca-header {
        padding: 80px 0 60px;
    }

    .ca-header h1 {
        font-size: 1.8rem;
    }

    .ca-grid {
        grid-template-columns: 1fr;
        padding: 0 16px 40px;
    }

    .quiz-container {
        padding: 32px 24px;
        border-radius: 24px;
        margin: 40px 16px;
    }

    .quiz-q {
        font-size: 1.25rem;
    }

    .quiz-opt {
        padding: 16px;
        border-radius: 16px;
    }
}

/* Spectrum Sync: Current Affairs Light Mode Refinements */
.light-mode .ca-header {
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.05), #f8fafc),
        linear-gradient(135deg, #f1f5f9, #ffffff);
    color: var(--secondary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.light-mode .ca-header h1 {
    color: var(--secondary);
    text-shadow: none;
}

.light-mode .ca-header p {
    color: var(--text-muted);
}

.light-mode .ca-tabs {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.06);
    margin-top: -50px;
}

.light-mode .ca-tab {
    color: var(--text-muted);
}

.light-mode .ca-tab:hover {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
}

.light-mode .ca-tab.active {
    background: var(--grad-primary);
    color: white !important;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.light-mode .ca-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.12);
}

.light-mode .ca-card:hover {
    background: white;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.15);
}

.light-mode .ca-title {
    color: var(--secondary);
}

.light-mode .ca-icon-box {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.light-mode .ca-download-btn {
    background: var(--grad-primary);
    color: white !important;
    border: none;
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.2);
}

.light-mode .ca-download-btn span,
.light-mode .ca-download-btn i {
    color: white !important;
}

.light-mode .ca-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
    color: white !important;
}

.light-mode .quiz-container {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 20px 50px -15px rgba(15, 23, 42, 0.08);
}

.light-mode .quiz-opt {
    background: #fdfdfd;
    border: 1px solid rgba(0, 0, 0, 0.04);
    color: #334155;
}

.light-mode .quiz-opt:hover {
    background: #f0fdf4;
    border-color: rgba(16, 185, 129, 0.1);
}

.light-mode .badge-pro {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
}