/* ==========================================================================
   Agenda de reuniones - /agendar
   Misma marca que ACTIVA (Montserrat / Karla, rojo #de091e, indigo #393185).
   Todo prefijado .agenda- para no tocar estilos globales del sitio.
   ========================================================================== */

/* El menu desplegable del nav debe quedar por encima del contenido y ser opaco. */
header nav#principalNav { position: relative; z-index: 1000; }
header nav#principalNav .dropdown-menu {
    z-index: 1050 !important;
    background-color: #0a0722 !important;
}

.agenda {
    --red: #de091e;
    --red-deep: #b30717;
    --indigo: #393185;
    --ink: #14141f;
    --paper: #ffffff;
    --paper-2: #f5f5f8;
    --line: #e4e4ec;
    --muted: #63636f;
    --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
    --serif: "Karla", "Helvetica Neue", Arial, sans-serif;

    max-width: 760px;
    margin: 0 auto;
    padding: 40px 0 90px;
    font-family: var(--serif);
    color: var(--ink);
}

.agenda *,
.agenda *::before,
.agenda *::after {
    box-sizing: border-box;
}

.agenda__intro {
    margin-bottom: 34px;
}

.agenda__intro h1 {
    font-family: var(--sans);
    font-weight: 800;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin: 0 0 14px;
    color: var(--ink);
}

.agenda__intro p {
    font-size: 17px;
    line-height: 1.55;
    color: var(--muted);
    margin: 0;
    max-width: 60ch;
}

.agenda__plan {
    margin-top: 12px !important;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 14px !important;
    color: var(--indigo) !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* --- Estado cerrado ------------------------------------------------------- */

.agenda__cerrada {
    border: 1px solid var(--line);
    background: var(--paper-2);
    padding: 32px;
}

.agenda__cerrada h2 {
    font-family: var(--sans);
    font-weight: 800;
    font-size: 22px;
    margin: 0 0 10px;
}

.agenda__cerrada p {
    font-size: 16px;
    line-height: 1.55;
    color: var(--muted);
    margin: 0 0 18px;
}

/* --- Formulario / pasos ------------------------------------------------- */

.agenda__form {
    display: block;
}

.agenda__hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.agenda__step {
    border-top: 2px solid var(--ink);
    padding-top: 24px;
    margin-top: 28px;
}

.agenda__step:first-of-type {
    margin-top: 0;
}

.agenda__step h2 {
    font-family: var(--sans);
    font-weight: 800;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 20px;
}

/* --- Calendario --------------------------------------------------------- */

.agenda__cal {
    border: 1px solid var(--line);
    background: var(--paper);
}

.agenda__cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.agenda__cal-head span {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 15px;
    text-transform: capitalize;
}

.agenda__cal-nav {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    background: var(--paper);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
}

.agenda__cal-nav:hover:not(:disabled) {
    background: var(--ink);
    color: #fff;
}

.agenda__cal-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.agenda__cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.agenda__dow {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-align: center;
    padding: 10px 0 8px;
}

.agenda__day {
    aspect-ratio: 1 / 1;
    border: 0;
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
    background: var(--paper);
    font-family: var(--sans);
    font-size: 15px;
    color: var(--ink);
    cursor: pointer;
}

.agenda__day:nth-child(7n) {
    border-right: 0;
}

.agenda__day--empty {
    background: var(--paper-2);
    cursor: default;
}

.agenda__day--disabled {
    color: #c2c2cc;
    cursor: not-allowed;
}

.agenda__day--free {
    font-weight: 700;
    box-shadow: inset 0 -3px 0 var(--indigo);
}

.agenda__day--free:hover {
    background: var(--indigo);
    color: #fff;
}

.agenda__day--selected,
.agenda__day--selected:hover {
    background: var(--ink);
    color: #fff;
    box-shadow: inset 0 -3px 0 var(--red);
}

/* --- Horarios --------------------------------------------------------- */

.agenda__slots {
    margin-top: 18px;
}

.agenda__slots-hint {
    font-size: 15px;
    color: var(--muted);
    margin: 0;
}

.agenda__slots-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}

