/* ==========================
   VARIABLES GENERALES
========================== */
:root {
    --azul: #0b83bd;
    --azul-oscuro: #075f8c;
    --fondo: #f2f8fb;
    --verde: #25D366;
    --texto: #333;
    --gris: #666;
}

/* ==========================
   CONFIGURACIÓN GENERAL
========================== */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: var(--fondo);
    color: var(--texto);
}

/* ==========================
   ENCABEZADO
========================== */
header {
    background: linear-gradient(135deg, var(--azul), var(--azul-oscuro));
    color: white;
    padding: 35px 20px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 32px;
}

header p {
    margin-top: 10px;
    font-size: 18px;
}

/* ==========================
   MENÚ
========================== */
nav {
    background: var(--azul-oscuro);
    padding: 12px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 10px;
    font-weight: bold;
    display: inline-block;
}

nav a:hover {
    text-decoration: underline;
}

/* ==========================
   CONTENEDORES Y TARJETAS
========================== */
.contenedor {
    width: 90%;
    max-width: 1100px;
    margin: 30px auto;
}

.tarjeta {
    background: white;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

h2 {
    color: var(--azul);
    margin-top: 0;
}

/* ==========================
   INFORMACIÓN Y HORARIOS
========================== */
.info {
    background: #eaf6fb;
    border-left: 5px solid var(--azul);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 18px;
}

.info p {
    line-height: 1.6;
}

.horario {
    background: #eaf6fb;
    border-left: 5px solid var(--azul);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.actualizacion {
    text-align: right;
    color: var(--gris);
    font-size: 14px;
    margin-bottom: 10px;
}

/* ==========================
   FORMULARIOS
========================== */
label {
    display: block;
    font-weight: bold;
    margin-top: 12px;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border: 1px solid #bbb;
    border-radius: 8px;
    font-size: 15px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--azul);
    box-shadow: 0 0 5px rgba(11,131,189,.4);
}

/* ==========================
   BOTONES
========================== */
button,
.whatsapp,
.volver,
.limpiar {
    display: inline-block;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

button {
    background: var(--azul);
    padding: 12px 20px;
    margin-top: 15px;
}

button:hover {
    background: var(--azul-oscuro);
}

.whatsapp,
.volver {
    background: var(--verde);
    padding: 12px 18px;
    margin-top: 15px;
}

.whatsapp:hover,
.volver:hover {
    background: #1ebc59;
}

.limpiar {
    background: #6c757d;
    padding: 10px 15px;
}

.limpiar:hover {
    background: #555;
}

/* ==========================
   BUSCADOR
========================== */
.buscador {
    background: #eaf6fb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.buscador input {
    width: auto;
    padding: 8px;
    margin-top: 0;
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* ==========================
   TABLAS ADMINISTRACIÓN
========================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th {
    background: var(--azul-oscuro);
    color: white;
    padding: 12px;
}

td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

tr:hover {
    background: #eef7fb;
}

/* ==========================
   ESTADOS DE CITAS
========================== */
.estado {
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 6px;
}

.pendiente {
    background: #fff3cd;
    color: #856404;
}

.confirmada {
    background: #d4edda;
    color: #155724;
}

.cancelada {
    background: #f8d7da;
    color: #721c24;
}

/* ==========================
   GALERÍAS DE IMÁGENES
========================== */
.galeria-imagenes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.galeria-imagenes img {
    width: 250px;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,.2);
    object-fit: cover;
    transition: transform .3s;
}

.galeria-imagenes img:hover {
    transform: scale(1.05);
}

.mapa iframe {
    width: 100%;
    border-radius: 12px;
}

/* ==========================
   PIE DE PÁGINA
========================== */
footer {
    background: var(--azul-oscuro);
    color: white;
    text-align: center;
    padding: 18px;
    margin-top: 30px;
}

/* ==========================
   RESPONSIVE
========================== */
@media (max-width: 900px) {
    .contenedor {
        width: 95%;
        overflow-x: auto;
    }

    table {
        min-width: 1000px;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 24px;
    }

    nav a {
        display: block;
        margin: 8px 0;
    }

    .tarjeta {
        padding: 20px;
    }

    .buscador {
        flex-direction: column;
        align-items: stretch;
    }

    .buscador input {
        width: 100%;
    }

    .galeria-imagenes {
        justify-content: center;
    }

    .galeria-imagenes img {
        width: 100%;
    }
}
.campo-fecha {
    background: #f8fbfd;
    border: 1px solid #cfe8f3;
    border-radius: 10px;
    padding: 10px;
    margin-top: 6px;
}

.campo-fecha span {
    display: block;
    font-weight: bold;
    color: #075f8c;
    margin-bottom: 6px;
}

.campo-fecha input {
    width: 100%;
    border: none;
    background: white;
    font-size: 16px;
    padding: 12px;
}
.selector-cita {
    margin-top: 15px;
}

.calendario {
    max-width: 430px;
    margin-top: 10px;
    padding: 18px;
    background: #fff;
    border: 1px solid #d8e4ea;
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .08);
}

.calendario-encabezado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #075f8c;
    font-size: 18px;
}

.boton-mes {
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #e3f2fd;
    color: #075f8c;
    font-size: 25px;
    cursor: pointer;
}

.boton-mes:hover {
    background: #0b83bd;
    color: white;
}

.dias-semana,
.dias-calendario {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.dias-semana {
    margin-bottom: 8px;
    text-align: center;
    color: #607d8b;
    font-size: 12px;
    font-weight: bold;
}

.dia-calendario {
    aspect-ratio: 1;
    border: none;
    border-radius: 50%;
    background: #f4f8fa;
    color: #333;
    cursor: pointer;
    font-weight: bold;
}

.dia-calendario:hover {
    background: #bbdefb;
}

.dia-calendario.seleccionado {
    background: #0b83bd;
    color: white;
}

.dia-calendario.hoy {
    border: 2px solid #0b83bd;
}

.dia-calendario.domingo,
.dia-calendario.pasado {
    background: #eee;
    color: #aaa;
    cursor: not-allowed;
}

.dia-vacio {
    visibility: hidden;
}

.horarios-contenedor {
    margin-top: 20px;
}

.horarios-contenedor h3 {
    color: #075f8c;
}

.lista-horarios {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(105px, 1fr)
    );
    gap: 10px;
}

.hora-cita {
    padding: 12px 8px;
    border: 1px solid #0b83bd;
    border-radius: 9px;
    background: white;
    color: #075f8c;
    font-weight: bold;
    cursor: pointer;
}

.hora-cita:hover {
    background: #e3f2fd;
}

.hora-cita.seleccionada {
    background: #0b83bd;
    color: white;
}

.hora-cita.ocupada,
.hora-cita.pasada {
    border-color: #ccc;
    background: #eee;
    color: #999;
    cursor: not-allowed;
    text-decoration: line-through;
}

.mensaje-calendario {
    grid-column: 1 / -1;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
    text-align: center;
}