/* ============================================================
   GLOBAL CONTAINER & ROOT VARIABLES
   ============================================================ */
:root {
    --primary-color: #c0392b;
    --secondary-color: #e67e22;
    --accent-color: #f39c12;
    --bg-color: #fef9f0;
    --card-bg-light: #ffffff;
    --text-color: #2c3e50;
    --text-muted: #7f8c8d;
    --border-radius-md: 12px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.1);
    --transition-speed: 0.3s ease;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ============================================================
   LAYOUT ARCHITECTURE (Sticky Footer & Responsive Auto-Height)
   ============================================================ */
html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* ============================================================
   MAIN CONTENT & SPECIFIC HEIGHT FIXES
   ============================================================ */
.main-content {
    flex: 1 0 auto; /* Pushes footer down without forcing oversized height */
    padding: 40px 0;
    min-height: auto !important;
}

.main-content p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

.main-content .intro-section {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 25px;
}

/* Explicit height overrides across template views */
.main-content .page-body,
.hotel-page .main-content,
.rooms-page .main-content,
.amenities-page .main-content {
    min-height: auto !important;
    height: auto !important;
}

/* ============================================================
   HEADER & STICKY NAVIGATION
   ============================================================ */
header {
    background: #1a1a2e;
    color: #ffffff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.brand .logo {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
    align-items: center;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed);
}

nav ul li a:hover {
    color: var(--secondary-color);
}

/* Active Navigation Item */
nav ul li.active > a,
nav ul li.active > a:link,
nav ul li.active > a:visited {
    color: var(--secondary-color) !important;
    font-weight: 600;
}

/* Dropdown Menus */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a2e;
    min-width: 200px;
    padding: 0.5rem 0;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed);
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu li {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 0.5rem 1rem;
}

nav ul li.dropdown ul li.active > a {
    color: var(--secondary-color) !important;
    background: rgba(230, 126, 34, 0.1);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================================
   HERO & CAROUSEL SECTION
   ============================================================ */
.hero-section {
    width: 100%;
    padding: 90px 0;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    color: #ffffff;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Dark overlay for readability */
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 0;
}

.carousel-wrapper {
    position: relative;
    scroll-margin-top: 80px;
}

.carousel-slide .carousel-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.carousel-prev, .carousel-next {
    background: rgba(0,0,0,0.5);
    color: #ffffff;
    border-radius: 50%;
    transition: background var(--transition-speed);
}

.carousel-prev:hover, .carousel-next:hover {
    background: var(--primary-color);
}

/* ============================================================
   HOTEL LAYOUT (Two-Column & Cards)
   ============================================================ */
.hotel-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.hotel-main {
    flex: 2;
    min-width: 0; /* Prevents grid flex overflow */
}

.hotel-sidebar {
    flex: 1;
    min-width: 280px;
    position: sticky;
    top: 90px; /* Sticks on scroll when header is present */
}

.sidebar-card {
    background: var(--card-bg-light);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
}

.sidebar-card h3 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
}

/* Section Titles */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* ============================================================
   ROOMS GRID & CARDS
   ============================================================ */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.room-card {
    background: var(--card-bg-light);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.room-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.room-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.room-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.room-body h3 {
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.room-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.room-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.room-meta li {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 6px;
}

.room-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: auto;
    margin-bottom: 1rem;
}

/* ============================================================
   GALLERY GRID
   ============================================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-sm);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    color: #ffffff;
    padding: 15px 10px 10px;
    transform: translateY(100%);
    transition: transform var(--transition-speed);
    font-size: 0.9rem;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn, .btn-primary, a.btn, a.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed);
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary:hover, .btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #ffffff;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer, .footer {
    background-color: #1a1a2e;
    color: #a0a0a0;
    text-align: center;
    padding: 2.5rem 0;
    border-top: 5px solid var(--secondary-color);
    margin-top: auto; /* Ensures sticky placement at page bottom */
}

/* ============================================================
   RESPONSIVE MEDIA QUERIES
   ============================================================ */
@media (max-width: 992px) {
    .hotel-layout {
        flex-direction: column;
    }
    
    .hotel-sidebar {
        position: static;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 1rem 0;
    }
    
    nav ul.show {
        display: flex;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        display: none;
        box-shadow: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .main-content {
        padding: 30px 0;
    }

    .rooms-grid {
        grid-template-columns: 1fr;
    }

    .brand .logo {
        height: 40px;
        max-width: 150px;
    }
}


/* ============================================================
   AUTO-HEIGHT & FLEX LAYOUT PATCH
   ============================================================ */

/* 1. Ensure body uses natural flex distribution */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 2. Remove fixed height locks on main wrapper and sub-elements */
main,
.main-content,
.page-body,
[class$="-page"] .main-content {
    flex: 1 0 auto !important;
    min-height: auto !important;
    height: auto !important;
}

/* 3. Keep sticky footer at bottom for short content pages */
footer,
.footer {
    margin-top: auto !important;
}
