* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.topbar {
    background: #0f4c81;
    color: #ffffff;
}

.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
}

.nav a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 1.2rem;
    font-weight: 500;
}

/* Hamburger button – hidden on desktop */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Contact list */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.hero-full {
    position: relative;
}

.button {
    display: inline-block;
    background: #0f4c81;
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 72vh;
    min-height: 430px;
    max-height: 620px;
    overflow: hidden;
    background: #d8e4f3;
}

.hero-slider .slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slider .slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 33, 57, 0.78) 0%, rgba(11, 33, 57, 0.45) 48%, rgba(11, 33, 57, 0.2) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    color: #ffffff;
    max-width: 680px;
}

.hero-content h1 {
    font-size: 2.7rem;
    margin: 0 0 1rem;
}

.hero-content p {
    line-height: 1.75;
    margin-bottom: 1.3rem;
    font-size: 1.06rem;
}

.slider-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(15, 47, 82, 0.84);
    color: #ffffff;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 3;
}

.slider-dots {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 3;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
}

.dot.active {
    background: #ffffff;
}

.main-sections {
    margin-top: 0.8rem;
}

.section {
    padding: 2.8rem 0;
}

.section h2 {
    margin-top: 0;
    color: #0f2f52;
}

#programs {
    background: #ffffff;
    border: 1px solid #dce6f5;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 28px rgba(15, 47, 82, 0.08);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.section-header h2 {
    margin: 0;
    color: #0f2f52;
}

.section-subtext {
    margin: 0 0 1.2rem;
    color: #4b5563;
    line-height: 1.7;
}

.view-all-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f4c81;
    text-decoration: none;
    border: 1.5px solid #0f4c81;
    border-radius: 6px;
    padding: 0.4rem 0.8rem;
    white-space: nowrap;
}

.course-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.course-card {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #d7e3f5;
    border-radius: 12px;
    padding: 1rem 1rem 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.course-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #0f4c81, #1d4ed8);
}

.course-card:hover {
    box-shadow: 0 10px 24px rgba(15, 47, 129, 0.16);
    transform: translateY(-4px);
}

.course-card h3 {
    margin: 0;
    font-size: 1rem;
    color: #0f2f52;
    line-height: 1.4;
}

.course-index {
    position: absolute;
    top: 0.75rem;
    right: 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #9db3d6;
}

.course-meta {
    margin: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.course-meta span {
    font-size: 0.79rem;
    background: #edf4ff;
    color: #27436f;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-weight: 600;
}

.course-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 4px;
    padding: 0.15rem 0.45rem;
    width: fit-content;
}

.course-tag.ug {
    background: #dbeafe;
    color: #1d4ed8;
}

.course-tag.pg {
    background: #ede9fe;
    color: #6d28d9;
}

.courses-cta {
    text-align: center;
    margin-top: 1.6rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.card {
    background: #ffffff;
    border: 1px solid #e3e8f1;
    border-radius: 12px;
    padding: 1rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.stat {
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 1.6rem;
    color: #0f4c81;
}

.footer {
    background: #0f2f52;
    color: #d7e3f2;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .hero-slider {
        height: 62vh;
        min-height: 360px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .course-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #programs {
        padding: 1.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
}

/* ---- Mobile nav breakpoint ---- */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .topbar .container {
        flex-wrap: wrap;
    }

    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 0.6rem 0 0.2rem;
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        margin: 0;
        padding: 0.65rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        font-size: 1rem;
    }

    .hero-overlay {
        background: linear-gradient(180deg, rgba(11, 33, 57, 0.72) 0%, rgba(11, 33, 57, 0.45) 50%, rgba(11, 33, 57, 0.25) 100%);
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .footer p {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .contact-list {
        flex-direction: column;
        gap: 0.3rem;
    }
}

@media (max-width: 540px) {
    .brand {
        font-size: 1.02rem;
    }

    .brand-logo {
        width: 36px;
        height: 36px;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .stat strong {
        font-size: 1.3rem;
    }

    .course-preview-grid {
        grid-template-columns: 1fr;
    }

    #programs {
        padding: 1.1rem;
    }

    .hero-slider {
        height: 54vh;
        min-height: 280px;
    }

    .hero-content h1 {
        font-size: 1.55rem;
    }

    .section {
        padding: 1.8rem 0;
    }

    .section h2 {
        font-size: 1.3rem;
    }
}
