@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Poppins:wght@300;400;500;600&family=Great+Vibes&display=swap');

:root {
    --primary-blue: #1F2E45;
    --primary-gold: #C6A15B;
    --secondary-beige: #D8C7A1;
    --accent-terracotta: #C97A5B;
    --white: #FFFFFF;
    --bg-light: #faf9f6;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
    --font-accent: 'Great Vibes', cursive;
}

/* =========================================
   BASE Y RESET PROFESIONAL
========================================= */
body { 
    font-family: var(--font-body); 
    color: var(--primary-blue); 
    background-color: var(--bg-light); 
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .navbar-brand { 
    font-family: var(--font-heading); 
    color: var(--primary-blue); 
    text-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Mejor contraste por defecto */
}
p { 
    line-height: 1.8; 
    font-weight: 300; 
}

.text-gold { color: var(--primary-gold) !important; }
.text-blue { color: var(--primary-blue) !important; }
.bg-blue { background-color: var(--primary-blue) !important; }
.bg-gold { background-color: var(--primary-gold) !important; }
.bg-beige { background-color: var(--secondary-beige) !important; }

/* Corrección de Visibilidad para Accent Text ("no se pierde") */
.accent-text { 
    font-family: var(--font-accent); 
    color: var(--accent-terracotta); 
    font-size: clamp(2.2rem, 5vw, 3.5rem); 
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* =========================================
   NAVBAR Y MENÚ (EXPERIENCIA APP INMERSIVA)
========================================= */
.navbar { 
    background-color: var(--primary-blue); 
    transition: all 0.4s ease; 
    padding: 12px 0; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); 
}
.navbar-brand { 
    letter-spacing: 1px; 
    font-size: clamp(1.2rem, 3vw, 1.6rem) !important;
}

/* Estilos de Logo Integrado */
.navbar-logo {
    height: clamp(35px, 6vw, 45px); /* Tamaño responsivo profesional */
    width: auto;
    object-fit: contain;
}

.navbar-dark .navbar-nav .nav-link { 
    color: var(--secondary-beige); 
    font-weight: 400; 
    text-transform: uppercase; 
    font-size: 0.85rem; 
    letter-spacing: 1.5px; 
    margin: 0 12px; 
    transition: 0.3s; 
    position: relative; 
}
.navbar-dark .navbar-nav .nav-link::after { 
    content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; 
    background-color: var(--primary-gold); transition: 0.3s; 
}
.navbar-dark .navbar-nav .nav-link:hover::after, 
.navbar-dark .navbar-nav .nav-link.active::after { width: 100%; }
.navbar-dark .navbar-nav .nav-link:hover, 
.navbar-dark .navbar-nav .nav-link.active { color: var(--primary-gold); }

/* Ícono Hamburguesa App-Ready */
.navbar-dark .navbar-toggler { 
    border: 1px solid rgba(216, 199, 161, 0.2) !important; 
    outline: none; 
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
}
.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(198, 161, 91, 1)' stroke-linecap='round' stroke-miterlimit='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Menú Overlay Full Screen (Estilo App Nativa) */
@media (max-width: 991.98px) {
    .navbar-collapse { 
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(31, 46, 69, 0.98) !important; 
        backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 10vh 20px; 
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
        transform: translateY(-100%);
    }
    .navbar-collapse.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .navbar-nav {
        width: 100%;
        max-width: 400px;
        gap: 15px;
    }

    .navbar-dark .navbar-nav .nav-link {
        font-size: 1.3rem;
        text-align: center;
        padding: 18px 0;
        margin: 0;
        border-radius: 12px;
        background: rgba(255,255,255,0.03);
        border: 1px solid rgba(216, 199, 161, 0.1);
        width: 100%;
    }
    .navbar-dark .navbar-nav .nav-link.active {
        background: rgba(198, 161, 91, 0.1);
        border-color: var(--primary-gold);
    }
    
    /* Botón Reservar Estilo App */
    .navbar-dark .navbar-nav .btn-gold {
        width: 100%;
        padding: 18px;
        margin-top: 30px;
        font-size: 1.2rem;
        font-weight: 600;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(198, 161, 91, 0.3);
    }
    
    .mobile-minimal { display: none !important; }
    
    /* Ajuste para evitar scroll del body cuando el menú está abierto */
    body.menu-open { overflow: hidden; }
}

/* =========================================
   BOTONES Y ACCIONES
========================================= */
.btn-gold { 
    background-color: var(--primary-gold); color: var(--white); border: none; font-weight: 500; 
    padding: 14px 35px; border-radius: 50px; letter-spacing: 1px; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); 
    font-size: 0.95rem;
}
.btn-gold:hover { 
    background-color: #b08d4a; color: var(--white); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(198, 161, 91, 0.3); 
}
.btn-outline-gold { 
    border: 2px solid var(--primary-gold); color: var(--primary-gold); font-weight: 600; 
    padding: 12px 28px; border-radius: 50px; transition: 0.3s; background: transparent; 
    font-size: 0.95rem;
}
.btn-outline-gold:hover { 
    background-color: var(--primary-gold); color: var(--white); 
}