.agenda__slot {
    border: 1px solid var(--ink);
    background: var(--paper);
    font-family: var(--sans);
    font-weight: 700;
    font-size: 15px;
    padding: 12px 0;
    cursor: pointer;
    color: var(--ink);
}

.agenda__slot:hover {
    background: var(--indigo);
    border-color: var(--indigo);
    color: #fff;
}

.agenda__tz {
    margin-top: 16px;
    font-size: 13px;
    color: var(--muted);
}

/* --- Paso 2: datos --------------------------------------------------- */

.agenda__elegido {
    background: var(--paper-2);
    border-left: 3px solid var(--red);
    padding: 12px 14px;
    font-size: 15px;
    margin: 0 0 22px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.agenda__elegido strong {
    font-family: var(--sans);
}

.agenda__cambiar {
    border: 0;
    background: none;
    color: var(--indigo);
    font-family: var(--sans);
    font-weight: 700;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.agenda__field {
    display: block;
    margin-bottom: 16px;
}

.agenda__field span {
    display: block;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.agenda__field input[type="text"],
.agenda__field input[type="email"],
.agenda__field input[type="tel"] {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--paper);
    padding: 12px 14px;
    font-family: var(--serif);
    font-size: 16px;
    color: var(--ink);
}

.agenda__field input:focus {
    outline: 2px solid var(--indigo);
    outline-offset: 0;
    border-color: var(--indigo);
}

.agenda__check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    color: var(--muted);
    margin: 6px 0 24px;
}

.agenda__check a {
    color: var(--indigo);
    text-decoration: underline;
}

.agenda__error {
    background: #fdeaec;
    border-left: 3px solid var(--red);
    color: var(--red-deep);
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 18px;
}

.agenda__error--top {
    margin: 0 0 26px;
    padding: 14px 16px;
}

.agenda__error--top strong {
    font-family: var(--sans);
    display: block;
    margin-bottom: 4px;
}

.agenda__error--top ul {
    margin: 0;
    padding-left: 18px;
}

.agenda__field input[aria-invalid="true"] {
    border-color: var(--red);
    background: #fdeaec;
}

.agenda__btn {
    display: inline-block;
    border: 0;
    background: var(--red);
    color: #fff;
    font-family: var(--sans);
    font-weight: 800;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 15px 30px;
    cursor: pointer;
}

.agenda__btn:hover {
    background: var(--red-deep);
}

.agenda__btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.agenda__btn--ghost {
    background: none;
    color: var(--indigo);
    border: 1px solid var(--indigo);
}

.agenda__btn--ghost:hover {
    background: var(--indigo);
    color: #fff;
}

.agenda__wa {
    display: inline-block;
    margin-top: 4px;
    font-family: var(--sans);
    font-weight: 700;
    font-size: 14px;
    color: var(--indigo);
    text-decoration: underline;
}

/* --- Confirmacion / gestionar --------------------------------------- */

.agenda__ok {
    border: 1px solid var(--line);
    border-top: 4px solid var(--red);
    background: var(--paper);
    padding: 34px;
}

.agenda__ok h1 {
    font-family: var(--sans);
    font-weight: 800;
    font-size: clamp(26px, 4vw, 36px);
    margin: 0 0 12px;
}

.agenda__ok p {
    font-size: 16px;
    line-height: 1.55;
    color: var(--muted);
    margin: 0 0 20px;
}

.agenda__dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 6px 16px;
    margin: 0 0 22px;
    font-size: 16px;
}

.agenda__dl dt {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    padding-top: 2px;
}

.agenda__dl dd {
    margin: 0;
}

.agenda__note {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 24px;
}

@media (max-width: 520px) {
    .agenda__dl {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .agenda__dl dd {
        margin-bottom: 12px;
    }
}
