/* ========================================
   ESTILOS BASE Y GENERALES
======================================== */

/* Importación de fuentes y configuración base */
html {
    scroll-behavior: smooth;
}

body {
    /* Patrón de puntos de fondo */
    background-image: 
        radial-gradient(rgba(179, 84, 227, 0.18) 2px, transparent 2px), 
        radial-gradient(rgba(179, 84, 227, 0.18) 2px, transparent 2px);
    background-size: 44px 44px;
    background-position: 0 0, 22px 22px;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

/* ========================================
   ENCABEZADO (HEADER)
======================================== */

.encabezado {
    width: 100%;
    background: linear-gradient(90deg, rgba(231,34,133,1) 0%, rgba(71,12,157,1) 70%);
    font-weight: 300;
    font-family: "Poppins", sans-serif;
    font-style: normal;
    padding: 0;
}

/* Sección inferior del header con fondo blanco */
header .abajo {
    background: white;
    padding: 15px 20px;
    width: 100%;
    overflow: hidden;
}

/* Contenedor de logos en el header */
.encabezado .grupo-0 {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding: 30px 20px;
    align-items: center;
    justify-items: center;
}

.encabezado .grupo-0 .box-0 {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.encabezado .grupo-0 .box-0 figure {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.encabezado .grupo-0 .box-0 figure img {
    width: 130px;
    max-width: 90%;
    height: auto;
    object-fit: contain;
}

/* ========================================
   CARRUSEL DE IMÁGENES (MEJORADO)
======================================== */

.carrusel {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin: 0 auto;
}

.carousel-item {
    width: 100%;
    height: 500px; /* Aumentamos la altura para evitar cortes */
    overflow: hidden;
    position: relative;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    /* Cambiamos object-fit para mejor visualización */
    object-fit: contain; /* Mantiene toda la imagen visible */
    object-position: center;
    display: block;
    background-color: #f8f9fa; /* Color de fondo por si la imagen no llena todo el espacio */
    
    /* Alternativa: si prefieres que llene todo el espacio aunque se corte un poco */
    /* object-fit: cover; */
}

/* ========================================
   ACCESOS RÁPIDOS
======================================== */

.Accesosrapidos {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    font-style: normal;
    padding: 0 10px;
}

/* Contenedor de botones de accesos rápidos */
.containerBtn {
    display: grid;
    place-content: center;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
}

/* Estilos de botones de accesos rápidos */
.containerBtn button {
    background-color: white;
    border: 2px solid rgb(185, 32, 185);
    border-radius: 10px;
    cursor: pointer;
    padding: 1.5rem 1rem;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--color-white);
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Contenedor de iconos dentro de los botones */
button .icono {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 10px;
}

button .icono img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

button .icono a {
    text-decoration: none;
    text-align: center;
    color: rgb(203, 26, 209);
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Efectos hover para botones */
.containerBtn .btn-purple {
    border-color: rgb(185, 32, 185);
    transition: box-shadow 0.2s ease-in-out;
}

.containerBtn .btn-purple:hover {
    box-shadow: 0 0 40px rgb(185, 32, 185) inset;
    transform: translateY(-2px);
}

.containerBtn .btn-purple:focus {
    outline: 0;
}

/* ========================================
   FOOTER (PIE DE PÁGINA)
======================================== */

.pie-pagina {
    width: 100%;
    background: linear-gradient(90deg, rgba(231,34,133,1) 0%, rgba(71,12,157,1) 70%);
    margin-top: auto;
}

/* Sección principal del footer */
.pie-pagina .grupo-1 {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    align-items: start;
}

.pie-pagina .grupo-1 .box {
    width: 100%;
    text-align: center;
}

.pie-pagina .grupo-1 .box figure {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.pie-pagina .grupo-1 .box figure img {
    width: 130px;
    max-width: 90%;
    height: auto;
    object-fit: contain;
}

.pie-pagina .grupo-1 .box h2 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 20px;
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    font-style: normal;
}

.pie-pagina .grupo-1 .box p {
    color: #efefef;
    margin-bottom: 10px;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
    line-height: 1.6;
    font-size: 14px;
}

.pie-pagina .grupo-1 .box .alcaldesa {
    width: 150px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Redes sociales en el footer */
.pie-pagina .grupo-1 .red-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.pie-pagina .grupo-1 .red-social a img {
    width: 45px;
    height: 45px;
    transition: all 300ms ease;
    border-radius: 50%;
    object-fit: cover;
}

.pie-pagina .grupo-1 .red-social a:hover img {
    transform: scale(1.1);
}

/* Sección de copyright del footer */
.pie-pagina .grupo-2 {
    background: linear-gradient(90deg, rgba(231,34,133,1) 0%, rgba(71,12,157,1) 70%);
    padding: 15px 20px;
    text-align: center;
    color: #fff;
}

.pie-pagina .grupo-2 small {
    font-size: 15px;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
    line-height: 1.4;
}

/* ========================================
   BOTÓN DE SCROLL HACIA ARRIBA
======================================== */

#scrollBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    border: none;
    outline: none;
    background: linear-gradient(90deg, rgba(231,34,133,1) 0%, rgba(71,12,157,1) 100%);
    cursor: pointer;
    color: #fff;
    padding: 15px;
    border-radius: 50%;
}

#scrollBtn:hover {
    background: linear-gradient(90deg, rgb(160, 24, 92) 0%, rgb(46, 8, 102) 100%);
}

svg {
    width: 25px;
    height: 25px;
}

/* ========================================
   NOTICIAS
======================================== */

/* Contenedor principal de noticias */
#noti {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0px;
    flex-wrap: wrap;
}

/* Tarjetas individuales de noticias */
.noti-box {
    width: 350px;
    background-color: #ffffff;
    border: 1px solid #ececec;
    margin: 20px;
    overflow: hidden;
}

.noti-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 1px 14px 2px rgba(0, 0, 0, .15);
}

/* Contenedor de imagen de noticia */
.noti-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    cursor: pointer;
}

