/* =============================
   RESET GENERAL
============================= */
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;

    display: flex;
    flex-direction: column;
    min-height: 100vh;

    background: #f5f7fa;
}

/* CONTENIDO PRINCIPAL */
.main-content {
    flex: 1;
    flex-direction: column;
}


/* =============================
   HEADER
============================= */
.main-header {
    background: white;
    box-shadow: 0px 2px 8px rgba(0,0,0,0.08);
}

.header-container {
    max-width: 1200px;
    margin: auto;
    padding: 10px 20px;
    
    display: flex;
    align-items: center;
    justify-content: space-between;

}

.logo-header {
    height: 60px;
}
/* =============================
   BOTÓN HEADER "INICIO"
============================= */

.header-home {
    background: #0CB8B6;
    color: white;

    padding: 6px 14px;
    border-radius: 20px;

    text-decoration: none;
    font-size: 13px;
    font-weight: 500;

    display: inline-block;

    transition: all 0.25s ease;

    box-shadow: 0px 4px 10px rgba(0,0,0,0.1);
}

/* Hover */
.header-home:hover {
    background: #089a98;
    transform: translateY(-1px);
}


/* =============================
   HERO
============================= */
/* =============================
   HERO NUEVO CON IMAGEN
============================= */

.hero {
    background: #f5f7fa;
    padding: clamp(60px, 8vw, 100px) 20px;
}

/* Contenedor principal */
.hero-container {
    max-width: 1200px;
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(20px, 5vw, 60px);
}

/* Texto */
.hero-text h1 {
    font-size: clamp(26px, 5vw, 42px);
    color: #1f2937;
}

.hero-text p {
    font-size: clamp(14px, 2.5vw, 18px);
    margin: 15px 0;
    color: #4b5563;
}

