body { 
    font-family: Arial, sans-serif; 
    background: transparent !important;
    margin:0; 
    padding:0;
}

/* ================= ACCESIBILIDAD - CONTRASTE ENLACES AAA ================= */

a {
    color: #004a99;
}

a:hover,
a:focus {
    color: #003366;
}

/* ================= ACCESIBILIDAD - ÁREA TÁCTIL ENLACES ================= */

.link-accesible {
    display: inline-block;
    min-width: 44px;
    min-height: 44px;
    padding: 10px 12px;
    line-height: 1.2;
}

/* ======================================================================= */

.azul{
    color: #0053cc;
}
.padding-boton{
    padding-top: 10px;
    padding-bottom: 10px;
}

#fondoVideo {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1; /* DEJA EL VIDEO DETRÁS DEL CONTENIDO */
    background-size: cover;
    object-fit: cover;    
    background-image: url("../images/bg.jpg");
    background-color: #3571be;
    filter: brightness(0.95); /* OPCIONAL: oscurece para mejor contraste */
}

h1,h2 { margin: 0 0 20px 0; }

.skip-link{
	position:absolute;
	top:-48px;
	left:10px;
	background:#000;
	color:#fff !important; 
	padding:12px 12px;
	z-index:9999;
}

.skip-link:focus{
	top:10px;
}

.spinner-overlay{
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.4);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.spinner-overlay.activo{
	display: flex;
}

/******************** PANTALLA ANIMADA *********************/

body.pantalla-kiosko {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    background: #000;
}

#llamadas{
    font-size: 65px;
    line-height: 1.1;
    font-weight: bold;
    margin-bottom: 50px;
}
    #llamadas div{
        width: 100%;
        padding: 5px 0;
        border-bottom: 1px solid #FFF;
    }
#pendientes{
    font-size: 65px;
    line-height: 1.1;
    font-weight: bold;
}
    #pendientes div{
        color: #AAA;
        width: calc(50% - 20px);
        box-sizing: border-box;
        float: left;
        margin: 0 20px 0 0;
        padding: 5px 0;
        border-bottom: 1px solid #FFF;
    }

.container { display: flex; height: 100vh; }

#pantalla{
    --pantalla-scale: 1;
    --pantalla-left: 0px;
    --pantalla-top: 0px;
    color: #FFF;
    position: fixed;
    top: 0;
    left: 0;
    width: 1920px;
    height: 1080px;
    max-width: none;
    overflow: hidden;
    transform: translate(var(--pantalla-left), var(--pantalla-top)) scale(var(--pantalla-scale));
    transform-origin: top left;
}

.left-panel { 
    width: 30%;
    padding: 30px;
    overflow-y: auto; 
    background: rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}
.right-panel {
    padding: 30px;
    width: 70%; 
    text-align:center;
    box-sizing: border-box;
}
    #escudo{
        height: 292px;
        padding-top: 20px;
    }
        #escudo img{
            max-height: 270px;
            width: auto;
        }
    #centro{
        margin: 30px 0;
        font-size: 32px;
        line-height: 1.15;
        font-weight: 100;
    }

#codigo {
    width: 600px;
    border-radius: 25px;
    margin: 0 auto;
    padding: 10px 0 18px;
    font-size: 162px;
    line-height: 1.05;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.7);
    color: #000; 
}

/* ✨ Animación flash amarillo-blanco + zoom */
@keyframes flashZoomCodigo {
    0%   { background: rgba(255, 230, 0, 1); color:#000; transform: scale(1); }
    25%  { background: rgba(255, 255, 255, 1); color:#000; transform: scale(1.1); }
    50%  { background: rgba(255, 230, 0, 1); color:#000; transform: scale(1.2); }
    75%  { background: rgba(255, 255, 255, 1); color:#000; transform: scale(1.1); }
    100% { background: rgba(255, 230, 0, 1); color:#000; transform: scale(1); }
}

/* Clase que activa la animación */
.flashZoom {
    animation: flashZoomCodigo 2.5s ease-out 1;
}


#detalle { 
    font-size: 40px;
    line-height: 1.2;
    min-height: 78px;
    margin-top: 32px;
    margin-bottom: 54px; 
}

#banner{
        margin-top: 10px;
        width: 100%;
        min-height: 108px;
        overflow: hidden; 
        padding: 43px 0;
        background: rgba(255, 255, 255, 0.2);
        color: #DDD;
    }
        #banner h1{
            margin-left: 30px;
            margin-right: 30px;
            font-size: 54px;
            line-height: 1.1;
        }
        #banner h2{
            margin-left: 30px;
            margin-right: 30px;
            font-size: 43px;
            line-height: 1.1;
            margin-bottom: 0;
        }

.vent { font-weight:bold; color: #ff0; font-size: 65px;}

/* Animación de fade-in y fade-out */
@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

#banner h1, #banner h2 {
    transition: all 1s ease;
    opacity: 1;
}


/******************** FIN PANTALLA ANIMADA *********************/

/* =================== PANTALLA TOTEM CITAS =================== */
#header-index {
    position: relative;
    width: 100%;
    height: 25vh;
    overflow: hidden;
}

