* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Georgia, 'Times New Roman', serif;
}

body {
    background: #f8f9fa;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    color: #1e3a8a;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: black;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero */
.hero {
    display: flex;
    flex-wrap: wrap;
    padding: 50px;
    background: linear-gradient(to right, #1e3a8a, #111);
    color: white;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 40px;
}

.tagline {
    font-style: italic;
    margin: 10px 0;
}

.hero-text button {
    margin-top: 20px;
    padding: 10px 20px;
    background: red;
    border: none;
    color: white;
    cursor: pointer;
}

.hero-image {
    flex: 1;
}

.hero-image img {
    width: 100%;
    border-radius: 10px;
    padding-left: 15px;
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.7), black);
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.7), black);
}

/* Features */
.features {
    padding: 60px 50px;
    text-align: center;
    background: #f8f9fa;
}

.features h2 {
    font-size: 32px;
    color: #1e3a8a;
    margin-bottom: 10px;
}

.features-subtitle {
    font-size: 16px;
    color: #666;
    font-style: italic;
    margin-bottom: 40px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 32px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-top: 4px solid #1e3a8a;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(30,58,138,0.15);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 14px;
}

.feature-card h3 {
    font-size: 18px;
    color: #1e3a8a;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
}

/* Gallery */
.gallery {
    padding: 40px;
    background: #eee;
    text-align: center;
    scroll-margin-top: 70px;
}

.gallery-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.gallery-wrapper {
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
}

.gallery-grid {
    display: flex;
    gap: 10px;
    transition: transform 0.5s ease;
}

.gallery-grid img {
    width: 280px;
    height: 210px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

.gallery-nav {
    background: none;
    color: #1e3a8a;
    border: none;
    padding: 5px 10px;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s, transform 0.2s;
}

.gallery-nav:hover:not(:disabled) {
    color: #0f2463;
    transform: scale(1.2);
}

.gallery-nav:disabled {
    color: #ccc;
    opacity: 0.9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
}

.close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover {
    color: #bbb;
}

/* Success Stories */
.success-section {
    padding: 60px 50px;
    background: white;
    text-align: center;
}

.success-section h2 {
    font-size: 32px;
    color: #1e3a8a;
    margin-bottom: 10px;
}

.success-subtitle {
    font-size: 16px;
    color: #666;
    font-style: italic;
    margin-bottom: 40px;
}

.success-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 320px 320px;
    gap: 14px;
    max-width: 1100px;
    margin: 0 auto;
}

.success-item.success-video {
    grid-column: span 2;
    grid-row: span 2;
}

.success-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    background: #000;
}

.success-item video,
.success-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.success-item img:hover {
    transform: scale(1.04);
}

