/* Global Variables */
:root {
    --primary-color: #1e40af;
    --secondary-color: #2563eb;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1e293b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-grey: #f1f5f9;
    --bg-white: #ffffff;
    --header-footer-bg: #1e40af;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-white);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--header-footer-bg) 0%, #3b82f6 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero .display-4 {
    font-weight: 800;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: slideInLeft 0.8s ease-out;
    line-height: 1.1;
}

.hero .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: slideInLeft 0.8s ease-out 0.2s both;
    font-weight: 400;
    line-height: 1.6;
}

.hero .btn {
    animation: slideInUp 0.8s ease-out 0.4s both;
    margin-right: 1rem;
    border: none;
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.hero .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2xl);
}

.hero img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-2xl);
    max-height: 450px;
    width: 100%;
    object-fit: cover;
}

/* Grade Cards */
.grade-card {
    transition: var(--transition);
    border: none;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.grade-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.grade-card .card-header {
    background: var(--header-footer-bg);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    border: none;
    padding: 1.5rem;
}

.card-header {
    background: var(--header-footer-bg) !important;
    color: white !important;
}

.grade-card .card-body {
    padding: 2rem;
}

/* How It Works Section */
.how-it-works {
    background: var(--bg-white);
    padding: 5rem 0;
}

.how-it-works .step-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
}