/* Imagen derecha */
.hero-image {
    flex: 1.5;

    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero h1 {
    font-size: 42px;
}

.hero p {
    margin: 15px 0;
}


/* =============================
   BOTONES
============================= */
.btn-primary {
    background: white;
    color: #0CB8B6;
    padding: 14px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0px 6px 15px rgba(0,0,0,0.12);
    border: none;
    font-size: 14px;
    font-family: inherit;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.btn-primary:hover {
    background: #0CB8B6;
    color: white;

    transform: translateY(-2px);

    box-shadow: 0px 10px 25px rgba(0,0,0,0.2);
}

.btn-primary:active {
    transform: translateY(0px);

    box-shadow: 0px 4px 10px rgba(0,0,0,0.15);
}

/* =============================
   SERVICIOS
============================= */
.services {
    padding: 60px 20px;
    text-align: center;
    background: white;
}

.section-title {
    margin-bottom: 40px;
    font-size: 28px;
}

.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.service-card {
    background: #f5f7fa;
    padding: 25px;
    border-radius: 14px;

    box-shadow: 0px 8px 20px rgba(0,0,0,0.08); 

    transition: all 0.3s ease;
}

/* Hover moderno */
.service-card:hover {
    transform: translateY(-6px);

    box-shadow: 0px 12px 30px rgba(0,0,0,0.15);
}

.service-card img {
    height: 50px;
}


/* =============================
   DOCTOR IMAGE PREMIUM
============================= */
.doctor {
    padding: 80px 20px;
    background: #f5f7fa;
}

.doctor-container {
    max-width: 1100px;
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.doctor-frame {
    background: #0CB8B6;
    padding: 18px;
    border-radius: 24px;

    box-shadow: 14px 14px 0px rgba(0,0,0,0.15);
    position: relative;
}

.doctor-frame::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 16px;
    background: white;
    z-index: 0;
}

.doctor-frame img {
    width: 320px;
    border-radius: 16px;
    display: block;
    position: relative;
    z-index: 1;
}

.doctor-info {
    max-width: 520px;
}


/* =============================
   PROCESO
============================= */
.process {
    padding: 60px 20px;
    text-align: center;
}

.process-container {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.step span {
    background: #0CB8B6;
    color: white;

    width: 60px;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    font-size: 20px;

    box-shadow: 0px 6px 15px rgba(0,0,0,0.2);

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.step p {
    margin: 0;
}


/* =============================
   CTA
============================= */
.cta {
    padding: clamp(50px, 6vw, 80px) 20px;
    text-align: center;
    background: #d7d6d2;
}


.cta-content {
    margin-top: 40px;
}

.cta-content h3 {
    margin-bottom: 20px;
    font-size: clamp(18px, 3vw, 22px);
}

/* Ajuste pasos dentro de CTA */
.cta .process-container {
    margin-top: 20px;
}


/* =============================
   FOOTER
============================= */
.main-footer {
    background: #0CB8B6;
    color: white;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;

    display: flex;
    justify-content: space-between;
}

.footer-left a {
    color: white;
}


/* =============================
   EN CONSTRUCCIÓN
============================= */
.construction {
    flex: 1;

    /* ✅ hace el bloque más alto */
    min-height: calc(100vh - 120px);

    background: linear-gradient(135deg, #0CB8B6, #089a98);

    display: flex;
    align-items: center;
    justify-content: center;

    /* ✅ MÁS ESPACIO VERTICAL */
    padding: 80px 20px;
}

.construction-box {
    background: white;
    padding: 45px;
    border-radius: 16px;

    box-shadow: 0px 10px 25px rgba(0,0,0,0.12);
    max-width: 420px;

    text-align: center;
}


.construction-logo {
    height: 130px;   
    max-width: 100%;
    display: block;
    margin: 0 auto 20px auto;
}

/* =============================
   RESPONSIVE
============================= */
@media (max-width: 768px) {

    .doctor-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .doctor-frame img {
        width: 260px;
    }

    .process-container {
        flex-direction: column;
        gap: 25px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

}

/* =============================
   ICONOS SPRITE
============================= */

.icon {
    width: 80px;
    height: 80px;

    margin: 0 auto 15px auto;

    background-image: url("img/service-1.png");
    background-repeat: no-repeat;
    background-size: 500px; /* ajusta según tamaño real */
}


.icon-rx {
    background-position:-410px -100px;
}

.icon-endo {
    background-position: -105px -355px;
}

.icon-bleach {
    background-position: -315px -355px;
}

.icon-resina {
    background-position: -10px -355px;
}

.icon-protesis {
    background-position: -210px -265px;
}

.icon-peridoncia {
    background-position: -410px -355px;
}

.icon-ninos {
    background-position: -310px -265px;
}

.icon-carillas {
    background-position: -210px -5px;
}

.icon-extract {
    background-position: -10px -100px;
}

.icon-cirugias {
    background-position: -310px -100px;
}

.icon-clean {
    background-position: -310px -355px;
}

.icon-value {
    background-position: -10px -265px;
}

/* =============================
   ANIMACIONES BASE
============================= */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

/* cuando aparece */
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* delay opcional */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.5s; }


/* =============================
   ANIMACIÓN HOVER ICONOS
============================= */

.service-card:hover .icon {
    transform: scale(1.1);
}

/* icono animado */
.icon {
    transition: transform 0.3s ease;
}


/* =============================
   BOTONES MÁS PROFESIONALES
============================= */

.btn-primary {
    position: relative;
    overflow: hidden;
}

/* efecto luz */
.btn-primary::after {
    content: "";
    position: absolute;

    width: 120%;
    height: 120%;

    background: rgba(255,255,255,0.2);

    top: -100%;
    left: -100%;

    transform: rotate(25deg);
    transition: 0.5s;
}

.btn-primary:hover::after {
    top: 0;
    left: 0;
}

/* =====================================
   RESPONSIVE MEJORADO (NO ROMPE NADA)
   Agregar al FINAL del archivo
===================================== */

/* ✅ Tipografía fluida */
.hero h1 {
    font-size: clamp(26px, 5vw, 42px);
}

.hero p {
    font-size: clamp(14px, 2.5vw, 18px);
}

.section-title {
    font-size: clamp(20px, 4vw, 28px);
}

.service-card h3 {
    font-size: clamp(16px, 3vw, 20px);
}

.service-card p {
    font-size: clamp(13px, 2.5vw, 15px);
}

.doctor-info h2 {
    font-size: clamp(20px, 4vw, 28px);
}

.step p {
    font-size: clamp(13px, 3vw, 15px);
}


/* ✅ Espaciado dinámico */
.hero {
    padding: clamp(60px, 8vw, 100px) 20px;
}

.services,
.doctor,
.process,
.cta {
    padding: clamp(40px, 6vw, 70px) 20px;
}


/* ✅ Cards más cómodas en móvil */
.service-card {
    padding: clamp(15px, 4vw, 25px);
}


/* ✅ Imagen del doctor adaptable */
.doctor-frame img {
    width: clamp(220px, 40vw, 320px);
    max-width: 100%;
}


/* ✅ ICONOS NO SE ROMPEN */
.icon img {
    width: clamp(50px, 10vw, 70px);
}


/* =====================================
   BREAKPOINT TABLET
===================================== */
@media (max-width: 768px) {

    /* ✅ Doctor en columna */
    .doctor-container {
        flex-direction: column;
        text-align: center;
    }

    /* ✅ Pasos en columna */
    .process-container {
        flex-direction: column;
        gap: 25px;
    }

    /* ✅ Footer vertical */
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

}


/* =====================================
   BREAKPOINT MÓVIL REAL
===================================== */
@media (max-width: 480px) {

    /* ✅ Hero compactado */
    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 14px;
    }

    /* ✅ Servicios 1 columna */
    .services-container {
        grid-template-columns: 1fr;
    }

    /* ✅ Espaciado más relajado */
    .service-card {
        margin-bottom: 10px;
    }

    /* ✅ Doctor mejor espaciado */
    .doctor-container {
        gap: 20px;
    }

    /* ✅ CTA sin overflow */
    .btn-primary {
        padding: 12px 22px;
        font-size: 14px;
    }

}

@media (max-width: 768px) {

    .hero-container {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
    }

}

/* =============================
   HERO CARD (NUEVO)
============================= */

.hero {
    background: #0CB8B6;
    padding: clamp(40px, 6vw, 80px) 20px;
}

/* Card blanca */
.hero-card {
    max-width: 1200px;
    margin: auto;

    background: white;
    border-radius: 20px;

    padding: clamp(30px, 5vw, 50px);

    box-shadow: 0px 15px 40px rgba(0,0,0,0.15);
}

/* Contenido interno */
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(20px, 5vw, 50px);
}

/* Texto */
.hero-text {
    max-width: 520px;
}

.hero-text h1 {
    font-size: clamp(26px, 5vw, 40px);
    color: #1f2937;
}

.hero-text p {
    font-size: clamp(14px, 2.5vw, 18px);
    margin: 15px 0;
    color: #4b5563;
}

/* Imagen */
.hero-image img {
    width: clamp(350px, 55vw, 650px);
    max-width: 100%;
    display: block;
}

/* =============================
   FORMULARIO MODERNO
============================= */

.form-section {
    background: #D7D6D2;

    min-height: auto;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: clamp(30px, 5vw, 60px) 20px;
}


/* Card */
.form-card {
    background: white;

    width: 100%;
    max-width: 380px;

    padding: 30px;
    border-radius: 18px;

    box-shadow: 0px 15px 40px rgba(0,0,0,0.15);

    text-align: center;
}

/* Títulos */
.form-card h2 {
    margin-bottom: 10px;
    color: #086b69;
}

.form-subtitle {
    margin-bottom: 20px;
    color: #6b7280;
}

/* Inputs */
.form-card input {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
}

.form-card input:focus {
    border-color: #0c8a88;
    box-shadow: 0px 12px 30px rgba(31, 30, 30, 0.12);
}

input[type="date"] {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 12px;
    min-height: 58px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
}

/* =====================================
   DATE PICKER UNIFICADO
===================================== */

.form-card input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    font-family: inherit;
    background-color: #f5f7fa;
    color: #2b3646;
    outline: none;
    transition: all 0.2s ease;
    min-height: 50px;
    appearance: none;
    -webkit-appearance: none;
}

.form-card input[type="date"]:focus {
    border-color: #07605f;
    box-shadow: 0px 0px 0px 2px rgba(12,184,182,0.2);
}

/* Checkbox */
.privacy-label {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 13px;
    text-align: left;

    margin-bottom: 20px;
}

.privacy-label input {
    width: auto;
    margin: 0;
}

.privacy-label a {
    color: #0d9895;
    text-decoration: none;
}

.privacy-label a:hover {
    text-decoration: underline;
}

/* texto */
.privacy-label span {
    line-height: 1.3;
}

/* Botón */
.form-card button {
    width: 100%;
    max-width: 100%;

    box-sizing: border-box;
}

/* =============================
   RESPONSIVE
============================= */

@media (max-width: 480px) {

    .form-card {
        padding: 20px;
    }

}

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.4);

    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}


