/* ==========================================================
   CENTRO PSICOLÓGICO CLARIDAD
   SOLICITUD DE CITA

   Este archivo contiene únicamente estilos de agenda.php.

   Header, footer, botones, contenedores y utilidades
   generales pertenecen a global.css.
   ========================================================== */


/* ==========================================================
   1. HERO
   ========================================================== */

.agenda-hero {
    padding: clamp(60px, 7vw, 90px) 0;

    background:
        radial-gradient(
            circle at 50% 0%,
            var(--accent-mint-light) 0%,
            transparent 65%
        );
}


.agenda-hero-content {
    max-width: 850px;

    text-align: center;
}


.agenda-hero h1 {
    margin-bottom: 22px;

    font-size: clamp(2.3rem, 4.5vw, 3.4rem);
    line-height: 1.15;

    color: var(--primary-dark);
}


.agenda-hero p {
    max-width: 720px;

    margin-left: auto;
    margin-right: auto;

    font-size: 1.05rem;
    line-height: 1.75;

    color: var(--text-muted);
}


/* ==========================================================
   2. SECCIÓN PRINCIPAL
   ========================================================== */

.agenda-section {
    padding: 80px 0;
}


.agenda-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 0.8fr)
        minmax(0, 1.2fr);

    align-items: start;

    gap: clamp(40px, 6vw, 70px);
}


/* ==========================================================
   3. INFORMACIÓN LATERAL
   ========================================================== */

.agenda-info {
    min-width: 0;
}


.agenda-info > h2 {
    margin-bottom: 18px;

    font-size: clamp(1.8rem, 3vw, 2.3rem);
    line-height: 1.25;

    color: var(--primary-dark);
}


.agenda-info > p {
    margin-bottom: 35px;

    font-size: 0.98rem;
    line-height: 1.75;

    color: var(--text-muted);
}


/* ==========================================================
   4. PASOS DE LA SOLICITUD
   ========================================================== */

.agenda-info-list {
    display: flex;
    flex-direction: column;

    gap: 24px;
}


.agenda-info-item {
    display: flex;
    align-items: flex-start;

    gap: 16px;
}


.agenda-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 46px;
    height: 46px;

    border-radius: 14px;

    font-size: 1.2rem;

    color: var(--accent-mint);

    background-color: var(--accent-mint-light);
}


.agenda-info-item h3 {
    margin-bottom: 4px;

    font-size: 1rem;
    line-height: 1.35;

    color: var(--primary-dark);
}


.agenda-info-item p {
    font-size: 0.88rem;
    line-height: 1.6;

    color: var(--text-muted);
}


/* ==========================================================
   5. CONTACTO POR WHATSAPP
   ========================================================== */

.agenda-contact {
    margin-top: 35px;

    padding: 24px;

    border: 1px solid rgba(0, 168, 143, 0.12);
    border-radius: 18px;

    background-color: var(--accent-mint-light);
}


.agenda-contact > p {
    margin-bottom: 12px;

    font-size: 0.88rem;
    line-height: 1.55;

    color: var(--text-main);
}


.agenda-whatsapp {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    font-size: 0.95rem;
    font-weight: 700;

    text-decoration: none;

    color: var(--accent-mint);

    transition:
        color 0.3s ease,
        transform 0.3s ease;
}


.agenda-whatsapp i {
    font-size: 1.15rem;
}


.agenda-whatsapp:hover {
    transform: translateY(-1px);

    color: var(--primary-dark);
}


.agenda-whatsapp:focus-visible {
    outline: 3px solid rgba(0, 168, 143, 0.35);

    outline-offset: 3px;
}


/* ==========================================================
   6. CONTENEDOR DEL FORMULARIO
   ========================================================== */

.agenda-form-container {
    min-width: 0;

    padding: 38px;

    border: 1px solid rgba(15, 42, 58, 0.06);
    border-radius: 26px;

    background-color: var(--white);

    box-shadow:
        0 12px 35px rgba(15, 42, 58, 0.055);
}


.agenda-form-heading {
    margin-bottom: 30px;
}


.agenda-form-heading h2 {
    margin-bottom: 6px;

    font-size: 1.7rem;
    line-height: 1.3;

    color: var(--primary-dark);
}