.noti-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Contenido de texto de las noticias */
.noti-text {
    padding: 30px;
    display: flex;
    flex-direction: column;
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    font-style: normal;
}

.noti-text span {
    color: gray;
    font-size: 0.9rem;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-style: normal;
}

.noti-text .noti-title {
    font-size: 1.3rem;
    font-weight: 500;
    color: #0f0f0f;
    text-decoration: none;
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    font-style: normal;
}

.noti-text .noti-title:hover {
    color: rgba(183, 0, 255, 0.7);
    transition: all ease 0.3s;
}

.noti-text p {
    color: #9b9b9b;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 20px 0px;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-style: normal;
}

.noti-text a {
    color: #0f0f0f;
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    font-style: normal;
}

.noti-text a:hover {
    color: rgba(183, 0, 255, 0.7);
    transition: all ease 0.3s;
}

/* ========================================
   CONCEJO MUNICIPAL (CARRUSEL DE MIEMBROS)
======================================== */

.concejo-centro {
    min-height: 50vh; /* Altura mínima de la sección */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px; /* Espaciado interno */
}

/* Contenedor del slider */
.swiper {
    width: 100%;
    max-width: 1120px; /* Limita el ancho del slider */
    padding: 40px 0;
    position: relative;
}

/* Contenedor interno de las tarjetas */
.swiper-wrapper {
    /* Swiper maneja el display: flex internamente */
    transition: transform 0.3s ease-in-out;
}

/* Cada tarjeta deslizable */
.swiper-slide {
    /* No se necesita flex-shrink ni width fijo: Swiper lo gestiona */
    height: auto;
    display: flex;
    justify-content: center;
}

/* Tarjeta individual */
.concejo-centro .card {
    width: 300px;
    max-width: 300px;
    border-radius: 25px;
    background-color: white;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

/* Efecto al pasar el mouse */
.card:hover {
    transform: translateY(-10px);
}

/* Contenedor de la imagen y fondo degradado */
.image-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 14px 10px;
}

/* Contenido textual de la tarjeta */
.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 14px 25px;
}

/* Fondo degradado decorativo */
.overlay-carrusel {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, rgba(231,34,133,1) 0%, rgba(71,12,157,1) 100%);
    border-radius: 25px 25px 0 25px;
}

/* Esquinas decorativas en el degradado */
.overlay-carrusel::before,
.overlay-carrusel::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -40px;
    height: 40px;
    width: 40px;
    background: rgba(71,12,157,1);
}

.overlay-carrusel::after {
    border-radius: 0 25px 0 0;
    background: white;
}

/* Imagen circular del concejal */
.card-image {
    position: relative;
    height: 150px;
    width: 150px;
    border-radius: 50%;
    padding: 3px;
    z-index: 1;
}

.card-image .card-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid white;
}

