:root {
    --sj-red: #b30000;
    --sj-dark: #1a1a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

/* --- NAVBAR --- */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 6%;
    background: white;
    position: relative;
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-area img { height: 50px; }

.brand-name {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--sj-red);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--sj-dark);
    font-weight: 600;
    transition: 0.3s;
}

.nav-links a:hover { color: var(--sj-red); }

/* --- HERO --- */
.hero {
    height: 420px;
    background: url('campus-bg.png') center/cover no-repeat;
    position: relative;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(179,0,0,0.75), rgba(0,0,0,0.6));
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    color: white;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 { font-size: 3rem; margin-bottom: 10px; }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; }

/* --- SEARCH --- */
.search-box {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 1rem;
    outline: none;
}

.search-box button {
    background: var(--sj-red);
    color: white;
    border: none;
    padding: 15px 35px;
    font-weight: bold;
    cursor: pointer;
}

/* --- WAYFINDER LAYOUT --- */
.wayfinder-wrapper {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 60px 6%;
    background: #f4f4f4;
}

.map-section {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.15);
    flex: 1;
    max-width: 1000px;
}

.map-container { position: relative; }
.map-container img { width: 100%; border-radius: 12px; }

.floor-pills {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}

.f-btn {
    padding: 10px 25px;
    border-radius: 30px;
    border: 2px solid var(--sj-red);
    background: white;
    color: var(--sj-red);
    font-weight: bold;
    cursor: pointer;
}

.f-btn.active { background: var(--sj-red); color: white; }

/* --- MAP MARKER PULSING --- */
.map-marker {
    position: absolute;
    width: 22px;
    height: 22px;
    background: var(--sj-red);
    border-radius: 50%;
    border: 3px solid white;
    display: none;
    transform: translate(-50%, -100%);
    z-index: 10;
    box-shadow: 0 0 0 0 rgba(179, 0, 0, 0.7);
    animation: pulseGlowRed 1.5s infinite;
}

@keyframes pulseGlowRed {
    0% { box-shadow: 0 0 0 0 rgba(179, 0, 0, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(179, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(179, 0, 0, 0); }
}

.path-line {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    display: none;
    z-index: 5;
}

/* --- STREETVIEW --- */
#streetview-floating {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 350px; 
    height: 220px; 
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
    z-index: 1000;
    background: white;
    border: 3px solid white;
    cursor: grab;
}

#streetview-floating:active { cursor: grabbing; }

#streetview-floating:fullscreen {
    width: 100vw;
    height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
}

#streetview-floating iframe { width: 100%; height: 100%; border: none; }

/* --- INTRO OVERLAY --- */
#intro-overlay {
    position: fixed;
    inset: 0;
    background: #0a0a0a;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999;
    text-align: center;
}

.intro-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* --- INTRO LOGO & GLOW --- */
.intro-logo {
    height: 130px;
    width: auto;
    margin-bottom: 20px;
    display: block;
    animation: pulseGlow 2.5s infinite ease-in-out; 
}

@keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 10px rgba(179, 0, 0, 0.4)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 30px rgba(179, 0, 0, 0.9)); transform: scale(1.05); }
    100% { filter: drop-shadow(0 0 10px rgba(179, 0, 0, 0.4)); transform: scale(1); }
}

#intro-overlay h2 {
    color: white !important; 
    font-size: 2.2rem;
    margin-top: 20px;
    background: linear-gradient(to right, #ffffff, var(--sj-red));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    display: block !important;
}

#intro-overlay p {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 1.1rem;
    margin-top: 10px;
    letter-spacing: 1px;
    display: block !important;
}

.loader {
    border: 3px solid #222; border-top: 3px solid var(--sj-red);
    border-radius: 50%; width: 40px; height: 40px;
    animation: spin 0.8s linear infinite; margin: 30px auto;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

.intro-hidden { transform: translateY(-100%); opacity: 0; visibility: hidden; transition: 0.5s; }

/* --- FOOTER --- */
.site-footer {
    width: 100%;
    background: var(--sj-dark);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9rem;
    border-top: 2px solid var(--sj-red);
}

/* --- MOBILE OVERRIDES (SAFE MERGE) --- */
@media (max-width: 480px) {
    .top-nav {
        padding: 10px 4% !important;
        flex-direction: row !important; 
        justify-content: flex-start !important; 
        align-items: center !important;
        gap: 10px !important;
    }

    .logo-area {
        display: flex !important;
        flex-direction: row !important; 
        align-items: center !important;
        justify-content: flex-start !important;
        width: auto !important;
        gap: 8px !important;
    }

    .logo-area img { height: 35px !important; margin: 0 !important; }

    .brand-name { 
        font-size: 0.85rem !important; 
        text-align: left !important;
        width: auto !important;
        display: inline-block !important;
    }

    .nav-links { display: none !important; }

    .hero { height: 320px; }
    .hero-content h1 { font-size: 1.5rem !important; }
    .search-box { flex-direction: column; }

    .wayfinder-wrapper { 
        display: block !important; 
        padding: 15px 10px !important;
    }

    /* UPDATED: Increased width to make Fullscreen Toggle visible */
    #streetview-floating {
        width: 260px !important; 
        height: 160px !important;
        bottom: 15px !important;
        right: 15px !important;
        z-index: 2000 !important; /* Ensure it stays above footer */
    }

    /* THE MOBILE FOOTER FIX */
    .site-footer {
        background: #000 !important;
        color: white !important;
        font-size: 0.75rem;
        padding: 25px 15px !important;
        padding-bottom: 180px !important; /* Increased to accommodate the taller streetview */
        position: relative !important;
        z-index: 1 !important;
    }
}