/* PROYECTO: Hotel Cañas - QR Innovations 
   VERSION: Final Premium (Equilibrio Visual Total)
*/

:root {
    --gold: #C19A6B;
    --dark: #0f172a;
    --white: #ffffff;
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background: #f8fafc; color: var(--dark); overflow-x: hidden; }

/* --- TOP BAR --- */
.top-bar { background: #0a0f1a; color: white; padding: 12px 5%; font-size: 0.85rem; position: relative; z-index: 100; }
.top-bar-container { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.contact-info { display: flex; gap: 25px; }
.contact-info a { color: rgba(255,255,255,0.8); text-decoration: none; display: flex; align-items: center; gap: 8px; transition: 0.3s; }
.contact-info i { color: var(--gold); }
.social-links { display: flex; gap: 20px; }
.social-links a { color: white; text-decoration: none; transition: 0.3s; font-size: 1rem; }
.social-links a:hover { color: var(--gold); transform: translateY(-2px); }

/* --- HERO SECTION (CENTRE PERFECTO) --- */
.hero-impact {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    background: #000;
}

#hero-video {
    position: absolute;
    top: 50%; left: 50%;
    min-width: 100%; min-height: 100%;
    transform: translate(-50%, -50%);
    z-index: 1;
    object-fit: cover;
}

.layer-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.8));
    z-index: 2;
}

/* El truco: Usamos flex-grow en elementos vacíos para centrar el bloque de texto */
.hero-impact::before {
    content: '';
    flex-grow: 1.2; /* Este espacio empuja el texto hacia abajo */
    z-index: 3;
}

.hero-content-impact {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 0 20px;
    flex-grow: 1; /* Este bloque ocupa el centro */
}

.logo-top { font-weight: 600; letter-spacing: 3px; margin-bottom: 25px; font-size: 1rem; text-transform: uppercase; }
.logo-top span { color: var(--gold); }

h1 { 
    font-family: 'Playfair Display', serif; 
    font-size: clamp(2.8rem, 8vw, 5.5rem); 
    line-height: 1.1; 
    margin-bottom: 20px; 
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero-content-impact p { 
    font-size: 1.3rem; 
    font-weight: 300; 
    max-width: 750px; 
    margin: 0 auto 40px; 
    opacity: 0.9;
}

.btn-wow {
    display: inline-block;
    background: var(--gold);
    color: var(--dark);
    padding: 18px 45px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* SCROLL INDICATOR (BAJO Y SEGURO) */
.scroll-down-wrapper {
    position: relative;
    z-index: 4;
    text-align: center;
    cursor: pointer;
    padding-bottom: 40px; /* Margen de seguridad con el borde inferior */
    width: 100%;
}

.scroll-down-wrapper span {
    color: white;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
}

.icon-scroll {
    width: 26px;
    height: 42px;
    border: 2px solid var(--gold);
    border-radius: 15px;
    margin: 0 auto;
    position: relative;
}

.icon-scroll::before {
    content: '';
    position: absolute;
    top: 8px; left: 50%;
    width: 5px; height: 5px;
    background: var(--gold);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scroll-anim 2s infinite;
}

@keyframes scroll-anim {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 25px; }
}

/* --- SECCIÓN HABITACIONES --- */
.section-rooms { 
    padding: 100px 5%; 
    background: white; 
    border-radius: 50px 50px 0 0; 
    margin-top: -50px; 
    position: relative; 
    z-index: 10; 
}

.container { max-width: 1300px; margin: 0 auto; }
.pre-title { display: block; text-align: center; color: var(--gold); letter-spacing: 5px; font-weight: 600; margin-bottom: 15px; text-transform: uppercase; }
.main-title { text-align: center; font-family: 'Playfair Display', serif; font-size: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: 60px; }
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 35px; }
.room-card-premium { background: white; border-radius: 25px; overflow: hidden; box-shadow: 0 15px 35px rgba(0,0,0,0.05); transition: var(--transition); border: 1px solid #f1f5f9; }
.room-card-premium:hover { transform: translateY(-15px); box-shadow: 0 30px 60px rgba(0,0,0,0.1); }
.room-img-wrapper { height: 280px; overflow: hidden; position: relative; }
.room-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: 0.8s; }
.room-card-premium:hover img { transform: scale(1.1); }
.room-details { padding: 30px; }
.room-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; border-top: 1px solid #f1f5f9; }
.btn-book-gold { background: var(--dark); color: white; border: none; padding: 12px 25px; border-radius: 10px; font-weight: 600; cursor: pointer; transition: 0.3s; }
/* ESTILOS DEL MODAL */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    align-items: center; justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 30px;
    width: 90%; max-width: 800px;
    position: relative;
    animation: modalAppear 0.4s ease-out;
}

