/* =========================================== */
/* === SECCIÓN CONSULTORIO (FIDELIZADA) === */
/* =========================================== */

.consultorio-hero {
    position: relative;
    width: 100%;
    min-height: 900px;
    /* proporcional al diseño original en 2880x1864 */
    background-image: url('../images/home.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    display: flex;
    align-items: center;
    padding: 64px 250px;
    box-sizing: border-box;
}

/* .container {
    max-width: 1600px !important;
} */

/* Caja de texto semitransparente */
.hero-content-box {
    background-color: rgba(73, 91, 74, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 48px;
    max-width: 600px;
    color: #495B4A;
}

/* Título principal */
.hero-content-box h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 36px;
    line-height: 1.4;
    margin-bottom: 25px;
    color: #495B4A;
}

/* Texto descriptivo */
.hero-content-box p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #495B4A;
}

/* Botón principal */
.btn-consultorio {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 12px;
    background-color: #8DE39B;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 20px;
    color: #495B4A;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-consultorio:hover {
    background-color: #79d187;
    transform: translateY(-2px);
}

/* =========================================== */
/* === RESPONSIVE ADAPTATIONS === */
/* =========================================== */

/* Pantallas grandes (4K, 2880px y similares) */
@media (min-width: 2000px) {
    .consultorio-hero {
        padding: 96px 240px;
        min-height: 1100px;
    }

    .hero-content-box {
        max-width: 640px;
        padding: 60px;
    }

    .hero-content-box h1 {
        font-size: 42px;
    }

    .hero-content-box p {
        font-size: 20px;
    }
}