.modal-card {
    background: white;

    width: 90%;
    max-width: 420px;

    padding: 25px;
    border-radius: 16px;

    box-shadow: 0px 20px 40px rgba(0,0,0,0.25);

    text-align: center;
}

/* Título */
.modal-card h3 {
    color: #0CB8B6;
    margin-bottom: 15px;
}

/* Texto */
.modal-card p {
    font-size: 14px;
    color: #4b5563;

    margin-bottom: 20px;
    line-height: 1.5;
}

/* Botón */
.modal-close {
    width: 100%;
}

/* =============================
   AGENDA
============================= */

.agenda-section {
    background: #D7D6D2;
    padding: clamp(40px, 6vw, 80px) 20px;
}

.agenda-title {
    text-align: center;
    margin-bottom: 30px;
    color: #0CB8B6;
}

/* GRID */
.agenda-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;

    max-width: 1000px;
    margin: auto;
}

/* CARD */
.agenda-card {
    max-width: 1100px; 
    margin: 0 auto;
    padding: 25px;
    border-radius: 20px;
    background: white;
}

/* CALENDAR */
.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);

    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-grid div {
    padding: 10px;
    text-align: center;

    border-radius: 8px;
    background: #f5f7fa;

    cursor: pointer;
}

/* HOVER */
.calendar-grid div:hover {
    background: #bdeae0;
}

/* SELECCIONADO */
.calendar-grid .selected {
    background: #0CB8B6;
    color: white;
}

/* HORARIOS */
.time-slot {
    padding: 12px;
    margin-bottom: 10px;

    border: 1px solid #8a8b8c;
    border-radius: 10px;

    text-align: center;
    cursor: pointer;

    transition: 0.2s;
}

.time-slot:hover {
    border-color: #0CB8B6;
    background: #e6fffa;
}

/* =============================
   RESPONSIVE
============================= */

@media (max-width: 768px) {

    .agenda-grid {
        grid-template-columns: 1fr;
    }

}
/* =============================
   AGENDA CARD UNIFICADA
============================= */

.agenda-section {
    background: #D7D6D2;
    padding: clamp(40px, 6vw, 80px) 20px;

    display: flex;
    justify-content: center;
}

/* Card igual al formulario */
.agenda-card {
    background: white;

    width: 100%;
    max-width: 1200px;

    border-radius: 18px;
    padding: 25px;

    box-shadow: 0px 15px 40px rgba(0,0,0,0.15);

    text-align: center;
}

/* Header */
.agenda-card h2 {
    color: #07605e;
    margin-bottom: 8px;
}

.agenda-subtitle {
    margin-bottom: 20px;
    color: #6b7280;
}

/* CALENDARIO */
.calendar-box {
    margin-bottom: 20px;
}

/* NAV */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 10px;
}

.nav-btn {
    background: #f5f7fa;
    border: none;
    border-radius: 8px;

    width: 32px;
    height: 32px;

    cursor: pointer;
}