.agenda-form-heading p {
    font-size: 0.85rem;

    color: var(--text-muted);
}


.agenda-form-heading p span,
.form-group > label > span:not(.optional),
.agenda-consent span span {
    color: #b42318;
}


/* ==========================================================
   7. ESTRUCTURA DEL FORMULARIO
   ========================================================== */

.agenda-form {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 22px 20px;
}


.form-group {
    display: flex;
    flex-direction: column;

    min-width: 0;

    gap: 8px;
}


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


/* ==========================================================
   8. LABELS
   ========================================================== */

.form-group > label {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;

    color: var(--primary-dark);
}


.optional {
    font-weight: 400;

    color: var(--text-muted);
}


/* ==========================================================
   9. INPUTS, SELECT Y TEXTAREA
   ========================================================== */

.agenda-form input[type="text"],
.agenda-form input[type="tel"],
.agenda-form input[type="email"],
.agenda-form select,
.agenda-form textarea {
    width: 100%;

    min-width: 0;

    border: 1px solid #d7dde3;
    border-radius: 12px;

    font-family: var(--font-family);
    font-size: 0.95rem;

    color: var(--text-main);

    background-color: var(--white);

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background-color 0.25s ease;
}


.agenda-form input[type="text"],
.agenda-form input[type="tel"],
.agenda-form input[type="email"],
.agenda-form select {
    min-height: 48px;

    padding: 11px 14px;
}


.agenda-form textarea {
    min-height: 130px;

    padding: 13px 14px;

    line-height: 1.6;

    resize: vertical;
}


.agenda-form input::placeholder,
.agenda-form textarea::placeholder {
    color: #9ca3af;
}


/*
    Estado de foco.

    Se utiliza box-shadow en vez de eliminar por completo
    la señal visual de foco.
*/
.agenda-form input[type="text"]:focus,
.agenda-form input[type="tel"]:focus,
.agenda-form input[type="email"]:focus,
.agenda-form select:focus,
.agenda-form textarea:focus {
    outline: none;

    border-color: var(--accent-mint);

    box-shadow:
        0 0 0 3px rgba(0, 168, 143, 0.12);
}


/* ==========================================================
   10. TEXTO DE AYUDA
   ========================================================== */

.form-help {
    display: block;

    margin-top: 2px;

    font-size: 0.76rem;
    line-height: 1.5;

    color: var(--text-muted);
}


/* ==========================================================
   11. AUTORIZACIÓN DE CONTACTO
   ========================================================== */

.agenda-consent {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    padding: 17px 18px;

    border: 1px solid rgba(15, 42, 58, 0.08);
    border-radius: 14px;

    background-color: var(--bg-light);

    cursor: pointer;
}


.agenda-consent input[type="checkbox"] {
    flex-shrink: 0;

    width: 18px;
    height: 18px;

    margin-top: 3px;

    accent-color: var(--accent-mint);

    cursor: pointer;
}


.agenda-consent > span {
    font-size: 0.83rem;
    font-weight: 400;
    line-height: 1.6;

    color: var(--text-main);
}


.agenda-consent:focus-within {
    border-color: rgba(0, 168, 143, 0.4);

    box-shadow:
        0 0 0 3px rgba(0, 168, 143, 0.08);
}


/* ==========================================================
   12. ENVÍO
   ========================================================== */

.form-submit {
    display: flex;
    flex-direction: column;

    align-items: flex-start;

    gap: 12px;

    padding-top: 4px;
}


.form-submit .btn {
    min-width: 190px;
}


.form-submit p {
    max-width: 520px;

    font-size: 0.78rem;
    line-height: 1.55;

    color: var(--text-muted);
}

/* ==========================================================
   SELECTOR PERSONALIZADO
   ========================================================== */


/*
    El select HTML original continúa existiendo para
    conservar el valor que posteriormente utilizará PHP.

    Solo ocultamos su representación visual.
*/
.native-select-hidden {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;

    border: 0;

    opacity: 0;

    pointer-events: none;
}


/* ----------------------------------------------------------
   CONTENEDOR
   ---------------------------------------------------------- */

