/* --- UI Foundation & Variables --- */
:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --accent: #6f42c1;
    --dark-bg: #05070a;
    --sidebar-bg: #0a0c10;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-muted: #94a3b8;
    --nav-height: 72px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--dark-bg);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* --- Premium Glow Button --- */
.btn-glow-sm {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.2);
}

.btn-glow-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(111, 66, 193, 0.4);
    filter: brightness(1.1);
}

/* --- Fixed Navbar --- */
.navbar {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(5, 7, 10, 0.85);
    border-bottom: 1px solid var(--glass-border);
    height: var(--nav-height);
    z-index: 1100;
}

/* --- Layout Engine --- */
.app-container {
    display: flex;
    margin-top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow: hidden;
}

/* --- Sidebar (Desktop) --- */
.sidebar {
    width: 320px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    padding: 2rem 1.5rem;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-heading {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 700;
    opacity: 0.8;
}

/* --- Content Pane --- */
.content-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: 3rem;
    background: radial-gradient(circle at 50% 0%, rgba(13, 110, 253, 0.07), transparent);
}

/* --- Mobile Navigation (Scrollable Chips) --- */
.mobile-topic-nav {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 14px 15px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: var(--nav-height);
    z-index: 1000;
    gap: 10px;
    scrollbar-width: none;
}

.mobile-topic-nav::-webkit-scrollbar { display: none; }

.mobile-chip {
    padding: 8px 20px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition);
    cursor: pointer;
}

.mobile-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

/* --- Category Items (Sidebar List) --- */
.category-item {
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(4px);
}

.category-item.active {
    background: rgba(13, 110, 253, 0.1);
    color: var(--primary);
    border: 1px solid rgba(13, 110, 253, 0.2);
    font-weight: 600;
}

/* --- Interview Q&A Cards --- */
.qa-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.qa-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.qa-header {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.q-number {
    background: rgba(13, 110, 253, 0.15);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.qa-answer {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    display: none;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.answer-label {
    color: #10b981;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.answer-label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
}

.qa-card.open {
    border-color: var(--primary);
    background: rgba(13, 110, 253, 0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.qa-card.open .qa-answer { display: block; }

/* --- Search & Utility --- */
.search-box .form-control {
    border-radius: 8px;
    padding: 10px 15px;
}

.promo-box {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), rgba(111, 66, 193, 0.1));
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

/* --- Mobile Responsive Overrides --- */
@media (max-width: 992px) {
    .app-container {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    
    .navbar { height: 64px; }
    
    .sidebar {
        display: none !important;
    }

    .content-area {
        padding: 2rem 1rem;
        background: none;
    }

    .display-6 {
        font-size: 1.75rem;
    }
    
    .qa-header {
        padding: 1.25rem;
        font-size: 0.9rem;
    }
}

/* --- Entry Animations --- */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}







/* ============================================================
   CERTIFICATION GRID & CARD STYLES 
   ============================================================ */

.cert-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.cert-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    background: rgba(13, 110, 253, 0.04);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.cert-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.cert-icon-wrapper {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.2), rgba(111, 66, 193, 0.2));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary);
    border: 1px solid var(--glass-border);
}

.badge-level {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 4px 12px;
    border-radius: 6px;
    height: fit-content;
    letter-spacing: 0.5px;
    border: 1px solid var(--glass-border);
}

/* --- The Dual Mode Footer --- */
.cert-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.btn-mode {
    border: none;
    padding: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    background: transparent;
    color: var(--text-muted);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Practice Mode (Subtle) */
.btn-mode.practice:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Exam Mode (High Contrast) */
.btn-mode.exam {
    border-left: 1px solid var(--glass-border);
}

.btn-mode.exam:hover {
    background: var(--primary);
    color: white;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}

/* Mobile Adjustments for Grid */
@media (max-width: 576px) {
    .cert-footer {
        grid-template-columns: 1fr; /* Stack buttons on very small phones */
    }
    .btn-mode.exam {
        border-left: none;
        border-top: 1px solid var(--glass-border);
    }
}


/* --- Futuristic Global Styles --- */
.futuristic-bg {
    background-color: #05070a;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(13, 110, 253, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(111, 66, 193, 0.05) 0%, transparent 40%);
    min-height: 100vh;
}

.main-wrapper {
    padding-top: 120px;
    padding-bottom: 80px;
}

/* --- Entrance Animations --- */
.animate-header {
    animation: fadeInDown 0.8s ease-out;
}

.reveal-card {
    opacity: 0;
    transform: translateY(30px);
    animation: revealIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: calc(var(--order) * 0.1s);
}

@keyframes revealIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Enhanced Futuristic Card --- */
.futuristic-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
    overflow: hidden;
}

.futuristic-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1), transparent);
    opacity: 0;
    transition: 0.4s;
    z-index: -1;
}

.futuristic-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.futuristic-card:hover::before {
    opacity: 1;
}

/* --- Status Dot --- */
.status-indicator {
    font-size: 0.7rem;
    color: #10b981;
    text-transform: uppercase;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* --- Icon Pulse --- */
.pulse-blue {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
    animation: bluePulse 3s infinite;
}

@keyframes bluePulse {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(13, 110, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(10, 12, 16, 0.98); /* Solid-ish dark glass */
        backdrop-filter: blur(20px);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 20px;
        border-bottom: 1px solid var(--glass-border);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .nav-link {
        padding: 15px 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
}
/* --- Icon Pulse --- */

.exam-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    margin-top: 10px;
    padding-bottom: 50px;}


.text-muted {
    --bs-text-opacity: 1;
    color: rgb(255 255 255 / 78%) !important;
}