.nav-btn:hover {
    background: #e6fffa;
}

/* HEADER DÍAS */
.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);

    font-size: 12px;
    color: #6b7280;

    margin-bottom: 8px;
}

/* GRID */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-grid div {
    padding: 10px;

    border-radius: 8px;
    background: #f5f7fa;

    text-align: center;
    cursor: pointer;

    font-size: 12px;
}

/* Hover días */
.calendar-grid div:hover {
    background: #ccfbf1;
}

/* Día seleccionado */
.calendar-grid .selected {
    background: #0CB8B6;
    color: white;
}

/* HORARIO */
.time-box {
    text-align: left;
    margin-bottom: 20px;
}

.time-box label {
    font-size: 13px;
    display: block;
    margin-bottom: 6px;
}

.time-box select {
    width: 100%;
    padding: 10px;

    border-radius: 10px;
    border: 1px solid #d1d5db;

    font-size: 14px;
}

/* RESPONSIVE */
@media (max-width: 480px) {

    .calendar-grid div {
        padding: 8px;
        font-size: 11px;
    }

}

.calendar-grid .disabled {
    background: #9ca3af; /* ✅ gris más oscuro */
    color: white;
    cursor: not-allowed;
}

.calendar-grid .disabled:hover {
    background: #9ca3af; /* ✅ no cambia en hover */
}

/* =============================
   VALIDACIÓN VISUAL
============================= */

.input-group {
    position: relative;
}

/* ERROR INPUT */
.input-error {
    border-color: #ef4444 !important;
}

/* TOOLTIP */
.error-tooltip {
    position: absolute;
    top: -45px;
    left: 10px;

    background: white;
    border-radius: 8px;

    padding: 8px 12px;

    font-size: 13px;

    box-shadow: 0px 10px 20px rgba(0,0,0,0.15);

    display: none;
}

/* Flechita */
.error-tooltip::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 15px;

    width: 10px;
    height: 10px;

    background: white;
    transform: rotate(45deg);
}
/* =============================
   CONFIRMACIÓN
============================= */

.confirm-section {
    background: #D7D6D2;

    display: flex;
    justify-content: center;

    padding: clamp(40px, 6vw, 80px) 20px;
}

/* Card */
.confirm-card {
    background: white;

    width: 100%;
    max-width: 420px;

    border-radius: 18px;
    padding: 25px;

    box-shadow: 0px 15px 40px rgba(0,0,0,0.15);

    text-align: center;
}

/* Header */
.confirm-card h2 {
    color: #07605e;
    margin-bottom: 8px;
}

.confirm-subtitle {
    margin-bottom: 20px;
    color: #6b7280;
}

/* Datos */
.confirm-data {
    text-align: left;
    margin-bottom: 25px;
}

.confirm-row {
    display: flex;
    justify-content: space-between;

    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;

    font-size: 14px;
}

.confirm-row .label {
    color: #6b7280;
    font-weight: 500;
}

/* Destacar fecha */
.confirm-row.highlight {
    color: #0CB8B6;
    font-weight: 600;
}

/* =============================
   ACCIONES CONFIRMACIÓN
============================= */

.confirm-actions {
    display: flex;
    justify-content: center; 
    gap: 15px; 
    margin-top: 20px;
}

.confirm-actions button {
    min-width: 140px; 
    flex: 0;
}

/* Botón secundario */
.btn-secondary {
    flex: 1;

    border: 2px solid #0CB8B6;
    background: white;
    color: #0CB8B6;

    padding: 12px;
    border-radius: 30px;

    cursor: pointer;

    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #0CB8B6;
    color: white;
}

/* Timer */
.confirm-timer {
    margin-top: 15px;
    font-size: 14px;
    color: #6b7280;
}

.confirm-timer-time {
    margin-top: 15px;
    font-size: 15px;
    color: #07605e;
}
/* =====================================
   HARD FIX MOBILE IOS / ANDROID
===================================== */

/* ✅ Base universal */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ✅ iOS fix tipografía */
html {
    -webkit-text-size-adjust: 100%;
}

/* ✅ Evita escalado raro en iOS */
body {
    overflow-x: hidden;
}

/* =====================================
   CALENDAR FIX (CRÍTICO)
===================================== */

.calendar-box {
    width: 100%;
}

.calendar-header,
.calendar-grid {
    width: 100%;
    max-width: 100%;
}

/* ✅ FIX principal iOS */
.calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

/* ✅ evita colapso en Safari */
.calendar-grid div {
    min-width: 0;
    flex-shrink: 0;
}

/* =====================================
   CARD FIX MOBILE
===================================== */

.confirm-card,
.form-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* =====================================
   BUTTON FIX MOBILE
===================================== */

.confirm-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* ✅ clave */
    gap: 12px;
}

.confirm-actions button {
    min-width: 130px;
}

/* =====================================
   SELECT FIX iOS
===================================== */

select {
    appearance: none;
    -webkit-appearance: none;
}

/* =====================================
   MEDIA QUERIES REALES
===================================== */

/* 📱 MOBILE TOP (≤480px) */
@media (max-width: 480px) {

    .main-content {
        padding: 0;
    }

    .agenda-section,
    .confirm-section {
        padding: 20px 10px;
    }

    .agenda-card,
    .confirm-card {
        padding: 18px;
    }

    .calendar-grid {
        gap: 4px;
    }

    .calendar-grid div {
        padding: 8px;
        font-size: 11px;
    }

    .nav-btn {
        width: 28px;
        height: 28px;
    }

    .confirm-actions {
        flex-direction: column;
        align-items: center;
    }

    .confirm-actions button {
        width: 100%;
        max-width: 280px;
    }
}

