/* style.css - Diseño inspirado en "Agenda Lider" */

/* ===== RESET BÁSICO Y VARIABLES GLOBALES ===== */
:root {
    --bg-dark: #020017;
    --bg-cards: #1a1a2e;
    --cyan: #15eeff;
    --magenta: #ff05f2;
    --text-primary: #ffffff;
    --text-secondary: #c7c7c7;
    --text-accent: #ffda66;
    /* Colores del calendario original */
    --color-day: #c7c7c7;
    --color-day-selected: #fff9bf;
    --color-slot-available: #7393ff;
    --color-slot-selected: #ffffff;
}


* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Lato', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-secondary);
    background-color: var(--bg-dark);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
/* ========================================================== */
/* APLICAR DEGRADADO AL COLOR DEL TEXTO DE LOS TÍTULOS        */
/* ========================================================== */

#hero h1,
#booking-section-wrapper .section-title,
#familiar-section .section-title,
#features-section .section-title,
#custom-agenda-section .section-title {
    /* 1. Se define el degradado que servirá como "color" */
    background: linear-gradient(
        90deg,
        #ffffff 0%, 
        #7393ff 100%
    );

    /* 2. Se usa el fondo para rellenar solo el texto */
    -webkit-background-clip: text;
    background-clip: text;

    /* 3. Se oculta el color sólido del texto para revelar el fondo degradado */
    color: transparent;
}
.container { width: 90%; max-width: 1100px; margin: 0 auto; padding: 0 15px; position: relative; }
h1, h2, h3, h4 { font-family: 'Montserrat', Arial, sans-serif; color: var(--text-primary); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); text-transform: uppercase; }
h2.section-title { font-size: clamp(2rem, 5vw, 2.8rem); text-align: center; margin-bottom: 0.5em; text-transform: uppercase; }
h3 { font-size: 1.4rem; text-align: center;color:#7393ff;}
p { margin-bottom: 1em; }
a { color: var(--text-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--cyan); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
.hidden { display: none !important; }
section { padding: 80px 0; }
.logo-text{display:none}
/* ===== BOTÓN PRINCIPAL (CTA) ===== */
.cta-button {
    display: inline-block; padding: 12px 35px; font-family: 'Montserrat', sans-serif; font-size: 1rem;
    font-weight: 700; text-align: center; border-radius: 50px; cursor: pointer;
    transition: all 0.3s ease; border: none;
    background: linear-gradient(90deg, var(--cyan) 0%, var(--magenta) 100%);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(21, 238, 255, 0.4), 0 8px 25px rgba(255, 5, 242, 0.4);
}
.cta-button:disabled {
    background: #555;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.back-button {
    background: transparent; border: 1px solid var(--text-secondary); color: var(--text-secondary);
    padding: 8px 15px; border-radius: 5px; cursor: pointer; transition: all 0.2s ease;
    margin-bottom: 20px;
}
.back-button:hover { background-color: var(--bg-cards); color: var(--text-primary); }

/* ===== HEADER ===== */
.main-header {
    padding: 20px 0;
    position: absolute; width: 100%; top: 0; left: 0; z-index: 100;
}
.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo-link { display: flex; align-items: center; font-weight: 700; font-size: 1.5rem; font-family: 'Montserrat'; }

.logo-image {
    margin-top: 15%;
    height: 10vh;
    max-width: 50vw;;
  
}
.main-nav { display: flex; gap: 30px; }
.main-nav a { font-weight: 500; }
.main-nav a:hover { color: var(--text-accent); }

/* ===== HERO SECTION ===== */
#hero {
 
    min-height: 80vh;
    padding-top: 150px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden; /* Muy importante para que el video no se salga */
}
#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    
    /* El degradado ocupará el 10% de la altura del contenedor #hero */
    height: 10%; 

    /* Creamos el degradado lineal */
    background: linear-gradient(
        to top, /* Dirección: de abajo hacia arriba */
        var(--bg-dark) 0%, /* Comienza con el color de fondo a opacidad 100% */
        rgba(2, 0, 23, 0) 100% /* Termina con el mismo color pero a opacidad 0% */
    );

    /* Asegura que el degradado esté por encima del video (-1) pero debajo del texto (1) */
    z-index: 0;
}
/* El nuevo contenedor que envuelve al video */
.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* El video, ahora posicionado DENTRO del wrapper */
#hero-video {
    position: absolute;
    bottom: 0;
    right: 0;

    /* LA CLAVE: El video tendrá el 100% de la altura del contenedor.
       Su anchura se ajustará automáticamente para mantener la proporción.
       Esto evita el "zoom" excesivo. */
    height: 100%;
    width: auto;
}