/* Tablets */
@media (max-width: 992px) {
    .consultorio-hero {
        justify-content: center;
        padding: 60px 40px;
        min-height: auto;
        text-align: center;
    }

    .hero-content-box {
        max-width: 90%;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .consultorio-hero {
        padding: 40px 20px;
    }

    .hero-content-box h1 {
        font-size: 28px;
    }

    .hero-content-box p {
        font-size: 16px;
    }
}

/* =========================================== */
/* === 2. SECCIÓN GALERÍA (AJUSTADA AL 100%) === */
/* =========================================== */

.gallery-collage {
    padding: 0;
    background-color: #fff;
    /* Hacemos que la sección ocupe todo el ancho */
    width: 100%;
    overflow-x: hidden;
    /* Previene desbordamiento horizontal */
}

.gallery-container {
    /* ¡AQUÍ ESTÁ EL CAMBIO! */
    /* Eliminamos max-width y margin: auto */
    /* max-width: 1440px; */
    /* margin: 0 auto; */

    /* Ocupa el 100% del ancho de .gallery-collage */
    width: 100%;

    display: flex;
    /* Mantenemos la altura original del diseño */
    height: 596px;
}

/* --- Columna Izquierda --- */
.gallery-column-left {
    /* ¡AQUÍ ESTÁ EL CAMBIO! */
    /* Convertimos el ancho fijo (697px) a porcentaje */
    /* (697 / 1440) * 100 = 48.4028% */
    flex: 0 0 48.4028%;

    display: flex;
    flex-direction: column;
}

/* --- Columna Derecha --- */
.gallery-column-right {
    /* ¡AQUÍ ESTÁ EL CAMBIO! */
    /* Convertimos el ancho fijo (743px) a porcentaje */
    /* (743 / 1440) * 100 = 51.5972% */
    flex: 0 0 51.5972%;
}

/* --- Estilos de las imágenes --- */
.gallery-image-wrapper {
    width: 100%;
    /* La columna izquierda tiene dos wrappers, 
       así que cada uno ocupa la mitad de la altura (50%) */
    height: 100%;
    overflow: hidden;
    position: relative;
    /* Buena práctica para object-fit */
}

/* La columna izquierda tiene dos wrappers, este CSS se asegura de que cada uno ocupe el 50% de la altura */
.gallery-column-left .gallery-image-wrapper {
    height: 50%;
}

.gallery-image-wrapper img {
    width: 100%;
    height: 100%;

    /* ESTA ES LA CLAVE PARA QUE NO SE ESTIRE:
       La imagen se expande para llenar el contenedor 
       sin deformarse (se recorta si es necesario) */
    object-fit: cover;

    display: block;
}

/* --- RESPONSIVE GALERÍA (Ajustado) --- */
@media (max-width: 992px) {
    .gallery-container {
        /* Se apilan verticalmente */
        flex-direction: column;
        height: auto;
    }

    .gallery-column-left,
    .gallery-column-right {
        /* Ambas columnas ocupan el 100% del ancho */
        flex-basis: 100%;
        max-width: 100%;
    }

    .gallery-column-right {
        order: 1;
    }

    .gallery-column-left {
        order: 2;
        /* La columna izquierda sigue siendo flex-direction: column */
    }

    /* Ajustamos las alturas para el responsive */
    .gallery-column-right .gallery-image-wrapper {
        height: 500px;
    }

    /* Ahora ambos wrappers de la col-izquierda deben tener una altura fija */
    .gallery-column-left .gallery-image-wrapper {
        height: 350px;
    }
}

@media (max-width: 768px) {

    /* Reducimos la altura en móviles más pequeños */
    .gallery-column-right .gallery-image-wrapper {
        height: 400px;
    }

    .gallery-column-left .gallery-image-wrapper {
        height: 300px;
    }
}

/* ======================================== */
/* === 3. ESTILOS SECCIÓN AGENDAR (AJUSTADO) === */
/* ======================================== */

.appointment-section {
    background-image: url('../images/A_IMG_6816.png');
    background-size: cover;
    background-position: center;

    /* 1. Quitamos el padding lateral de la sección */
    padding: 60px 0;
    /* ANTES: padding: 20px 20px; */

    display: flex;
    align-items: center;
    min-height: 673px;
    box-sizing: border-box;
}

/* === INICIO DE LA MODIFICACIÓN === */
.appointment-section .container {
    display: flex;
    justify-content: flex-start;
    /* Esto ya estaba bien */
    align-items: center;
    width: 100%;

    /* 2. Anulamos el centrado y ancho máximo de app.css */
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
    /* Buena práctica */

    /* 3. Aplicamos el mismo padding lateral que tu header */
    /* para que el formulario se alinee a la izquierda con el logo. */
    padding-left: 180px;
    padding-right: 180px;
}

/* === FIN DE LA MODIFICACIÓN === */


.appointment-form {
    width: 100%;
    max-width: 650px;
    /* Redujimos esto un poco, como pediste */
    padding: 40px;
    background-color: rgba(73, 91, 74, 0.45);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.appointment-form h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 24px;
    color: #FFFFFF;
    line-height: 1.3;
    margin: 0;
}

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

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: none;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 15px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #FFFFFF;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

.form-group select {
    padding-right: 50px;
}

.form-group select:invalid {
    color: rgba(255, 255, 255, 0.9);
}

.form-group select option {
    background-color: #495B4A;
    color: #FFFFFF;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.form-address-info {
    grid-column: 1 / -1;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #FAFAFA;
    margin-top: 8px;
    line-height: 1.6;
}

.form-submit {
    grid-column: 1 / -1;
    text-align: right;
}

.form-submit .btn {
    background-color: #8DE39B;
    color: #495B4A;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 20px;
    border-radius: 12px;
    padding: 12px 30px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.form-submit .btn:hover {
    background-color: #79d187;
    transform: translateY(-2px);
}

#hora {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: none !important;
}

/* --- 3. REGLAS RESPONSIVAS (TABLET Y MÓVIL) --- */

/* === INICIO DE LA MODIFICACIÓN RESPONSIVE === */
/* Añadimos este breakpoint para que coincida con el header */
@media (max-width: 1200px) {
    .appointment-section .container {
        padding-left: 60px;
        padding-right: 60px;
    }
}

/* === FIN DE LA MODIFICACIÓN RESPONSIVE === */


@media (max-width: 992px) {
    .appointment-section {
        /* Ajustamos padding para tablet y centramos */
        padding: 60px 0;
        /* ANTES: padding: 60px 40px; */
        min-height: auto;
        justify-content: center;
    }

    .appointment-section .container {
        justify-content: center;
        /* Hacemos que coincida con el padding del header en esta vista */
        padding-left: 40px;
        padding-right: 40px;
    }

    .form-grid {
        /* --- Un input por fila --- */
        grid-template-columns: 1fr;
    }

    .form-submit {
        /* Centramos el botón en la vista de una columna */
        text-align: center;
    }
}

@media (max-width: 768px) {
    .appointment-section {
        /* Menos padding en móvil */
        padding: 40px 0;
        /* ANTES: padding: 40px 20px; */
    }

    .appointment-section .container {
        /* Hacemos que coincida con el padding del header en esta vista */
        padding-left: 20px;
        padding-right: 20px;
    }

    .appointment-form {
        /* Reducimos el padding interno del formulario en móvil */
        padding: 30px 20px;
    }

    .appointment-form h2 {
        /* Reducimos un poco el título en móvil */
        font-size: 20px;
        text-align: center;
        /* Centramos el título en móvil */
    }

    .form-address-info {
        /* Centramos el texto de dirección en móvil */
        text-align: center;
    }


    /* =================================== */
    /* ESTILOS PARA CHECKBOX "MOSTRAR CANCELADAS" */
    /* =================================== */

    .form-group-toggle {
        flex-grow: 0 !important;
        flex-basis: auto !important;
        min-width: 180px !important;
        justify-content: center;
        cursor: pointer;
    }

    .form-group-toggle label {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--secondary-color);
        cursor: pointer;
        margin-bottom: 0;
        /* Sobrescribe el margin-bottom por defecto */
        padding: 10px;
        border-radius: 6px;
        transition: background-color 0.2s ease;
    }

    .form-group-toggle label:hover {
        background-color: var(--admin-bg);
    }

    .form-group-toggle input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
    }
}