/* 📱 TABLET (≤768px) */
@media (max-width: 768px) {

    .calendar-grid {
        gap: 5px;
    }

    .agenda-card,
    .confirm-card {
        max-width: 90%;
    }

}

/* =====================================
   SAFARI GRID FALLBACK
===================================== */

/* Si iOS falla con grid, usa flex fallback */
@supports not (display: grid) {

    .calendar-grid {
        display: flex;
        flex-wrap: wrap;
    }

    .calendar-grid div {
        width: calc(100% / 7);
    }
}

/* =====================================
   EXTRA SAFE: FORZAR RENDER
===================================== */

.calendar-grid,
.calendar-header,
.agenda-card {
    transform: translateZ(0);
}

/* =============================
   NOTA FORMULARIO
============================= */

.form-note {
    font-size: 13px;
    color: #6b7280;

    text-align: left;
    margin-bottom: 10px;
}

/* SELECT */
.form-card select {
    width: 100%;
    padding: 12px;

    border-radius: 10px;
    border: 1px solid #d1d5db;

    font-size: 14px;

    margin-bottom: 12px;

    outline: none;
    transition: 0.2s;
}

.form-card select:focus {
    border-color: #0CB8B6;
    box-shadow: 0px 0px 0px 2px rgba(12,184,182,0.2);
}

/* =============================
   SELECT UNIFICADO (EDAD)
============================= */

.form-card select {
    width: 100%;
    box-sizing: border-box;

    padding: 12px;
    margin-bottom: 12px;

    border-radius: 10px;
    border: 1px solid #d1d5db;

    font-size: 14px;
    font-family: inherit;

    background-color: #f5f7fa; /* ✅ igual tono que inputs */
    color: #2b3646;

    outline: none;

    transition: all 0.2s ease;

    /* ✅ Compatibilidad móvil */
    appearance: none;
    -webkit-appearance: none;
}

/* FOCUS */
.form-card select:focus {
    border-color: #07605f;
    box-shadow: 0px 0px 0px 2px rgba(12,184,182,0.2);
}

/* ICONO FLECHA CUSTOM */
.form-card .input-group select {
    background-image: url("data:image/svg+xml;utf8,<svg fill='%236b7280' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;

    padding-right: 40px; /* espacio para flecha */
}

/* =============================
   AJUSTE LEYENDA EDAD
============================= */

.form-note {
    margin-top: 4px;    /* ✅ más pegado al select */
    margin-bottom: 16px; /* ✅ separa del siguiente campo */
}

/* =============================
   MENU HEADER (SOLO INDEX)
============================= */

.header-nav {
    display: flex;
    gap: 25px;
}

.header-nav a {
    text-decoration: none;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;

    transition: all 0.3s ease;
}

/* Hover elegante */
.header-nav a:hover {
    color: #0CB8B6;
}

/* =============================
   RESPONSIVE MENU
============================= */
@media (max-width: 768px) {

    .header-nav {
        display: none; /* ✅ escondido en móvil */
    }

}

html {
    scroll-behavior: smooth;
}

/* =============================
   ADMIN NAV (IGUAL INDEX)
============================= */

.admin-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;

    padding: 15px 0;
}

/* links */
.admin-nav a {
    text-decoration: none;
    color: #4b5563;
    font-size: 15px;
    font-weight: 500;

    transition: color 0.3s ease;
}

/* hover */
.admin-nav a:hover {
    color: #0CB8B6;
}

/* =============================
   DASHBOARD INDICADORES
============================= */

.admin-summary {
    display: grid;
    grid-template-columns: repeat(5, 240px);
    justify-content: center;
    gap: 20px;
    margin: 35px 0;
}

