* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #e6f0fa, #8fb7f5);
    min-height: 100vh;
}

header {
    background: #0033a0;
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mc-logo {
    width: 45px;
    height: 45px;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 8px 15px;
    border-radius: 20px;
    transition: background 0.3s, color 0.3s;
}

nav ul li a:hover {
    background: #ffd700;
    color: #0033a0;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

#home, #why-choose-us, #about, #classes, #contact, #register, #login {
    padding: 60px 15px;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    animation: fadeIn 1s ease-in;
}

#home {
    min-height: calc(100vh - 80px);
    background: url('hero-bg.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.hero {
    background: rgba(0, 0, 0, 0.7);
    padding: 2.5rem;
    border-radius: 15px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.2rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.6rem;
    margin-bottom: 1.8rem;
}

.btn {
    background: #ffd700;
    color: #0033a0;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.3s, transform 0.3s;
}

.btn:hover {
    background: #e6c200;
    transform: scale(1.05);
}

h2 {
    font-size: 2.8rem;
    color: #0033a0;
    margin-bottom: 1.8rem;
}

#about h3, #classes h3, .bottom-image-section h3 {
    font-size: 1.8rem;
    color: #0033a0;
    margin: 1.2rem 0;
}

#about p, #why-choose-us p, #contact p, #classes p {
    font-size: 1.1rem;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.7;
}

.faculty-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    justify-content: center;
    margin-top: 1.2rem;
}

.faculty-card {
    background: #f9fcff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.faculty-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.faculty-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.2rem;
}

.faculty-card h4 {
    font-size: 1.4rem;
    color: #0033a0;
    margin-bottom: 0.6rem;
}

.class-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    justify-content: center;
}

.class-card {
    background: #f9fcff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.class-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.class-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.2rem;
}

.class-card h3 {
    font-size: 1.6rem;
    color: #0033a0;
    margin-bottom: 0.6rem;
}

.class-card p {
    font-size: 1rem;
    color: #555;
}

#contact form, #register form, #login form {
    max-width: 600px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

#contact input, #contact textarea, #register input, #register select, #login input {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border 0.3s, box-shadow 0.3s;
}

#contact input:focus, #contact textarea:focus, #register input:focus, #register select:focus, #login input:focus {
    border-color: #0033a0;
    box-shadow: 0 0 6px rgba(0, 51, 160, 0.2);
    outline: none;
}

#contact textarea {
    height: 160px;
    resize: vertical;
}

#register select {
    appearance: none;
    background: url('data:image/svg+xml;utf8,<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>') no-repeat right 0.8rem center/0.8rem;
}

#register div {
    text-align: left;
    margin: 1rem 0;
}

#register label {
    font-size: 1.1rem;
    color: #0033a0;
    margin-bottom: 0.5rem;
    display: block;
}

#register input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1);
}

.bottom-image-section {
    padding: 50px 15px;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    animation: fadeIn 1s ease-in;
}

.bottom-image-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.bottom-image-card {
    flex: 0 1 400px;
    text-align: center;
    background: #f9fcff;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.bottom-image-card:hover {
    transform: translateY(-5px);
}

.bottom-image-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #0033a0;
}

.bottom-image-card h4 {
    font-size: 1.3rem;
    color: #0033a0;
    margin-top: 0.6rem;
}

footer {
    background: #0033a0;
    color: #fff;
    text-align: center;
    padding: 1.8rem 0;
    font-size: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Page-specific styles to ensure sections are visible on mobile */
body:has(#about) #about,
body:has(#classes) #classes,
body:has(#contact) #contact,
body:has(#register) #register {
    display: block !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* Hide non-homepage content on mobile by default */
    #about, #classes, #contact, #register, #login {
        display: none;
    }
    .logo-container {
        flex-direction: row;
        gap: 6px;
    }
    .mc-logo {
        width: 35px;
        height: 35px;
    }
    .logo {
        font-size: 1.4rem;
    }
    nav {
        flex-wrap: wrap;
        position: relative;
    }
    nav ul {
        display: none;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        background: #0033a0;
        padding: 15px;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 999;
    }
    nav ul.active {
        display: flex;
    }
    nav ul li a {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    .hamburger {
        display: block;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 1rem;
    }
    h2 {
        font-size: 1.6rem;
    }
    #about h3, #classes h3, .bottom-image-section h3 {
        font-size: 1.4rem;
    }
    #about p, #why-choose-us p, #contact p, #classes p {
        font-size: 0.9rem;
    }
    .class-card, .faculty-card {
        padding: 10px;
    }
    .class-card img, .faculty-card img {
        height: 140px;
    }
    .class-card h3, .faculty-card h4 {
        font-size: 1.2rem;
    }
    .class-card p {
        font-size: 0.9rem;
    }
    .bottom-image-container {
        flex-direction: column;
        gap: 10px;
    }
    .bottom-image-card {
        flex: 1;
        max-width: 100%;
        padding: 8px;
    }
    .bottom-image-card img {
        height: 180px;
    }
    .bottom-image-card h4 {
        font-size: 1.1rem;
    }
    #contact form, #register form, #login form {
        max-width: 100%;
        padding: 0 10px;
    }
    #contact input, #contact textarea, #register input, #register select, #login input {
        font-size: 0.9rem;
        padding: 10px;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .logo {
        font-size: 1.2rem;
    }
    .mc-logo {
        width: 30px;
        height: 30px;
    }
    .hero h1 {
        font-size: 1.6rem;
    }
    .hero p {
        font-size: 0.9rem;
    }
    h2 {
        font-size: 1.4rem;
    }
    #about h3, #classes h3, .bottom-image-section h3 {
        font-size: 1.2rem;
    }
    .faculty-gallery {
        grid-template-columns: 1fr;
    }
    .class-container {
        grid-template-columns: 1fr;
    }
    .class-card img, .faculty-card img {
        height: 120px;
    }
    .bottom-image-card img {
        height: 160px;
    }
    #contact textarea {
        height: 140px;
    }
}