/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0a2540;
    --primary-hover: #1e3a5f;
    --saffron: #ff9933;
    --saffron-hover: #e07b16;
    --green: #138808;
    --green-hover: #0f6c06;
    --navy-blue: #000080;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #cbd5e1;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    
    /* Exam Console Color Codes */
    --cbt-not-visited: #e2e8f0;
    --cbt-not-answered: #dc2626;
    --cbt-answered: #16a34a;
    --cbt-marked: #7c3aed;
    --cbt-answered-marked: #6366f1; /* Purple with dot */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Tri-color Top Accent Bar */
.tricolor-bar {
    height: 4px;
    background: linear-gradient(to right, #ff9933 33.3%, #ffffff 33.3%, #ffffff 66.6%, #138808 66.6%);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1001;
}

/* Master Layout Header */
.main-header {
    position: sticky;
    top: 4px;
    z-index: 1000;
    background-color: #ffffff;
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Navigation Menu Styling */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-grow: 1;
    justify-content: space-between;
    margin-left: 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
}

.nav-item a, .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-item a:hover, .dropdown-toggle:hover {
    color: var(--primary-color);
    background-color: var(--light-bg);
}

.nav-item.active > a, .nav-item.active > .dropdown-toggle {
    color: var(--primary-color);
    background-color: rgba(10, 37, 64, 0.08);
}

/* Dropdown Menu CSS */
.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1010;
    display: none;
    min-width: 220px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    list-style: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Click support via JS only (disabled hover auto-open to prevent overlay after navigation) */
.nav-item.dropdown.open .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0;
    width: 100%;
    transition: all 0.2s ease;
}

.dropdown-menu li a:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.dropdown-menu li a.active {
    background-color: rgba(10, 37, 64, 0.05);
    color: var(--primary-color);
    font-weight: 600;
}

.caret {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.nav-item.dropdown.open .caret {
    transform: rotate(180deg);
}

/* Mobile Toggle Hamburger Button styling */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.mobile-toggle:hover {
    background-color: var(--light-bg);
}

/* Candidate Account Dashboard Layout */
.account-wrapper {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.account-sidebar {
    width: 260px;
    flex-shrink: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.account-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.account-menu-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.account-menu-item a:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.account-menu-item.active a {
    background-color: var(--primary-color);
    color: #ffffff;
}

.account-content {
    flex-grow: 1;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.account-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile responsive media queries */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #ffffff;
        border-top: 1px solid var(--border-color);
        border-bottom: 2px solid var(--border-color);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        padding: 1.5rem;
        margin-left: 0;
        display: none;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .nav-item a, .dropdown-toggle {
        width: 100%;
        padding: 0.75rem 1rem;
        justify-content: flex-start;
    }
    
    .nav-item.dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--border-color);
        margin-left: 1.5rem;
        margin-top: 0;
        padding: 0.25rem 0;
        display: none;
        opacity: 1;
        transform: none;
        min-width: 0;
    }
    
    .nav-item.dropdown.open .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu li a {
        padding: 0.5rem 1rem;
    }
    
    .user-nav {
        flex-direction: column;
        align-items: stretch;
        border-top: 1px solid var(--border-color);
        padding-top: 1.5rem;
        gap: 1rem;
    }
    
    .user-profile-info {
        text-align: left;
        margin-bottom: 0.5rem;
    }
    
    .account-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .account-sidebar {
        width: 100%;
    }
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.emblem-placeholder {
    width: 48px;
    height: 48px;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border-radius: 50%;
    font-size: 0.8rem;
    border: 2px solid var(--saffron);
}

.logo-text h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.025em;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.user-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-profile-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-color);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    gap: 0.5rem;
}


.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: #cbd5e1;
}

.btn-saffron {
    background-color: var(--saffron);
    color: #fff;
}

.btn-saffron:hover {
    background-color: var(--saffron-hover);
}

.btn-green {
    background-color: var(--green);
    color: #fff;
}

.btn-green:hover {
    background-color: var(--green-hover);
}

/* Card container pages (Login/Register) */
.auth-wrapper {
    min-height: calc(100vh - 120px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

.auth-card {
    background-color: var(--card-bg);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
}

.auth-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 1.5rem;
    text-align: center;
}

.auth-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.auth-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: border-color 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.15);
}