.admin-box {
    border-radius: 16px;
    padding: 20px;
    color: white;
    text-align: center;
    box-shadow: 0px 8px 20px rgba(0,0,0,0.12);
    min-height: 160px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.admin-box h3 {
    font-size: 40px;
    margin: 0 0 12px 0;
    font-weight: 700;
    text-align: center;
}

.admin-box p {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
    line-height: 1.4;
    min-height: 42px;
}

/* Colores */
.admin-box-primary {
    background: #0CB8B6;
}

.admin-box-warning {
    background: #f59e0b;
}

.admin-box-neutral {
    background: #64748b;
}

/* Lista de próximas citas */
.lista-citas {
    margin: 18px 0 0 0;
    padding-left: 18px;
    font-size: 16px;
}

.lista-citas li {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-summary {
        grid-template-columns: 1fr;
    }
}

/* =============================
   DASHBOARD - INDICADORES
============================= */

.admin-summary {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin: 25px 0 30px 0;
    align-items: stretch;
}

.admin-box {
    border-radius: 14px;
    padding: 20px;
    color: white;
    text-align: center;
    box-shadow: 0px 8px 20px rgba(0,0,0,0.12);
    height: 140px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.admin-box h3 {
    font-size: 32px;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.admin-box p {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

/* Colores */
.admin-box-primary {
    background: #14b8b6; /* turquesa */
}

.admin-box-warning {
    background: #f59e0b; /* naranja */
}

.admin-box-success {
    background: #16a34a; /* verde */
}

.admin-box-danger {
    background: #ef4444; /* rojo */
}

.admin-box-secondary {
    background: #b1b2b3; /* gris */
    color:#0f172a;
}

/* Lista de próximas citas */
.lista-citas {
    margin: 18px 0 0 0;
    padding-left: 20px;
}

.lista-citas li {
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 18px;
}

@media (max-width: 992px) {
    .admin-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .admin-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .admin-summary {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   CITAS ADMINISTRACIÓN
========================================================= */
        .citas-wrapper {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            width: 100%;
            box-sizing: border-box;
        }

        .week-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 20px;
            margin-bottom: 20px;
        }

        .week-range {
            display: inline-block;
            padding: 12px 28px;
            background: linear-gradient(
                135deg,
                #0CB8B6,
                #0d9997
            );
            color: #ffffff;
            font-weight: 700;
            border-radius: 999px;
            box-shadow: 0 8px 18px rgba(0,0,0,0.15);
            text-align: center;
        }

        .calendar-week {
            max-height: 80vh;
            overflow-x: auto;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            background: #fff;
            border-radius: 18px;
            box-shadow: 0px 15px 40px rgba(0,0,0,0.12);
            padding: 16px;
            margin-bottom: 24px;
        }

        .calendar-week table {
            width: 100%;
            border-collapse: collapse;
            min-width: 1100px;
        }

        .calendar-week th,
        .calendar-week td {
            border: 1px solid #6b7280;
            vertical-align: top;
        }

        .calendar-week th {
            position: sticky;
            top: 0;
            z-index: 300;
            background: #e1e2e3;
            padding: 10px;
            text-align: center;
            font-size: 14px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.08);
        }

        .hour-col {
            position: sticky;
            left: 0;
            background: #103c4a;
            color: #ffffff;
            font-weight: 700;
            border-right: 2px solid #334155;
            z-index: 200;
            width: 90px;
            text-align: center;
            font-weight: 600;
            font-size: 13px;
        }

        .calendar-week thead .hour-col {
            position: sticky;
            top: 0;
            left: 0;
            z-index: 400;
            background: linear-gradient(
                180deg,
                #1e293b,
                #0f172a
            );
            color: #ffffff;
        }

        .calendar-week thead th {
            position: sticky;
            top: 0;
            z-index: 300;
            background: linear-gradient(
                180deg,
                #64748b,
                #475569
            );
            color: #ffffff;
            font-weight: 700;
            box-shadow: 0 2px 8px rgba(0,0,0,.15);
            border-bottom: 3px solid #334155;
        }

        .time-cell {
            background: #ffffff;
            transition: background .2s ease;
            height: 80px;
            padding: 6px;
        }

        .calendar-week td:hover {
            background: #f0fdfa;
        }

        .cita-card-mini {
            background: #0CB8B6;
            color: #fff;
            border-radius: 8px;
            padding: 6px 8px;
            margin-bottom: 6px;
            font-size: 12px;
            line-height: 1.35;
            box-shadow: 0 4px 10px rgba(0,0,0,.12);
        }

        .cita-card-mini .estatus {
            display: inline-block;
            margin-top: 4px;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 6px;
            border-radius: 10px;
            background: rgba(255,255,255,.18);
        }

        .cita-card-mini .acciones {
            margin-top: 6px;
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .btn-mini {
            border: none;
            border-radius: 6px;
            padding: 4px 8px;
            font-size: 11px;
            cursor: pointer;
        }

        .btn-mini-edit {
            background: #fef3c7;
            color: #92400e;
        }

        .btn-mini-cancel {
            background: #fee2e2;
            color: #991b1b;
        }

        .form-admin-card {
            background: #fff;
            border-radius: 20px;
            box-shadow: 0px 15px 40px rgba(0,0,0,0.12);
            padding: 35px;
            max-width: 1200px;
            margin: 0 auto;
        }

        .form-admin-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(300px,1fr));
            gap: 24px 40px;
        }

        .form-admin-grid label {
            display: block;
            margin-bottom: 6px;
            font-size: 14px;
            font-weight: 600;
            color: #374151;
        }

        .form-admin-grid input,
        .form-admin-grid select,
        .form-admin-grid textarea {

            width: 100%;
            box-sizing: border-box;

            padding: 12px 14px;

            border: 1px solid #d1d5db;
            border-radius: 10px;

            font-size: 14px;
            font-family: inherit;

            background: #f9fafb;

            transition: all .2s ease;
        }

        .form-admin-grid input:focus,
        .form-admin-grid select:focus,
        .form-admin-grid textarea:focus {

            outline: none;

            border-color: #0CB8B6;

            box-shadow: 0 0 0 3px rgba(12,184,182,.15);

            background: #fff;
        }

        .form-admin-grid .full {
            grid-column: 1 / -1;
        }

        .flash-ok {
            background: #dcfce7;
            color: #166534;
            padding: 12px 14px;
            border-radius: 10px;
            margin-bottom: 16px;
        }

        .flash-error {
            background: #fee2e2;
            color: #991b1b;
            padding: 12px 14px;
            border-radius: 10px;
            margin-bottom: 16px;
        }

        .status-confirmada { background: #54c09e !important; }
        .status-atendida { background: #06a340 !important; }
        .status-pendiente { background: #d2af31 !important; }
        .status-cancelada { background: #a71c1c !important; }
        .status-no-show { background: #788a8d !important; }

        @media (max-width: 768px) {
            .form-admin-grid {
                grid-template-columns: 1fr;
            }

            .week-nav {
                flex-direction: column;
                align-items: stretch;
            }
        }

/* =========================================================
   CITAS - MOBILE
========================================================= */

@media (max-width: 768px) {

   .citas-wrapper {
        padding: 10px;
    }

    .week-nav {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .week-range {
        font-size: 20px;
    }

    .calendar-week {
        padding: 10px;
    }

    .calendar-week table {
        min-width: 900px;
    }

   .form-admin-card {
        padding: 20px;
    }

    .form-admin-grid{
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .admin-form-actions {
        flex-direction: column;
        align-items: center;
    }

    .admin-form-actions button,
    .admin-form-actions a {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .week-nav .btn-primary {
        width: 100%;
        text-align:center;
    }

}

@media (max-width:768px) {

    .cita-card-mini {
        font-size: 11px;
    }

    .cita-card-mini .acciones {
        flex-direction: column;
    }

    .btn-mini {
        width: 100%;
    }

}

@media (max-width: 768px) {

    .form-admin-grid input,
    .form-admin-grid select,
    .form-admin-grid textarea {
        font-size: 16px;
    }

}

/* ===================================
   RECETA
=================================== */

.receta-wrapper{
    max-width:1200px;
    margin:0 auto;
    padding:20px;
}

.receta-card{
    background:#fff;
    border-radius:18px;
    padding:30px;
    box-shadow:0 15px 40px rgba(0,0,0,.12);
}

.receta-section{
    margin-bottom:35px;
}

.receta-section h3{
    color:#07605e;
    border-bottom:2px solid #0CB8B6;
    padding-bottom:10px;
    margin-bottom:20px;
}

.receta-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:18px 30px;
}

.receta-grid .full{
    grid-column:1 / -1;
}

.receta-grid label{
    display:block;
    margin-bottom:6px;
    font-weight:600;
}

.receta-grid input,
.receta-grid textarea,
.receta-grid select{
    width:100%;
    box-sizing:border-box;
    padding:12px;
    border:1px solid #d1d5db;
    border-radius:10px;
}

.receta-grid textarea{
    min-height:100px;
    resize:vertical;
}

.medicamento-card{
    background:#f9fafb;
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:20px;
    margin-bottom:20px;
}

.btn-add-medicamento{
    margin-top:10px;
}

.receta-actions{
    display:flex;
    justify-content:center;
    gap:15px;
    margin-top:25px;
}

@media(max-width:768px){

    .receta-grid{
        grid-template-columns:1fr;
    }

    .receta-actions{
        flex-direction:column;
    }

}

/* =====================================
   RECETA - DATOS DE CITA
===================================== */

.receta-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 25px 0 35px 0;
}

.receta-info-item {
    background: #f5f7fa;
    border-left: 4px solid #0CB8B6;
    border-radius: 10px;
    padding: 12px 18px;
    min-width: 180px;
}

.receta-info-label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.receta-info-value {
    font-size: 16px;
    font-weight: 600;
    color: #07605e;
}

@media (max-width: 768px) {

    .receta-info {
        flex-direction: column;
    }

    .receta-info-item {
        min-width: auto;
    }

}

.btn-mini-receta {
    background: #dbeafe;
    color: #1d4ed8;
}

.btn-mini-receta-view {
    background: #dcfce7;
    color: #166534;
}

.titulo-receta-nueva {
    color: #089492;
    text-align: center;
}

.titulo-receta-consulta {
    color: #eba225;
    text-align: center;
}

.cita-dashboard-normal {
    margin-bottom: 10px;
}

.cita-dashboard-curso {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #dcfce7;
    border-left: 4px solid #16a34a;
}

.badge-en-curso {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 20px;
    background: #16a34a;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.btn-mini-delete {
    background: #360505;
    color: #ffffff;
}

/* Placeholder en color institucional */
.receta-grid input::placeholder,
.receta-grid textarea::placeholder {

    color: #0CB8B6;

    opacity: 1;
}

.receta-grid input::-webkit-input-placeholder,
.receta-grid textarea::-webkit-input-placeholder {
    color: #0CB8B6;
}

.receta-grid input::-moz-placeholder,
.receta-grid textarea::-moz-placeholder {
    color: #0CB8B6;
}

.receta-grid input:-ms-input-placeholder,
.receta-grid textarea:-ms-input-placeholder {
    color: #0CB8B6;
}

input[readonly],
textarea[readonly] {
    background-color: #e5e7ebd6;
    color: #374151;
    cursor: not-allowed;
    border-color: #cbd5e1;
}

.medicamento-card{

    position: relative;
}

.btn-remove-medicamento{

    position:absolute;

    top:10px;

    right:10px;

    width:24px;

    height:24px;

    border:none;

    border-radius:50%;

    background:#cbd5e1;

    color:#475569;

    font-size:16px;

    font-weight:bold;

    cursor:pointer;

    display:flex;

    align-items:center;

    justify-content:center;

    line-height:1;
}

.btn-remove-medicamento:hover{

    background:#94a3b8;

    color:#ffffff;
}

        .aviso-privacidad {

            max-width: 950px;
            text-align: left;
            margin: 0 auto;

            line-height: 1.8;

            color: #334155;
        }

        .aviso-privacidad h1 {

            color: #0CB8B6;

            text-align: center;

            margin-bottom: 10px;
        }

        .aviso-fecha {

            text-align: center;

            color: #64748b;

            margin-bottom: 30px;

            font-style: italic;
        }

        .aviso-privacidad h2 {

            color: #07605e;

            margin-top: 35px;

            border-bottom: 2px solid #0CB8B6;

            padding-bottom: 8px;
        }

        .aviso-privacidad p {

            text-align: justify;
        }

        .aviso-privacidad ul {

            padding-left: 25px;
        }

        .aviso-privacidad li {

            margin-bottom: 8px;
        }

        .aviso-resumen {

            background: #ecfeff;

            border-left: 5px solid #0CB8B6;

            padding: 20px;

            border-radius: 8px;

            margin-bottom: 30px;
        }

.dashboard-section-title {
    margin-top: 10px;
    margin-bottom: 20px;
    color: #0f172a;
}

.dashboard-tabs{
    display:flex;
    gap:10px;
    margin:25px 0;
}

.dashboard-tab{
    border:none;
    padding:10px 18px;
    border-radius:10px;
    cursor:pointer;
}

.dashboard-tab.active{
    background:#0CB8B6;
    color:white;
}

.dashboard-content{
    display:none;
}

.dashboard-content.active{
    display:block;
}

/* =============================
   DASHBOARD - PESTAÑAS SUPERIORES
============================= */

.dashboard-card {
    position: relative;
    overflow: visible;
    margin-top: 22px;
    padding-top: 32px;
    border-top-left-radius: 0;
}

/* Contenedor que sobresale sobre la card */
.dashboard-tabs {
    position: absolute;
    top: -42px;
    left:18px;

    display: flex;
    align-items: flex-end;
    gap: 0;

    width: auto;
    max-width: calc(100% - 32px);

    margin: 0;
    padding: 0;

    overflow-x: auto;
    overflow-y: visible;

    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;

    z-index: 10;
}

.dashboard-card::before {
    content: '';

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 2px;

    background: #0CB8B6;
}

.dashboard-tabs::-webkit-scrollbar {
    display: none;
}

/* Pestañas inactivas */
.dashboard-tab {
    min-width: 140px;
    height: 42px;

    padding: 0 22px;

    border: 2px solid #0CB8B6;
    border-bottom: none;
    border-radius: 12px 12px 0 0;

    background: #8edbd9;
    color: #164e4d;

    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    white-space: nowrap;

    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

/* Interacción de pestañas inactivas */
.dashboard-tab:hover {
    background: #5fcecb;
    color: #083d3c;
    transform: translateY(-2px);
}

/* Accesibilidad con teclado */
.dashboard-tab:focus-visible {
    outline: 3px solid rgba(12, 184, 182, 0.3);
    outline-offset: 3px;
}

/* Pestaña activa integrada con la card */
.dashboard-tab.active {
    height: 46px;

    background: #ffffff;
    color: #0b6664;
    border-bottom: 2px solid #ffffff;
    border-color: #0CB8B6;
    border-bottom-color: #ffffff;

    transform: translateY(2px);

    box-shadow:none;

    position: relative;
    z-index: 6;
}

/* Evita que el hover mueva la pestaña activa */
.dashboard-tab.active:hover {
    background: #ffffff;
    color: #0b6664;
    transform: translateY(2px);
}

/* Contenido de cada pestaña */
.dashboard-content {
    display: none;
    width: 100%;
}

/* Contenido visible */
.dashboard-content.active {
    display: block;
    animation: dashboardTabFadeIn 0.3s ease;
}

@keyframes dashboardTabFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================
   DASHBOARD TABS - TABLET
============================= */

@media (max-width: 768px) {

    .dashboard-card {
        margin-top: 58px;
        padding-top: 38px;
    }

    .dashboard-tabs {
        top: -50px;
        left: 0;
        max-width: 100%;
        gap: 3px;
    }

    .dashboard-tab {
        min-width: 118px;
        height: 50px;

        padding: 0 20px;

        border-radius: 12px 12px 0 0;

        font-size: 15px;
    }

    .dashboard-tab.active {
        height: 56px;
    }

}

/* =============================
   DASHBOARD TABS - MOVIL
============================= */

@media (max-width: 480px) {

    .dashboard-card {
        margin-top: 52px;
        padding-top: 32px;
        border-top-right-radius: 14px;
    }

    .dashboard-tabs {
        top: -46px;
        width: 100%;
        max-width: 100%;
    }

    .dashboard-tab {
        flex: 1 0 auto;

        min-width: 100px;
        height: 46px;

        padding: 0 15px;

        border-width: 1px;
        border-bottom-width: 0;

        font-size: 14px;
    }

    .dashboard-tab.active {
        height: 51px;
    }

}

/* ====================================
   DISPONIBILIDAD PACIENTES
==================================== */

.slot-activo {
    background: #FFFFFF;
}

.slot-inactivo {
    background: #efebeb;
    border-color: #575656 !important;
}

.slot-inactivo .cita-card-mini,
.slot-inactivo .horario-bloqueado {
    opacity: 1;
}