#video-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

#header-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 30px;
    color: white;
    text-shadow: 2px 2px 8px black;
}

#header-center {
    position: relative;
    text-align: center;
    height: 100%;
    padding: 25px;
    color: white;
    text-shadow: 2px 2px 8px black;
}

#escudo-header {
    height: 20vh;
    max-height: 200px;
    cursor: pointer;
}

#titulo-header {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    color: white;
    text-shadow: 2px 2px 8px black;
}

#titulo-principal {
    font-size: 4vh;
    font-weight: bold;
}

#reloj-header {
    font-size: 8vh;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#reloj-header span {
    display: inline-block;
}

#sep {
    width: 0.5ch;
    text-align: center;
    transition: opacity 0.4s ease-in-out;
    margin: 0 0.1ch;
}

/* PANEL BLANCO CENTRAL */
#mainBox {
    margin: 20px auto;
    width: 90%;
    max-width: 1100px;
    background: rgba(255,255,255,0.9);
    padding: 0 30px;
    border-radius: 15px;
    text-align: center;
}

/* BOTONERA VERTICAL */
#botonera {
    display: flex;
    flex-direction: column; /* ahora los botones se apilan verticalmente */
    align-items: center;    /* centra horizontalmente */
    gap: 30px;              /* espacio entre botones */
    margin-top: 140px;
}

/* BOTONES GRANDES */
#botonera button {
    width: 60%;             /* ancho grande y uniforme */
    max-width: 550px;
    height: 18vh;           
    font-size: 5vh;         
    font-weight: bold;
    background: #0066ff;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}

#botonera button:hover {
    background: #0053cc;
    transform: scale(1.04);
}


/* FORMULARIO DNI/NIE/PASAPORTE */
#dniForm {
    text-align: center;
    margin-top: 30px;
}

/* Contenedor del input */
#inputGroup {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
}

/* Input de documento */
#dniInput {
    font-size: 1.8rem;
    text-align: center;
    padding: 15px;
    border: 2px solid #007bff;
    border-radius: 8px;
    width: 400px;
    margin-bottom: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Efecto focus */
#dniInput:focus {
    border-color: #0056b3;
    box-shadow: 0 0 8px rgba(0, 86, 179, 0.4);
}

/* TECLADO QWERTY */
#teclado {
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

#teclado .fila {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.tecla {
    background: #ffffffcc;
    color: #000;
    font-size: 3.5vh;       /* escala con pantalla */
    font-weight: bold;
    width: 6vh;             /* más grande */
    height: 6vh;
    margin: 8px;
    border-radius: 12px;
    border: 2px solid #1e3a8a;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s ease, background 0.2s;
    touch-action: manipulation;
}

.tecla:active {
    transform: scale(0.85);
    background: #cdd6ff;
}

#borrar {
    background: #ff4d4d;
    color: white;
    font-weight: bold;
    width: 12vh;
    height: 6vh;
    font-size: 2.5vh;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 2px solid #aa0000;
}
#borrar:active {
    transform: scale(0.95);
    background: #cc0000;
}

#enviar {
    background: #0066ff;
    color: white;
    font-weight: bold;
    width: 12vh;
    height: 6vh;
    font-size: 2.5vh;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: 2px solid #004aad;
}
#enviar:active {
    transform: scale(0.95);
    background: #0053cc;
}


/* Botón cancelar */
#cancelar {
    width: 34vw;
    height: 8vh;
    font-size: 5vh;
    font-weight: bold;
    background: #999;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: .2s;
}

#cancelar:hover {
    background: #777;
    transform: scale(1.03);
}

#seleccionCola{
    margin-top: 90px;
}