/* Áreas de Toque Optimizadas en Móvil */
@media (max-width: 767.98px) {
    .btn-gold, .btn-outline-gold {
        width: 100%;
        padding: 18px;
        font-size: 1.1rem;
        border-radius: 12px;
    }
}

/* =========================================
   HERO SECTION (CONTRATE MEJORADO)
========================================= */
.hero-section {
    background: linear-gradient(rgba(10, 15, 25, 0.5), rgba(10, 15, 25, 0.85)), url('../images/HAB-CASAAMIGA-001-Casa%20Amiga-01.webp') center/cover no-repeat;
    height: 90vh;
    display: flex;
    align-items: center;
    color: var(--white);
    position: relative;
}
/* Capa extra de contraste */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.1);
    z-index: 1;
    pointer-events: none; /* <- ESTA ES LA MAGIA: Permite que los clics traspasen la sombra */
}
.hero-section .container { position: relative; z-index: 2; }

.hero-section h1 { 
    color: var(--white); 
    font-size: clamp(2.8rem, 6vw, 5.5rem); 
    letter-spacing: -1.5px; 
    margin-bottom: 25px; 
    text-shadow: 0 4px 10px rgba(0,0,0,0.3); /* Sombra fuerte para legibilidad */
}

@media (min-width: 992px) {
    .hero-section { background-attachment: fixed; }
}
@media (max-width: 767.98px) {
    .hero-section { height: 85vh; padding-top: 80px; }
    .hero-section h1 { line-height: 1.2; margin-bottom: 15px; font-weight: 700; }
    .hero-section .accent-text { color: var(--white); text-shadow: 1px 1px 1px rgba(0,0,0,0.5); } /* Corrección específica móvil */
}

/* =========================================
   BOOKING BAR (ESTILO APP GRID)
========================================= */
.booking-bar { 
    background-color: var(--white); border-radius: 20px; box-shadow: 0 25px 60px rgba(31,46,69,0.1); 
    padding: 40px; margin-top: -100px; position: relative; z-index: 10; border: 1px solid rgba(0,0,0,0.01); 
}
.booking-bar .form-label { 
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--primary-gold) !important; 
    margin-bottom: 8px; font-weight: 600;
}
.booking-bar .form-control, .booking-bar .form-select { 
    background: #fdfdfd; border-radius: 10px; padding: 16px 14px; font-weight: 500; color: var(--primary-blue); 
    border: 1px solid #e9e9e9; font-size: 1rem;
}

@media (max-width: 767.98px) {
    .booking-bar { margin-top: -60px; padding: 30px 20px; border-radius: 25px; }
    .booking-bar .form-control, .booking-bar .form-select { padding: 18px; font-size: 1.1rem; }
    .booking-bar label { font-size: 0.85rem; }
}
.booking-section {
    position: relative;
    z-index: 50; /* Fuerza al contenedor a estar en primer plano */
}

/* =========================================
   BANNERS Y TARJETAS
========================================= */
/* Corrección de "Degradado Terrible" a estilo App Profundo */
.seasonal-banner { 
    background: linear-gradient(135deg, rgba(31, 46, 69, 0.95), rgba(20, 30, 45, 1)); 
    color: white; border-radius: 20px; padding: 30px; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-left: 6px solid var(--primary-gold); /* Acento dorado */
}
.seasonal-banner h3 { color: var(--secondary-beige); text-shadow: none; }
.seasonal-banner p { color: rgba(255,255,255,0.8); }

.img-boutique { 
    border-radius: 20px; box-shadow: 0 20px 45px rgba(0,0,0,0.1); object-fit: cover; 
    width: 100%; height: 100%; transition: transform 0.6s ease; 
}
.img-boutique:hover { transform: scale(1.03); }