/* Nombre del concejal */
.name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    font-family: "Poppins", sans-serif;
    text-align: center;
    margin: 10px 0 5px;
}

/* Descripción del concejal */
.description {
    font-size: 14px;
    color: #707070;
    text-align: center;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    margin: 0;
    word-break: break-word;
}

/* Botones de navegación (izquierda y derecha) */
.swiper-button-next,
.swiper-button-prev {
    color: rgba(71,12,157,1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
}

/* Paginación de los puntos inferiores */
.swiper-pagination-bullet {
    background: rgba(71,12,157,0.3);
}

.swiper-pagination-bullet-active {
    background: rgba(71,12,157,1);
}

/* ========================================
   GALERÍA DE IMÁGENES
======================================== */

.galeria h1 {
    text-align: center;
    margin: 20px 0 15px 0;
    font-weight: 300;
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    font-style: normal;
}

.titulo {
    text-align: center;
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    font-style: normal;
}

.linea {
    border-top: 5px linear-gradient(90deg, rgba(231,34,133,1) 0%, rgba(71,12,157,1) 100%);
    margin-top: 20px;
}

/* Contenedor principal de la galería */
.contenedor-imagenes {
    display: flex;
    width: 85%;
    margin: auto;
    justify-content: space-around;
    flex-wrap: wrap;
    border-radius: 3px;
}

.contenedor-imagenes .imagen {
    width: 25%;
    position: relative;
    height: 250px;
    margin-bottom: 5px;
    box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, .75);
}

.imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background-color: #f0f0f0;
}

/* Overlay para las imágenes de la galería */
.overla {
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, rgba(231, 34, 132, 0.562) 0%, rgba(70, 12, 157, 0.562) 100%);
    width: 100%;
    height: 0;
    overflow: hidden;
    transition: .5s ease;
}

.overla h2 {
    color: #fff;
    font-weight: 300;
    font-size: 30px;
    position: absolute;
    top: 50%;
    left: 50%;
    text-align: center;
    transform: translate(-50%, -50%);
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    font-style: normal;
}

.imagen:hover .overla {
    height: 100%;
    cursor: pointer;
}

/* ========================================
   ÁLBUM DE VETERINARIA
======================================== */

.album1 {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 250px;
    grid-gap: 20px;
    padding: 100px 0;
}

.box1 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.box1:nth-child(1) {
    grid-column-start: span 2;
}

.box1:nth-child(4) {
    grid-column-start: span 2;
}

/* ========================================
   BOTONES ESPECIALES
======================================== */

.containe h1 {
    text-align: center;
    margin: 20px 0 15px 0;
    font-weight: 300;
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    font-style: normal;
}

