/* --- 1. Variables & Global --- */
:root {
    --header-bg: #0c323a;
    /* Dark Teal */
    --navbar-bg: #009cbb;
    /* Golden Yellow */
    --footer-bg: #0c323a;
    /* Dark Footer */
    --text-orange: #c3ebf4;
    /* Highlight Orange */
    --text-light: #bbbbbb;
    /* Soft Grey */
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* --- 2. Main Header (Dark Section) --- */
.main-header {
    background-color: var(--header-bg);
    color: white;
}

.header-logo {
    max-height: 80px;
    width: auto;
}

.inst-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.inst-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

.header-icons a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    margin-left: 15px;
}

/* --- 3. Navbar (Yellow Section) --- */
.navbar-yellow {
    background-color: var(--navbar-bg);
    padding: 0;
}

.navbar-yellow .nav-link {
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 15px 20px !important;
}

.navbar-yellow .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Sticky Header and Navbar Wrapper */
.sticky-top {
    z-index: 1030; /* Ensures it stays above all content */
    background-color: var(--header-bg); /* Prevents transparency issues */
}

/* Ensure the navbar doesn't have extra margins that cause gaps */
.navbar-yellow {
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
}
/* Styling to ensure the links don't change the look of the cards */
.programme-card-link {
    text-decoration: none !important;
}

.programme-card {
    transition: all 0.3s ease-in-out;
}

/* Subtle elevation and glow on hover */
.programme-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid var(--navbar-bg) !important;
}

/* Make icons pop slightly more on hover */
.programme-card:hover i {
    transform: scale(1.1);
    color: #ffc107; /* Brighter yellow/warning */
}

/* Footer Contact Links */
.footer-contact-link {
    transition: all 0.3s ease;
    display: block;
}

.footer-contact-link:hover {
    opacity: 0.8;
}

.footer-contact-link:hover .footer-info {
    color: var(--text-orange) !important; /* Glows to your theme orange on hover */
}
/* Styling for the Full-Width Banner Image */
.prog-card-header-img {
    width: 100%;
    height: 180px;      /* Set a fixed height so all cards look even */
    object-fit: cover;  /* This makes the image fill the space without stretching */
    transition: transform 0.5s ease;
}

/* Zoom effect on hover */
.programme-card:hover .prog-card-header-img {
    transform: scale(1.1);
}

/* Ensure the card text stays neat */
.programme-card .card-body {
    padding: 1.5rem;
}

/* --- Interactive Star Rating --- */
.star-rating {
    display: flex;
    flex-direction: row-reverse; /* Important for the hover effect logic */
    justify-content: flex-end;
    padding: 10px 0;
}

/* Hide the actual radio circles completely */
.star-rating input {
    display: none !important;
}

.star-rating label {
    color: #ccc; /* Default grey star */
    font-size: 2.2rem;
    padding: 0 4px;
    cursor: pointer;
    transition: color 0.2s ease;
}

/* Hover and Checked states */
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #ffc107 !important; /* Golden Yellow */
}

/* Scale effect on click/touch */
.star-rating label:active {
    transform: scale(0.9);
}

/* Adjust mobile collapse position since parent is now sticky */
@media (max-width: 991px) {
    .navbar-collapse {
        top: 100%; /* Sits exactly below the sticky wrapper */
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* --- 4. Banner (Slider) --- */
#heroCarousel {
    margin: 0;
    padding: 0;
}

#heroCarousel .carousel-item img {
    width: 100%;
    height: auto;
}

.footer-the_innovators {
    color: #acedfa !important;
}

/* --- Read More Button Styling --- */
.btn-read-more {
    background-color: var(--navbar-bg);
    color: #ffffff !important;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-read-more:hover {
    background-color: var(--header-bg);
    /* Changes to dark teal on hover */
    color: #ffffff !important;
    transform: translateY(-5px) scale(1.05);
    /* Lifts up and grows slightly */
    box-shadow: 0 8px 25px rgba(0, 156, 187, 0.4);
    /* Adds a glowing shadow of your navbar color */
}

.btn-read-more:active {
    transform: translateY(-2px);
    /* Slight press-down effect when clicked */
}

.txt-latest-notice {
    color: var(--header-bg);
}

/* --- Modern & Premium Dropdown Layout --- */

