/* ====== VARIABLES ====== */
:root {
    --primary-color: #00AD50;
    --primary-dark: #008a40;
    --primary-light: #4cd488;
    --secondary-color: #0033A0;
    --secondary-dark: #002680;
    --secondary-light: #335db3;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-light: #f8f9fa;
    --border-color: #e0e0e0;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
    --font-main: 'Inter', sans-serif;
}

/* ====== BASE STYLES ====== */
.modern-ui {
    
    font-family: var(--font-main);
    color: var(--text-primary);
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    
}

body::-webkit-scrollbar {
    width: 8px;
}

body::-webkit-scrollbar-track {
    background: var(--light-bg);
}

body::-webkit-scrollbar-thumb {
    background-color: #c1c1c1;
    border-radius: 6px;
    border: 3px solid var(--light-bg);
}

body::-webkit-scrollbar-thumb:hover {
    background-color: #a8a8a8;
}

/* ====== BUTTONS ====== */
.btn {
    border-radius: var(--radius-md);
    padding: 10px 20px;
    font-weight: 500;
    transition: all var(--transition-fast) ease;
}

/* ====== NAVIGATION ====== */
.navbar {
    background-color: white;
    box-shadow: var(--shadow-sm);
    padding-top: 15px;
    padding-bottom: 15px;
    transition: all var(--transition-fast) ease;
}

.navbar.scrolled {
    padding-top: 10px;
    padding-bottom: 10px;
    box-shadow: var(--shadow-md);
}

.navbar.sticky-top {
    z-index: 1030;
    position: sticky;
    top: 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
}

.brand-divider {
    height: 25px;
    width: 1px;
    background-color: var(--border-color);
    margin: 0 15px;
}

.brand-text {
    font-weight: 600;
    color: var(--text-primary);
}

.navbar-nav .nav-item {
    margin-left: 10px;
}

.navbar-nav .nav-link {
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast) ease;
}

.navbar-nav .nav-link i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.navbar-nav .nav-link:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

/* ====== HERO SECTION ====== */
.hero-section {
    padding: 10px 0;
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(240,249,245,1) 100%);
    position: relative;
    overflow: hidden;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.hero-section .container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.hero-section:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background-image: radial-gradient(var(--primary-light) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.2;
    z-index: 0;
}

.hero-section h1 {
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-title {
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Floor plan styles */

.controls {
    margin-bottom: 20px;
}

.error {
    background-color: #f8d7da;
    color: var(--danger);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.floor-plan-container {
    position: relative;
    flex-grow: 1;
    width: 100%;
    margin-bottom: 10px;
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}


.floor-plan {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: white;
    box-shadow: var(--shadow-sm);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.floor-plan svg {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 200px);
    display: block;
    object-fit: contain;
}

.room {
    cursor: pointer;
    transition: all var(--transition-normal) ease;
}

.room:hover {
    fill: var(--info) !important;
    stroke-width: 2px !important;
    stroke: var(--info) !important;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.2));
}


.loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.8);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    margin-bottom: 10px;
    animation: spin 1s linear infinite;
}

.course-loading {
    z-index: 100;
    background-color: rgba(255,255,255,0.9);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.course-loading .loading-spinner {
    border-color: #f3f3f3;
    border-top-color: var(--secondary-color);
}

.legend-container p{
    margin-bottom: 0px;
    color: var(--text-secondary);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ====== Calendar styles ====== */
.ec-event-title {
    font-size: 14px;
}

.ec-dark {
    --ec-bg-color: #22272e;
    --ec-text-color: #adbac7;
}

.ec-dark .bi {
    color: white;
}

.loader {
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #00AD50;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rotate-device {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.rotate-device img {
    width: 100px;
    height: auto;
    animation: rotate 2s infinite linear;
}

@media only screen and (max-width: 768px) and (orientation: portrait) {
    .rotate-device {
        display: flex;
    }
}


/* ====== FOOTER ====== */
.modern-footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 50px 0 20px;
    
}

.footer-brand {
    margin-bottom: 20px;
}

.footer-logo {
    height: 40px;
    width: auto;
}

.modern-footer h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.modern-footer h5:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition-fast) ease;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-fast) ease;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--transition-fast) ease;
}

.footer-legal a:hover {
    color: white;
}

/* ====== RESPONSIVE ADJUSTMENTS ====== */
@media (max-width: 1600px) {
    
}

@media (min-width: 1400px) {
    .container-fluid {
        max-width: 1800px;
    }
}

@media (max-width: 991px) {
    .hero-section {
        padding: 10px 0;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding: 10px 0;
        text-align: center;
    }
    
    .modern-footer {
        padding-top: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        margin-top: 15px;
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .navbar .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .brand-text{
        font-size: 16px;
    }

    .logo {
        height: 30px; /* Smaller logo size for mobile */
    }
    
    .brand-divider {
        height: 20px;
        margin: 0 5px; /* Less spacing around divider */
    }

    .hero-section h1 {
        font-size: 2rem;
    }
    
    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }
}