/* Superposición oscura para legibilidad del texto */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(2, 0, 23, 0.6);
    z-index: 0;
}

.hero-content { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    align-items: center; 
    gap: 40px; 
    position: relative;
    z-index: 1;
    padding:0;
}
.hero-subtitle { font-size: 1.5rem; color: var(--text-accent); font-family: 'Lato'; margin: 15px 0 30px; }
.hero-image-container { text-align: center; }

/* ===== BOOKING SECTION ===== */
#booking-section-wrapper { background-color: var(--bg-dark); }
#booking-app {
    background-color: var(--bg-cards);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 900px;
    margin: 20px auto 0;
}
#booking-app .section-title, #booking-app .section-subtitle { text-align: center; }
#booking-app .section-subtitle { margin-bottom: 2rem; color: var(--magenta); font-size: 1.2rem; }

/* Step 1: Service Selection */
#service-buttons-container {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px;
}
.service-button {
    background-color: rgba(0,0,0,0.2); border: 1px solid #444; border-radius: 10px;
    padding: 20px; cursor: pointer; transition: all 0.3s ease;
}
.service-button:hover { transform: translateY(-5px); border-color: var(--cyan); }
.service-button.selected { border-color: var(--magenta); background-color: rgba(255, 5, 242, 0.1); }
.service-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.service-details p { font-size: 0.9rem; margin: 0; color: #aaa; }
.summary { text-align: center; padding: 20px 0; margin-top: 20px; border-top: 1px solid #444; }
#accept-services-button { width: 100%; margin-top: 10px; }

/* Step 2: Calendar */
.calendar-main-area { 
    position: relative;
    margin-bottom: 30px;
    min-height: 500px; /* Altura fija para el contenedor 3D */
    perspective: 1200px; 
}

/* Los dos paneles (calendario y horarios) se superponen */
.calendar-component, .time-slots-component {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
    padding: 20px;
    background-color: var(--bg-cards);
    border-radius: 15px; 
}

/* ========================================================== */
/* COMIENZO DE LA MODIFICACIÓN CLAVE                */
/* ========================================================== */
.calendar-component {
    transform: rotateY(0deg);
    z-index: 2;
    /* 1. Convertir en contenedor flex vertical */
    display: flex;
    flex-direction: column;
}

/* 2. El grid de días ahora se estirará para llenar el espacio vertical */
div#calendar-days.calendar-grid {
    flex-grow: 1; /* Permite que este elemento crezca y ocupe el espacio sobrante */
    min-height: 0; /* Necesario para que flexbox pueda encoger el elemento si es necesario */
    /* 3. Distribuir el espacio vertical disponible en 6 filas iguales */
    grid-template-rows: repeat(6, 1fr);
}

.calendar-day {
    /* 4. Quitar el aspect-ratio para evitar conflictos. La altura ahora la dicta la fila. */
    /* aspect-ratio: 1 / 1;  <-- SE ELIMINA ESTA LÍNEA */
    display: flex; 
    align-items: center; 
    justify-content: center;
    border-radius: 8px; 
    cursor: pointer; 
    transition: background-color 0.2s;
    background-color: var(--color-day); 
    color: var(--bg-dark); 
    font-weight: bold;
}
/* ========================================================== */
/* FIN DE LA MODIFICACIÓN CLAVE                 */
/* ========================================================== */


/* Estado inicial: los horarios están volteados y ocultos detrás */
.time-slots-component {
    transform: rotateY(180deg);
    z-index: 1;
}

/* Estado "volteado": se activa con JS */
.calendar-main-area.is-flipped .calendar-component {
    transform: rotateY(-180deg); 
    z-index: 1;
}
.calendar-main-area.is-flipped .time-slots-component {
    transform: rotateY(0deg); 
    z-index: 2;
}

.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.calendar-nav-button { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-primary); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.days-names div { text-align: center; font-size: 0.8rem; color: #888; padding-bottom: 5px; }

.calendar-day:not(.disabled):hover { background-color: var(--cyan); }
.calendar-day.disabled { background-color: #444; color: #777; cursor: not-allowed; }
.calendar-day.selected-date { background-color: var(--color-day-selected); }

/* Panel de Horarios y su scroll */
#back-to-calendar-view-button { margin-bottom: 15px; }
.time-slots-component h4 { margin-bottom: 15px; }
.time-slots-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); 
    gap: 10px;
    max-height: calc(100% - 80px); /* Usar el 100% de la altura del panel menos el espacio para el título y botón */
    overflow-y: auto; 
    padding: 10px;
}

/* Estilo para el scrollbar (opcional pero recomendado) */
.time-slots-grid::-webkit-scrollbar { width: 8px; }
.time-slots-grid::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 4px; }
.time-slots-grid::-webkit-scrollbar-thumb { background: var(--color-slot-available); border-radius: 4px; }
.time-slots-grid::-webkit-scrollbar-thumb:hover { background: #5a7ee0; }

.slot {
    padding: 10px 5px; border-radius: 5px; cursor: pointer; text-align: center; font-size: 0.9rem;
    background-color: var(--color-slot-available); color: var(--bg-dark); font-weight: bold; transition: all 0.2s;
}
.slot:hover { transform: scale(1.05); }
.slot.selected { background-color: var(--color-slot-selected); }

/* Estilo específico para el botón de confirmar horario */
#finish-booking-button {
    width: 80%;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
}


