/* ========================================
   CABO SURF HOTEL - MOBILE-FIRST STYLESHEET
   ======================================== */

/* ========================================
   1. CSS VARIABLES & RESET
   ======================================== */
:root {
    /* Colors */
    --primary-color: #d8a747;
    --secondary-color: #0292B7;
    --accent-color: #ffea77;
    --text-dark: #503e2c;
    --text-light: #7f8c8d;
    --text-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    /* Spacing */
    --section-padding: 60px 0;
    --container-padding: 0 15px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

/* ========================================
   2. LAYOUT & CONTAINERS
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ========================================
   3. TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* ========================================
   4. BUTTONS
   ======================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-white);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-white);
}

/* ========================================
   5. NAVIGATION (Mobile First)
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-family: 'Exo', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    transform: scaleY(0.92);
    transform-origin: center;
}

.nav-logo-main {
    font-weight: 900;
}

.nav-logo-sub {
    font-weight: 500;
}

.nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--bg-white);
    width: 100%;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    padding: 2rem 0;
}

.nav-menu.active {
    left: 0;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 1rem;
    display: block;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ========================================
   6. HERO SECTION (Mobile First)
   ======================================== */
.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    transform: translate(var(--kb-x-end), var(--kb-y-end)) scale(var(--kb-scale-end));
    will-change: opacity, transform;
    --kb-x-start: 0%;
    --kb-y-start: 0%;
    --kb-x-end: 0%;
    --kb-y-end: 0%;
    --kb-scale-start: 1;
    --kb-scale-end: 1;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide.is-animating {
    animation: heroKenBurns 6s ease-in-out forwards;
}

.hero-slide.fade-out {
    opacity: 0;
}

@keyframes heroKenBurns {
    0% {
        transform: translate(var(--kb-x-start), var(--kb-y-start)) scale(var(--kb-scale-start));
    }
    100% {
        transform: translate(var(--kb-x-end), var(--kb-y-end)) scale(var(--kb-scale-end));
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.7), rgba(52, 73, 94, 0.5));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-white);
    max-width: 800px;
    padding: 0 15px;
}

.hero-logo {
    margin-bottom: 1.5rem;
}

.logo-image {
    max-width: 120px;
    width: 100%;
    height: auto;
    filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.5));
    transition: var(--transition);
}

.hero-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   7. RESERVATION DRAWER (Mobile First)
   ======================================== */
.reservation-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transform: translateY(100%);
    transition: var(--transition);
}

.reservation-drawer.open {
    transform: translateY(0);
}

.reservation-tab {
    background-color: var(--primary-color);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    position: absolute;
    top: -42px;
    right: 10px;
    z-index: 1001;
}

.reservation-tab:hover {
    filter: brightness(0.95);
}

.tab-text {
    font-weight: 600;
    font-size: 0.9rem;
}

.reservation-content {
    position: relative;
    background-color: var(--bg-white);
    width: 100%;
    max-width: 100%;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 1000;
}

.reservation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.reservation-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.close-drawer {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.close-drawer:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.reservation-form {
    padding: 1.5rem;
}

.reservation-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-light);
    border-radius: 0 0 0 var(--border-radius-lg);
}

.reservation-footer p {
    margin: 0;
    font-size: 0.9rem;
    text-align: center;
    color: var(--text-light);
}

.reservation-footer a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.reservation-footer a:hover {
    text-decoration: underline;
}

/* ========================================
   8. FORMS
   ======================================== */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.booking-inline {
    background-color: var(--primary-color);
    padding: 2rem 0;
    position: relative;
    z-index: 3;
}

.booking-inline-card {
    background-color: transparent;
    border-radius: var(--border-radius-lg);
    box-shadow: none;
    padding: 0;
}

