/* ================= University Hero Carousel ================= */
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    animation: heroZoom 14s ease forwards;
}

/* Dark academic overlay */
.hero-carousel .carousel-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
            rgba(0, 0, 0, 0.65),
            rgba(0, 0, 0, 0.35));
    z-index: 1;
}

/* ===== HERO FULL WIDTH FIX ===== */

/* Remove Bootstrap container spacing */
.hero-wrapper {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 0;
}

/* Remove gaps under navbar */
.hero-carousel {
    margin-top: 0 !important;
}

/* Force edge-to-edge slides */
.hero-carousel,
.hero-carousel .carousel-inner,
.hero-carousel .carousel-item {
    width: 100vw;
}

/* Ensure image fills edges */
.hero-img {
    width: 100vw;
    height: 85vh;
    object-fit: cover;
    object-position: center center;
}

/* Fix Bootstrap body overflow issue */
body {
    overflow-x: hidden;
}


/* Caption layout */
.hero-carousel .carousel-caption {
    z-index: 2;
    text-align: left;
    max-width: 650px;
    left: 8%;
    right: auto;
    bottom: 10%;
}

/* Category tag */
.hero-tag {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    padding: 6px 14px;
    border-radius: 30px;
    margin-bottom: 15px;
    opacity: 0;
    animation: fadeDown 1s ease forwards;
}

/* Title */
.hero-carousel h2 {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
    opacity: 0;
    animation: fadeUp 1.2s ease forwards;
    animation-delay: 0.3s;
}

/* Description */
.hero-carousel p {
    font-size: 1.1rem;
    color: #eaeaea;
    line-height: 1.6;
    margin-bottom: 25px;
    opacity: 0;
    animation: fadeUp 1.2s ease forwards;
    animation-delay: 0.6s;
}

/* Button */
.hero-btn {
    padding: 12px 34px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 30px;
    opacity: 0;
    animation: fadeUp 1.2s ease forwards;
    animation-delay: 0.9s;
}

/* ================= Animations ================= */

@keyframes heroZoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(35px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= Responsive ================= */

@media (max-width: 768px) {
    .hero-carousel .carousel-item {
        height: 65vh;
    }

    .hero-carousel h2 {
        font-size: 2rem;
    }

    .hero-carousel p {
        font-size: 1rem;
    }

    .hero-carousel .carousel-caption {
        left: 6%;
        right: 6%;
        bottom: 18%;
    }
}

/* ===== REMOVE TOP GAP ABOVE HERO (FINAL FIX) ===== */

/* Kill body and main spacing */
body,
main {
    margin-top: 120px !important;
    padding-top: 0 !important;
}

/* If hero is first section */
.hero-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove navbar bottom spacing */
.navbar {
    margin-bottom: 0 !important;
}

/* Remove Bootstrap container padding if wrapped */
.container,
.container-fluid {
    padding-top: 0 !important;
}