.text-danger {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Dashboard Style */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.dashboard-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.category-section {
    margin-bottom: 3rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.category-header i {
    color: var(--saffron);
}

.exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.exam-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.exam-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

.exam-card h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.exam-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.exam-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
    border-top: 1px solid var(--light-bg);
    padding-top: 1rem;
    margin-bottom: 1rem;
}

/* Instructions Page */
.instructions-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.instructions-card h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.75rem;
    text-align: center;
}

.instructions-body {
    font-size: 0.9rem;
    color: var(--text-primary);
    height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    background-color: var(--light-bg);
    margin-bottom: 1.5rem;
}

.instructions-body h3 {
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.instructions-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.instructions-body li {
    margin-bottom: 0.5rem;
}

.palette-legend-table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
}

.palette-legend-table td {
    padding: 0.5rem;
    font-size: 0.85rem;
    vertical-align: middle;
}

.palette-demo-btn {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #fff;
    border: 1px solid #cbd5e1;
}

.legend-visited {
    background: linear-gradient(to bottom, #fcfcfc, #eeeeee) !important;
    border: 1px solid #b2b2b2 !important;
    color: #000 !important;
    border-radius: 2px !important;
}
.legend-not-answered {
    background: #e03c1b !important;
    color: #fff !important;
    border: none !important;
    clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 70% 100%, 30% 100%, 0% 70%);
}
.legend-answered {
    background: #5cb85c !important;
    color: #fff !important;
    border: none !important;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 100%, 0% 100%, 0% 30%);
}
.legend-marked {
    background: #8e44ad !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important;
}
.legend-ans-marked { 
    background: #8e44ad !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    position: relative;
}
.legend-ans-marked::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #5cb85c;
    border: 1.5px solid #fff;
    z-index: 5;
}

.declaration-box {
    border: 1px solid var(--saffron);
    background-color: #fffbeb;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.declaration-box input {
    margin-top: 0.25rem;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.declaration-box label {
    font-size: 0.85rem;
    color: #78350f;
    font-weight: 500;
}

/* CBT Exam Console Layout */
.console-wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.console-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--saffron);
}

.console-header-left h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.console-header-left p {
    font-size: 0.75rem;
    color: #cbd5e1;
}

.timer-box {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timer-warning {
    background-color: #dc2626 !important;
    border-color: #fca5a5 !important;
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0.5; }
}

.console-body {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 1fr 300px;
    overflow: hidden;
}

.question-panel {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    overflow-y: auto;
    padding: 1.5rem;
    border-right: 1px solid var(--border-color);
}