.booking-inline-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.booking-inline-header h3 {
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.booking-inline-header p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

.booking-inline .reservation-form {
    display: grid;
    gap: 1rem;
}

.booking-inline .form-group label {
    color: var(--text-white);
}

.booking-inline .form-group input,
.booking-inline .form-group select {
    background-color: var(--bg-white);
}

/* ========================================
   9. SECTIONS
   ======================================== */
section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   10. ROOMS SECTION (Mobile First)
   ======================================== */
.rooms {
    background-color: var(--bg-light);
}

.rooms-preview {
    background-color: var(--bg-white);
}

.rooms-preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.rooms-preview-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: grid;
    grid-template-columns: 1fr;
}

.rooms-preview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.rooms-preview-image {
    height: 220px;
    overflow: hidden;
}

.rooms-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.rooms-preview-card:hover .rooms-preview-image img {
    transform: scale(1.03);
}

.rooms-preview-content {
    padding: 1.5rem;
}

.rooms-preview-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.rooms-preview-type {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.rooms-preview-cta {
    background: linear-gradient(135deg, rgba(186, 146, 111, 0.12), rgba(2, 146, 183, 0.12));
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    display: grid;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.rooms-preview-cta h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.rooms-preview-cta p {
    margin-bottom: 0;
}

/* Rooms Page Hero */
.rooms-page-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 15px 80px;
    background: url('../images/room-placeholder.svg') center/cover no-repeat;
}

.rooms-page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.75), rgba(52, 73, 94, 0.6));
}

.rooms-page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    color: var(--text-white);
}

.rooms-page-hero-content h1 {
    margin-bottom: 1rem;
}

.rooms-page-hero-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.room-filter {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-dark);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

.rooms-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.room-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

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

.room-card:active {
    transform: translateY(-2px);
}

.room-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.room-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.room-card:hover .room-image img {
    transform: scale(1.05);
}

.room-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.room-card:hover .room-overlay {
    opacity: 1;
}

.view-details-hint {
    color: var(--text-white);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--border-radius);
    border: 2px solid var(--text-white);
}

.room-content {
    padding: 1.5rem;
}