.custom-select {
    position: relative;

    width: 100%;

    min-width: 0;
}


/* ----------------------------------------------------------
   CAMPO VISIBLE
   ---------------------------------------------------------- */

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    min-height: 48px;

    padding: 11px 14px;

    gap: 15px;

    border: 1px solid #d7dde3;
    border-radius: 12px;

    font-family: var(--font-family);
    font-size: 0.95rem;

    text-align: left;

    color: var(--text-main);

    background-color: var(--white);

    cursor: pointer;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


.custom-select-trigger:hover {
    border-color: rgba(0, 168, 143, 0.55);
}


.custom-select.open .custom-select-trigger {
    border-color: var(--accent-mint);

    box-shadow:
        0 0 0 3px rgba(0, 168, 143, 0.12);
}


.custom-select-trigger:focus-visible {
    outline: none;

    border-color: var(--accent-mint);

    box-shadow:
        0 0 0 3px rgba(0, 168, 143, 0.12);
}


/* ----------------------------------------------------------
   FLECHA
   ---------------------------------------------------------- */

.custom-select-arrow {
    flex-shrink: 0;

    font-size: 0.9rem;

    color: var(--text-muted);

    transition:
        transform 0.25s ease,
        color 0.25s ease;
}


.custom-select.open .custom-select-arrow {
    transform: rotate(180deg);

    color: var(--accent-mint);
}


/* ----------------------------------------------------------
   CUADRO DE OPCIONES
   ---------------------------------------------------------- */

.custom-select-options {
    position: absolute;

    top: calc(100% + 8px);
    left: 0;

    z-index: 100;

    display: none;

    width: 100%;

    max-height: 280px;

    padding: 7px;

    overflow-y: auto;
    overscroll-behavior: contain;

    border: 1px solid rgba(15, 42, 58, 0.1);
    border-radius: 14px;

    background-color: var(--white);

    box-shadow:
        0 14px 35px rgba(15, 42, 58, 0.14);
}


.custom-select.open .custom-select-options {
    display: block;
}


/*
    Si no existe suficiente espacio debajo del campo,
    agenda.js agrega open-up y el menú aparece arriba.
*/
.custom-select.open-up .custom-select-options {
    top: auto;

    bottom: calc(100% + 8px);
}


/* ----------------------------------------------------------
   OPCIONES
   ---------------------------------------------------------- */

.custom-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;

    min-height: 44px;

    padding: 10px 12px;

    gap: 12px;

    border: 0;
    border-radius: 9px;

    font-family: var(--font-family);
    font-size: 0.93rem;

    text-align: left;

    color: var(--text-main);

    background-color: transparent;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}


.custom-select-option:hover,
.custom-select-option:focus-visible {
    outline: none;

    color: var(--primary-dark);

    background-color: var(--accent-mint-light);
}


/* ----------------------------------------------------------
   OPCIÓN SELECCIONADA
   ---------------------------------------------------------- */

.custom-select-option.selected {
    font-weight: 600;

    color: var(--accent-mint);

    background-color: var(--accent-mint-light);
}


.custom-select-check {
    flex-shrink: 0;

    opacity: 0;

    font-size: 1rem;

    color: var(--accent-mint);
}


.custom-select-option.selected .custom-select-check {
    opacity: 1;
}


/* ----------------------------------------------------------
   SCROLL DEL DESPLEGABLE
   ---------------------------------------------------------- */

.custom-select-options {
    scrollbar-width: thin;

    scrollbar-color:
        rgba(0, 168, 143, 0.35)
        transparent;
}


.custom-select-options::-webkit-scrollbar {
    width: 7px;
}


.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
}


.custom-select-options::-webkit-scrollbar-thumb {
    border-radius: 10px;

    background-color: rgba(0, 168, 143, 0.3);
}


.custom-select-options::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 168, 143, 0.5);
}

/* ==========================================================
   MENSAJES DEL FORMULARIO
   ========================================================== */

.agenda-alert {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    margin-bottom: 28px;

    padding: 17px 18px;

    border: 1px solid transparent;
    border-radius: 14px;

    font-size: 0.88rem;
}


.agenda-alert > i {
    flex-shrink: 0;

    margin-top: 2px;

    font-size: 1.15rem;
}