.containe p {
    text-align: justify;
    margin: 0 100px 0 100px;
    font-family: "Poppins", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Botón con efecto especial */
.boton {
    width: 170px;
    height: 50px;
    text-decoration: none;
    text-align: center;
    position: relative;
    font-size: 1rem;
    margin: 5px;
    color: white;
    border-radius: 40px;
    box-shadow: 0 0 0 0 rgba(145, 64, 248, 0.5), 0 0 0 0 rgba(39, 200, 255, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
    overflow: hidden;
}

.boton::after {
    content: "";
    width: 200px;
    height: 200px;
    position: absolute;
    top: -50px;
    left: -10px;
    background: #13ff13;
    background-image: linear-gradient(-225deg, #231557 0%, #44107A 29%, #FF1361 67%, #FFF800 100%);
    z-index: -1;
    transition: transform 0.5s ease;
}

.boton:hover {
    transform: translate(0, -6px);
    box-shadow: 10px -10px 25px 0 rgba(16, 226, 253, 0.5), -10px 10px 25px 0 rgba(183, 0, 255, 0.7);
}

.boton:hover::after {
    transform: rotate(150deg);
}

/* ========================================
   TRÁMITES EN LÍNEA
======================================== */

.cuerpo {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

/* Contenedor de tarjetas de departamentos */
.tarjetasdep {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
}

/* Tarjetas de departamentos */
.tarjet {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tarjet:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.tarjet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.text_tarjet {
    padding: 25px;
    text-align: center;
    width: 100%;
}

.title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text_tarjet a {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 20px;
    border: 2px solid #667eea;
    border-radius: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.text_tarjet a:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

/* ========================================
   MODAL PARA DOCUMENTOS
======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    transform: translateY(-50%) scale(1.2);
    opacity: 0.8;
}

.modal-body {
    padding: 25px;
}

/* Lista de documentos en el modal */
.document-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.document-item {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.document-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.document-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.document-link:hover {
    color: #764ba2;
}

.document-icon {
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* ========================================
   GUÍA TELEFÓNICA FLOTANTE
======================================== */

/* Botón flotante para abrir la guía */
.floating-button {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.floating-button.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    transform: rotate(45deg);
}

.floating-button.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.8), 0 0 0 10px rgba(102, 126, 234, 0.1);
    }
    100% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    }
}

/* Overlay para cerrar el directorio */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Barra lateral flotante */
.floating-sidebar {
    position: fixed;
    top: 55px;
    left: 20px;
    width: 350px;
    max-height: calc(100vh - 40px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transform: translateX(-400px) scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

.floating-sidebar.active {
    transform: translateX(0) scale(1);
    opacity: 1;
}

/* Header de la barra lateral */
.sidebar-header {
    padding: 25px 20px 15px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.sidebar-header h2 {
    font-size: 1.4em;
    margin-bottom: 10px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Contenido de la barra lateral */
.sidebar-content {
    padding: 20px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

/* Caja de búsqueda */
.search-box {
    margin-bottom: 20px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 14px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.02);
}

/* Departamentos en la guía telefónica */
.department {
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.department:nth-child(1) { animation-delay: 0.1s; }
.department:nth-child(2) { animation-delay: 0.2s; }
.department:nth-child(3) { animation-delay: 0.3s; }
.department:nth-child(4) { animation-delay: 0.4s; }
.department:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.department-title {
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: bold;
    margin-bottom: 12px;
    font-size: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Items de contacto */
.contact-item {
    background: rgba(255, 255, 255, 0.08);
    margin-bottom: 10px;
    padding: 15px 18px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-left-color: #FFD700;
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.contact-name {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 15px;
}

.contact-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    opacity: 0.9;
}

.extension {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    padding: 4px 10px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.phone-number {
    color: rgba(255, 255, 255, 0.9);
}

/* Scrollbar personalizada */
.sidebar-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ========================================
   OTRAS SECCIONES
======================================== */

/* Biografía del alcalde */
.alcalde img {
    width: 300px;
    height: 250px;
    display: flex;
    margin: 20px 15px 15px 100px;
    justify-content: space-around;
    flex-wrap: wrap;
    border: 5px white;
    float: left;
}

.biografia p {
    text-align: justify;
    margin-right: 100px;
    margin-left: 100px;
    font-family: "Poppins", sans-serif;
    font-style: normal;
}

/* Organigrama */
.organigrama {
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    font-style: normal;
    padding: 20px;
}

.organigrama iframe {
    width: 80%;
    height: 650px;
    max-width: 1400px;
}

/* Contenedor general */
.contenedor {
    width: 80%;
    margin: 0 140px;
}

/* Tablas */
.table a img {
    width: 50px;
}

table tr td a {
    text-decoration: none;
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    font-style: normal;
}

/* Redes sociales en sección principal */
.redes-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
    padding: 20px;
}

.redes-container iframe {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    max-width: 100%;
    height: 500px;
}

.redes-container .insta {
    width: 600px;
}

/* Sección de cuentas */
.cuenta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    text-align: center;
    margin: 0 100px 0 100px;
}

.cuenta li {
    padding: 10px 10px 10px 10px;
}

.cuenta a {
    text-decoration: none;
    color: black;
    font-weight: bold;
    font-family: "Poppins", sans-serif;
    font-style: normal;
}

.cuenta img {
    width: 50px;
    height: 50px;
}

/* Sección de contenido superior */
.cont {
    background: linear-gradient(90deg, rgba(231,34,133,1) 0%, rgba(71,12,157,1) 70%);
    text-align: center;
}

.cont a img {
    height: 45px;
    width: 9%;
}

.cont a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-family: "Poppins", sans-serif;
    font-style: normal;
}

.cont a .gif {
    width: 50px;
}

/* Banner */
/* 🌐 Estilo por defecto: escritorio */
.banner {
  display: flex;
  justify-content: left; /* por si necesitas alineación */
  width: 700px;
  max-width: 100%;
  margin: 0 auto;
}

.banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* 📱 Estilo para pantallas pequeñas */
@media (max-width: 768px) {
  .banner {
    width: 100%;
    padding: 0 10px; /* opcional, para espacio lateral en móvil */
  }

  .banner-img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}

/* ========================================
   MODAL PARA PDF/REAVALÚO
======================================== */

/* Botón para mostrar reavalúo */
#toggleBtn {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

/* Overlay para el modal de PDF */
#overlay {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

/* Modal de PDF */
#pdfModal {
    background: white;
    padding: 15px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    height: 80%;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* Botón de cerrar del modal PDF */
#closeBtn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    border: none;
    background: none;
    cursor: pointer;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ========================================
   MAPA DE SERVICIOS LOCALES 
======================================== */

.mapa {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 600px;
    border: 0;
    display: block;
}

/* ========================================
   ACCESIBILIDAD Y CONTRASTE
======================================== */

#accessibility-toolbar {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: #333;
    color: white;
    padding: 10px;
    z-index: 1000;
    border-radius: 5px;
    font-size: 14px;
}

#accessibility-toolbar button {
    background: none;
    border: none;
    color: white;
    margin: 0 5px;
    cursor: pointer;
}

.high-contrast {
    background-color: #333333 !important;
    color: white !important;
}

/* ========================================
   RESPONSIVE DESIGN - MEDIA QUERIES
======================================== */

/* Tablets grandes y laptops pequeñas (1024px) */
@media screen and (max-width: 1024px) {
    .page-container {
        min-height: 100vh;
    }
    
    .encabezado .grupo-0 {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 25px;
        padding: 25px 15px;
    }
    
    .encabezado .grupo-0 .box-0 figure img {
        width: 110px;
    }
    
    .carousel-item {
        height: 400px; /* Ajustamos altura para tablets */
    }
    
    .containerBtn {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .containerBtn button {
        padding: 1.2rem 0.8rem;
        font-size: 0.85rem;
        min-height: 100px;
    }
    
    button .icono img {
        width: 45px;
        height: 45px;
    }
    
    .pie-pagina .grupo-1 {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 25px;
        padding: 35px 15px;
    }
    
    .pie-pagina .grupo-1 .box figure img {
        width: 110px;
    }
    
    .pie-pagina .grupo-1 .box h2 {
        font-size: 18px;
    }
    
    .pie-pagina .grupo-1 .box .alcaldesa {
        width: 130px;
    }
    
    /* Trámites en línea - Tablets */
    .tarjetasdep {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
    
    /* Concejo - Tablets */
    .card {
        width: 280px;
        max-width: 280px;
    }
    
    /* Noticias - Tablets */
    .noti-box {
        width: 300px;
    }
}

/* Tablets (768px) */
@media screen and (max-width: 768px) {
    .page-container {
        min-height: 100vh;
    }
    
    .encabezado .grupo-0 {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
        padding: 20px 10px;
    }
    
    .encabezado .grupo-0 .box-0 figure img {
        width: 90px;
    }
    
    header .abajo {
        padding: 10px 15px;
    }
    
    .carousel-item {
        height: 300px; /* Reducimos altura para tablets */
    }
    
    .Accesosrapidos {
        margin: 20px 0;
        padding: 0 5px;
    }
    
    .containerBtn {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
        padding: 0 10px;
    }
    
    .containerBtn button {
        padding: 1rem 0.5rem;
        font-size: 0.8rem;
        min-height: 90px;
    }
    
    button .icono img {
        width: 40px;
        height: 40px;
    }
    
    button .icono a {
        font-size: 0.8rem;
    }
    
    .pie-pagina .grupo-1 {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 10px;
        text-align: center;
    }
    
    .pie-pagina .grupo-1 .box figure img {
        width: 90px;
    }
    
    .pie-pagina .grupo-1 .box h2 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .pie-pagina .grupo-1 .box p {
        font-size: 13px;
    }
    
    .pie-pagina .grupo-1 .box .alcaldesa {
        width: 110px;
    }
    
    .pie-pagina .grupo-2 {
        padding: 12px 15px;
    }
    
    .pie-pagina .grupo-2 small {
        font-size: 13px;
    }
    
    /* Trámites en línea - Tablets */
    .tarjetasdep {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 15px;
    }
    
    .title {
        font-size: 1rem;
        min-height: 50px;
    }
    
    /* Modal responsive */
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    /* Galería responsive */
    .contenedor-imagenes {
        width: 90%;
    }
    
    .contenedor-imagenes .imagen {
        width: 48%;
    }
    
    /* Noticias responsive */
    .noti-box {
        width: 70%;
    }
}

/* Móviles (480px) */
@media screen and (max-width: 480px) {
    .page-container {
        min-height: 100vh;
    }
    
    .encabezado .grupo-0 {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 5px;
    }
    
    .encabezado .grupo-0 .box-0 figure img {
        width: 70px;
    }
    
    .carousel-item {
        height: 250px; /* Altura más pequeña para móviles */
    }
    
    .Accesosrapidos {
        margin: 15px 0;
        padding: 0;
    }
    
    .containerBtn {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0 5px;
    }
    
    .containerBtn button {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
        min-height: 70px;
        flex-direction: row;
        text-align: left;
        justify-content: flex-start;
    }
    
    button .icono {
        flex-direction: row;
        gap: 15px;
        align-items: center;
    }
    
    button .icono img {
        width: 35px;
        height: 35px;
    }
    
    button .icono a {
        text-align: left;
        font-size: 0.9rem;
    }
    
    .pie-pagina .grupo-1 {
        padding: 20px 5px;
        gap: 15px;
    }
    
    .pie-pagina .grupo-1 .box figure img {
        width: 70px;
    }
    
    .pie-pagina .grupo-1 .box h2 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .pie-pagina .grupo-1 .box p {
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .pie-pagina .grupo-1 .box .alcaldesa {
        width: 90px;
    }
    
    .pie-pagina .grupo-1 .red-social a img {
        width: 35px;
        height: 35px;
    }
    
    .pie-pagina .grupo-2 {
        padding: 8px 10px;
    }
    
    .pie-pagina .grupo-2 small {
        font-size: 11px;
    }
    
    /* Trámites en línea - Móviles */
    .tarjetasdep {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(8, 1fr);
        gap: 10px;
    }
    
    .text_tarjet {
        padding: 20px;
    }
    
    /* Concejo - Móviles */
    .card {
        width: 260px;
        max-width: 260px;
    }
    
    .concejo-centro {
        padding: 10px;
    }
    
    /* Galería - Móviles */
    .contenedor-imagenes .imagen {
        width: 48%;
    }
    
    /* Noticias - Móviles */
    .noti-box {
        margin: 20px 10px;
        width: 100%;
    }
    
    #noti {
        padding: 20px;
    }
    
    /* Guía telefónica - Móviles */
    .floating-sidebar {
        top: 10px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100vh - 20px);
    }
    
    .floating-button {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Móviles muy pequeños (320px) */
@media screen and (max-width: 320px) {
    .page-container {
        min-height: 100vh;
    }
    
    .encabezado .grupo-0 .box-0 figure img {
        width: 60px;
    }
    
    .carousel-item {
        height: 200px; /* Altura mínima para móviles muy pequeños */
    }
    
    .containerBtn button {
        min-height: 60px;
        padding: 0.6rem 0.3rem;
    }
    
    button .icono img {
        width: 30px;
        height: 30px;
    }
    
    button .icono a {
        font-size: 0.8rem;
    }
    
    .pie-pagina .grupo-1 .box figure img {
        width: 60px;
    }
    
    .pie-pagina .grupo-1 .box .alcaldesa {
        width: 80px;
    }
    
    .pie-pagina .grupo-1 .red-social a img {
        width: 30px;
        height: 30px;
    }
}

/* Responsive adicionales para elementos específicos */
@media (max-width: 1250px) {
    .noti-box {
        width: 300px;
    }
}

@media (max-width: 1100px) {
    .noti-box {
        width: 70%;
    }
    
    .album1 {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .album1 {
        padding: 30px;
        grid-template-columns: repeat(1, 1fr);
    }
    
    .box1:nth-child(1) {
        grid-column-start: span 1;
    }
    
    .box1:nth-child(4) {
        grid-column-start: span 1;
    }
}

@media (max-width: 950px) {
    .card {
        width: 280px;
        max-width: 280px;
    }
}

@media screen and (max-width: 700px) {
    .contenedor-imagenes {
        width: 90%;
    }
    
    .contenedor-imagenes .imagen {
        width: 48%;
    }
}

@media (max-width: 550px) {
    .noti-box {
        margin: 20px 10px;
        width: 100%;
    }
    
    #noti {
        padding: 20px;
    }
}

@media screen and (max-width: 450px) {
    .contenedor-imagenes {
        width: 90%;
    }
    
    .contenedor-imagenes .imagen {
        width: 48%;
    }
}

@media (max-width: 520px) {
    .card {
        width: 260px;
        max-width: 260px;
    }
    
    .concejo-centro {
        padding: 10px;
    }
}