#botoneraColas{
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    align-items: center;    /* centra horizontalmente */
    gap: 18px;              /* espacio entre botones */
}
    /* BOTONES GRANDES */
    #botoneraColas button {
        width: 100%;             /* ancho grande y uniforme */
        max-width: 550px;
        height: 18vh;           
        font-size: 5vh;         
        font-weight: bold;
        background: #0066ff;
        color: white;
        border: none;
        border-radius: 20px;
        cursor: pointer;
        transition: transform .2s ease, background .2s ease;
    }

    #botoneraColas button:hover {
        background: #0053cc;
        transform: scale(1.04);
    }

    #botoneraColas .btnCola {
        width: 100%;
        min-height: 96px;
        line-height: 1.2;
        padding: 18px;
    }

    /* Botón cancelar cola */
    #cancelarCola {
        width: 34vw;
        height: 10vh;
        font-size: 5vh;
        font-weight: bold;
        background: #999;
        color: #fff;
        border: none;
        border-radius: 20px;
        cursor: pointer;
        transition: .2s;
    }

    #cancelarCola:hover {
        background: #777;
        transform: scale(1.03);
    }

    /* Botonera horas y dias */

     #botoneraHoras,
        #calendarioDias {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
            gap: 18px;
            margin-top: 24px;
        }

        .btnHoraPresencial,
        .btnDiaPresencial {
            border: 0;
            border-radius: 10px;
            padding: 20px 14px;
            font-size: 1.6rem;
            font-weight: 700;
            color: #003366;
            border: 1px solid #fafafa;
            background: #fff;
            box-shadow: 0 3px 12px rgba(0,0,0,.18);
            transition: .2s;
        }

        .btnHoraPresencial:hover,
        .btnDiaPresencial:hover {
            border: 1px solid #003366;
        }

        .btnHoraPresencial span {
            display: block;
            font-size: 1.85rem;
            line-height: 1;
        }

        .btnDiaPresencial span {
            display: block;
            font-size: 2.0rem;
        }

        .btnDiaPresencial.sin-huecos {
            opacity: .25;
            pointer-events: none;
        }

        #volverColas, #elegirOtroDia, #volverHoras{
            height: 6vh;
            padding: 5px 20px;
            margin: 0 5px;
            font-size: 3vh;
            font-weight: bold;
            background: #999;
            color: #fff;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            transition: .2s;
        }

        #volverColas:hover, #elegirOtroDia:hover, #volverHoras:hover {
            background: #777;
            transform: scale(1.03);
        }

        #cancelarHora, #cancelarCalendario {
            background: #ff4d4d;
            height: 6vh;
            padding: 5px 20px;
            margin: 0 5px;
            font-size: 3vh;
            font-weight: bold;
            color: #fff;
            border: none;
            border-radius: 10px;
            cursor: pointer;
            transition: .2s;
        }
        #cancelarHora:hover, #cancelarCalendario:hover {
            transform: scale(1.03);
            background: #cc0000;
        }


/* Alerta personalizada */
.alerta {
    width: 34vw;
    font-size: x-large;
    margin: 0 auto;
    margin-bottom: 15px;
    padding: 18px 20px;
    margin-top: 10px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

    /* Alerta éxito */
    .alerta-success {
        color: #0f5132;
        background-color: #d1e7dd;
        border-color: #badbcc;
    }

    /* Alerta error */
    .alerta-error {
        color: #842029;
        background-color: #f8d7da;
        border-color: #f5c2c7;
    }

.texto-multilinea {
	white-space: pre-line;
}

#ticketPantalla {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin-top: 100px;
}

#estadoImpresion {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 25px;
    animation: parpadeo 1.5s infinite;
}
    #estadoImpresion.impreso {
        color: red;
    }

@keyframes parpadeo {
    0%   { opacity: 1; }
    50%  { opacity: 0.4; }
    100% { opacity: 1; }
}

#ticket {
    background: #fff;
    color: #000;
    padding: 25px 30px;
    border-radius: 8px;
    width: 320px;
    font-family: "Courier New", monospace;
    text-align: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.ticket-title {
    font-size: 22px;
    font-weight: bold;
    margin: 10px 0;
}

.ticket-line {
    font-size: 14px;
}

.ticket-body {
    margin: 20px 0;
    font-size: 16px;
}
    #t-codigo{
        font-size: 80px;
        font-weight: bolder;
    }
    #linea-hora{
        font-size: 40px;
    }

.ticket-body div {
    margin-bottom: 8px;
}

.ticket-msg {
    margin-top: 15px;
    font-size: 14px;
}

.ticket-footer {
    margin-top: 10px;
    font-size: 12px;
}


/* Animación de entrada */
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* =========================================================
   WEB CIUDADANO - INDEX.PHP
   (Totalmente aislado del resto del sistema)
========================================================= */

/* Contenedor exclusivo del index */
#indexWeb {
    padding: 40px 20px;
}

/* Grid centros exclusivo */
#indexCentrosRow {
}

/* Cards centros */
#indexCentrosRow .index-centro-card {
    border-radius: 15px;
    border: 1px solid #DDD;
    transition: all 0.25s ease;
    cursor: pointer;
}