.subject-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    font-size: 0.85rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.question-card {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.question-number-header {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-text {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-item {
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.option-item:hover {
    background-color: var(--light-bg);
}

.option-item input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.option-label {
    font-size: 0.95rem;
    font-weight: 500;
}

.option-item.selected {
    border-color: var(--primary-color);
    background-color: rgba(10, 37, 64, 0.05);
}

.side-panel {
    background-color: var(--light-bg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.candidate-card {
    padding: 1rem;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.candidate-photo {
    width: 64px;
    height: 72px;
    background-color: #cbd5e1;
    border: 1.5px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.candidate-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.candidate-details {
    font-size: 0.8rem;
}

.candidate-name-lbl {
    font-weight: 700;
    color: var(--primary-color);
}

.palette-container {
    padding: 1rem;
    flex-grow: 1;
}

.palette-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.palette-btn {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Palette state classes mapping */
.btn-not-visited {
    background: linear-gradient(to bottom, #fcfcfc, #eeeeee) !important;
    border: 1px solid #cbd5e1 !important;
    color: #000 !important;
    border-radius: 2px !important;
}
.btn-not-answered {
    background: #e03c1b !important;
    color: #fff !important;
    border: none !important;
    clip-path: polygon(0% 0%, 100% 0%, 100% 70%, 70% 100%, 30% 100%, 0% 70%);
}
.btn-answered {
    background: #5cb85c !important;
    color: #fff !important;
    border: none !important;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 100%, 0% 100%, 0% 30%);
}
.btn-marked {
    background: #8e44ad !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important;
}
.btn-ans-marked { 
    background: #8e44ad !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    position: relative;
}
.btn-ans-marked::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #5cb85c;
    border: 1.5px solid #fff;
    z-index: 5;
}

.btn-current {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}

.side-panel-footer {
    padding: 1rem;
    background-color: #fff;
    border-top: 1px solid var(--border-color);
}

.summary-stats-box {
    background-color: var(--light-bg);
    border-radius: 0.25rem;
    padding: 0.75rem;
    font-size: 0.8rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.stat-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.console-footer {
    background-color: var(--light-bg);
    border-top: 2px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
}

.console-footer-left {
    display: flex;
    gap: 0.75rem;
}

/* Submit Modal / Stats Page */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    border: 1px solid var(--border-color);
}

.modal-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.modal-table th, .modal-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #cbd5e1;
    font-size: 0.85rem;
}

.modal-footer {
    padding: 1rem;
    background-color: var(--light-bg);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid var(--border-color);
}

/* Report View / Analysis */
.report-header-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-status-badge {
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.85rem;
}

.badge-pass {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-fail {
    background-color: #fee2e2;
    color: #991b1b;
}

.report-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.25rem;
    text-align: center;
}

.stat-card-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.stat-card-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-card-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Review Questions List */
.review-section {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
}

.review-section h2 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-item {
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.review-item-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.badge-correct { color: var(--green); }
.badge-incorrect { color: var(--cbt-not-answered); }
.badge-unattempted { color: var(--text-secondary); }

.review-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .review-options {
        grid-template-columns: 1fr;
    }
}

.review-option {
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
}

.option-correct-match {
    background-color: #d1fae5;
    border-color: #34d399;
    color: #065f46;
    font-weight: 600;
}

.option-incorrect-match {
    background-color: #fee2e2;
    border-color: #f87171;
    color: #991b1b;
    font-weight: 600;
}

.review-explanation {
    background-color: #f1f5f9;
    border-left: 4px solid var(--primary-color);
    padding: 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    color: #334155;
    margin-top: 1rem;
}

/* Footer Styling */
footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 1.5rem 0;
    border-top: 4px solid var(--saffron);
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
}

footer p {
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   ADMIN PANEL STYLING
   ========================================================================== */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background-color: var(--primary-color);
    color: #fff;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    border-right: 3px solid var(--saffron);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.admin-sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.admin-sidebar-menu {
    flex-grow: 1;
    list-style: none;
    padding: 1rem 0;
}

.admin-sidebar-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.admin-sidebar-item a:hover, .admin-sidebar-item.active a {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--saffron);
}

.admin-sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    color: #94a3b8;
}

.admin-main {
    margin-left: 260px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--light-bg);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed Admin Sidebar States */
body.admin-sidebar-collapsed .admin-sidebar {
    transform: translateX(-260px);
}

body.admin-sidebar-collapsed .admin-main {
    margin-left: 0;
}

.admin-topbar {
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-content {
    padding: 2rem;
    flex-grow: 1;
}

/* Admin Dashboard Metrics Grid */
.admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admin-metric-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.admin-metric-info h3 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.admin-metric-info p {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
}

.admin-metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
}

.icon-blue { background-color: rgba(10, 37, 64, 0.1); color: var(--primary-color); }
.icon-saffron { background-color: rgba(255, 153, 51, 0.1); color: var(--saffron); }
.icon-green { background-color: rgba(19, 136, 8, 0.1); color: var(--green); }
.icon-purple { background-color: rgba(124, 58, 237, 0.1); color: var(--cbt-marked); }

/* Table styles */
.admin-card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.75rem;
}

.admin-card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.admin-table-container {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.admin-table th {
    background-color: var(--light-bg);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: var(--text-primary);
    vertical-align: middle;
}

.admin-table tr:hover {
    background-color: rgba(248, 250, 252, 0.5);
}

.admin-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin { background-color: rgba(10, 37, 64, 0.1); color: var(--primary-color); }
.badge-candidate { background-color: #f1f5f9; color: var(--text-secondary); }

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

/* Home Page Hero Slider Styles */
.hero-slider-container {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
}

.hero-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-slide-content {
    max-width: 750px;
    margin-left: 8%;
    padding: 2rem;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    z-index: 10;
}

.hero-badge {
    align-self: flex-start;
    background: rgba(255, 153, 51, 0.15);
    border: 1px solid var(--saffron);
    color: var(--saffron);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.015em;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.hero-desc {
    font-size: 1.15rem;
    line-height: 1.6;
    opacity: 0.95;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 0.375rem;
}

.btn-outline-white {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff !important;
}

.btn-outline-white:hover {
    background-color: #ffffff;
    color: var(--primary-color);
}

/* Slider Controls */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    scale: 1.05;
}

.slider-btn.prev {
    left: 2rem;
}

.slider-btn.next {
    right: 2rem;
}

.slider-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    gap: 0.5rem;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.slider-dot.active {
    background: #ffffff;
    width: 24px;
    border-radius: 9999px;
}

/* Home Section Layouts */
.home-section {
    padding: 5rem 1.5rem;
}

.section-header-center {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem auto;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Categories Grid styling */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card-premium {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
}

.category-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
}

.category-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 0.5rem;
    background-color: rgba(10, 37, 64, 0.05);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.category-card-premium:hover .category-card-icon {
    background-color: var(--primary-color);
    color: #ffffff;
}

.category-card-premium h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.category-card-premium:hover h3 {
    color: var(--saffron);
}

.category-card-premium p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.category-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--light-bg);
    padding-top: 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.category-card-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--light-bg);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s;
}

.category-card-premium:hover .category-card-link {
    background-color: var(--saffron);
    color: #ffffff;
}

/* Exam Badge styling */
.exam-card-badge {
    background-color: rgba(10, 37, 64, 0.08);
    color: var(--primary-color);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Testimonials Layout styling */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.testimonial-rating {
    color: var(--saffron);
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
}

.testimonial-quote {
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.testimonial-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.95rem;
}

.testimonial-user h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.15rem;
}

.testimonial-user p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .hero-slider-container {
        height: 420px;
    }
    
    .hero-slide-content {
        margin-left: 5%;
        margin-right: 5%;
        padding: 1.5rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-desc {
        font-size: 0.95rem;
    }
    
    .slider-btn {
        display: none; /* Hide buttons on mobile in favor of swipe/dots */
    }
    
    .home-section {
        padding: 3.5rem 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

/* Premium Form Tabs Styling */
.form-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}
.form-tab-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 0.375rem;
    border: 1px solid var(--border-color, #e2e8f0);
    background: #fff;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.form-tab-btn:hover {
    background-color: var(--light-bg, #f8fafc);
    color: var(--primary-color, #2563eb);
}
.form-tab-btn.active {
    background-color: var(--primary-color, #2563eb);
    color: #fff;
    border-color: var(--primary-color, #2563eb);
}
.form-tab-content {
    display: none;
    animation: fadeInTab 0.2s ease-in-out;
}
.form-tab-content.active {
    display: block;
}
@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* CBT Console Language Selector Dropdown */
.lang-switcher-container {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    height: 34px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s ease;
}
.lang-switcher-container:hover {
    border-color: #9ca3af;
}
.lang-switcher-container i {
    color: #4b5563;
    font-size: 0.95rem;
    margin-right: 0.35rem;
}
.lang-switcher-select {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    padding-right: 0.25rem;
    font-family: inherit;
}

/* Premium Reasoning/Visual Question Images Styles */
.q-image-wrapper {
    margin: 1rem 0;
    text-align: left;
}
.q-image {
    max-width: 100%;
    max-height: 280px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    object-fit: contain;
    padding: 4px;
}
.opt-image-wrapper {
    margin-top: 0.5rem;
    display: block;
}
.opt-image {
    max-width: 190px;
    max-height: 190px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    object-fit: contain;
    padding: 3px;
    transition: transform 0.2s ease;
}
.option-item:hover .opt-image {
    transform: scale(1.02);
}
.exp-image-wrapper {
    margin-top: 0.75rem;
    display: block;
}
.exp-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    object-fit: contain;
    padding: 4px;
}

/* Restrict question body image and explanation image to under 200px inside the evaluation analysis review list */
.review-item .q-image {
    max-width: 190px;
    max-height: 190px;
}
.review-item .exp-image {
    max-width: 190px;
    max-height: 190px;
}

/* Mega Menu Dropdown CSS */
.header-container {
    position: relative;
}

.nav-item.dropdown.mega-dropdown {
    position: static;
}

.mega-dropdown .mega-menu-panel {
    position: absolute;
    top: 100%;
    left: 1.5rem;
    right: 1.5rem;
    width: auto;
    max-width: none;
    z-index: 1050;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, display 0.25s ease;
    overflow: hidden;
    padding: 0;
}

.mega-dropdown.open .mega-menu-panel {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.mega-menu-container {
    display: flex;
    min-height: 460px;
    background-color: #ffffff;
}

.mega-menu-left {
    width: 260px;
    background-color: #f8fafc;
    border-right: 1px solid var(--border-color);
    padding: 1.25rem 0;
    flex-shrink: 0;
    overflow-y: auto;
}

.mega-menu-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-cat-item {
    margin: 0.25rem 0.75rem;
}

.mega-dropdown .mega-menu-cat-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    background: none;
    border: none;
}

.mega-dropdown .mega-menu-cat-link i {
    transition: transform 0.2s ease;
}

.mega-dropdown .mega-menu-cat-item.active .mega-menu-cat-link {
    background-color: rgba(10, 37, 64, 0.06);
    color: var(--primary-color);
}

.mega-dropdown .mega-menu-cat-item.active .mega-menu-cat-link .arrow-indicator {
    transform: translateX(3px);
    color: var(--saffron);
}

.mega-dropdown .mega-menu-cat-link:hover {
    background-color: rgba(10, 37, 64, 0.04);
    color: var(--primary-color);
}

.mega-menu-right {
    flex-grow: 1;
    padding: 1.5rem;
    background-color: #ffffff;
    overflow-y: auto;
    max-height: 520px;
}

.mega-dropdown .mega-menu-exams-panel {
    display: none;
}

.mega-dropdown .mega-menu-exams-panel.active {
    display: block;
}

.mega-menu-exams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.mega-dropdown .mega-exam-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
}

.mega-dropdown .mega-exam-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px -1px rgba(0, 0, 0, 0.08);
    border-color: rgba(10, 37, 64, 0.2);
}

.mega-dropdown .mega-exam-card-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-grow: 1;
    min-width: 0;
}

.mega-dropdown .mega-exam-icon-circle {
    width: 38px;
    height: 38px;
    background-color: rgba(10, 37, 64, 0.05);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.mega-dropdown .mega-exam-card:hover .mega-exam-icon-circle {
    background-color: var(--primary-color);
    color: #ffffff;
}

.mega-dropdown .mega-exam-details {
    min-width: 0;
}

.mega-dropdown .mega-exam-details h5 {
    font-size: 0.85rem;
    font-weight: 750;
    color: var(--text-primary);
    margin: 0 0 0.2rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.mega-dropdown .mega-exam-card:hover h5 {
    color: var(--primary-color);
}

.mega-dropdown .mega-exam-specs {
    font-size: 0.72rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.mega-dropdown .mega-exam-card-arrow {
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.mega-dropdown .mega-exam-card:hover .mega-exam-card-arrow {
    transform: translateX(2px);
    color: var(--saffron);
}

/* Mobile responsive overrides for Mega Menu */
@media (max-width: 768px) {
    .nav-item.dropdown.mega-dropdown {
        position: relative;
    }

    .mega-dropdown .mega-menu-panel {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--border-color);
        margin-left: 1.5rem;
        margin-top: 0.5rem;
        padding: 0;
        display: none;
        opacity: 1;
        transform: none;
        width: 100%;
        max-width: calc(100% - 1.5rem);
    }

    .mega-dropdown.open .mega-menu-panel {
        display: block;
    }

    .mega-menu-container {
        flex-direction: column;
        min-height: auto;
    }

    .mega-menu-left {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0.5rem 0;
    }

    .mega-menu-cat-item {
        margin: 0.15rem 0;
    }

    .mega-dropdown .mega-menu-cat-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .mega-menu-right {
        width: 100%;
        padding: 1rem 0;
        max-height: none;
        overflow-y: visible;
    }

    .mega-menu-exams-grid {
        grid-template-columns: 1fr;
    }
}

/* Optimize navigation layout for mid-sized screens to prevent overlapping */
@media (min-width: 769px) and (max-width: 1200px) {
    .header-container {
        padding: 0.75rem 1rem;
    }
    .nav-menu {
        gap: 1rem;
        margin-left: 1rem;
    }
    .nav-links {
        gap: 0.25rem;
    }
    .nav-item a, .dropdown-toggle {
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
        gap: 0.25rem;
    }
    .logo-section {
        gap: 0.5rem;
    }
    .emblem-placeholder {
        width: 36px;
        height: 36px;
        font-size: 0.7rem;
    }
    .logo-text h1 {
        font-size: 1.1rem;
    }
    .logo-text p {
        display: none;
    }
    .user-nav {
        gap: 0.75rem;
    }
    .user-name {
        font-size: 0.85rem;
    }
    .user-role {
        display: none;
    }
    .user-nav .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}