@keyframes modalAppear {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute; right: 25px; top: 20px;
    font-size: 30px; cursor: pointer; color: #999;
}

.modal-header { text-align: center; margin-bottom: 30px; }
.modal-header h3 { font-family: 'Playfair Display', serif; font-size: 2rem; }

.booking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

/* Calendario */
.calendar-wrapper { border: 1px solid #eee; padding: 20px; border-radius: 15px; }
.calendar-header { text-align: center; font-weight: 600; margin-bottom: 15px; }
.days-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; gap: 10px; }
.days-grid span { padding: 8px; border-radius: 5px; font-size: 0.9rem; }
.past { color: #ccc; text-decoration: line-through; }
.selected { background: var(--gold); color: white; font-weight: 700; }
.current { border: 1px solid var(--gold); }

/* Formulario */
.booking-form { display: flex; flex-direction: column; justify-content: space-between; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-group select { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #ddd; }

.price-summary { background: #f9f9f9; padding: 20px; border-radius: 15px; margin: 20px 0; }
.row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.9rem; }
.total { border-top: 1px solid #ddd; pt: 10px; font-weight: 800; font-size: 1.1rem; color: var(--dark); }

.btn-confirm {
    background: var(--dark); color: white; border: none; padding: 15px;
    border-radius: 12px; font-weight: 700; cursor: pointer; transition: 0.3s;
}
.btn-confirm:hover { background: var(--gold); }

@media (max-width: 600px) { .booking-grid { grid-template-columns: 1fr; } }

/* --- MEJORA DEL CALENDARIO --- */
.calendar-header { 
    text-align: center; 
    font-weight: 700; 
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Quitamos el borde de botón al texto del mes */
.calendar-header button {
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    cursor: default;
}

/* --- MEJORA DEL SELECT (HUÉSPEDES) --- */
.form-group select { 
    width: 100%; 
    padding: 15px; 
    border-radius: 12px; 
    border: 2px solid #f1f5f9; 
    background-color: #f8fafc;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: var(--dark);
    appearance: none; /* Quitamos la flecha por defecto */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23C19A6B' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C2.185 5.355 2.403 5 2.8 5h9.4c.397 0 .615.355.349.658l-4.796 5.482a.5.5 0 0 1-.706 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 20px) center;
    cursor: pointer;
    transition: all 0.3s;
}

.form-group select:focus {
    outline: none;
    border-color: var(--gold);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(193, 154, 107, 0.1);
}

/* --- AJUSTE DE DÍAS --- */
.calendar-days span {
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 10px;
    display: inline-block;
}

.days-grid span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    width: 35px;
    margin: 0 auto;
    transition: 0.3s;
    cursor: pointer;
}

.days-grid span:not(.past):not(.selected):hover {
    background: #f1f5f9;
    color: var(--gold);
}

/* --- CONFIRMACIÓN DE RESERVA --- */
.confirm-container {
    max-width: 1100px;
    margin: 50px auto;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

.confirm-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
}

.gold-text { color: var(--gold); }
.subtitle { color: #64748b; margin-bottom: 30px; }

/* Formulario */
.premium-form .input-group { margin-bottom: 20px; }
.premium-form label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; }
.premium-form input, .premium-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #f1f5f9;
    border-radius: 10px;
    font-family: inherit;
    transition: 0.3s;
}
.premium-form input:focus { border-color: var(--gold); outline: none; background: #fff; }

.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.payment-notice {
    background: #f0fdf4;
    color: #166534;
    padding: 15px;
    border-radius: 10px;
    margin: 25px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.btn-finalize {
    width: 100%;
    background: var(--dark);
    color: white;
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}
.btn-finalize:hover { background: var(--gold); transform: translateY(-3px); }

/* Card de Resumen */
.booking-summary-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.summary-img { height: 180px; background-size: cover; background-position: center; position: relative; }
.price-tag { position: absolute; bottom: 15px; right: 15px; background: var(--gold); color: white; padding: 5px 15px; border-radius: 5px; font-weight: 600; }

.summary-content { padding: 25px; }
.summary-content h3 { margin-bottom: 20px; font-family: 'Playfair Display', serif; }

.info-item { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: #475569; font-size: 0.9rem; }
.info-item i { color: var(--gold); }

.total-block { margin-top: 25px; padding-top: 20px; border-top: 2px dashed #f1f5f9; }
.total-row { display: flex; justify-content: space-between; margin-bottom: 10px; }
.total-price { font-size: 1.4rem; font-weight: 800; color: var(--dark); margin-top: 10px; }

@media (max-width: 850px) { .confirm-grid { grid-template-columns: 1fr; } }

/* --- PANTALLA DE ÉXITO --- */
.success-container {
    text-align: center;
    padding: 40px 20px;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.swal-icon-shaking i {
    font-size: 80px;
    color: #22c55e; /* Verde éxito */
    margin-bottom: 20px;
    display: inline-block;
}

.success-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.ticket-summary {
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 15px;
    margin: 30px auto;
    max-width: 450px;
    padding: 20px;
}

.ticket-header {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.ticket-header strong { color: var(--gold); font-size: 1.2rem; }

.success-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-print {
    background: white;
    border: 2px solid #ddd;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.btn-close-final {
    background: var(--dark);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.whatsapp-note {
    margin-top: 40px;
    font-size: 0.9rem;
    color: #64748b;
}

.whatsapp-note i { color: #25D366; }

/* BOTÓN LOYALTY TOP BAR */
.btn-loyalty {
    background: linear-gradient(135deg, var(--gold), #8e6d45);
    color: white; border: none; padding: 6px 15px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px;
}

/* PORTAL DE LEALTAD */
.loyalty-header { text-align: center; margin-bottom: 25px; }
.user-badge { background: #ffd700; color: #000; display: inline-block; padding: 4px 12px; border-radius: 50px; font-size: 0.7rem; font-weight: 800; margin-bottom: 10px; }
.points-bar { background: #eee; height: 12px; border-radius: 10px; position: relative; margin: 30px 0; }
.progress { background: var(--gold); height: 100%; border-radius: 10px; transition: 1s ease-in-out; }
.points-bar span { position: absolute; top: 18px; width: 100%; text-align: center; font-size: 0.8rem; color: #666; }

.benefits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 40px; }
.benefit-item { border: 1px solid #eee; padding: 15px; border-radius: 15px; text-align: center; font-size: 0.8rem; }
.benefit-item.active { border-color: var(--gold); background: #fffdf9; }
.benefit-item.locked { opacity: 0.5; background: #f5f5f5; }
.benefit-item i { font-size: 1.5rem; color: var(--gold); margin-bottom: 8px; display: block; }

/* DASHBOARD DE MÉTRICAS */
.metrics-bg { background: #0f172a; color: white; border: 1px solid var(--gold); }
.metrics-header h3 { font-family: 'Playfair Display', serif; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 30px; }
.stat-card { background: rgba(255,255,255,0.05); padding: 15px; border-radius: 12px; border-left: 3px solid var(--gold); }
.stat-card strong { display: block; font-size: 1.2rem; margin: 5px 0; color: var(--gold); }
.stat-card span.up { color: #22c55e; font-size: 0.7rem; }

/* --- CORRECCIÓN DE TAMAÑO GRÁFICO CIRCULAR --- */

/* Mantenemos el contenedor blanco del mismo tamaño que los otros */
.chart-box {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    /* Aseguramos que el contenido se centre */
    display: flex;
    flex-direction: column;
    align-items: center; 
}

/* Reducimos el tamaño del canvas circular (Paso de 100% a 70%) */
.chart-box canvas[id="roomPrefChart"] {
    max-width: 70% !important; /* Limitamos el ancho para que no choque con los bordes */
    height: auto !important;
    margin: 0 auto; /* Centrado perfecto */
}