@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-purple: #3b1e54;
    --dark-purple: #2a143d;
    --accent-purple: #5c2d91;
    --accent-yellow: #f39c12;
    --light-bg: #f8f9fa;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #fff;
    color: #333;
    overflow-x: hidden;
}

/* Top Bar */
.top-bar {
    background: linear-gradient(90deg, #3b1e54 0%, #5c2d91 100%);
    color: #fff;
    padding: 14px 0;
    font-size: 12px;
    font-weight: 500;
    position: relative;
    z-index: 1101;
    overflow: visible;
}

.top-bar-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin-left: 20px;
    transition: 0.3s;
}

.top-bar-links a:hover { color: var(--accent-yellow); }

.top-bar .dropdown-menu {
    z-index: 1200;
}

/* Main Header */
.main-header {
    background: #f5f6ff;
    box-shadow: 0 14px 40px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.main-header .container {
    width: 100%;
    max-width: 1400px;
    padding-left: clamp(12px, 2.5vw, 26px);
    padding-right: clamp(12px, 2.5vw, 26px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 67px;
    padding: 0 clamp(12px, 2vw, 22px);
    position: relative;
    background: rgba(59,30,84,0.08);
    border-radius: 14px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    color: var(--primary-purple);
}

.navbar-brand img { height: 45px; margin-right: 15px; }
.brand-title { font-size: 26px; font-weight: 800; color: var(--primary-purple); letter-spacing: 1px; }

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 8px;
    gap: 10px;
    align-items: center;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: blur(16px);
}

.nav-menu li a {
    color: var(--dark-purple);
    padding: 12px 18px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
    transition: transform 0.2s ease, background 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu li a:hover {
    background: rgba(255,255,255,0.18);
    color: var(--primary-purple);
    transform: translateY(-1px);
}

.nav-menu li.active a {
    background: #ffffff;
    color: var(--primary-purple);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.nav-menu li.active a i {
    color: var(--primary-purple);
}

@media (max-width: 992px) {
    .header-content {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
        height: auto;
        padding-bottom: 15px;
    }

    .nav-menu {
        width: 100%;
        justify-content: center;
        padding: 10px 12px;
    }
}

@media (max-width: 767px) {
    .main-header { padding: 8px 0; }

    .header-content {
        height: 56px;
        padding: 0 12px;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 10px;
    }

    .navbar-brand img { height: 34px; margin-right: 10px; }
    .brand-title { font-size: 20px; }
}

.mobile-nav { display: flex; align-items: center; }
.mobile-nav-toggle {
    background: rgba(59,30,84,0.08);
    border: 1px solid rgba(59,30,84,0.18);
    color: var(--primary-purple);
    border-radius: 12px;
    padding: 10px 12px;
    line-height: 1;
}
.mobile-nav-toggle:focus { outline: none; }
.mobile-nav-backdrop {
    position: fixed;
    top: var(--mobile-nav-top, 0px);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1190;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease, visibility 220ms ease;
}
.mobile-nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.mobile-nav-collapse {
    position: fixed;
    top: var(--mobile-nav-top, 0px);
    right: 0;
    left: auto;
    width: clamp(240px, 33vw, 340px);
    height: calc(100vh - var(--mobile-nav-top, 0px));
    background: linear-gradient(180deg, rgba(59,30,84,0.08) 0%, #ffffff 48px);
    border-left: 1px solid rgba(0,0,0,0.08);
    box-shadow: -18px 0 45px rgba(0,0,0,0.22);
    padding: 12px;
    z-index: 1200;
    overflow-y: auto;
    transform: translateX(110%);
    transition: transform 260ms ease;
    visibility: hidden;
    pointer-events: none;
}
.mobile-nav-collapse.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}
.mobile-nav-open { overflow: hidden; }
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 6px 10px;
    border-bottom: 1px solid rgba(59,30,84,0.12);
    margin-bottom: 10px;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    overflow: hidden;
}
.mobile-nav-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: -26px;
    height: 100%;
    width: 28%;
    background: linear-gradient(135deg, #3b1e54 0%, #5c2d91 100%);
    transform: skewX(-18deg);
    transform-origin: left top;
}
.mobile-nav-brand { display:flex; align-items:center; gap:10px; min-width:0; position: relative; z-index: 2; }
.mobile-nav-brand-left { width: 28%; min-width: 58px; display: flex; align-items: center; justify-content: center; }
.mobile-nav-logo { width: 26px; height: 26px; border-radius: 8px; background: #fff; padding: 2px; border: 1px solid rgba(255,255,255,0.35); }
.mobile-nav-title { font-weight: 900; color: var(--primary-purple); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-nav-close {
    background: #fff;
    border: 1px solid rgba(59,30,84,0.18);
    border-radius: 12px;
    padding: 8px 10px;
    line-height: 1;
    color: #444;
    position: relative;
    overflow: hidden;
}
.mobile-nav-close:focus { outline: none; }
.mobile-nav-close i { position: relative; z-index: 1; }
.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mobile-nav-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    color: #333;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(0,0,0,0.06);
}
.mobile-nav-menu li a i { width: 22px; text-align: center; color: var(--primary-purple); }
.mobile-nav-menu li + li { margin-top: 6px; }
.mobile-nav-menu li.active a {
    background: rgba(59,30,84,0.10);
    color: var(--primary-purple);
    border-color: rgba(59,30,84,0.18);
}
.mobile-nav-menu li a:hover { background: rgba(0,0,0,0.04); }

/* Hero & Sections - Shared Styles */
.hero-section {
    background: linear-gradient(rgba(59, 30, 84, 0.8), rgba(59, 30, 84, 0.8)), url('../img/university_hero.png');
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    margin-bottom: 40px;
}

.hero-title { font-size: 48px; font-weight: 800; color: #fff; margin-bottom: 20px; }
.hero-subtitle { font-size: 18px; color: rgba(255,255,255,0.9); max-width: 600px; margin: 0 auto; }

.stats-box {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-top: -80px;
    position: relative;
    z-index: 10;
    margin-bottom: 60px;
}

.room-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: 0.3s;
    border: 1px solid #f0f0f0;
}

.room-card:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }
.room-img { height: 200px; background-size: cover; background-position: center; }
.room-info { padding: 25px; }
.room-name { font-size: 18px; font-weight: 700; color: var(--primary-purple); margin-bottom: 5px; }
.room-location { font-size: 13px; color: #777; margin-bottom: 15px; }
.room-specs { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; }

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px; height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
