/* --- HEADER --- */
header {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 15px 30px 15px 10px;
    position: fixed; /* Sticky Header */
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Scrolled state (handled by JS) */
header.scrolled {
    padding: 10px 0;
    background-color: rgba(0, 0, 128, 0.95);
    backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Prevent the brand section from shrinking */
    flex-shrink: 0;
    margin-right: 30px;
}

.logo-img {
    height: 55px;
    width: 200px;
    object-fit: cover;
}

.brand-text h1 {
    font-size: 1.1rem; 
    font-weight: 600;
    /* FIX: Force text to one line */
    white-space: nowrap; 
}

.brand-text p {
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: 300;
    /* Optional: Force subtitle to one line too */
    white-space: nowrap;
}

/* Dropdown Section */
.dropdown {
    position: relative;
    display: inline-block;
}

/* The actual dropdown menu (hidden by default) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 270px;
    box-shadow: var(--shadow-md);
    border-radius: 4px;
    z-index: 1001;
    top: 100%; /* Sits right below the parent link */
    left: -8px;
    overflow: hidden;
}

#drop-faculty {
    min-width: 200px;
}

/* Links inside the dropdown */
.dropdown-content a {
    color: var(--accent-orange);
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-family: 'Prompt', sans-serif;
    font-size: 0.8rem;
    transition: background 0.3s;
}

/* Hover effect for items inside the dropdown */
.dropdown-content a:hover {
    background-color: var(--accent-orange);
    color: var(--white);
}

/* SHOW the dropdown when hovering over the .dropdown container */
.dropdown:hover .dropdown-content {
    display: block;
}

/* --- NAVIGATION --- */
.nav-desktop {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
    /* FIX: Prevent menu items like "About Us" from wrapping */
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--accent-orange);
    border-bottom: 2px solid var(--accent-orange);
}

#nav-dropdown:hover {
    color: var(--accent-orange);
    border-bottom: none;
}

.nav-link.active {
    font-weight: bold;
    color: var(--accent-orange) !important;
    border-bottom: 2.5px solid var(--accent-orange); /* Matches the underline in your reference */
    /* padding-bottom: 5px; */
}

/* --- MOBILE MENU --- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px; /* FIXED: Limits the width so it doesn't cover the whole page */
    height: 100vh;
    background-color: var(--secondary-blue); /* Darker color from your screenshot */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Aligns items to the top */
    padding: 30px 20px;
    gap: 15px; /* Spacing between links */
    transform: translateX(100%); /* Keeps it hidden off-screen */
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 1001; /* Higher than header */
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2); /* Adds depth */
}

.mobile-menu.active {
    transform: translateX(0);
}

#mobile-menu-title {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    border: none;
}

.mobile-link {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-family: 'Prompt', sans-serif;
    font-weight: 500;
    padding: 15px 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5); /* Separator lines like your screenshot */
    width: 100%;
}

/* .mobile-link:hover {
    color: var(--accent-orange);
    border-bottom: 2px solid var(--accent-orange);
} */

.mobile-link.active {
    color: var(--accent-orange) !important; /* Matches orange text in your reference */
    font-weight: 600;
    border-bottom: 2.5px solid var(--accent-orange); /* Keeps the line divider */
}

/* --- MOBILE DROPDOWN STYLING --- */

/* The submenu container */
.mobile-submenu {
    max-height: 0;            /* Start hidden */
    overflow: hidden;         /* Hide content when collapsed */
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth slide */
    background-color: rgba(0, 0, 0, 0.15); /* Slightly darker background for depth */
    border-left: 3px solid transparent;    /* Preparation for active state */
}

/* The class added by JavaScript */
.mobile-submenu.open {
    max-height: 500px;        /* Large enough value to fit all links */
    border-left: 3px solid var(--accent-orange); /* Orange highlight when open */
}

/* Styling for the links inside the dropdown */
.mobile-sublink {
    display: block;
    padding: 12px 0 12px 20px; /* Indent links to show hierarchy */
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-family: 'Prompt', sans-serif;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.3s ease;
}

.mobile-sublink:hover {
    color: var(--accent-orange);
}

/* The trigger title */
.dropdown-trigger {
    cursor: pointer;
    transition: color 0.3s ease;
}

/* --- HAMBURGER MENU --- */
.hamburger {
    position: relative; /* z-index requires a position value */
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 2000;
}

.line {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.hamburger.active .line1 { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active .line2 { opacity: 0; }
.hamburger.active .line3 { transform: rotate(-45deg) translate(5px, -6px); }

/* --- OVERLAY DIMMING EFFECT --- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5); /* Dims the page 60% black */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
    z-index: 1000; /* Sits just below the mobile-menu */
}

/* Show the overlay when active */
.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* --- RESPONSIVE BREAKPOINTS IPAD --- */
@media (max-width: 1275px) {
    .nav-desktop { display: none; }
    .hamburger { display: flex; }
    
    .hero-grid {
        grid-template-columns: 1fr;
    }

    /* Adjusted Brand Alignment */
    .brand { 
        flex-direction: row; 
        align-items: center;
        gap: 5px;
    }
    
    /* FIX: Ensure long single-line text scales down on mobile */
    .brand-text h1 {
        white-space: nowrap;
        font-size: 0.95rem; /* Slightly smaller to fit mobile screens */
    }

    .header-container { 
        align-items: center;
        padding: 0;
    }
}

/* --- RESPONSIVE BREAKPOINTS MOBILE --- */
@media (max-width: 680px) {
    .brand-text {
        display: none; /* Completely removes the text */
    }

    /* Optional: Adjust logo alignment since text is gone */
    .brand {
        align-items: center; /* Centers logo vertically */
        justify-content: center;
    }
}

/* --- LOGIN BUTTON STYLES --- */

/* Desktop Version */
.login-btn {
    background-color: var(--accent-orange);
    color: var(--white);
    padding: 8px 20px;
    width: max-content;
    text-decoration: none;
    /* font-weight: 600; */
    border-radius: 50px;
    transition: transform 0.2s, background-color 0.3s;
    font-family: 'Prompt', sans-serif;
    font-size: 0.95rem;
    /* margin-left: 10px; */
}

.login-btn:hover {
    background-color: #e67e22; /* A slightly darker orange for hover */
    transform: translateY(-2px);
    color: var(--white);
    border-bottom: none; /* Prevents the line from your nav-link hover rule */
}

/* Mobile Version */
.mobile-login-btn {
    display: block;
    text-align: center;
    background-color: var(--accent-orange);
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    padding: 10px 0;
    margin-top: 20px;
    border-radius: 50px;
    width: 100%;
}