.how-it-works .step-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.how-it-works .step-number {
    width: 60px;
    height: 60px;
    background: var(--header-footer-bg);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.how-it-works .step-icon {
    font-size: 2.5rem;
    color: var(--header-footer-bg);
    margin-bottom: 1rem;
}

.how-it-works h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.how-it-works p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Why Choose Us Section */
.why-choose-us {
    background: var(--bg-grey);
    padding: 5rem 0;
}

.why-choose-us .feature-card {
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
}

.why-choose-us .feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.why-choose-us .feature-icon {
    width: 80px;
    height: 80px;
    background: var(--header-footer-bg);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.why-choose-us h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.why-choose-us p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Exam Cards */
.exam-card {
    transition: var(--transition);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: var(--border-radius);
    background: white;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.exam-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--header-footer-bg);
}

.exam-card .card-body {
    padding: 2rem;
}

.exam-card .exam-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.exam-card .exam-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.exam-card .exam-meta i {
    margin-right: 0.5rem;
    color: var(--header-footer-bg);
}

.exam-card .exam-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.exam-card .btn {
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.exam-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

/* Exam Table Styles */
.exam-table {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.exam-table thead {
    background: var(--header-footer-bg);
    color: white;
}

.exam-table thead th {
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
    border: none;
}

.exam-table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.exam-table tbody tr:hover {
    background: rgba(30, 64, 175, 0.05);
}

.exam-table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.exam-table .exam-title-cell {
    max-width: 300px;
}

.exam-table .exam-title-cell strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.exam-table .exam-title-cell .text-muted {
    font-size: 0.875rem;
}

.exam-table .term-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.exam-table .term-opener {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.exam-table .term-mid {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.exam-table .term-end {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.exam-table .term-gold {
    background: rgba(234, 179, 8, 0.1);
    color: #ca8a04;
}

.exam-table .term-silver {
    background: rgba(148, 163, 184, 0.2);
    color: #64748b;
}

.exam-table .term-bronze {
    background: rgba(180, 83, 9, 0.1);
    color: #b45309;
}

.exam-table .amount-cell {
    font-weight: 700;
    color: var(--success-color);
    font-size: 1.1rem;
}

.exam-table .action-cell {
    white-space: nowrap;
}

/* Navigation */
.navbar {
    background: var(--header-footer-bg) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    padding: 1.25rem 0;
    position: relative;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    transition: var(--transition);
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.navbar-brand:hover {
    transform: scale(1.05);
    color: var(--accent-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    position: relative;
    transition: var(--transition);
    color: #ffffff !important;
    border-radius: var(--border-radius-sm);
    margin: 0 0.125rem;
    opacity: 0.9;
    font-size: 1rem;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--accent-color);
    transition: var(--transition);
    transform: translateX(-50%);
    border-radius: 2px;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    opacity: 1;
    box-shadow: var(--shadow-sm);
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: var(--border-radius);
    background: #007bff;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    animation: dropdownFadeIn 0.3s ease-out;
    margin-top: 0.5rem;
    min-width: 200px;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-item {
    padding: 0.875rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
    border-radius: 8px;
    margin: 0.25rem 0.5rem;
    color: var(--text-primary);
}

.dropdown-item:hover {
    background: var(--header-footer-bg);
    color: white !important;
    transform: translateX(8px);
}

.dropdown-header {
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 0.75rem 1rem 0.5rem;
    margin: 0.5rem 0 0.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

/* Buttons */
.btn-primary {
    background: var(--header-footer-bg);
    border: none;
    border-radius: 50px;
    padding: 0.875rem 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: #1e40af;
}

/* Small primary button to match other small buttons */
.btn-primary.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Action buttons in exam table - consistent small size */
.exam-table .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

/* Ensure action buttons are responsive and same size */
.exam-table .action-cell .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 80px;
}

.exam-table .action-cell .btn i {
    font-size: 0.7rem;
}

.btn-outline-primary {

    border: 2px solid var(--header-footer-bg);
    color: var(--header-footer-bg);
    border-radius: 50px;
    padding: 0.875rem 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.btn-outline-primary:hover {
    background: var(--header-footer-bg);
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    border: none;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Footer */
.footer {
    background: var(--header-footer-bg);
    color: #e2e8f0;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer h5 {
    color: #60a5fa;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer .list-unstyled li {
    margin-bottom: 0.75rem;
}

.footer .social-links a {
    color: #e2e8f0;
    margin-right: 1.25rem;
    font-size: 1.25rem;
    transition: var(--transition);
    display: inline-block;
}

.footer .social-links a:hover {
    color: #60a5fa;
    transform: translateY(-3px) scale(1.1);
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-color: var(--header-footer-bg);
    border-right-color: transparent;
}

/* Alert Styles */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-sm);
    padding: 1rem 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-left: 4px solid var(--success-color);
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-left: 4px solid var(--danger-color);
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    border-left: 4px solid var(--warning-color);
    color: #92400e;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 0.875rem 1.25rem;
    transition: var(--transition);
    background: white;
    font-size: 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--header-footer-bg);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-secondary);
}

/* Badge Styles */
.badge {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 2rem;
    list-style: none;
}

.breadcrumb-item {
    list-style: none;
}

.breadcrumb li {
    list-style-type: none;
}

.breadcrumb-item a {
    color: var(--header-footer-bg);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Pagination */
.pagination .page-link {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--header-footer-bg);
    border-color: var(--header-footer-bg);
    color: white;
}

.pagination .page-item.active .page-link {
    background: var(--header-footer-bg);
    border-color: var(--header-footer-bg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: var(--header-footer-bg);
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}

/* Navbar Toggler */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.8) !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Responsive Design */
@media (max-width: 992px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
        margin: 0.25rem 0;
    }

    .hero {
        min-height: 60vh;
        text-align: center;
        padding: 3rem 0;
    }

    .hero .col-lg-6 {
        margin-bottom: 2rem;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }

    .grade-card, .exam-card {
        margin-bottom: 1.5rem;
    }

    .exam-card .card-body {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero .display-4 {
        font-size: 2rem;
    }

    .hero .lead {
        font-size: 1.1rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .dropdown-menu {
        min-width: 180px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .footer {
        display: none !important;
    }

    .container {
        max-width: none !important;
        width: 100% !important;
    }

    .exam-card, .grade-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--header-footer-bg) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: var(--shadow-lg);
}

.bg-gradient-primary {
    background: var(--header-footer-bg);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    flex: 1 0 auto;
}

/* Custom Header Layers */
.header-container {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.header-upper-layer {
    height: 30px;
    background-color: #00008B;
    color: white;
}

.header-lower-layer {
    background-color: white;
    padding: 1rem 0;
}

/* Custom Navbar Styles */
.custom-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.custom-navbar-brand {
    font-weight: 800;
    font-size: 1.75rem;
    color: #00008B !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.custom-navbar-brand:hover {
    transform: scale(1.05);
    color: #0000FF !important;
}

.custom-navbar-toggler {
    border: none;
    background: transparent;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: var(--transition);
}

.custom-navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.custom-navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280,0,139,1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

.custom-navbar-collapse {
    flex-basis: 100%;
    flex-grow: 1;
    align-items: center;
}

.custom-navbar-nav {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    margin-left: auto;
}

.custom-navbar-nav .nav-item {
    margin: 0.25rem 0;
}

.custom-nav-link {
    display: block;
    padding: 0.5rem 1rem;
    color: #00008B;
    text-decoration: none;
    transition: var(--transition);
    border-radius: 0.25rem;
    font-weight: 600;
}

.custom-nav-link:hover {
    color: #0000FF;
    background-color: rgba(0, 0, 139, 0.1);
}

.custom-dropdown-toggle {
    display: block;
    padding: 0.5rem 1rem;
    color: #00008B;
    text-decoration: none;
    transition: var(--transition);
    border-radius: 0.25rem;
    font-weight: 600;
}

.custom-dropdown-toggle:hover {
    color: #0000FF;
    background-color: rgba(0, 0, 139, 0.1);
}

.custom-dropdown-toggle:hover + .custom-dropdown-menu,
.custom-dropdown-menu:hover,
.dropdown:hover .dropdown-menu {
    display: block;
}

.custom-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    float: left;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #007bff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
}

.custom-dropdown-menu-end {
    right: 0;
    left: auto;
}

.custom-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.25rem 1.5rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    transition: var(--transition);
}

.custom-dropdown-item:hover {
    color: #16181b;
    text-decoration: none;
    background-color: #f8f9fa;
}

.custom-text-danger {
    color: #dc3545 !important;
}

.custom-btn {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: var(--transition);
}

.custom-btn-outline {
    color: #00008B;
    border-color: #00008B;
}

.custom-btn-outline:hover {
    color: #fff;
    background-color: #00008B;
    border-color: #00008B;
}

.custom-btn-light {
    color: #000;
    background-color: #f8f9fa;
    border-color: #f8f9fa;
}

.custom-btn-light:hover {
    color: #000;
    background-color: #e2e6ea;
    border-color: #dae0e5;
}

.custom-btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

/* Responsive adjustments for custom navbar */
@media (min-width: 992px) {
    .custom-navbar-nav {
        flex-direction: row;
        margin-left: auto;
    }

    .custom-navbar-nav .nav-item {
        margin: 0 0.5rem;
    }
}

/* ============================================
   COMPREHENSIVE RESPONSIVE STYLES
   ============================================ */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .hero .display-4 {
        font-size: 2.5rem;
    }
    
    .hero .lead {
        font-size: 1.1rem;
    }
    
    .container {
        max-width: 540px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .hero {
        min-height: 60vh;
    }
    
    .hero .display-4 {
        font-size: 3rem;
    }
    
    .display-5 {
        font-size: 2.5rem;
    }
    
    .display-6 {
        font-size: 2rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .hero {
        min-height: 70vh;
    }
    
    .hero .display-4 {
        font-size: 3.5rem;
    }
    
    .hero .lead {
        font-size: 1.25rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero .display-4 {
        font-size: 4rem;
    }
}

/* ============================================
   MOBILE RESPONSIVE FIXES (max-width: 767px)
   ============================================ */
@media (max-width: 767px) {
    /* Body and general */
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Container */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Header Upper Layer */
    .header-upper-layer {
        display: none;
    }
    
    /* Header Lower Layer / Navbar */
    .header-lower-layer {
        padding: 0.75rem 0;
    }
    
    .custom-navbar {
        position: relative;
    }
    
    .custom-navbar-brand {
        font-size: 1.25rem;
    }
    
    .custom-navbar-brand img {
        height: 30px !important;
    }
    
    /* Navbar Toggler Button */
    .custom-navbar-toggler {
        display: flex !important;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        padding: 0.5rem;
    }
    
    /* Navbar Collapse - Mobile Menu */
    .custom-navbar-collapse {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding: 1rem;
    }
    
    .custom-navbar-collapse.active {
        display: block;
    }
    
    .custom-navbar-nav {
        flex-direction: column !important;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .custom-navbar-nav .nav-item {
        margin: 0.25rem 0;
        width: 100%;
    }
    
    .custom-nav-link,
    .custom-dropdown-toggle {
        padding: 0.75rem 1rem;
        width: 100%;
        text-align: left;
        border-radius: 0.375rem;
    }
    
    /* Dropdown Menu - Mobile */
    .custom-dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        background: rgba(0, 123, 255, 0.1) !important;
        border: none !important;
        box-shadow: none !important;
        margin-top: 0.25rem !important;
        padding: 0.5rem !important;
        display: none;
    }
    
    .custom-dropdown-menu.show {
        display: block !important;
    }
    
    .custom-dropdown-item {
        padding: 0.5rem 1rem;
        color: #00008B !important;
        border-radius: 0.25rem;
    }
    
    .custom-dropdown-item:hover {
        background: rgba(0, 123, 255, 0.2) !important;
        color: #00008B !important;
    }
    
    /* Hero Section */
    .hero {
        padding: 3rem 0 !important;
        min-height: auto !important;
        text-align: center !important;
    }
    
    .hero .row {
        flex-direction: column-reverse;
    }
    
    .hero .col-lg-6 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        text-align: center !important;
        margin-bottom: 2rem;
    }
    
    .hero .display-4 {
        font-size: 1.75rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero .lead {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    .hero .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0 !important;
        padding: 0.75rem 1.5rem;
    }
    
    .hero img {
        max-height: 250px !important;
        margin-bottom: 1rem;
    }
    
    /* Grade Cards Section */
    .grade-section {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .grade-section .row {
        flex-wrap: nowrap !important;
        gap: 1rem;
    }
    
    .grade-section .col-auto {
        flex: 0 0 200px;
        max-width: 200px;
    }
    
    .grade-card {
        width: 100%;
    }
    
    .grade-card .card-header {
        padding: 1rem;
    }
    
    .grade-card .card-body {
        padding: 1rem;
    }
    
    .grade-card .card-title {
        font-size: 1rem;
    }
    
    .grade-card .list-group-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* How It Works Section */
    .how-it-works {
        padding: 3rem 0 !important;
    }
    
    .how-it-works .step-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .how-it-works .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .how-it-works .step-icon {
        font-size: 2rem;
    }
    
    .how-it-works h4 {
        font-size: 1.25rem;
    }
    
    /* Why Choose Us */
    .why-choose-us {
        padding: 3rem 0 !important;
    }
    
    .why-choose-us .feature-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .why-choose-us .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Section Titles */
    .display-5 {
        font-size: 1.75rem !important;
    }
    
    .display-6 {
        font-size: 1.5rem !important;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
    
    section .lead {
        font-size: 0.95rem;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .exam-card .card-body {
        padding: 1rem;
    }
    
    .exam-card .exam-title {
        font-size: 1rem;
    }
    
    .exam-card .exam-price {
        font-size: 1.1rem;
    }
    
    .exam-card .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
    }
    
    /* Forms */
    .form-control,
    .form-select {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Tables */
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .exam-table .exam-title-cell {
        max-width: 150px;
    }
    
    /* Search and Filter Row */
    .filter-row .col-md-6,
    .filter-row .col-md-3 {
        margin-bottom: 0.75rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem !important;
        margin-top: 2rem !important;
        text-align: center;
    }
    
    .footer h5 {
        margin-bottom: 1rem;
    }
    
    .footer .col-lg-4 {
        margin-bottom: 1.5rem;
    }
    
    .footer .list-unstyled li {
        margin-bottom: 0.5rem;
    }
    
    /* Badges */
    .badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    /* Modal */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.85rem;
    }
    
    /* Alert */
    .alert {
        padding: 0.75rem 1rem;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   TABLET RESPONSIVE FIXES (768px - 991px)
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {
    .hero {
        min-height: 50vh;
    }
    
    .hero .display-4 {
        font-size: 2.5rem;
    }
    
    .hero img {
        max-height: 300px;
    }
    
    .grade-card {
        margin-bottom: 1rem;
    }
    
    .footer .col-lg-4 {
        margin-bottom: 1.5rem;
    }
}

/* ============================================
   NAVBAR TOGGLE BUTTON (hidden by default)
   ============================================ */
.custom-navbar-toggler {
    display: none;
}

/* ============================================
   ADDITIONAL UTILITY CLASSES
   ============================================ */

/* Mobile first helpers */
@media (max-width: 767px) {
    .mobile-hidden {
        display: none !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
    
    .mobile-text-center {
        text-align: center !important;
    }
    
    .mobile-mb-2 {
        margin-bottom: 0.5rem !important;
    }
    
    .mobile-mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .mobile-mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    .mobile-p-2 {
        padding: 0.5rem !important;
    }
    
    .mobile-p-3 {
        padding: 1rem !important;
    }
    
    .mobile-p-4 {
        padding: 1.5rem !important;
    }
}

/* Print styles enhancement */
@media print {
    .navbar,
    .btn,
    .footer,
    .breadcrumb,
    .no-print {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    .card,
    .exam-card,
    .grade-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
    
    .table {
        font-size: 10pt;
    }
    
    a[href]:after {
        content: none !important;
    }
}

/* Purchase card header - smaller font size to match Preview */
.card-header .purchase-header {
    font-size: 1rem !important;
    font-weight: 500 !important;
}