/* 1. Base Styles for Dropdown */
.navbar-yellow .dropdown-menu {
    border: none;
    border-radius: 8px;
    /* Rounded corners for modern feel */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    /* Soft, deep shadow */
    padding: 10px 0;
    margin-top: 0;
    background: #ffffff;
    min-width: 220px;
    transform-origin: top center;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    /* Smooth movement */
}

/* 2. Individual Item Styling */
.navbar-yellow .dropdown-item {
    padding: 12px 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--header-bg);
    border-left: 4px solid transparent;
    /* Hidden left highlight */
    transition: all 0.2s ease;
}

/* 3. Hover Effects on Items */
.navbar-yellow .dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--navbar-bg);
    border-left: 4px solid var(--navbar-bg);
    /* Highlight pops out on hover */
    padding-left: 30px;
    /* Slight nudge for extra interactivity */
}
/* --- Programme Card Styling --- */
.programme-card {
    transition: all 0.3s ease;
    border-radius: 12px;
}

.programme-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
    background-color: #ffffff;
}

.programme-card i {
    transition: transform 0.3s ease;
}

.programme-card:hover i {
    transform: scale(1.1);
}

.programme-card h5 {
    color: var(--header-bg);
    font-weight: 700;
}

/* 4. Desktop Hover-to-Open & Animation */
@media (min-width: 992px) {

    /* Reveals the menu when hovering over the parent Nav Item */
    .nav-item.dropdown:hover>.dropdown-menu {
        display: block;
        animation: slideDown 0.4s ease forwards;
    }

    /* Remove the default arrow on hover to keep it clean */
    .dropdown-toggle::after {
        transition: transform 0.3s;
    }

    .nav-item.dropdown:hover .dropdown-toggle::after {
        transform: rotate(180deg);
        /* Arrow flips when open */
    }
}

/* 5. Slide Down Animation Keyframes */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 6. Mobile Dropdown Adjustments */
@media (max-width: 991px) {
    .navbar-yellow .dropdown-menu {
        background: rgba(255, 255, 255, 0.05);
        /* Glassmorphism on mobile */
        border-left: 2px solid var(--navbar-bg);
        margin: 10px 15px;
        box-shadow: none;
    }

    .navbar-yellow .dropdown-item {
        color: #ffffff;
        /* White text for mobile dark menu */
    }

    .navbar-yellow .dropdown-item:hover {
        background: transparent;
        color: var(--navbar-bg);
    }
}

.menu-toggle-btn {
    cursor: pointer !important;
    position: relative;
    z-index: 2100;
    /* Higher than the main-header sticky z-index */
    outline: none !important;
}

/* --- 5. Mobile Optimization --- */
@media (max-width: 991px) {

    /* Ensure Header is always on top */
    .main-header {
        position: sticky;
        top: 0;
        z-index: 2000;
    }

    /* Standard Navbar Fixes (Remove display: none) */
    .navbar-yellow {
        background-color: var(--navbar-bg);
        padding: 0;
        margin: 0;
        border: none;
    }

    .navbar-collapse {
        background-color: var(--header-bg);
        /* Dark menu on mobile */
        padding: 10px 0;
        position: absolute;
        width: 100%;
        left: 0;
        top: 100%;
        /* Sits below header */
        z-index: 1500;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    .navbar-yellow .nav-link {
        color: #ffffff !important;
        text-align: center;
        padding: 12px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-yellow .dropdown-menu {
        background: rgba(255, 255, 255, 0.05);
        /* Proper transparency */
        border: none;
        margin: 0;
        border-radius: 0;
    }
}

/* --- 6. Laptop/Desktop Styles --- */
@media (min-width: 992px) {
    .inst-title {
        font-size: 2.2rem;
    }

    #heroCarousel .carousel-item img {
        height: 500px;
        object-fit: cover;
    }
}

/* --- 7. Footer Section --- */
.footer-section {
    background-color: var(--footer-bg) !important;
    padding: 60px 0 20px 0;
    color: white;
}

.text-orange {
    color: var(--text-orange) !important;
}

.footer-link {
    color: var(--text-light);
    text-decoration: none !important;
    display: block;
    margin-bottom: 10px;
    transition: 0.3s;
}

.footer-link:hover {
    color: var(--text-orange);
    padding-left: 5px;
}

.footer-divider {
    border-top: 1px solid #333;
    margin: 30px 0;
}
