/* --- VARIABLES --- */
:root {
    --primary-green: #1B4332; 
    --secondary-green: #2D6A4F;
    --light-green: #74C69D;
    --gold: #D4AF37; 
    --gold-hover: #b5952f;
    --cream: #FBF9F1; 
    --dark-text: #2C3E50;
    --light-text: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 50px rgba(0,0,0,0.15);
    --shadow-sm: 0 4px 10px rgba(0,0,0,0.05);
    --glow-gold: 0 0 20px rgba(212, 175, 55, 0.4);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* SOLUCIÓN AL DESLIZAMIENTO HORIZONTAL (SCROLL BUG) */
html, body { 
    overflow-x: hidden; 
    width: 100%;
    margin: 0; 
    padding: 0; 
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body { 
    font-family: 'Lato', sans-serif; 
    color: var(--dark-text); 
    background-color: #ffffff; 
    line-height: 1.7; 
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: var(--primary-green); }
.bg-cream { background-color: var(--cream); }
.container { max-width: 1300px; margin: 0 auto; padding: 0 30px; }
.shadow-img { border-radius: 12px; box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); border-radius: 15px; }
.shadow-sm { box-shadow: var(--shadow-sm); border-radius: 12px; }

/* --- EFECTOS REVEAL --- */
.reveal { opacity: 0; transform: translateY(60px); transition: all 1s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

@keyframes fadeInUpLoad {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-on-load {
    animation: fadeInUpLoad 1.2s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

/* --- NAVBAR --- */
.navbar { background-color: transparent; padding: 25px 60px; display: flex; justify-content: space-between; align-items: center; position: fixed; width: 100%; top: 0; z-index: 1000; transition: var(--transition); }
.navbar.scrolled { background-color: rgba(27, 67, 50, 0.98); backdrop-filter: blur(10px); padding: 15px 60px; box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.logo-container .logo { height: 80px; border-radius: 50%; box-shadow: var(--glow-gold); transition: var(--transition); }
.navbar.scrolled .logo { height: 55px; }

.nav-links { list-style: none; display: flex; gap: 40px; align-items: center; margin: 0; padding: 0;}
.nav-links a { color: var(--light-text); text-decoration: none; font-weight: 700; text-transform: uppercase; font-size: 0.95rem; letter-spacing: 1px; transition: var(--transition); text-shadow: 1px 1px 5px rgba(0,0,0,0.8); }
.navbar.scrolled .nav-links a { text-shadow: none; }
.nav-links a:hover { color: var(--gold); transform: translateY(-2px); display: inline-block;}

/* Botón de reservar en la navegación */
.btn-reserva-nav { background-color: var(--gold); color: var(--primary-green) !important; padding: 10px 25px; border-radius: 30px; border: 2px solid var(--gold); text-shadow: none !important; }
.btn-reserva-nav:hover { background-color: transparent; color: var(--gold) !important; box-shadow: var(--glow-gold); }

/* Menú Hamburguesa */
.menu-toggle { display: none; color: #fff; font-size: 28px; cursor: pointer; z-index: 1001; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }
.navbar.scrolled .menu-toggle { text-shadow: none; }

/* --- BOTONES FLOTANTES --- */
.whatsapp-float {
    position: fixed; width: 65px; height: 65px; bottom: 40px; left: 40px; 
    background-color: #25d366; color: #FFF; border-radius: 50%; text-align: center; font-size: 35px;
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4); z-index: 100;
    display: flex; justify-content: center; align-items: center; transition: var(--transition);
}
.whatsapp-float:hover { transform: scale(1.15) rotate(-5deg); }

.chat-toggle-btn {
    position: fixed; width: 65px; height: 65px; bottom: 40px; right: 40px; 
    background-color: var(--gold); color: var(--primary-green); border-radius: 50%; border: none; font-size: 30px;
    box-shadow: var(--glow-gold); z-index: 101; cursor: pointer;
    display: flex; justify-content: center; align-items: center; transition: var(--transition);
}
.chat-toggle-btn:hover { background-color: var(--gold-hover); transform: scale(1.1); }

/* --- WIDGET DE CHAT --- */
.chat-widget { 
    position: fixed; bottom: 120px; right: 40px; width: 350px; background: #fff; border-radius: 15px; 
    z-index: 1000; overflow: hidden; display: flex; flex-direction: column; 
    opacity: 0; pointer-events: none; transform: translateY(30px) scale(0.95); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.chat-widget.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.chat-header { background: var(--primary-green); color: #fff; padding: 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: bold; font-size: 1.1rem; }
.chat-body { height: 400px; display: flex; flex-direction: column; }
.chat-messages { flex-grow: 1; padding: 20px; overflow-y: auto; background: #f4f6f9; display: flex; flex-direction: column; gap: 15px; }
.message { max-width: 85%; padding: 12px 18px; border-radius: 18px; font-size: 0.95rem; line-height: 1.4; position: relative; box-shadow: var(--shadow-sm);}
.msg-recepcion { background: #fff; border: 1px solid #e0e0e0; color: var(--dark-text); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-cliente { background: var(--primary-green); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-time { font-size: 0.75rem; color: #999; display: block; margin-top: 6px; text-align: right; }
.msg-cliente .msg-time { color: rgba(255,255,255,0.7); }
.chat-input-area { display: flex; border-top: 1px solid #eee; padding: 15px; background: #fff; align-items: center;}
.chat-input-area input { flex-grow: 1; border: 1px solid #ddd; outline: none; padding: 12px 15px; border-radius: 25px; background: #fafafa; font-family: 'Lato', sans-serif; transition: var(--transition);}
.chat-input-area input:focus { border-color: var(--gold); background: #fff; box-shadow: 0 0 8px rgba(212,175,55,0.2);}
.chat-input-area button { background: var(--gold); color: var(--primary-green); border: none; width: 45px; height: 45px; border-radius: 50%; margin-left: 10px; cursor: pointer; font-size: 1.2rem; transition: var(--transition);}

/* --- HERO --- */
.hero { height: 100vh; background-attachment: fixed; background-position: center; background-repeat: no-repeat; background-size: cover; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--light-text); }
.hero-content { max-width: 900px; padding: 0 20px; }
.subtitle-hero { font-family: 'Lato', sans-serif; font-size: 1.3rem; letter-spacing: 4px; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; display: block; text-shadow: 1px 1px 3px rgba(0,0,0,0.8);}
.hero-content h1 { font-size: 5.5rem; color: #fff; margin-bottom: 25px; text-shadow: 3px 5px 10px rgba(0,0,0,0.6); line-height: 1.1;}
.hero-content p { font-size: 1.6rem; margin-bottom: 50px; font-weight: 300; text-shadow: 2px 3px 5px rgba(0,0,0,0.7); }

/* SOLUCIÓN: Botón de Explorar Habitaciones como antes */
.btn-primary { 
    background-color: var(--gold); 
    color: var(--primary-green); 
    padding: 16px 40px; 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 1.1rem; 
    border: none; 
    border-radius: 35px; 
    cursor: pointer; 
    transition: var(--transition); 
    display: inline-block; 
    width: auto; /* Asegura que no ocupe toda la pantalla */
    text-align: center;
}
.btn-primary:hover:not(:disabled) { background-color: var(--gold-hover); transform: translateY(-5px); box-shadow: var(--glow-gold); }

/* --- SECCIONES COMUNES --- */
.section-title { font-size: 3.5rem; text-align: center; margin-bottom: 15px; margin-top: 0; position: relative;}
.section-title::after { content: ''; display: block; width: 80px; height: 4px; background-color: var(--gold); margin: 20px auto 0; border-radius: 2px;}
.section-title.left-align { text-align: left; margin-top: 0; }
.section-title.left-align::after { margin: 20px 0 0 0; }
.section-subtitle { text-align: center; font-size: 1.3rem; color: #666; margin-bottom: 80px; font-weight: 300;}

.tour-subtitle { font-family: 'Playfair Display', serif; color: var(--gold); font-size: 2.2rem; text-align: center; margin-bottom: 30px; letter-spacing: 1px;}
.experience-section, .services-section, .rooms-section, .gallery-section { padding: 150px 0; }
.banner-separator { padding: 100px 0; background-attachment: fixed; background-size: cover; background-position: center;}

/* --- EXPERIENCIA Y SERVICIOS --- */
.experience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.experience-text p { font-size: 1.2rem; color: #555; margin-bottom: 25px;}
.features-list { margin-top: 40px; display: flex; flex-direction: column; gap: 20px; }
.feature-item { display: flex; align-items: center; gap: 20px; font-size: 1.2rem; font-weight: bold; color: var(--primary-green); }
.feature-item i { color: var(--gold); font-size: 1.8rem; background: var(--cream); padding: 15px; border-radius: 50%;}

.img-collage { position: relative; height: 550px; }
.img-main { width: 75%; height: 450px; object-fit: cover; position: absolute; z-index: 1; left: 0; top: 0; transition: var(--transition);}
.img-sub { width: 55%; height: 280px; object-fit: cover; position: absolute; border: 8px solid #fff; z-index: 2; transition: var(--transition); }
.img-sub-1 { right: 0; top: 40px; }
.img-sub-2 { right: 5%; bottom: -20px; }
.img-collage:hover .img-main { transform: scale(1.02); }
.img-sub:hover { transform: scale(1.08) translateY(-10px); z-index: 3; box-shadow: var(--shadow-lg);}

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; }
.service-card { background: #fff; padding: 50px 40px; border-radius: 15px; text-align: center; transition: var(--transition); border-bottom: 4px solid transparent; }
.service-card:hover { transform: translateY(-15px); box-shadow: var(--shadow-lg); border-bottom-color: var(--gold); }
.icon-circle { width: 90px; height: 90px; background-color: var(--cream); border-radius: 50%; display: flex; justify-content: center; align-items: center; margin: 0 auto 30px; transition: var(--transition); }
.service-card:hover .icon-circle { background-color: var(--primary-green); transform: scale(1.1);}
.icon-circle i { font-size: 2.5rem; color: var(--primary-green); transition: var(--transition);}
.service-card:hover .icon-circle i { color: var(--gold); }

/* --- HABITACIONES --- */
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.room-card { background: #fff; border-radius: 15px; overflow: hidden; cursor: pointer; transition: var(--transition); border: 1px solid #f0f0f0;}
.room-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); border-color: var(--gold);}
.room-img-wrapper { position: relative; height: 280px; overflow: hidden; }
.room-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.room-card:hover .room-img-wrapper img { transform: scale(1.15); }
.room-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: linear-gradient(to top, rgba(27,67,50,0.9), transparent); display: flex; justify-content: center; align-items: flex-end; padding-bottom: 30px; opacity: 0; transition: var(--transition); }
.room-card:hover .room-overlay { opacity: 1; }
.room-overlay span { color: var(--gold); font-weight: bold; border: 2px solid var(--gold); padding: 12px 25px; border-radius: 30px; background: rgba(0,0,0,0.5); font-size: 1.1rem; letter-spacing: 1px;}
.room-info { padding: 35px 25px; text-align: center; }
.room-info h3 { font-size: 1.8rem; margin-bottom: 15px; }
.room-capacity { color: var(--gold); font-weight: bold; margin-bottom: 15px; font-size: 1.1rem;}
.room-short-desc { color: #555; margin-bottom: 25px; font-size: 1.05rem; line-height: 1.6;}
.btn-outline { background: transparent; border: 2px solid var(--primary-green); color: var(--primary-green); padding: 10px 25px; border-radius: 30px; font-weight: bold; cursor: pointer; transition: var(--transition); font-size: 1.1rem;}
.room-card:hover .btn-outline { background: var(--primary-green); color: var(--gold); border-color: var(--primary-green);}

/* --- MODAL DE HABITACIONES (PERFECCIONADO) --- */
.modal { 
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0; top: 0; 
    width: 100vw; height: 100vh; 
    background-color: rgba(10,25,15,0.85); 
    backdrop-filter: blur(5px); 
    overflow-y: auto; /* Permite scroll si la pantalla es enana */
}
.modal-content { 
    background-color: #fff; 
    margin: 5vh auto; /* Deja un poco de aire arriba y abajo */
    width: 90%; 
    max-width: 950px; /* Ancho fino y elegante */
    border-radius: 12px; 
    position: relative; 
    animation: modalIn 0.3s ease-out; 
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    overflow: hidden; 
}
@keyframes modalIn { from { transform: scale(0.95) translateY(20px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

.close-modal { 
    position: absolute; 
    top: 15px; right: 15px; 
    background: #fff; color: var(--primary-green); 
    width: 35px; height: 35px; 
    border-radius: 50%; 
    display: flex; justify-content: center; align-items: center; 
    font-size: 1.2rem; cursor: pointer; z-index: 10; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.2); border: none;
    transition: var(--transition);
}
.close-modal:hover { background: var(--primary-green); color: var(--gold); }

.modal-grid { display: flex; flex-direction: row; }
.modal-gallery { width: 55%; display: flex; flex-direction: column; }
.modal-main-img { width: 100%; height: 400px; object-fit: cover; }
.modal-thumbnails { display: flex; gap: 10px; padding: 15px; background: #f9f9f9; overflow-x: auto; }
.modal-thumbnails img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: 0.6; transition: 0.3s; border: 2px solid transparent;}
.modal-thumbnails img.active, .modal-thumbnails img:hover { opacity: 1; border-color: var(--gold); }

.modal-info { width: 45%; padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.modal-info h2 { font-size: 2.2rem; margin-bottom: 5px; }
.modal-cap { color: var(--gold); font-size: 1.1rem; font-weight: bold; margin-bottom: 15px; }
.modal-desc { color: #555; margin-bottom: 20px; font-size: 1.05rem; line-height: 1.6; }
.modal-features { list-style: none; margin-bottom: 30px; display: grid; grid-template-columns: 1fr; gap: 12px; }
.modal-features li { font-size: 1rem; color: #333; font-weight: bold;}
.modal-features i { color: var(--light-green); font-size: 1.1rem; margin-right: 8px;}
.modal-book-btn { width: 100%; padding: 16px; font-size: 1.1rem; border-radius: 8px; margin-top: auto;}

/* --- GALERÍA / RECORRIDO --- */
.masonry-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; margin-top: 20px; }
.gallery-item { overflow: hidden; border-radius: 12px; }
.masonry-gallery img { width: 100%; height: 350px; object-fit: cover; transition: transform 0.6s ease, filter 0.6s ease; filter: brightness(0.85); display: block;}
.masonry-gallery img:hover { filter: brightness(1.1); transform: scale(1.1); }

/* --- FOOTER --- */
footer { background-color: #0a1a13; color: #ccc; padding: 80px 0 30px; border-top: 5px solid var(--gold);}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 60px; margin-bottom: 50px; }
.footer-logo { height: 90px; margin-bottom: 25px; filter: grayscale(100%) brightness(200%); }
.footer-col h3 { color: var(--gold); margin-bottom: 25px; font-family: 'Lato', sans-serif; text-transform: uppercase; font-size: 1.2rem; letter-spacing: 1px;}
.footer-col p { margin-bottom: 15px; font-size: 1.05rem;}
.footer-col i { width: 25px; color: var(--gold); }
.social-link { color: #ccc; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; transition: var(--transition); font-size: 1.1rem;}
.social-link:hover { color: var(--gold); transform: translateX(5px);}
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.95rem; }

/* ==========================================
   ADAPTACIÓN A TELÉFONO (MOBILE RESPONSIVE)
   ========================================== */
@media (max-width: 1024px) {
    .experience-grid { grid-template-columns: 1fr; }
    .img-collage { height: 450px; }
    .hero-content h1 { font-size: 4.5rem; }
}

@media (max-width: 768px) {
    .parallax { background-attachment: scroll !important; }
    
    .navbar { padding: 15px 25px; background: rgba(27, 67, 50, 0.98); }
    .logo-container .logo { height: 50px; }
    .menu-toggle { display: block; }
    .nav-links { 
        position: fixed; top: 0; right: -100%; width: 70%; height: 100vh; 
        background: var(--primary-green); flex-direction: column; justify-content: flex-start; 
        padding-top: 100px; gap: 30px; transition: 0.4s ease-in-out; border-left: 2px solid var(--gold);
    }
    .nav-links.active { right: 0; }
    .nav-links li { width: 100%; text-align: center; }

    .hero-content h1 { font-size: 3.5rem; }
    .hero-content p { font-size: 1.2rem; }
    .section-title { font-size: 2.5rem; }
    .experience-section, .services-section, .rooms-section, .gallery-section { padding: 60px 0; }
    .tour-subtitle { font-size: 1.8rem; margin-top: 50px; }
    
    .img-collage { height: 350px; }
    .img-main { height: 280px; width: 85%; }
    .img-sub { height: 180px; width: 60%; }
    .masonry-gallery { grid-template-columns: 1fr; }
    .masonry-gallery img { height: 250px; }
    
    /* MODAL EN MÓVIL TOTALMENTE ARREGLADO */
    .modal-grid { flex-direction: column; }
    .modal-gallery { width: 100%; }
    .modal-info { width: 100%; padding: 25px; }
    .modal-main-img { height: 250px; border-radius: 12px 12px 0 0; }

    .chat-widget { width: 90%; right: 5%; bottom: 100px; }
    .whatsapp-float { width: 55px; height: 55px; font-size: 30px; left: 20px; bottom: 20px;}
    .chat-toggle-btn { width: 55px; height: 55px; font-size: 25px; right: 20px; bottom: 20px;}
}