.agenda-alert strong {
    display: block;

    margin-bottom: 3px;

    color: var(--primary-dark);
}


.agenda-alert p {
    line-height: 1.55;
}


/* ÉXITO */

.agenda-alert-success {
    border-color: rgba(0, 168, 143, 0.18);

    color: #42665f;

    background-color: var(--accent-mint-light);
}


.agenda-alert-success > i {
    color: var(--accent-mint);
}


/* ERROR */

.agenda-alert-error {
    border-color: rgba(180, 35, 24, 0.12);

    color: #7a4540;

    background-color: #fff4f2;
}


.agenda-alert-error > i {
    color: #b42318;
}

/* ==========================================================
   13. RESPONSIVIDAD
   ========================================================== */


/* ----------------------------------------------------------
   LAPTOPS PEQUEÑAS / TABLETS HORIZONTALES
   ---------------------------------------------------------- */

@media (max-width: 992px) {

    .agenda-hero {
        padding: 65px 0;
    }


    .agenda-section {
        padding: 65px 0;
    }


    .agenda-layout {
        grid-template-columns:
            minmax(0, 0.85fr)
            minmax(0, 1.15fr);

        gap: 35px;
    }


    .agenda-form-container {
        padding: 30px;
    }

}


/* ----------------------------------------------------------
   TABLETS VERTICALES / CELULARES
   ---------------------------------------------------------- */

@media (max-width: 768px) {

    /* HERO */

    .agenda-hero {
        padding: 55px 0;
    }


    .agenda-hero h1 {
        font-size: 2.25rem;
    }


    .agenda-hero p {
        font-size: 1rem;
    }


    /* ESTRUCTURA */

    .agenda-section {
        padding: 55px 0;
    }


    .agenda-layout {
        grid-template-columns: 1fr;

        gap: 45px;
    }


    /* INFORMACIÓN */

    .agenda-info {
        text-align: center;
    }


    .agenda-info > p {
        max-width: 650px;

        margin-left: auto;
        margin-right: auto;
    }


    .agenda-info-list {
        max-width: 600px;

        margin-left: auto;
        margin-right: auto;

        text-align: left;
    }


    .agenda-contact {
        max-width: 600px;

        margin-left: auto;
        margin-right: auto;

        text-align: center;
    }


    /* FORMULARIO */

    .agenda-form-container {
        padding: 30px 26px;
    }


    .agenda-form {
        grid-template-columns: 1fr;
    }


    /*
        Al existir una sola columna, todas las filas
        ocupan automáticamente el ancho completo.
    */
    .form-group-full {
        grid-column: auto;
    }


    .form-submit {
        align-items: stretch;

        text-align: center;
    }


    .form-submit .btn {
        width: 100%;
    }


    .form-submit p {
        margin-left: auto;
        margin-right: auto;
    }

}


/* ----------------------------------------------------------
   CELULARES PEQUEÑOS
   ---------------------------------------------------------- */

@media (max-width: 480px) {

    .agenda-hero {
        padding: 45px 0;
    }


    .agenda-hero h1 {
        font-size: 2rem;
    }


    .agenda-section {
        padding: 45px 0;
    }


    .agenda-info > h2 {
        font-size: 1.7rem;
    }


    .agenda-info-item {
        gap: 13px;
    }

    .custom-select-trigger,
    .custom-select-option {
        font-size: 16px;
    }
  
    .agenda-info-icon {
        width: 42px;
        height: 42px;

        font-size: 1.1rem;
    }


    .agenda-contact {
        padding: 20px;
    }


    .agenda-form-container {
        padding: 25px 18px;

        border-radius: 20px;
    }


    .agenda-form-heading h2 {
        font-size: 1.5rem;
    }


    /*
        16px evita que algunos navegadores móviles,
        especialmente Safari, hagan zoom automático
        al enfocar los campos.
    */
    .agenda-form input[type="text"],
    .agenda-form input[type="tel"],
    .agenda-form input[type="email"],
    .agenda-form select,
    .agenda-form textarea {
        font-size: 16px;
    }


    .agenda-consent {
        padding: 15px;
    }

}