#indexCentrosRow .index-centro-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

/* Enlace completo sin subrayado */
#indexCentrosRow .index-card-link {
    text-decoration: none;
    color: inherit;
}

/* Caja gestionar cita */
#indexGestionCita {
    margin-top: 50px;
}

#indexGestionCita .index-gestion-box {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
}

/* =========================================================
   WEB CIUDADANO - INDEX.PHP (AISLADO)
   ========================================================= */

/* Contenedor exclusivo del index */
#indexWeb {
    padding: 0 20px;
}

/* Fila de centros */
#bloqueCentros {
    /*margin-top: 30px;*/
}

/* Card centros */
#bloqueCentros .index-centro-card {
    border-radius: 12px;
    cursor: pointer;
    padding: 15px;
    background-color: #f5f8ff;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

/* Hover suave institucional */
#bloqueCentros .index-centro-card:hover {
    transform: translateY(-3px);
    background-color: #eaf5ff;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
}

/* Card colas */
#bloqueColas .cola-card {
    border-radius: 12px;
    cursor: pointer;
    padding: 15px;
    background-color: #f5f8ff;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

/* Hover colas suave institucional */
#bloqueColas .cola-card:hover {
    transform: translateY(-3px);
    background-color: #eaf5ff;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
}


/* =========================================================
   FORMULARIO RESERVA - DISEÑO PROFESIONAL
   ========================================================= */

#bloqueReserva {
    margin-left: auto;
    margin-right: auto;
}

#bloqueReserva .reserva-card {
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    background: #ffffff;
    box-shadow: 0 12px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

#bloqueReserva .reserva-header {
    background: linear-gradient(135deg, #e7e8eb, #a7bce7);
    padding: 15px;
}

#bloqueReserva .reserva-header h5 {
    font-weight: 600;
}

#bloqueReserva .reserva-input {
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    transition: all 0.25s ease;
}

#bloqueReserva .reserva-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15);
}

#bloqueReserva label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #444;
}

#bloqueReserva .form-text {
    font-size: 0.8rem;
}

#bloqueReserva hr {
    border-top: 1px solid #e5e5e5;
}

#bloqueReserva .reserva-btn {
    padding: 10px 35px;
    font-weight: 600;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Animación suave aparición */
#bloqueReserva {
    animation: fadeInReserva 0.4s ease;
}

@keyframes fadeInReserva {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Gestión de cita */
#indexGestionCita {
    margin-top: 50px;
}

#indexGestionCita .index-gestion-box {
    background: #f6f6f6;
    border: 1px solid #DDD;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

/* CALENDARIO PROPIO */
.cal-grid{
    display:grid;
    grid-template-columns: repeat(7, 1fr);
    gap:8px;
}
.cal-dia-nombre{
    text-align:center;
    font-weight:bold;
    padding:8px 0;
    background:#f1f1f1;
}
.cal-dia{
    text-align:center;
    padding:12px 0;
    cursor:pointer;
    border-radius:6px;
}
.estado-disponible{
    background:#13633d;
    color:white;
    transition: all 0.3s ease;
}
    .estado-disponible:hover{
        background:#1fb870;
    }
.estado-completo{
    background:#dc3545;
    color:white;
}
.estado-cerrado{
    background:#fafafa;
    color:#333;
    cursor:default;
}
.cal-dia.seleccionado{
    outline:3px solid #0d6efd;
}


.footer-municipal{
	background:#1f2d3d;
	color:#ffffff;
	font-size:0.9rem;
}

.footer-municipal a{
	color:#ffffff;
	text-decoration:none;
}

.footer-municipal a:hover,
.footer-municipal a:focus{
	text-decoration:underline;
	outline:2px solid #ffffff;
	outline-offset:2px;
}


/*  Reducir animaciones - Accesibilidad */
@media (prefers-reduced-motion: reduce) {
	#video-header{
		display:none;
	}
}

/* Ajustes móvil */
@media (max-width: 767.98px) {

    #indexWeb {
        padding: 0;
    }

    #mainBox{
        padding: 0 5px;
    }

    #indexCentrosRow .index-centro-titulo-wrapper {
        min-height: 50px;
    }

    #indexGestionCita .index-gestion-box {
        padding: 20px;
    }

    #video-header {
        display: none;
    }

    #header-index {
        background-color: #3571be;
        background-image: url("../images/bg.jpg");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
}

/* ================= FOOTER ABAJO SOLO WEB ================= */

body {
    min-height: 100vh;
}

#contenido-principal {
    min-height: calc(100vh - 25vh - 120px);
}