/* Step 3: User Details */
#user-details-step .section-title { margin-bottom: 0.5em; }
#user-details-step .section-description { margin-bottom: 2em; text-align: center; }
.form-group { margin-bottom: 15px; }
.form-group input {
    width: 100%; padding: 12px 15px; border-radius: 5px; border: 1px solid #555;
    background-color: var(--bg-dark); color: var(--text-primary); font-size: 1rem;
}
.form-group input:focus { border-color: var(--cyan); outline: none; }
.booking-navigation { display: flex; justify-content: space-between; margin-top: 30px; gap: 20px; }

/* ===== FAMILIAR SECTION ===== */
#familiar-section{
    padding:0;
}
.familiar-image-container {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

.familiar-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
}
/* ===== FEATURES SECTION ===== */
#features-section { background-color: var(--bg-dark); }
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px; margin-top: 4rem;
}
.feature-card {
    background-color: var(--bg-cards); padding: 30px; border-radius: 15px;
    text-align: center; border: 1px solid #333; transition: all 0.3s ease;
}
.feature-card:hover { transform: translateY(-10px); border-color: var(--magenta); }
.feature-icon {
    height: 60px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.feature-card h3 { margin-bottom: 10px; color: var(--cyan); }

/* ===== CUSTOM AGENDA SECTION ===== */
#custom-agenda-section { text-align: center; padding: 0; padding-bottom: 10vh;}
.section-quote { font-size: 1.5rem; font-style: italic; max-width: 700px; margin: 2rem auto 2.5rem; }

/* ===== FOOTER ===== */
#footer { background-color: #000; padding: 40px 0; border-top: 1px solid #333; }
.footer-container { text-align: center; }
.footer-links { display: flex; justify-content: center; gap: 25px; margin-bottom: 20px; }
.admin-login-footer { margin-bottom: 20px; }
.admin-login-footer a { color: #888; font-size: 0.9rem; }
.copyright { font-size: 0.8rem; color: #666; }

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 992px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-image-container { order: -1; margin-bottom: 30px; }
    .chat-bubbles-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .main-header .container { flex-direction: column; gap: 15px; }
    .calendar-main-area { grid-template-columns: 1fr; }
    .time-slots-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
    .bubble-overlay { position: static; width: 100%; margin-top: 15px; }
}


/* ========================================================== */
/* NUEVA MEDIA QUERY PARA EL COMPORTAMIENTO DEL HERO A < 1000PX */
/* ========================================================== */
@media (max-width: 1000px) {
    /* =========== INICIO DE LA MODIFICACIÓN =========== */
    /* 1. Cambiar el header para que ocupe su propio espacio */
    .main-header {
        position: static;
        background-color: var(--bg-dark);
        padding-top: 10px;
        padding-bottom: 10px;
    }

    /* 2. Ocultar la barra de navegación */
    .main-nav {
        display: none;
    }
    
    /* 3. Centrar el logo que queda */
    .main-header .container {
        justify-content: center;
    }
    
    /* 4. Ajustar el logo y el hero para el nuevo layout */
    .logo-image {
        margin-top:5%;
    }
    
    #hero {
        padding-top: 60px;
        min-height: 800px;
    }
    /* =========== FIN DE LA MODIFICACIÓN =========== */

    /* Reglas existentes que se mantienen */
    div.container.hero-content{
        padding:0;
        min-height: 600px; 
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text {
    order: 1;
    margin-top: -10vh;
    
    }

    .hero-image-container {
        order: 2;
    }

    #hero-video {
      PADDING-TOP:0;
    }
}

/* Ajuste adicional para que el layout de 992px no interfiera */
@media (max-width: 992px) {
    .hero-image-container { 
        margin-bottom: 30px;
    }
}
@media (max-width: 500px){
    .hero-text {
   
    margin-top:0vh;
    
    }
}
@media (max-width: 480px) {
    #hero-video {
     object-fit: contain;
     right: 0;}
}
@media (max-width: 500px){
    .hero-text {
        position: relative;

    
    }
}