/* CTA Banner */
.cta-banner {
    background: linear-gradient(to right, #1e3a8a, #111);
    color: white;
    text-align: center;
    padding: 70px 40px;
}

.cta-banner h2 {
    font-size: 36px;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.cta-banner p {
    font-size: 17px;
    opacity: 0.85;
    max-width: 640px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.cta-btn {
    background: red;
    color: white;
    border: none;
    padding: 14px 36px;
    font-size: 16px;
    font-family: Georgia, serif;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.cta-btn:hover {
    background: #c00;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .success-section { padding: 40px 20px; }
    .success-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
    .success-item.success-video { grid-column: span 2; grid-row: span 1; }
    .cta-banner h2 { font-size: 26px; }
}

/* Contact */
.contact {
    padding: 40px;
    background: #111;
    color: white;
    text-align: center;
    scroll-margin-top: 70px;
}

/* Scholarship Page */
.scholarship-hero {
    background: linear-gradient(to right, #1a6b3b, #0f4620);
    color: white;
    padding: 60px 40px;
    text-align: center;
}

.scholarship-hero h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.scholarship-hero p {
    font-size: 18px;
    opacity: 0.9;
}

.subjects {
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.completion-banner {
    background: linear-gradient(135deg, #f0faf4 0%, #e0f5e9 100%);
    border-top: 4px solid #1a6b3b;
    border-bottom: 4px solid #1a6b3b;
    text-align: center;
    padding: 60px 40px;
    margin: 0;
}

.completion-icon {
    width: 70px;
    height: 70px;
    background: #1a6b3b;
    color: white;
    font-size: 38px;
    line-height: 70px;
    border-radius: 50%;
    margin: 0 auto 24px;
}

.completion-banner h2 {
    font-size: 32px;
    color: #0f4620;
    margin-bottom: 16px;
    font-family: 'Georgia', serif;
    letter-spacing: 0.5px;
}

.completion-banner p {
    font-size: 17px;
    color: #2c4a35;
    max-width: 660px;
    margin: 0 auto 12px;
    line-height: 1.7;
}

.completion-sub {
    font-size: 15px !important;
    color: #5a7a65 !important;
    font-style: italic;
}

.subject-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
}

.subject-header {
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.subject-header h2 {
    font-size: 28px;
    margin: 0;
}

.questions-count {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.physics-header {
    background: linear-gradient(to right, #1a6b3b, #0f4620);
}

.chemistry-header {
    background: linear-gradient(to right, #8B4513, #654321);
}

.biology-header {
    background: linear-gradient(to right, #2d5016, #1a3009);
}

.subject-content {
    padding: 25px;
}

.subject-info {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.subject-info p {
    margin: 0;
    font-size: 14px;
}

.marks, .duration {
    color: #333;
}

.topics {
    list-style: none;
    margin-bottom: 20px;
    padding: 0;
}

.topics li {
    padding: 8px 0;
    color: #555;
    font-size: 14px;
}

.topics li:before {
    content: "✓ ";
    color: #1a6b3b;
    font-weight: bold;
    margin-right: 8px;
}

.take-test-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
    font-size: 16px;
}

.physics-btn {
    background: linear-gradient(to right, #1a6b3b, #0f4620);
}

.physics-btn:hover {
    opacity: 0.9;
}

.chemistry-btn {
    background: linear-gradient(to right, #8B4513, #654321);
}

.chemistry-btn:hover {
    opacity: 0.9;
}

.biology-btn {
    background: linear-gradient(to right, #2d5016, #1a3009);
}

.biology-btn:hover {
    opacity: 0.9;
}

.take-test-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    background: #888 !important;
}

.take-test-btn:disabled:hover {
    opacity: 0.6;
}


/* Footer */
footer {
    background: black;
    color: white;
    text-align: center;
    padding: 10px;
}

/* Registration Modal */
.registration-modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    font-family: 'Arial', sans-serif;
}

.registration-modal-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.registration-modal-content h2 {
    color: #1e3a8a;
    margin-bottom: 10px;
    font-size: 28px;
    text-align: center;
}

.registration-modal-content p {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
}

.registration-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Arial', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 5px rgba(30, 58, 138, 0.1);
}

.form-group input::placeholder {
    color: #aaa;
}

.register-btn {
    padding: 12px;
    background: #1e3a8a;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    margin-top: 10px;
}

.register-btn:hover {
    background: #162e73;
    transform: scale(1.02);
}

.register-btn:active {
    transform: scale(0.98);
}

.registration-modal.hidden {
    display: none;
}

/* Mobile */
@media (max-width: 768px) {
    /* Navbar */
    .navbar {
        padding: 12px 20px;
    }

    .logo {
        font-size: 22px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background: white;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 99;
        padding: 8px 0;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li {
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 14px 24px;
        font-size: 15px;
        color: #333;
    }

    .nav-links a:hover {
        background: #f8f9fa;
        color: #1e3a8a;
    }

    .menu-toggle {
        display: block;
    }

    /* Hero */
    .hero {
        flex-direction: column;
        padding: 30px 20px;
    }

    .hero-text h1 {
        font-size: 28px;
    }

    .hero-text h3 {
        font-size: 16px;
    }

    .hero-image {
        margin-top: 20px;
    }

    /* Features */
    .features {
        padding: 30px 20px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    /* Gallery */
    .gallery {
        padding: 30px 15px;
    }

    /* Video */
    .video {
        padding: 30px 15px;
    }

    /* Contact */
    .contact {
        padding: 30px 20px;
    }

    /* Scholarship page */
    .scholarship-hero {
        padding: 40px 20px;
    }

    .scholarship-hero h1 {
        font-size: 28px;
    }

    .scholarship-hero p {
        font-size: 14px;
    }

    .subjects {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }

    .subject-card {
        margin: 0;
    }

    .subject-header h2 {
        font-size: 24px;
    }

    .questions-count {
        font-size: 12px;
    }

    .subject-info {
        flex-direction: column;
        gap: 10px;
    }

    .take-test-btn {
        padding: 10px;
    }

    /* Registration modal */
    .registration-modal-content {
        padding: 25px 20px;
    }

    .registration-modal-content h2 {
        font-size: 22px;
    }
}

.scholar-btn {
    margin-top: 10px;
    padding: 10px 20px;
    background: gold;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

/* Admin Login Modal */
#loginModal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

#loginModal.show-modal {
    display: flex;
}

.login-modal {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    animation: slideDown 0.3s ease-out;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: auto;
}

.login-modal h2 {
    color: #1e3a8a;
    margin-bottom: 25px;
    font-size: 28px;
    text-align: center;
    margin-top: 0;
}

.login-modal form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-modal input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.login-modal input:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 5px rgba(30, 58, 138, 0.1);
}

.login-modal input::placeholder {
    color: #aaa;
}

.login-btn {
    padding: 12px;
    background: #1e3a8a;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    margin-top: 10px;
}

.login-btn:hover {
    background: #162e73;
    transform: scale(1.02);
}

.login-btn:active {
    transform: scale(0.98);
}

.error-msg {
    color: #d32f2f;
    font-size: 14px;
    text-align: center;
    margin-bottom: 0;
    display: block;
}