/* --- 1. Root Variables Definition --- */
:root {
    /* Light Mode Colors */
    --primary-color: #0d6efd;
    --nav-bg-scrolled: #2c3157;
    --body-bg: #f8f9fa;
    --text-main: #1a1d35;
    --card-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.1);
    --sun-color: #ffc107;
    --moon-color: #f1c40f;
}


/* --- 3. Applying Variables to Design --- */

/* Fixed Navbar */
.navbar {
    position: fixed !important;
    top: 0; 
    width: 100%; 
    z-index: 1050;
    transition: all 0.4s ease;
    background-color: transparent;
}

/* Navbar appearance on scroll */
.navbar.scrolled {
    background-color: var(--nav-bg-scrolled) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

body { 
    padding-top: 85px; 
    background-color: var(--body-bg); 
    color: var(--text-main);
    transition: background-color 0.3s ease;
}

/* Theme Toggle Button */
#themeToggle {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
}

/* Sun Icon (Hidden in Light Mode) */
[data-bs-theme="light"] .sun-icon {
    display: none;
}

/* Moon Icon (Visible in Light Mode) */
[data-bs-theme="light"] .moon-icon {
    display: block;
    color: var(--bg-body);
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main); 
    position: relative;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Playfair Display', serif;
}

.section-title span {
    color: var(--primary-color);
    position: relative;
}

/* Filter Bar */
.filter-bar { 
    background-color: var(--card-bg);
    border: 1px solid var(--border-color); 
    transition: 0.3s; 
}

/* Room Cards */
.room-card { 
    background: var(--card-bg); 
    border-radius: 15px; 
    overflow: hidden; 
    transition: 0.3s; 
    border: 1px solid var(--border-color); 
    color: var(--text-main);
}

.room-img { 
    height: 220px; 
    object-fit: cover; 
    transition: 0.5s; 
}

/* Image Zoom on Hover */
.room-card:hover .room-img { 
    transform: scale(1.1); 
}

/* --- Centering Theme Toggle in Mobile Menu --- */
.navbar-toggler {
    border-color: rgba(0, 0, 0, 0.1) !important; /* Subtle dark border */
}

.navbar-toggler-icon {
    /* Uses a dark grey/black SVG for visibility on white backgrounds */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* --- Mobile Menu Centering & Background --- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        /* Background behind the links */
        background-color: rgb(86, 86, 116); 
        border-radius: 15px;
        margin-top: 15px;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        
        /* Centering the items */
        text-align: center;
    }

    .navbar-nav {
        /* Ensuring the list takes full width for centering */
        width: 100%;
        align-items: center;
    }

    .nav-item {
        width: 100%;
        padding: 10px 0;
    }

    /* Styling the links to look like buttons in mobile */
    .nav-link {
        color: var(--bs-emphasis-color) !important;
        font-weight: 600;
        font-size: 1.1rem;
    }
}

/* --- Vertical Centering Logic for Mobile Menu --- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        display: flex;
        flex-direction: column; /* Stack items vertically */
        align-items: center;    /* Center everything horizontally */
        justify-content: center;
        text-align: center;
    }

    .navbar-nav {
        margin-bottom: 20px; /* Space between links and the theme icon */
    }

    /* Style for the theme toggle button/container */
    #themeToggle {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto; /* Ensures it stays centered */
        padding: 10px;
        cursor: pointer;
    }
}