/* --- BOTÓN DE AYUDA (ámbar #b45309 + ondas) --- */
.ayuda-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9em;
    background: #b45309;
    padding: 6px 14px;
    border-radius: 999px;
    transition: all 0.3s;
    z-index: 1;
    isolation: isolate;
    margin-top: -7px;
}

.ayuda-container:hover,
.ayuda-container:focus {
    background: #9a4508;
    box-shadow: 0 6px 16px rgba(180, 83, 9, 0.55);
    transform: translateY(-1px);
    outline: none;
}

.ayuda-icon {
    background: #ffffff;
    color: #b45309;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.ayuda-palabra {
    color: #b45309;
    font-weight: 500;
}

.ayuda-pulse {
    display: block;
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #b45309;
    animation: ayuda-pulse 2s ease-out infinite;
    z-index: -1;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.45);
}

.ayuda-pulse--delay {
    animation-delay: 0.6s;
}

@keyframes ayuda-pulse {
    0% {
        transform: scale(1);
        opacity: 0.55;
    }

    100% {
        transform: scale(1.55);
        opacity: 0;
    }
}

@media screen and (max-width: 768px) {
    .ayuda-pulse {
        display: none;
        animation: none;
    }
}

/* --- Desplegable especialidad (estilo site6) --- */
.spec-dropdown {
    position: relative;
}

.spec-dropdown.is-open {
    border: 1px solid #d8dee8;
    border-radius: 0.5rem;
    background: #f1f5f9;
    overflow: hidden;
}

.spec-dropdown__native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.spec-dropdown__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #f8fafc;
    color: #1e293b;
    font: inherit;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.spec-dropdown__trigger:hover,
.spec-dropdown__trigger:focus-visible {
    border-color: #1e3a8a;
    box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.2);
    outline: none;
}

.spec-dropdown.is-open .spec-dropdown__trigger,
.spec-dropdown.is-open .spec-dropdown__trigger:hover,
.spec-dropdown.is-open .spec-dropdown__trigger:focus-visible {
    border: 0;
    border-bottom: 1px solid #d8dee8;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.spec-dropdown__trigger.is-placeholder {
    color: #64748b;
}

.spec-dropdown__chev {
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid #1a365d;
    border-bottom: 2px solid #1a365d;
    transform: rotate(45deg);
    transition: transform 0.25s ease;
    flex-shrink: 0;
    margin-top: -0.2rem;
}

.spec-dropdown.is-open .spec-dropdown__chev {
    transform: rotate(-135deg);
    margin-top: 0.2rem;
}

.spec-dropdown__panel {
    margin: 0;
    padding: 0.75rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: grid;
    gap: 0.4rem;
}

.spec-dropdown__panel[hidden] {
    display: none !important;
}

.spec-dropdown__option {
    width: 100%;
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.65rem;
    align-items: start;
    text-align: left;
    margin: 0;
    padding: 0.7rem 0.8rem;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.spec-dropdown__option:hover,
.spec-dropdown__option:focus-visible,
.spec-dropdown__option.is-selected {
    border-left-color: var(--color-accent);
    background: #fff8eb;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    outline: none;
}

.spec-dropdown__name {
    color: #1a365d;
    font-size: 1rem;
    font-weight: 500;
}

.spec-dropdown__desc {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 400;
}

.spec-dropdown__note {
    margin: 0.35rem 0 0;
    padding: 0 0.15rem;
    color: #718096;
    font-size: 0.85rem;
    line-height: 1.4;
    font-style: italic;
}

@media (max-width: 520px) {
    .spec-dropdown__option {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

/* --- MODAL AYUDA (legacy) --- */
.modal-genesis {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    margin-top: 0 !important;
    padding: 0.1rem;
}

.modal-genesis.is-active {
    display: flex;
}

.modal-genesis[hidden] {
    display: none !important;
}

.modal-content-genesis {
    background-color: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: min(86vh, 720px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: modalAyudaSlideIn 0.3s ease-out;
    font-family: "Morales", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@keyframes modalAyudaSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header-genesis {
    background: #1a365d;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-genesis h3 {
    margin: 0;
    font-family: "Morales", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: #cea047;
}

.close-genesis {
    border: 0;
    background: transparent;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    color: #fff;
    transition: opacity 0.3s;
    padding: 0;
}

.close-genesis:hover,
.close-genesis:focus-visible {
    opacity: 0.7;
    outline: none;
}

.modal-body-genesis {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
    background: #f8fafc;
    display: grid;
    gap: 0.65rem;
}

.area-item {
    display: block;
    width: 100%;
    margin: 0;
    border: 0;
    border-left: 4px solid #1a365d;
    padding: 0.85rem 1rem;
    background: #fff;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    font-family: "Morales", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.area-item:hover,
.area-item:focus-visible {
    background: #fff8eb;
    border-left-color: var(--color-accent);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
    outline: none;
}

.area-destacada {
    border-left-color: var(--color-accent);
}

.area-item strong {
    color: #1a365d;
    display: block;
    margin-bottom: 4px;
    font-family: "Morales", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 500;
    font-size: 1.125rem;
}

.area-item p {
    margin: 0;
    font-family: "Morales", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.1rem;
    color: #4a5568;
    font-weight: 400;
    line-height: 1.45;
}

.nota-footer {
    font-family: "Morales", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.85em;
    color: #718096;
    margin-top: 10px;
    border-top: 1px solid #edf2f7;
    padding-top: 9px;
    font-style: italic;
}

.color-azul {
    color: #1a365d !important;
}

/* --- «¿Sobre qué es tu consulta?» (reservar cita): tarjetas de grupo y subdesplegable filtrado --- */
.spec-dropdown[hidden],
.spec-dropdown__option[hidden],
.spec-dropdown__group[hidden],
.grupo-cards[hidden],
.grupo-elegido[hidden] {
    display: none !important;
}

.grupo-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.grupo-card {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin: 0;
    padding: 0.9rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.grupo-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.grupo-card:hover,
.grupo-card:focus-visible {
    border-color: var(--color-accent);
    background: #fff8eb;
    transform: translateY(-1px);
    outline: none;
}

.grupo-card.is-on {
    border-color: var(--color-primary);
    background: #eef3fa;
}

.grupo-card__icon {
    font-size: 1.7rem;
    line-height: 1;
}

.grupo-card__text strong {
    display: block;
    color: #1a365d;
    font-weight: 500;
}

.grupo-card__text small {
    display: block;
    margin-top: 0.15rem;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.4;
}

.grupo-elegido {
    margin: 0 0 0.75rem;
}

.grupo-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: #eef3fa;
    color: #1a365d;
    font-size: 0.9rem;
}

.grupo-chip button {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #b45309;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.grupo-paso {
    margin: 0.7rem 0 0;
    color: #1e293b;
    font-size: 0.95rem;
    font-weight: 500;
}

@media (max-width: 520px) {
    .grupo-cards {
        grid-template-columns: 1fr;
    }
}