.room-card { 
    background: var(--white); border-radius: 25px; overflow: hidden; 
    box-shadow: 0 15px 50px rgba(0,0,0,0.06); transition: all 0.4s ease; border: 1px solid rgba(0,0,0,0.01); 
}
.room-card:hover { box-shadow: 0 25px 60px rgba(198,161,91,0.12); }
.room-gallery-img { height: 380px; object-fit: cover; width: 100%; }

.amenity-badge { 
    background: rgba(216, 199, 161, 0.12); color: var(--primary-blue); padding: 10px 16px; 
    border-radius: 10px; font-size: 0.85rem; font-weight: 500; display: inline-flex; align-items: center; 
    margin-right: 10px; margin-bottom: 10px; border: 1px solid rgba(216, 199, 161, 0.1);
}
.amenity-badge i { color: var(--primary-gold); margin-right: 8px; font-size: 1rem; }

@media (max-width: 767.98px) {
    .room-gallery-img { height: 280px; }
    .room-card .p-4 { padding: 30px 20px !important; }
    .room-card h2 { font-size: 1.6rem; }
}

/* =========================================
   GASTRONOMÍA Y EXPERIENCIAS
========================================= */
.gastronomy-section { 
    position: relative; color: var(--white); padding: 120px 0; 
    background: linear-gradient(to right, rgba(10, 15, 25, 0.96) 0%, rgba(10, 15, 25, 0.75) 100%), url('../images/HAB-CASAAMIGA-001-Casa%20Amiga-06.webp') center/cover no-repeat; 
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (min-width: 992px) { .gastronomy-section { background-attachment: fixed; } }
@media (max-width: 767.98px) {
    .gastronomy-section { padding: 80px 0; text-align: center; }
    .gastronomy-section h2 { font-size: 2.5rem; line-height: 1.2; }
    .gastronomy-section .accent-text { color: var(--white); text-shadow: 1px 1px 1px rgba(0,0,0,0.5); } /* Corrección específica móvil */
}

/* Sticky Form en Habitaciones */
@media (min-width: 992px) { .sticky-booking-form { position: sticky; top: 110px; } }

/* Partners Grid App */
.partner-logo { filter: grayscale(100%); transition: filter 0.4s, transform 0.4s; margin: 20px 30px; opacity: 0.5; }
.partner-logo:hover { filter: grayscale(0%); opacity: 1; transform: translateY(-5px); }

@media (max-width: 767.98px) {
    .socio-grid { gap: 15px; }
    .socio-logo-container { width: 100%; max-width: 300px; margin: 10px auto; }
}

/* =========================================
   FOOTER (ESTILO APP)
========================================= */
footer { 
    background-color: var(--primary-blue); color: var(--secondary-beige); 
    padding: 100px 0 50px; font-size: 0.95rem; border-top: 6px solid var(--primary-gold); 
}
footer a { color: var(--secondary-beige); text-decoration: none; transition: 0.3s; }
footer a:hover { color: var(--primary-gold); letter-spacing: 0.5px; }

.footer-logo { height: clamp(40px, 7vw, 55px); }

.social-icons a { 
    display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; 
    background: rgba(255, 255, 255, 0.04); border-radius: 50%; color: var(--primary-gold); 
    margin: 0 12px; font-size: 1.3rem; transition: all 0.3s; 
    border: 1px solid rgba(216, 199, 161, 0.1);
}
.social-icons a:hover { background: var(--primary-gold); color: var(--primary-blue); transform: translateY(-5px); }

@media (max-width: 991.98px) {
    footer { padding: 60px 0 30px; text-align: center; }
    footer h3, footer h5 { margin-top: 20px; }
    footer .text-lg-end, footer .text-lg-center { text-align: center !important; }
    .social-icons { justify-content: center !important; margin-top: 20px; }
    footer p.pe-md-5 { padding-right: 0 !important; }
}

/* =========================================
   CHATBOT WHATSAPP (EXPERIENCIA APP INTEGRADA)
========================================= */
#wa-widget { position: fixed; bottom: 35px; right: 35px; z-index: 9998; /* Un nivel debajo del nav abierto */ }
.wa-btn { 
    background-color: #25D366; color: white; width: 68px; height: 68px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; font-size: 38px; 
    box-shadow: 0 12px 30px rgba(37,211,102,0.5); cursor: pointer; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.wa-btn:hover { transform: scale(1.1) rotate(-10deg); box-shadow: 0 15px 35px rgba(37,211,102,0.6); }

.wa-chat-box { 
    display: none; position: absolute; bottom: 90px; right: 0; width: 380px; height: 530px; 
    background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(15px); border-radius: 22px; 
    box-shadow: 0 25px 60px rgba(0,0,0,0.25); overflow: hidden; border: 1px solid rgba(255,255,255,0.6); 
    flex-direction: column; opacity: 0; transform: translateY(30px); transition: opacity 0.4s, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.wa-chat-box.show { opacity: 1; transform: translateY(0); display: flex; }

.wa-header { 
    background: var(--primary-blue); color: var(--secondary-beige); padding: 22px; 
    font-weight: 600; display: flex; align-items: center; justify-content: space-between; 
    border-bottom: 2px solid var(--primary-gold);
}
.wa-header-title { display: flex; align-items: center; gap: 12px; font-size: 1.1rem; }
.wa-header-close { cursor: pointer; color: var(--white); font-size: 1.3rem; padding: 6px; transition: 0.2s; opacity: 0.8; }
.wa-header-close:hover { opacity: 1; transform: rotate(90deg); }

.wa-body { 
    flex: 1; padding: 25px; overflow-y: auto; background: #e5ddd5 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABZ0RVh0Q3JlYXRpb24gVGltZQAwNS8yOS8xM5v5648AAAAfdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzVN4mdoAAAAMklEQVRYhe3MsQ0AAAjAMP7/M6Z06NAnA5KKuupU78wAAAAAAAAAAAAAAAAAAAAAAMB7YgF/iAL6G1U5OQAAAABJRU5ErkJggg=='); 
    display: flex; flex-direction: column; gap: 15px; 
}
.wa-msg { 
    padding: 14px 18px; border-radius: 14px; font-size: 0.95rem; max-width: 85%; 
    line-height: 1.6; box-shadow: 0 2px 6px rgba(0,0,0,0.08); 
}
.wa-msg.left { background: white; align-self: flex-start; border-bottom-left-radius: 5px; color: var(--primary-blue); }
.wa-msg.right { background: #dcf8c6; align-self: flex-end; border-bottom-right-radius: 5px; color: #075e54; }

.bot-option { 
    display: block; width: 100%; border: 1px solid rgba(31,46,69,0.1); background: #fdfdfd; 
    padding: 14px 18px; margin: 10px 0 0; border-radius: 12px; text-align: left; color: var(--primary-blue); 
    font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: all 0.2s; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
.bot-option:hover { background: var(--primary-gold); color: white; border-color: var(--primary-gold); transform: translateY(-2px); box-shadow: 0 5px 10px rgba(198,161,91,0.2); }

/* Chatbot Adaptación Móvil Inmersiva */
@media (max-width: 576px) {
    #wa-widget { bottom: 25px; right: 25px; z-index: 999; /* Asegurar que no tape el nav móvil si se abre a la vez */ }
    .wa-btn { width: 62px; height: 62px; font-size: 34px; }
    .wa-chat-box { 
        width: calc(100vw - 50px); /* Ocupa el ancho total menos los márgenes */
        height: 75vh; 
        max-height: 600px;
        right: 0; 
        bottom: 80px; 
        border-radius: 25px;
    }
    .wa-body { padding: 20px; gap: 12px; }
    .bot-option { padding: 16px; font-size: 1rem; margin-top: 12px; }
    .wa-msg { font-size: 1rem; padding: 16px; }
}

.typing-indicator { display: flex; gap: 4px; padding: 8px 12px; background: white; border-radius: 12px; width: fit-content; align-self: flex-start; border-bottom-left-radius: 4px; }
.typing-dot { width: 6px; height: 6px; background: #bbb; border-radius: 50%; animation: typing 1.4s infinite ease-in-out both; }
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
/* --- EFECTO HOVER PROFESIONAL PARA EL LOGO --- */
.navbar-brand-logo {
    display: inline-block;
    position: relative;
    /* Ajuste de altura responsiva similar al logo anterior */
    height: clamp(35px, 6vw, 45px); 
    width: auto;
}

.navbar-logo-main, .navbar-logo-hover {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
    display: block;
}

.navbar-logo-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0; /* Oculto por defecto */
}

/* Al pasar el mouse por el contenedor, ocultar el principal y mostrar el v2 */
.navbar-brand-logo:hover .navbar-logo-main {
    opacity: 0;
}

.navbar-brand-logo:hover .navbar-logo-hover {
    opacity: 1;
}

/* Ocultar el texto de accesibilidad */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}