/* ===== General Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #fdfdfd;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== Navigation ===== */
nav {
    background-color: #2c3e50;
    padding: 15px 0;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap; /* ensures wrapping on smaller screens */
}

nav ul li {
    margin: 5px 15px; /* matches contact.css spacing */
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: 600; /* same as contact.css */
    font-size: 1.2rem; /* same as contact.css */
    transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: #f39c12;
}

/* ===== Hero Section ===== */
.hero {
    height: 40vh;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4)),
                url('images/school1.jpeg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 20px;
}

.hero h1 {
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.3;
    max-width: 900px;
    margin: 0 auto;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
    animation: fadeInUp 1.2s ease forwards;
}

/* ===== Carousel ===== */
.carousel {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    height: 45vh;
    border-radius: 8px;
    margin: 20px auto;
    background-color: #f0f0f0;
}

.carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.carousel img.active {
    display: block;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 10px;
}

.carousel-controls button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 4px;
    transition: background 0.3s;
}

.carousel-controls button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* ===== Main Content ===== */
.container {
    padding: 20px;
    max-width: 900px;
    margin: auto;
    text-align: center;
}

.container h2 {
    color: #004080;
    margin-bottom: 10px;
    font-size: clamp(1.2rem, 4vw, 2rem);
}

/* ===== Footer ===== */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 15px 0;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Responsive Design for Tablets & Mobile */
@media (max-width: 768px) {
    nav ul {
        flex-wrap: wrap;       /* allow items to wrap */
        justify-content: center;
        gap: 8px;              /* spacing between items */
    }

    .hero {
        height: 30vh;
        padding: 15px;
    }

    .carousel {
        height: 30vh;
    }

    .container {
        padding: 15px;
    }
}
.course-info {
    text-align: center;
    background-color: #f4f6f8;
    padding: 20px;
}

.course-info h3 {
    margin: 8px 0;
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 600;
}

@media (max-width: 480px) {
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    nav ul li a {
        font-size: 1rem;
    }

    .hero {
        height: 25vh;
        padding: 10px;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .carousel {
        height: 25vh;
    }
}