.room-name {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.room-description {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.room-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background-color: var(--bg-light);
    color: var(--text-dark);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.room-footer {
    display: flex;
    justify-content: center;
    align-items: center;
}


/* ========================================
   11. ECOSYSTEM SECTION (Mobile First)
   ======================================== */
.ecosystem-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.ecosystem-card {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

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

.ecosystem-card:active {
    transform: translateY(-2px);
}

.ecosystem-icon {
    width: 200px;
    height: 120px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ecosystem-icon img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}


.ecosystem-card p {
    margin-bottom: 1.5rem;
}

/* ========================================
   12. HISTORY SECTION (Mobile First)
   ======================================== */
.history {
    background-color: var(--bg-light);
}

.history-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.history-text h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.history-main h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.history-expanded {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease;
    opacity: 0;
}

.history-expanded.show {
    max-height: 2000px; /* Increased to prevent image cutoff */
    opacity: 1;
}

.history-expanded-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

.history-expanded-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 2rem;
}

/* Clean up legacy styles for history sections */
.history-main h3,
.history-expanded-text h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.history-main p,
.history-expanded-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}


.history-founder-image {
    text-align: center;
}

.history-founder-image img {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.read-more-btn {
    margin-top: 1.5rem;
    transition: var(--transition);
}

.read-more-btn:hover {
    transform: translateY(-2px);
}

/* Balderrama Collection Carousel */
.balderrama-collection-section {
    margin-top: 2rem;
    text-align: center;
}

/* Make carousel full width on desktop but with max width */
@media (min-width: 769px) {
    .balderrama-collection-section {
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        width: 100vw;
        max-width: 100vw;
    }
    
    .balderrama-collection-section .container {
        max-width: 1200px; /* Match site's max width */
        margin: 0 auto;
        padding: 0 2rem;
    }
}

.balderrama-collection-section h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.balderrama-collection-carousel {
    position: relative;
    max-width: 100%;
    margin: 0 auto 2rem;
}

.collection-carousel-container {
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.collection-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.collection-carousel-slide {
    min-width: 100%;
    position: relative;
}

.collection-hotel-link {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.collection-hotel-link img {
    width: 100%;
    height: 250px; /* Optimized for panoramic ratio */
    object-fit: cover;
    transition: transform 0.3s ease;
}

.collection-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem 1.5rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.collection-overlay h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.collection-overlay p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

/* Mobile: Always show overlay */
@media (max-width: 768px) {
    .collection-overlay {
        transform: translateY(0);
    }
}

/* Desktop: Hover behavior */
@media (min-width: 769px) {
    .collection-hotel-link:hover img {
        transform: scale(1.02);
    }
    
    .collection-hotel-link:hover .collection-overlay {
        transform: translateY(0);
    }
}

.collection-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: bold;
}

.collection-carousel-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.collection-carousel-prev {
    left: 1rem;
}

.collection-carousel-next {
    right: 1rem;
}

.collection-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.collection-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-light);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.collection-carousel-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.history-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
    text-align: center;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    font-family: var(--font-display);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.history-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
}

/* ========================================
   13. CONTACT SECTION (Mobile First)
   ======================================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-item p {
    margin-bottom: 0;
}

.contact-item a {
    color: var(--secondary-color);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-form-container {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
}

/* ========================================
   14. MODAL (Mobile First)
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-white);
    margin: 1% auto;
    padding: 1rem;
    border-radius: var(--border-radius-lg);
    width: 98%;
    max-width: 1000px;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(50px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-white);
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2001;
    border: 2px solid var(--text-white);
}

.modal-close:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-white);
    transform: scale(1.1);
}

/* Room Modal Specific Styles */
.room-modal-header {
    margin-bottom: 1.5rem;
    text-align: center;
    padding-right: 4rem; /* Make room for close button */
}

.room-modal-header h2 {
    color: var(--primary-color);
    margin-bottom: 0;
    font-size: 1.5rem;
}

.room-modal-description {
    margin-bottom: 2rem;
    text-align: center;
}

.room-modal-description p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Image Carousel */
.room-image-carousel {
    margin-bottom: 2rem;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    background-color: var(--bg-light);
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    touch-action: pan-y;
}

.carousel-track.dragging {
    transition: none;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel-prev {
    left: 0.5rem;
}

.carousel-next {
    right: 0.5rem;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicator.active {
    background-color: var(--primary-color);
}

/* Room Modal Details */
.room-modal-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.room-features-modal h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.room-features-modal .feature-tag {
    display: inline-block;
    margin: 0.25rem 0.5rem 0.25rem 0;
}

.room-specs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.spec-item {
    padding: 0.75rem;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.spec-item strong {
    color: var(--primary-color);
}

.room-modal-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* ========================================
   15. FOOTER
   ======================================== */
.footer {
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--text-white);
    margin-bottom: 1rem;
}

.footer-section h3 {
    font-family: 'Exo', sans-serif;
    font-weight: 900;
}

.brand-split {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    text-transform: uppercase;
}

.brand-main {
    font-weight: 900;
}

.brand-sub {
    font-weight: 500;
    text-transform: none;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--text-white);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-links a,
.social-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.social-links a:hover {
    color: var(--text-white);
}

.social-icon {
    width: 28px;
    height: 28px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: var(--transition);
}


/* ========================================
   16. RESPONSIVE DESIGN - TABLET & UP
   ======================================== */

/* Tablet */
@media (min-width: 481px) {
    :root {
        --section-padding: 80px 0;
        --container-padding: 0 20px;
    }

    .nav-container {
        padding: 0 20px;
    }

    .nav-logo a {
        font-size: 1.5rem;
    }

    .hero-content {
        padding: 0 20px;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    .booking-inline .reservation-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
    }

    .booking-inline .reservation-form button {
        grid-column: 1 / -1;
    }

    .rooms-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }

    .rooms-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
    }

    .ecosystem-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .ecosystem-icon {
        width: 220px;
        height: 140px;
    }

    .history-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .modal-content {
        margin: 2% auto;
        padding: 2rem;
        width: 95%;
    }

    .carousel-container {
        height: 350px;
    }

    .room-modal-details {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Desktop */
@media (min-width: 769px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    h3 { font-size: 1.8rem; }
    h4 { font-size: 1.4rem; }

    .nav-menu {
        position: static;
        flex-direction: row;
        background: none;
        box-shadow: none;
        padding: 0;
        width: auto;
        left: auto;
    }

    .nav-link {
        padding: 0 1.5rem;
        display: inline;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--secondary-color);
        transition: var(--transition);
    }

    .nav-link:hover::after {
        width: 100%;
    }

    .nav-toggle {
        display: none;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    /* Desktop Reservation Drawer */
    .reservation-drawer {
        position: fixed;
        top: 50%;
        right: 0;
        bottom: auto;
        left: auto;
        transform: translateY(-50%) translateX(100%);
        width: 350px;
        max-width: 90vw;
    }

    .reservation-drawer.open {
        transform: translateY(-50%) translateX(0);
    }

    .reservation-tab {
        position: absolute;
        top: 0;
        left: -60px;
        padding: 1rem 1.8rem;
        border-radius: var(--border-radius) 0 0 var(--border-radius);
        width: 68px;
        writing-mode: vertical-rl;
        text-orientation: mixed;
    }

    .reservation-tab:hover {
        /* background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)); */
        transform: translateX(-4px);
    }

    .reservation-content {
        border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
        max-height: 80vh;
    }

    .booking-inline .reservation-form {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .booking-inline .reservation-form button {
        grid-column: auto;
        width: 100%;
    }

    .rooms-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }

    .rooms-preview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .rooms-preview-cta {
        grid-template-columns: 1fr auto;
        text-align: left;
        padding: 2.5rem 3rem;
    }

    .history-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
    
    .balderrama-collection-section h3 {
        font-size: 1.8rem;
    }
    
    .collection-hotel-link img {
        height: 400px;
    }
    
    .history-expanded-content {
        display: block;
    }
    
    .history-expanded-content h2 {
        text-align: left;
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }
    
    .history-founder-image {
        width: 100%;
        margin-bottom: 3rem;
        text-align: center;
    }
    
    .history-founder-image img {
        width: 100%;
        max-width: 600px;
        height: auto;
        border-radius: var(--border-radius-lg);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .history-two-columns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .history-main {
        margin-bottom: 0;
    }
    
    .history-expanded-text {
        margin-top: 0;
    }

    .history-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .history-image img {
        height: 400px;
    }

    .contact-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .carousel-container {
        height: 450px;
    }

    .carousel-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .carousel-prev {
        left: 1rem;
    }

    .carousel-next {
        right: 1rem;
    }
}

/* ========================================
   17. ACCESSIBILITY & UTILITIES
   ======================================== */

/* Focus styles for accessibility */
.btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-light: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Mobile touch improvements */
@media (max-width: 480px) {
    .view-details-hint {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .room-card {
        min-height: 44px; /* Ensure touch target is large enough */
    }
    
    .modal-content {
        margin: 5% auto;
        width: 95%;
        max-height: 90vh;
        transform: translateY(100px);
    }
    
    .modal.show .modal-content {
        transform: translateY(0);
    }
    
    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 3.5rem;
        height: 3.5rem;
        font-size: 2.2rem;
        background-color: rgba(0, 0, 0, 0.8);
        border-width: 3px;
    }
    
    .room-modal-header {
        padding-right: 5rem; /* More space for larger close button */
        padding-top: 1rem;
    }
    
    .room-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-close:active {
        transform: scale(0.95);
        background-color: var(--primary-color);
    }
    
    .ecosystem-icon {
        width: 160px;
        height: 100px;
    }
    
    .ecosystem-icon img {
        width: 100%;
        height: 100%;
    }
    
    .collection-overlay h4 {
        font-size: 1.1rem;
    }
    
    .collection-overlay p {
        font-size: 0.9rem;
    }
    
    .collection-hotel-link img {
        height: 200px;
    }
    
    .collection-carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .collection-carousel-prev {
        left: 0.5rem;
    }
    
    .collection-carousel-next {
        right: 0.5rem;
    }
}