/* --- 1. Global & Setup --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Makes default font size responsive */
    font-size: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

main > section {
    /* Add padding to all main sections */
    padding: 60px 0;
    /* Fixes anchor link scrolling */
    scroll-margin-top: 100px; 
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- 2. Header & Navigation (Mobile-First) --- */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.top-bar {
    background: rgba(0,0,0,0.2);
    padding: 10px 0;
    font-size: 14px;
    /* Hide on small phones, show on slightly larger ones */
    display: none;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.headlogo {
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    object-fit: cover;
}

/* Mobile Hamburger Menu Button */
#menu-toggle {
    display: block;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
}

.hamburger-bar {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 1px;
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile Nav Menu (Hidden by default) */
#nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    height: 100vh;
    background: #1e3c72;
    
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

#nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    transition: color 0.3s;
}

#nav-menu a:hover {
    color: #ffd700;
}

/* --- Mobile Menu Open State --- */
nav.menu-open #nav-menu {
    transform: translateX(0);
}

nav.menu-open #menu-toggle .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
nav.menu-open #menu-toggle .hamburger-bar:nth-child(2) {
    opacity: 0;
}
nav.menu-open #menu-toggle .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- 3. Hero Section --- */
.hero {
    background-image: linear-gradient(135deg, rgba(30, 60, 114, 0.7), rgba(42, 82, 152, 0.7)),
                      url('images/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat; 
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #ffd700;
    color: #1e3c72;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

/* --- 4. Features Section --- */
.features {
    background: #f9fafb;
}

.features h2 {
    text-align: center;
    font-size: 30px;
    margin-bottom: 40px;
    color: #1e3c72;
}

.features-grid {
    display: grid;
    /* 1 column on mobile */
    grid-template-columns: 1fr;
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
}

/* --- 5. About Section --- */
.about {
    background: white;
}

.about-content {
    display: grid;
    /* 1 column on mobile (image stacks below text) */
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: center;
}

.about-text h2 {
    font-size: 30px;
    margin-bottom: 20px;
    color: #1e3c72;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

/* --- 6. News Section --- */
.news {
    background: #f9fafb;
}

.news h2 {
    text-align: center;
    font-size: 30px;
    margin-bottom: 40px;
    color: #1e3c72;
}

.news-grid {
    display: grid;
    /* 1 column on mobile */
    grid-template-columns: 1fr;
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-image img {
    width: 100%;
    height: auto;
    /* This is the 16:9 aspect ratio */
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.news-content {
    padding: 20px;
}

.news-date {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.news-content h3 {
    margin-bottom: 10px;
    color: #1e3c72;
}

/* --- 7. Footer --- */
footer {
    background: #1e3c72;
    color: white;
    padding: 50px 20px 20px;
}

.footer-content {
    display: grid;
    /* 1 column on mobile */
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: #ffd700;
}

.footer-section p {
    color: #ddd;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    color: #ddd;
}

/* --- 8. Responsive Media Queries (Tablet & Up) --- */

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    /* Show top bar */
    .top-bar {
        display: block;
    }

    /* Restore desktop nav */
    #menu-toggle {
        display: none;
    }

    #nav-menu {
        position: static;
        flex-direction: row;
        height: auto;
        width: auto;
        transform: none;
        background: none;
        gap: 30px;
    }

    #nav-menu a {
        font-size: 16px;
    }

    /* Increase hero text */
    .hero h1 {
        font-size: 48px;
    }
    .hero p {
        font-size: 20px;
    }

    /* Change grids from 1 column to 2 */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-content {
        grid-template-columns: 1fr 1fr;
        gap: 50px;
    }
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-content {
        /* This auto-fit rule is great for footers */
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    /* Change grids to 3 columns */
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

#lm{
    margin-top: 2em;
}


/* --- 9. Admission Form Section --- */
.admission {
    background: #f9fafb;
    padding: 80px 20px;
}

.admission h2 {
    text-align: center;
    font-size: 32px;
    color: #1e3c72;
    margin-bottom: 10px;
}

.form-intro {
    text-align: center;
    margin-bottom: 40px;
    color: #555;
}

.admission-form h3 {
    color: #1e3c72;
    margin: 30px 0 20px;
    font-size: 22px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    transition: border 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #1e3c72;
    box-shadow: 0 0 5px rgba(30, 60, 114, 0.3);
    outline: none;
}

.full-width {
    grid-column: 1 / -1;
}

.form-submit {
    text-align: center;
    margin-top: 30px;
}

.form-submit .btn {
    padding: 12px 40px;
}

/* Responsive grid for medium+ devices */
@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* --- 9. Admission Form Section (Optimized for Mobile) --- */
/* --- 9. Admission Form Section (Simple Gradient Version) --- */
.admission {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%);
    color: white;
    padding: 100px 20px;
}

.admission h2 {
    text-align: center;
    font-size: 32px;
    color: #ffd700;
    margin-bottom: 10px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.form-intro {
    text-align: center;
    margin-bottom: 40px;
    color: #f0f0f0;
    font-size: 17px;
}

/* Form container */
.admission-form {
    background: white;
    color: #333;
    border-radius: 15px;
    padding: 35px 25px;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Section headings inside form */
.admission-form h3 {
    color: #1e3c72;
    margin: 25px 0 15px;
    font-size: 21px;
}

/* Grid and input styling */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #1e3c72;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    transition: border 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #ffd700;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
    outline: none;
}

.full-width {
    grid-column: 1 / -1;
}

/* Button */
.form-submit {
    text-align: center;
    margin-top: 25px;
}

.form-submit .btn {
    padding: 12px 35px;
    background: #ffd700;
    color: #1e3c72;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.form-submit .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

/* Responsive grid */
@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

