/* =========================================
   GLOBAL VARIABLES & RESETS
   ========================================= */
:root {
    --primary-blue: #0b2341;
    --accent-gold: #d88b22; 
    --text-dark: #333333;
    --text-light: #777777;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --nav-text: #455A64;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Avenir', sans-serif; }
body { color: var(--text-dark); line-height: 1.6; background-color: var(--white); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; position: relative; }

/* Global Fonts & Utilities */
@font-face {
    font-family: 'Shelley Allegro Script';
    src: url('https://neu.edu.ph/main/assets/fonts/Shelley%20Allegro%20Script%20Regular.otf') format('opentype');
    font-weight: normal; font-style: normal;
}
@font-face {
    font-family: 'Avenir Next Condensed';
    src: url('https://neu.edu.ph/main/assets/fonts/AvenirNextCondensed-Regular.otf') format('opentype');
    font-weight: normal; font-style: normal;
}
.font-condensed {
    font-family: 'Avenir Next Condensed', 'Arial Narrow', sans-serif !important;
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* Global Buttons */
.btn {
    display: inline-block; padding: 8px 16px; border: 1px solid var(--primary-blue);
    color: var(--primary-blue); font-size: 0.8rem; font-weight: 600;
    text-transform: uppercase; cursor: pointer; transition: all 0.3s; background: transparent;
}
.btn:hover { background: var(--primary-blue); color: var(--white); }
.btn-solid { background: var(--primary-blue); color: var(--white); border: none; padding: 10px 24px; }
.btn-solid:hover { background: #081a30; }


/* =========================================
   HEADER & NAVIGATION
   ========================================= */
/* Mobile Menu Toggle Bar (Hidden on Desktop) */
.mobile-menu-bar {
    display: none;
    background: var(--bg-light);
    padding: 15px 20px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}
.hamburger-btn {
    background: none; border: none; font-size: 1.2rem;
    font-weight: 600; color: var(--primary-blue); cursor: pointer;
    display: flex; align-items: center; gap: 8px; margin-left: auto;
}

.top-header {
    background-color: var(--primary-blue); color: var(--white); padding: 20px 0;
    background-image: url('https://uxi.rocks/neu2/assets/images/neu_header.webp');
    background-size: cover; background-position: center 550px; position: relative; 
}
.top-header-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(1, 45, 94, 0.85); z-index: 1; 
}
.header-content {
    display: flex; align-items: center; justify-content: center; gap: 20px; 
    position: relative; z-index: 2; 
}
.header-logo { width: 80px; height: auto; }
.header-text { text-align: center; }
.top-header h1 { 
    font-family: 'Shelley Allegro Script', cursive; font-size: 3.5rem; 
    font-weight: normal; letter-spacing: 0px; margin: 0; line-height: 1.2;
}
.top-header p { font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; margin: 0; }

nav { 
    background: var(--bg-light); border-bottom: 1px solid var(--border-color); 
    position: relative; z-index: 1000; 
}
.nav-links { display: flex; justify-content: space-between; gap: 50px; flex-wrap: wrap; }
.nav-item { padding: 20px 0; }
.nav-item > a { 
    font-size: 1rem; font-weight: 500; text-transform: uppercase; 
    color: var(--nav-text); padding-bottom: 20px; 
}
.nav-item:hover > a { color: var(--accent-gold); }

/* Mega Menu */
.mega-menu {
    position: absolute; top: 100%; left: 0; width: 100%; 
    background: var(--white); box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 8px; border: 1px solid var(--border-color);
    padding: 30px; opacity: 0; visibility: hidden;
    transform: translateY(15px); transition: all 0.3s ease; text-align: left;
}
.nav-item:hover .mega-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-menu h4 {
    color: var(--accent-gold); font-size: 0.8rem; font-weight: 600;
    margin-bottom: 12px; margin-top: 20px; text-transform: uppercase;
}
.mega-menu h4:first-child { margin-top: 0; }
.mega-menu a {
    display: block; font-size: 0.85rem; color: #555; font-weight: 400;
    padding: 6px 0; transition: color 0.2s;
}
.mega-menu a:hover { color: var(--primary-blue); font-weight: 500; text-decoration: underline; }

.menu-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.campus-menu-layout { display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: stretch; }
.col-border-right { border-right: 1px solid var(--border-color); padding-right: 20px; }
.campus-image-container { overflow: hidden; border-radius: 6px; }
.campus-image-container img { width: 100%; height: 180px; object-fit: cover; }

/* Header/Nav Mobile Responsive */
@media (max-width: 950px) {
    
    .nav-links { gap:20px }
}
@media (max-width: 900px) {
    .menu-grid-3, .campus-menu-layout { grid-template-columns: 1fr; gap: 20px; }
    .col-border-right { border-right: none; padding-right: 0; border-bottom: 1px solid var(--border-color); padding-bottom: 20px; margin-bottom: 20px; }
    
    
}


@media (max-width: 768px) {
    /* Modify how the mega menu appears on mobile */
    .mega-menu { position: static; visibility: visible; opacity: 1; transform: none; box-shadow: none; border: none; padding: 15px 0; display: none; }
    
    /* Turn off desktop hover on mobile */
    .nav-item:hover .mega-menu { display: none; } 
    
    /* Turn ON mobile click toggle */
    .nav-item.mobile-dropdown-active .mega-menu { display: block; }
    .header-content { flex-direction: column; text-align: center; gap: 10px; }
    .top-header h1 { font-size: 2.5rem; }
    .top-header p { font-size: 0.7rem; }
    
    /* Show mobile menu bar */
    .mobile-menu-bar { display: block; }
    
    /* Hide links by default & style the dropdown */
    .nav-links { 
        display: none; 
        flex-direction: column; gap: 0; padding: 0; width: 100%; 
        position: absolute; top: 100%; left: 0;
        background: var(--bg-light); z-index: 1001;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }
    
    /* Show links when active class is added by JS */
    ul.nav-links.active { display: flex; }
    
    .nav-item { padding: 0; width: 100%; text-align: left; border-bottom: 1px solid var(--border-color); }
    .nav-item > a { display: block; padding: 15px 20px; }
}


/* =========================================
   FOOTER
   ========================================= */
footer { background: var(--primary-blue); color: var(--white); padding: 60px 0 20px; font-size: 0.8rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 2fr 1fr; gap: 20px; margin-bottom: 40px; }
.footer-col h4 { font-size: 0.9rem; margin-bottom: 15px; color: var(--white); }
.footer-col ul li { margin-bottom: 8px; color: #aaa;display: flex; align-items: flex-start; }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); color: #aaa; }
.footer-logo { max-width: 180px; height: auto; margin-bottom: 15px; display: block; }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 600px) {
    .footer-logo { margin: 0 auto 15px auto; }
    .footer-col { text-align: center; margin-bottom: 20px; }
}


/* =========================================
   CUSTOM MODAL (GLOBAL COMPONENT)
   ========================================= */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); z-index: 2000;
    align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.modal.show { display: flex; opacity: 1; }
.modal-dialog {
    background: var(--white); border-radius: 8px; width: 90%; max-width: 500px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: translateY(-20px); transition: transform 0.3s ease; overflow: hidden;
}
.modal.show .modal-dialog { transform: translateY(0); }
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px; border-bottom: 1px solid var(--border-color);
}
.modal-title { font-size: 1.1rem; font-weight: 600; color: var(--primary-blue); }
.btn-close {
    background: none; border: none; font-size: 1.5rem; 
    cursor: pointer; color: #888; transition: color 0.2s;
}
.btn-close::before { content: "×"; }
.btn-close:hover { color: red; }
.modal-body { padding: 30px 20px; text-align: center; }
.img-fluid { max-width: 100%; height: auto; max-height: 300px; object-fit: contain; }
.mt-3 { margin-top: 1rem; }
.btn-primary {
    background-color: var(--primary-blue); color: var(--white); border: none;
    padding: 10px 24px; border-radius: 4px; cursor: pointer; 
    margin-top: 15px; font-weight: 600; text-transform: uppercase; transition: background-color 0.3s;
}
.btn-primary:hover { background-color: var(--accent-gold); }