/* ===== VARIABLES Y ESTILOS BASE ===== */
:root {
  --azul_oscuro: #033A61;
  --azul_oficial: #0565A8;
  --blanco: #ffffff;
  --negro: #000000;
}

/* ===== ESTRUCTURA PRINCIPAL ===== */
.principal {
  display: grid;
  grid-template-columns: 340px 1fr 260px;
  gap: 25px;
  padding: 20px;
  max-width: 1500px;
  margin: 0 auto;
  align-items: start;
  min-height: 80vh;
}

/* ===== ALERTAS VIALES (IZQUIERDA) - MÁS ANCHA ===== */
.alertas {
  background-color: var(--azul_oscuro);
  border-radius: 12px;
  padding: 20px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--azul_oficial) rgba(255,255,255,0.1);
}

/* Personalización del scroll para Chrome/Safari */
.alertas::-webkit-scrollbar {
  width: 6px;
}

.alertas::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

.alertas::-webkit-scrollbar-thumb {
  background-color: var(--azul_oficial);
  border-radius: 3px;
}

.alertas h1 {
  color: var(--blanco);
  margin: 0 0 20px 0;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.icon_alerta {
  width: 24px;
  height: 24px;
}

/* ===== CONTENIDO CENTRAL (CORREGIDO) ===== */
.contenido-central {
  display: flex;
  flex-direction: column;
  gap: 30px;
  min-width: 0;
}

/* ===== BANNER PRINCIPAL Y NOTICIAS DESTACADAS ===== */
.banner-contenedor {
  display: grid;
  grid-template-columns: 70% 30%;
  gap: 25px;
  align-items: start;
}

/* BANNER PRINCIPAL */
.banner-principal {
  height: 400px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  width: 100%;
}

.banner-carrusel {
  width: 100%;
  height: 100%;
  position: relative;
}

.banner-slide {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-slide.active {
  opacity: 1;
}

.banner-imagen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a237e 0%, #1a73e8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--blanco);
  font-size: 1.5rem;
  font-weight: 600;
  border: 3px dashed rgba(255,255,255,0.3);
  border-radius: 12px;
  text-align: center;
  padding: 20px;
}

.banner-controls {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.banner-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid rgba(255,255,255,0.3);
}

.banner-dot.active {
  background: var(--azul_oficial);
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(26, 115, 232, 0.5);
}

.banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.7);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: all 0.3s;
}

.banner-nav:hover {
  background: rgba(0,0,0,0.9);
  transform: translateY(-50%) scale(1.15);
}

.banner-prev {
  left: 20px;
}

.banner-next {
  right: 20px;
}

/* ===== NOTICIAS DESTACADAS AL LADO DEL BANNER ===== */
.noticias-destacadas {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 400px;
}

.noticia-destacada-item {
  background: var(--blanco);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.08);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.noticia-destacada-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Badge de categoría */
.noticia-destacada-categoria {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
}

.noticia-categoria-badge {
  background-color: var(--azul_oficial);
  color: var(--blanco);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

/* Contenedor de la noticia */
.noticia-destacada {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

/* Imagen */
.noticia-destacada-thumb {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.noticia-destacada-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.noticia-destacada-item:hover .noticia-destacada-thumb img {
  transform: scale(1.05);
}

/* Overlay para texto */
.noticia-destacada-thumb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, 
    rgba(0,0,0,0.7) 0%, 
    rgba(0,0,0,0.4) 50%, 
    rgba(0,0,0,0) 100%);
  z-index: 1;
}

/* Título sobre la imagen */
.noticia-destacada-title-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 15px;
  z-index: 2;
  color: var(--blanco);
}

.noticia-destacada-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  text-shadow: 0 2px 5px rgba(0,0,0,0.7);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.noticia-destacada-title a {
  color: var(--blanco);
  text-decoration: none;
  transition: color 0.3s ease;
}

.noticia-destacada-title a:hover {
  color: #ffeb3b;
  text-decoration: underline;
}

/* Primera noticia un poco más destacada */
.noticia-destacada-item:first-child .noticia-destacada-title {
  font-size: 1.1rem;
}

/* Placeholder para cuando no hay imagen */
.noticia-destacada-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== ÚLTIMAS NOTICIAS ===== */
.ultimas-noticias-seccion {
  background: var(--blanco);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.ultimas-noticias-seccion h1 {
  color: var(--azul_oscuro);
  font-size: 1.8rem;
  margin: 0 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--azul_oficial);
}

.container {
  width: 100%;
}

.grid_container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-top: 25px;
}

.note {
  display: flex;
  flex-direction: column;
  background: var(--blanco);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  height: 100%;
}

.note:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.note__thumb {
  height: 300px;
  overflow: hidden;
}

.note__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.note:hover .note__thumb img {
  transform: scale(1.05);
}

.note__content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.note__content h2 {
  margin: 0 0 12px 0;
  font-size: 1.4rem;
  line-height: 1.4;
  font-weight: 700;
}

.note__content h2 a {
  color: var(--negro);
  text-decoration: none;
  transition: color 0.3s ease;
}

.note__content h2 a:hover {
  color: var(--azul_oficial);
  text-decoration: underline;
}

.meta {
  font-size: 0.9rem;
  color: var(--azul_oscuro);
  margin-bottom: 12px;
  font-weight: 500;
}

.excerpt {
  font-size: 1rem;
  line-height: 1.5;
  color: #555;
  margin: 0 0 15px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== BANNERS LATERALES DERECHOS - SIN SCROLL RARO ===== */
.banners-laterales {
  position: relative;
  top: 20px;
  height: fit-content;
  padding: 20px;
  /* Quitamos el fondo blanco y el borde */
  /* background: var(--blanco); */
  /* border-radius: 12px; */
  /* box-shadow: 0 6px 20px rgba(0,0,0,0.1); */
}

.banners-laterales-contenedor {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.banner-lateral-item {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.08);
}

.banner-lateral-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.banner-lateral-imagen {
  width: 100%;
  height: auto;
  display: block;
}

.banner-lateral-placeholder {
  min-height: 200px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--azul_oscuro);
  font-size: 1rem;
  font-weight: 500;
  border: 2px dashed var(--azul_oficial);
  border-radius: 10px;
  text-align: center;
  padding: 25px;
}

/* ===== TICKER DE NOTICIAS ===== */
.news-ticker-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, #0d47a1, #1565c0);
  color: white;
  height: 40px;
  display: flex;
  align-items: center;
  z-index: 1000;
  border-top: 2px solid #ff3d00;
  box-shadow: 0 -2px 15px rgba(0,0,0,0.4);
}

.ticker-label {
  background: #ff3d00;
  color: white;
  height: 100%;
  padding: 0 15px;
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  min-width: 180px;
}

.ticker-label span {
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.ticker-wrapper {
  flex: 1;
  overflow: hidden;
  height: 100%;
  position: relative;
}

.ticker-content {
  display: flex;
  align-items: center;
  height: 100%;
  position: absolute;
  left: 0;
  transition: transform 0.5s ease;
}

.ticker-item {
  padding: 0 30px;
  font-size: 14px;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.2);
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-item a {
  color: white;
  text-decoration: none;
}

.ticker-item a:hover {
  color: #ffeb3b;
}

/* ===== RESPONSIVE ===== */

/* TABLET GRANDE (1200px - 1025px) */
@media (max-width: 1200px) {
  .principal {
    grid-template-columns: 320px 1fr 240px;
    gap: 22px;
    padding: 18px;
  }
  
  .banner-contenedor {
    grid-template-columns: 68% 32%;
    gap: 22px;
  }
  
  .banner-principal {
    height: 380px;
  }
  
  .noticias-destacadas {
    height: 380px;
  }
  
  .noticia-destacada-title {
    font-size: 0.95rem;
  }
  
  .noticia-destacada-item:first-child .noticia-destacada-title {
    font-size: 1rem;
  }
}

/* TABLET MEDIANA (1024px - 769px) */
@media (max-width: 1024px) {
  .principal {
    grid-template-columns: 280px 1fr 220px;
    gap: 20px;
  }
  
  .banner-contenedor {
    grid-template-columns: 65% 35%;
    gap: 20px;
  }
  
  .banner-principal {
    height: 350px;
  }
  
  .noticias-destacadas {
    height: 350px;
  }
  
  .noticia-destacada-title {
    font-size: 0.9rem;
  }
  
  .noticia-destacada-title-container {
    padding: 12px;
  }
  
  .banner-lateral-placeholder {
    min-height: 180px;
  }
}

/* TABLET PEQUEÑA (768px - 641px) - MODO RETRATO */
@media (max-width: 768px) {
  .principal {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 15px;
  }
  
  /* ALERTAS - MÁS COMPACTAS EN TABLET */
  .alertas {
    position: static;
    max-height: none;
    width: 100%;
    order: 1;
  }
  
  /* CONTENIDO CENTRAL - TOMA TODO EL ANCHO */
  .contenido-central {
    order: 2;
    gap: 20px;
  }
  

  /* BANNER PRINCIPAL Y NOTICIAS DESTACADAS - EN COLUMNA */
  .banner-contenedor {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .banner-principal {
    height: 300px;
  }
  
  /* NOTICIAS DESTACADAS - EN FILA EN TABLET */
  .noticias-destacadas {
    height: auto;
    flex-direction: row;
    gap: 15px;
  }
  
  .noticia-destacada-item {
    height: 200px;
  }
  
  .noticia-destacada-title {
    font-size: 0.85rem;
  }
  
  .noticia-destacada-title-container {
    padding: 10px;
  }
  
  /* ÚLTIMAS NOTICIAS - 2 COLUMNAS EN TABLET */
  .grid_container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .note__thumb {
    height: 200px;
  }
  
  .note__content h2 {
    font-size: 1.2rem;
  }
}

/* MÓVIL GRANDE (640px - 481px) */
@media (max-width: 640px) {
  .principal {
    padding: 12px;
    gap: 15px;
  }
  
  .banner-principal {
    height: 220px;
  }
  
  .banner-nav {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  /* NOTICIAS DESTACADAS - EN COLUMNA EN MÓVIL */
  .noticias-destacadas {
    flex-direction: column;
    gap: 15px;
  }
  
  .noticia-destacada-item {
    height: 180px;
  }
  
  .noticia-destacada-title {
    font-size: 0.9rem;
    -webkit-line-clamp: 3;
  }
  
  /* ÚLTIMAS NOTICIAS - 1 COLUMNA EN MÓVIL */
  .grid_container {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .note__thumb {
    height: 180px;
  }
  
  .note__content {
    padding: 15px;
  }
  
  .note__content h2 {
    font-size: 1.1rem;
  }
  
  .ultimas-noticias-seccion {
    padding: 20px 15px;
  }
  
  .ultimas-noticias-seccion h1 {
    font-size: 1.5rem;
  }
  
  .ticker-label {
    min-width: 150px;
    font-size: 12px;
  }
  
  .ticker-item {
    font-size: 13px;
    padding: 0 20px;
  }
}

/* MÓVIL PEQUEÑO (480px o menos) */
@media (max-width: 480px) {
  .principal {
    padding: 10px;
    gap: 12px;
  }
  
  .alertas {
    padding: 15px;
  }
  
  .alertas h1 {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }
  
  .banner-principal {
    height: 180px;
  }
  
  .banner-nav {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
  
  .banner-controls {
    bottom: 15px;
  }
  
  .banner-dot {
    width: 10px;
    height: 10px;
  }
  
  .noticia-destacada-item {
    height: 160px;
  }
  
  .noticia-destacada-title {
    font-size: 0.85rem;
  }
  
  .noticia-destacada-categoria {
    top: 8px;
    left: 8px;
  }
  
  .noticia-categoria-badge {
    font-size: 0.6rem;
    padding: 4px 8px;
  }
  
  .note__thumb {
    height: 160px;
  }
  
  .note__content h2 {
    font-size: 1rem;
  }
  
  .excerpt {
    font-size: 0.9rem;
  }
  
  .ticker-label {
    min-width: 130px;
    font-size: 11px;
    padding: 0 10px;
  }
  
  .ticker-item {
    font-size: 12px;
    padding: 0 15px;
  }
  
  .news-ticker-container {
    height: 35px;
  }
}

/* MÓVIL MUY PEQUEÑO (360px o menos) */
@media (max-width: 360px) {
  .banner-principal {
    height: 160px;
  }
  
  .noticia-destacada-item {
    height: 140px;
  }
  
  .noticia-destacada-title {
    font-size: 0.8rem;
  }
  
  .note__thumb {
    height: 140px;
  }
  
  .ultimas-noticias-seccion h1 {
    font-size: 1.3rem;
  }
}







/* ===== BANNER EN NOTA ===== */
.banner-nota-container {
  margin: 30px 0;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}



.banner-nota-imagen {
  width: 100%;
  height: auto;
  display: block;
  max-height: 300px;
  object-fit: cover;
}

.banner-nota-placeholder {
  margin: 30px 0;
  width: 100%;
  min-height: 200px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--azul_oscuro);
  font-size: 1.1rem;
  font-weight: 500;
  border: 2px dashed var(--azul_oficial);
  border-radius: 12px;
  text-align: center;
  padding: 25px;
}

/* Para el contenedor principal */
.ultimas-noticias-seccion {
  width: 100%;
}

/* Opcional: Si quieres que ocupe el mismo ancho que las noticias */
.contenido-central {
  width: 100%;
}








/* ===== BANNERS EN NOTA - CARRUSEL ===== */
.banners-notas-section {
    margin: 40px auto;
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
}

.banner-nota-carousel {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: 250px;
    background: #f8f9fa;
}

.banner-nota-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    z-index: 1;
}

.banner-nota-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.banner-nota-imagen {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Efecto hover para todo el banner */
.banner-nota-carousel a {
    display: block;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.banner-nota-carousel a:hover {
    transform: scale(1.02);
}

/* Indicadores (puntos de navegación) */
.banner-nota-indicators {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 3;
    padding: 10px;
}

.banner-nota-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.banner-nota-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: white;
    transform: scale(1.3);
}

.banner-nota-indicator.active {
    background: white;
    border-color: white;
    transform: scale(1.3);
}

/* Placeholder cuando no hay banners */
.banner-nota-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--azul_oscuro);
    font-size: 1.2rem;
    font-weight: 500;
    border: 3px dashed var(--azul_oficial);
    border-radius: 12px;
    text-align: center;
    padding: 30px;
    margin: 40px auto;
}

/* Responsive */
@media (max-width: 992px) {
    .banner-nota-carousel {
        height: 200px;
    }
    
    .banner-nota-placeholder {
        height: 200px;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .banners-notas-section {
        padding: 0 10px;
        margin: 30px auto;
    }
    
    .banner-nota-carousel {
        height: 180px;
        border-radius: 8px;
    }
    
    .banner-nota-placeholder {
        height: 180px;
        font-size: 1.1rem;
    }
    
    .banner-nota-indicators {
        bottom: 15px;
    }
    
    .banner-nota-indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .banner-nota-carousel {
        height: 150px;
    }
    
    .banner-nota-placeholder {
        height: 150px;
        font-size: 1rem;
        padding: 15px;
    }
}







 /* ===== BANNER ROTATIVO DEL INDEX - IGUAL QUE NOTA.CSS ===== */
.banner-rotativo-index {
    position: relative;
    height: 150px; /* Altura fija igual que nota.css */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: var(--blanco);
    border: 1px solid rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 900px;
}

.banner-slide-index {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.banner-slide-index.active {
    opacity: 1;
    z-index: 2;
}

.banner-slide-index a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* IMAGEN EXACTAMENTE IGUAL QUE EN NOTA.CSS */
.banner-slide-index img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Mantener cover como en nota.css */
    object-position: center;
    display: block;
}

.banner-nota-placeholder-index {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--azul_oscuro);
    font-size: 1rem;
    border: 2px dashed var(--azul_oficial);
    border-radius: 8px;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    margin: 20px auto;
    max-width: 900px;
}

/* ===== RESPONSIVE EXACTAMENTE IGUAL QUE NOTA.CSS ===== */

@media (max-width: 768px) {
    .banner-rotativo-index {
        height: 120px; /* Igual que en nota.css */
        border-radius: 6px;
        margin: 15px auto;
    }
    
    .banner-nota-placeholder-index {
        height: 120px;
        font-size: 0.9rem;
        padding: 15px;
        margin: 15px auto;
    }
}

@media (max-width: 576px) {
    .banner-rotativo-index {
        height: 100px; /* Igual que en nota.css */
        margin: 12px auto;
    }
    
    .banner-nota-placeholder-index {
        height: 100px;
        padding: 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .banner-rotativo-index {
        height: 80px; /* Igual que en nota.css */
    }
    
    .banner-nota-placeholder-index {
        height: 80px;
        font-size: 0.8rem;
    }
}
        
        
        
        
        
        
        
        /* ===== ESTILOS PARA PAGINACIÓN ===== */
.paginacion-container {
    margin: 40px 0 20px;
    padding: 20px;
    border-top: 2px solid #eee;
    text-align: center;
}

.paginacion-info {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.paginacion-botones {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn-paginacion {
    padding: 10px 20px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-paginacion:hover {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

.numeros-pagina {
    display: flex;
    gap: 5px;
}

.numeros-pagina a {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    min-width: 40px;
    text-align: center;
    transition: all 0.3s ease;
}

.numeros-pagina a:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

.numeros-pagina a.activa {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    font-weight: bold;
}

/* Botón Ver Más */
.ver-mas-container {
    margin-top: 30px;
    text-align: center;
}

.btn-ver-mas {
    display: inline-block;
    padding: 12px 30px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-ver-mas:hover {
    background-color: white;
    color: #007bff;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .paginacion-botones {
        flex-direction: column;
        gap: 15px;
    }
    
    .numeros-pagina {
        order: 2;
    }
    
    .btn-paginacion.anterior {
        order: 1;
    }
    
    .btn-paginacion.siguiente {
        order: 3;
    }
}






/* ===== TABLET Y LAPTOP OPTIMIZADO ===== */

/* TABLET HORIZONTAL (1024px - 900px) */
@media (max-width: 1024px) and (min-width: 901px) {
  .principal {
    grid-template-columns: 300px 1fr; /* Eliminamos la tercera columna */
    grid-template-areas: 
      "alertas contenido";
    gap: 20px;
    padding: 18px;
    max-width: 100%;
  }
  
  /* Mover banners laterales fuera del grid */
  .banners-laterales {
    display: none; /* Los ocultamos en este rango */
  }
  
  .alertas {
    grid-area: alertas;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
  }
  
  .contenido-central {
    grid-area: contenido;
  }
  
  .banner-contenedor {
    grid-template-columns: 60% 40%;
    gap: 20px;
  }
  
  .banner-principal {
    height: 340px;
  }
  
  .noticias-destacadas {
    height: 340px;
  }
  
  .grid_container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .note__thumb {
    height: 220px;
  }
}

/* TABLET VERTICAL (900px - 769px) */
@media (max-width: 900px) and (min-width: 769px) {
  .principal {
    grid-template-columns: 280px 1fr;
    grid-template-areas: 
      "alertas contenido";
    gap: 18px;
    padding: 15px;
  }
  
  .banners-laterales {
    display: none;
  }
  
  .banner-contenedor {
    grid-template-columns: 55% 45%;
    gap: 18px;
  }
  
  .banner-principal {
    height: 320px;
  }
  
  .noticias-destacadas {
    height: 320px;
    flex-direction: column;
    gap: 15px;
  }
  
  .noticia-destacada-item {
    height: 152px; /* 320px / 2 - gap */
  }
  
  .noticia-destacada-title {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
  }
  
  .noticia-destacada-title-container {
    padding: 10px;
  }
  
  .grid_container {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  
  .note__thumb {
    height: 200px;
  }
}

/* LAPTOP PEQUEÑA (1200px - 1025px) - Ya existe, ajustamos */
@media (max-width: 1200px) and (min-width: 1025px) {
  .principal {
    grid-template-columns: 300px 1fr 220px; /* Reducimos un poco */
    gap: 20px;
    padding: 18px;
  }
  
  .banner-contenedor {
    grid-template-columns: 65% 35%;
    gap: 20px;
  }
  
  .banner-principal {
    height: 360px;
  }
  
  .noticias-destacadas {
    height: 360px;
  }
  
  .banners-laterales-contenedor {
    gap: 18px;
  }
  
  .banner-lateral-imagen {
    max-height: 150px;
    object-fit: cover;
  }
  
  .banner-lateral-placeholder {
    min-height: 150px;
    font-size: 0.9rem;
    padding: 20px;
  }
}

/* TABLET DE 10" (820px - 768px) - iPads, etc */
@media (max-width: 820px) and (min-width: 768px) {
  .principal {
    grid-template-columns: 260px 1fr;
    grid-template-areas: 
      "alertas contenido";
    gap: 15px;
    padding: 12px;
  }
  
  .alertas {
    padding: 15px;
    max-height: calc(100vh - 30px);
  }
  
  .alertas h1 {
    font-size: 1.1rem;
  }
  
  .banners-laterales {
    display: none;
  }
  
  .banner-contenedor {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .banner-principal {
    height: 280px;
  }
  
  .noticias-destacadas {
    height: auto;
    flex-direction: row;
    gap: 15px;
  }
  
  .noticia-destacada-item {
    height: 160px;
  }
  
  .grid_container {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .note__thumb {
    height: 180px;
  }
  
  .note__content h2 {
    font-size: 1.1rem;
  }
  
  /* Banner rotativo */
  .banner-rotativo-index {
    height: 120px;
    margin: 15px auto;
  }
  
  .banner-nota-placeholder-index {
    height: 120px;
  }
}

/* MEJORAS PARA EL RANGO DE TABLET EN GENERAL */
@media (max-width: 1024px) {
  /* Ajustar fuente en todo el contenido central */
  .contenido-central {
    font-size: 0.95rem;
  }
  
  /* Asegurar que las imágenes no se desborden */
  .banner-imagen,
  .noticia-destacada-thumb img,
  .note__thumb img {
    max-width: 100%;
    height: auto;
  }
  
  /* Mejorar legibilidad de textos */
  .noticia-destacada-title {
    line-height: 1.25;
  }
  
  .note__content h2 {
    line-height: 1.3;
  }
  
  /* Ajustar espaciados */
  .ultimas-noticias-seccion {
    padding: 20px;
  }
  
  .note__content {
    padding: 15px;
  }
  
  /* Mejorar el ticker para tablet */
  .news-ticker-container {
    height: 35px;
  }
  
  .ticker-label {
    min-width: 140px;
    font-size: 12px;
  }
  
  .ticker-item {
    font-size: 13px;
    padding: 0 20px;
  }
}

/* CORRECCIÓN ESPECÍFICA PARA BANNERS LATERALES EN TABLET */
@media (max-width: 1024px) and (min-width: 769px) {
  .banners-laterales {
    display: none !important; /* Forzar ocultamiento */
  }
  
  /* Si quieres mostrar banners alternativos en tablet, podrías agregar esto: */
  /*
  .banners-laterales-tablet {
    display: block;
    grid-column: 1 / -1;
    margin-top: 20px;
  }
  
  .banners-laterales-tablet .banners-laterales-contenedor {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
  }
  
  .banners-laterales-tablet .banner-lateral-item {
    width: calc(50% - 15px);
    max-width: 300px;
  }
  */
}

/* AJUSTE FINO PARA MÁXIMA LEGIBILIDAD EN TABLET */
@media (max-width: 900px) {
  /* Limitar longitud de líneas para mejor lectura */
  .note__content h2,
  .noticia-destacada-title {
    max-width: 95%;
  }
  
  /* Asegurar contraste suficiente */
  .noticia-destacada-title a {
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  }
  
  /* Mejorar espaciado de metadatos */
  .meta {
    font-size: 0.85rem;
    margin-bottom: 10px;
  }
  
  .excerpt {
    font-size: 0.95rem;
    line-height: 1.4;
    -webkit-line-clamp: 2;
  }
}











/* ===== BANNERS LATERALES PARA MÓVIL (CARRUSEL) ===== */

/* Contenedor principal del carrusel móvil */
.banners-movil-container {
    display: none; /* Oculto por defecto, solo visible en móvil */
    margin: 25px auto;
    width: 100%;
    max-width: 500px;
    padding: 0 15px;
    order: 3; /* Para posicionar en el grid */
}

/* Carrusel de banners */
.banners-movil-carrusel {
    position: relative;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: var(--blanco);
    border: 2px solid var(--azul_oficial);
}

/* Slides individuales */
.banner-movil-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    z-index: 1;
}

.banner-movil-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Imagen del banner */
.banner-movil-imagen {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Enlace del banner */
.banner-movil-slide a {
    display: block;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.banner-movil-slide a:hover {
    transform: scale(1.02);
}

/* Placeholder cuando no hay banners */
.banner-movil-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--azul_oscuro);
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    padding: 20px;
}

/* Indicadores (puntos de navegación) */
.banners-movil-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
}

.banner-movil-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--azul_oficial);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.banner-movil-indicator:hover {
    background: var(--azul_oficial);
    transform: scale(1.3);
}

.banner-movil-indicator.active {
    background: var(--azul_oficial);
    border-color: var(--azul_oscuro);
    transform: scale(1.3);
}

/* ===== POSICIONAMIENTO EN MÓVIL ===== */

/* Para pantallas medianas (tablet), mantener banners ocultos */
@media (min-width: 769px) {
    .banners-movil-container {
        display: none !important;
    }
    
    /* Mostrar banners laterales normales */
    .banners-laterales {
        display: block !important;
    }
}

/* Para móviles (768px y menos) */
@media (max-width: 768px) {
    /* Ocultar banners laterales de escritorio */
    .banners-laterales {
        display: none !important;
    }
    
    /* Mostrar carrusel móvil */
    .banners-movil-container {
        display: block;
    }
    
    /* Reorganizar el grid para móvil */
    .principal {
        grid-template-areas: 
            "alertas"
            "contenido"
            "banners-movil";
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Posicionar el carrusel en el orden correcto */
    .alertas {
        grid-area: alertas;
        order: 1;
    }
    
    .contenido-central {
        grid-area: contenido;
        order: 2;
    }
    
    .banners-movil-container {
        grid-area: banners-movil;
        order: 3;
        margin: 20px auto;
    }
    
    /* Ajustar la estructura del contenido central */
    .banner-contenedor {
        order: 1;
    }
    
    .ultimas-noticias-seccion {
        order: 2;
        margin-bottom: 10px;
    }
    
    .banners-movil-container {
        order: 3;
        margin-top: 10px;
        margin-bottom: 20px;
    }
    
    /* Ajustar tamaño del carrusel para móvil */
    .banners-movil-carrusel {
        height: 180px;
    }
}

/* Móviles más pequeños */
@media (max-width: 640px) {
    .banners-movil-carrusel {
        height: 160px;
    }
    
    .banner-movil-placeholder {
        font-size: 1rem;
        padding: 15px;
    }
    
    .banners-movil-container {
        padding: 0 10px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .banners-movil-carrusel {
        height: 140px;
        border-radius: 10px;
    }
    
    .banner-movil-indicator {
        width: 10px;
        height: 10px;
    }
    
    .banners-movil-indicators {
        gap: 8px;
        margin-top: 12px;
    }
}





/* ===== BANNERS LATERALES PARA MÓVIL (CARRUSEL) ===== */

/* Contenedor principal - OCULTO por defecto, solo visible en móvil */
.banners-movil-container {
    display: none;
    margin: 20px 0;
    width: 100%;
    padding: 0;
    order: 0; /* Se posicionará con media queries */
}

/* Carrusel de banners móvil */
.banners-movil-carrusel {
    position: relative;
    height: 180px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: var(--blanco);
    border: 2px solid var(--azul_oficial);
    margin: 0 auto;
    max-width: 500px;
}

/* Slides individuales */
.banner-movil-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    z-index: 1;
}

.banner-movil-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Imagen del banner */
.banner-movil-imagen {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder cuando no hay banners */
.banner-movil-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--azul_oscuro);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    padding: 20px;
    border: 3px dashed var(--azul_oficial);
}

/* Indicadores (puntos de navegación) */
.banners-movil-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding: 0 10px;
}

.banner-movil-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--azul_oficial);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.banner-movil-indicator:hover {
    background: var(--azul_oficial);
    transform: scale(1.3);
}

.banner-movil-indicator.active {
    background: var(--azul_oficial);
    border-color: var(--azul_oscuro);
    transform: scale(1.3);
}

/* ===== RESPONSIVE ===== */

/* MOSTRAR CARRUSEL SOLO EN MÓVIL (768px o menos) */
@media (max-width: 768px) {
    .banners-movil-container {
        display: block;
        order: 3; /* Después del banner-contenedor (order: 2) y antes de últimas noticias (order: 4) */
    }
    
    /* Reorganizar el orden en móvil */
    .contenido-central {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .banner-contenedor {
        order: 1;
    }
    
    .banners-movil-container {
        order: 2;
        margin: 15px 0;
    }
    
    .ultimas-noticias-seccion {
        order: 3;
        margin-top: 10px;
    }
    
    .banner-rotativo-index {
        order: 4;
        margin-top: 20px;
    }
    
    /* Ocultar banners laterales de escritorio en móvil */
    .banners-laterales {
        display: none !important;
    }
    
    /* Ajustar el carrusel para móvil */
    .banners-movil-carrusel {
        height: 160px;
        max-width: 100%;
    }
}

/* Móviles medianos (640px o menos) */
@media (max-width: 640px) {
    .banners-movil-carrusel {
        height: 150px;
        border-radius: 8px;
    }
    
    .banner-movil-placeholder {
        font-size: 1.1rem;
        padding: 15px;
    }
    
    .banners-movil-indicators {
        margin-top: 10px;
    }
    
    .banner-movil-indicator {
        width: 10px;
        height: 10px;
    }
}

/* Móviles pequeños (480px o menos) */
@media (max-width: 480px) {
    .banners-movil-carrusel {
        height: 140px;
    }
    
    .banner-movil-placeholder {
        font-size: 1rem;
        padding: 12px;
    }
    
    .banners-movil-indicators {
        gap: 8px;
    }
    
    .banner-movil-indicator {
        width: 8px;
        height: 8px;
    }
}

/* Móviles muy pequeños (360px o menos) */
@media (max-width: 360px) {
    .banners-movil-carrusel {
        height: 120px;
        border-width: 1px;
    }
    
    .banner-movil-placeholder {
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .banners-movil-indicators {
        display: none; /* Ocultar indicadores en móviles muy pequeños */
    }
}

/* ===== OCULTAR/MOSTRAR SEGÚN DISPOSITIVO ===== */

/* Para pantallas grandes (escritorio) */
@media (min-width: 769px) {
    .banners-movil-container {
        display: none !important;
    }
    
    .banners-laterales {
        display: block !important;
    }
}




/* ===== CORRECCIÓN: ANCHO DE NOTICIAS DESTACADAS EN MÓVIL ===== */

/* TABLET (768px - 641px) - Modo retrato */
@media (max-width: 768px) {
    /* BANNER Y NOTICIAS DESTACADAS - CAMBIAR A UNA COLUMNA COMPLETA */
    .banner-contenedor {
        grid-template-columns: 1fr; /* Una sola columna */
        gap: 15px;
    }
    
    /* BANNER PRINCIPAL - OCUPA TODO EL ANCHO */
    .banner-principal {
        width: 100%;
        height: 200px; /* Ajusta según necesites */
    }
    
    /* NOTICIAS DESTACADAS - OCUPAR TODO EL ANCHO EN FILA */
    .noticias-destacadas {
        width: 100%;
        height: auto;
        flex-direction: row; /* Mantener en fila */
        gap: 15px;
        display: flex;
    }
    
    /* CADA NOTICIA DESTACADA - 50% DEL ANCHO MENOS EL GAP */
    .noticia-destacada-item {
        width: calc(50% - 7.5px); /* 50% menos la mitad del gap */
        height: 140px; /* Ajustar altura si es necesario */
        flex: none; /* Evitar que se estiren */
    }
    
    /* Asegurar que las imágenes se adapten */
    .noticia-destacada-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* MÓVIL GRANDE (640px - 481px) */
@media (max-width: 640px) {
    .noticia-destacada-item {
        height: 130px;
        width: calc(50% - 6px); /* Ajustar con nuevo gap */
    }
    
    .noticias-destacadas {
        gap: 12px;
    }
    
    .noticia-destacada-title {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
}

/* MÓVIL MEDIANO (480px o menos) - CAMBIAR A COLUMNA SI SE VEN MUY ESTRECHAS */
@media (max-width: 480px) {
    .noticias-destacadas {
        flex-direction: column; /* Cambiar a columna en móviles pequeños */
        gap: 10px;
    }
    
    .noticia-destacada-item {
        width: 100%; /* Ocupar todo el ancho */
        height: 120px;
    }
    
    /* Opcional: Si quieres mantenerlas en fila pero más anchas */
    /*
    .noticia-destacada-item {
        width: calc(50% - 5px);
        height: 110px;
    }
    */
}

/* MÓVIL MUY PEQUEÑO (360px o menos) */
@media (max-width: 360px) {
    .noticia-destacada-item {
        height: 100px;
    }
    
    .noticia-destacada-title {
        font-size: 0.75rem;
        -webkit-line-clamp: 2;
    }
}






/* ===== BANNER ROTATIVO DEL INDEX - PARA NOTAS ===== */
.banner-rotativo-index {
    position: relative;
    height: 150px; /* Altura fija */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: var(--blanco);
    border: 1px solid rgba(0,0,0,0.1);
    margin: 25px auto 30px auto; /* Espacio arriba y abajo */
    max-width: 900px;
    width: 100%;
}

.banner-slide-index {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.banner-slide-index.active {
    opacity: 1;
    z-index: 2;
}

.banner-slide-index a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* IMAGEN - Asegurar que cubra todo el contenedor */
.banner-slide-index img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esto es importante */
    object-position: center;
    display: block;
}

/* Placeholder cuando no hay banners */
.banner-nota-placeholder-index {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--azul_oscuro);
    font-size: 1rem;
    border: 2px dashed var(--azul_oficial);
    border-radius: 8px;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

/* ===== RESPONSIVE ===== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .banner-rotativo-index {
        max-width: 95%;
        height: 140px;
        margin: 20px auto;
    }
    
    .banner-nota-placeholder-index {
        height: 140px;
    }
}

/* Móvil Grande (768px o menos) */
@media (max-width: 768px) {
    .banner-rotativo-index {
        height: 120px;
        margin: 20px auto;
        max-width: 95%;
        border-radius: 6px;
    }
    
    .banner-nota-placeholder-index {
        height: 120px;
        font-size: 0.9rem;
        padding: 15px;
    }
}

/* Móvil Mediano (576px o menos) */
@media (max-width: 576px) {
    .banner-rotativo-index {
        height: 100px;
        margin: 15px auto;
        max-width: 100%;
        border-radius: 5px;
    }
    
    .banner-nota-placeholder-index {
        height: 100px;
        padding: 15px;
        font-size: 0.9rem;
    }
}

/* Móvil Pequeño (360px o menos) */
@media (max-width: 360px) {
    .banner-rotativo-index {
        height: 80px;
        margin: 12px auto;
    }
    
    .banner-nota-placeholder-index {
        height: 80px;
        font-size: 0.8rem;
        padding: 10px;
    }
}


/* ===== BANNERS LATERALES PARA MÓVIL - MANTENER PROPORCIÓN DESKTOP ===== */

/* Contenedor principal - OCULTO por defecto */
.banners-movil-container {
    display: none;
    margin: 25px auto;
    width: 100%;
    max-width: 500px;
    padding: 0 15px;
    order: 0;
}

/* Carrusel - MANTENER MISMA PROPORCIÓN QUE EN DESKTOP */
.banners-movil-carrusel {
    position: relative;
    width: 100%;
    height: auto; /* Altura automática basada en la imagen */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: var(--blanco);
    border: 2px solid var(--azul_oficial);
    margin: 0 auto;
}

/* Slides individuales */
.banner-movil-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    z-index: 1;
}

.banner-movil-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* IMAGEN - MANTENER PROPORCIÓN ORIGINAL COMO EN DESKTOP */
.banner-movil-imagen {
    width: 100%;
    height: auto; /* ← CLAVE: Altura automática, no forzar altura fija */
    display: block;
    max-height: none; /* Permitir que la imagen determine la altura */
    object-fit: contain; /* Mostrar imagen completa, sin recortar */
}

/* Enlace - ocupar todo */
.banner-movil-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Placeholder - MANTENER MISMA PROPORCIÓN */
.banner-movil-placeholder {
    width: 100%;
    height: 180px; /* Altura similar a los banners en desktop */
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--azul_oscuro);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    padding: 20px;
    border: 3px dashed var(--azul_oficial);
}

/* Indicadores */
.banners-movil-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding: 0 10px;
}

.banner-movil-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--azul_oficial);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.banner-movil-indicator:hover {
    background: var(--azul_oficial);
    transform: scale(1.3);
}

.banner-movil-indicator.active {
    background: var(--azul_oficial);
    border-color: var(--azul_oscuro);
    transform: scale(1.3);
}

/* ===== RESPONSIVE - MOSTRAR SOLO EN MÓVIL ===== */

/* MOSTRAR CARRUSEL SOLO EN MÓVIL (768px o menos) */
@media (max-width: 768px) {
    .banners-movil-container {
        display: block;
        order: 3;
    }
    
    /* Reorganizar el orden */
    .contenido-central {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .banner-contenedor {
        order: 1;
    }
    
    .banners-movil-container {
        order: 2;
        margin: 20px 0;
    }
    
    .ultimas-noticias-seccion {
        order: 3;
    }
    
    .banner-rotativo-index {
        order: 4;
    }
    
    /* Ocultar banners laterales de escritorio */
    .banners-laterales {
        display: none !important;
    }
    
    /* Limitar el ancho máximo para que no sea demasiado grande */
    .banners-movil-container {
        max-width: 400px; /* Similar al ancho de los banners en desktop (260px) pero adaptado a móvil */
    }
}

/* Móviles medianos (640px o menos) */
@media (max-width: 640px) {
    .banners-movil-container {
        max-width: 350px;
    }
    
    .banner-movil-placeholder {
        height: 160px;
        font-size: 1.1rem;
        padding: 15px;
    }
}

/* Móviles pequeños (480px o menos) */
@media (max-width: 480px) {
    .banners-movil-container {
        max-width: 300px;
        padding: 0 10px;
    }
    
    .banner-movil-placeholder {
        height: 140px;
        font-size: 1rem;
        padding: 12px;
    }
    
    .banner-movil-indicator {
        width: 10px;
        height: 10px;
    }
}

/* Móviles muy pequeños (360px o menos) */
@media (max-width: 360px) {
    .banners-movil-container {
        max-width: 280px;
    }
    
    .banner-movil-placeholder {
        height: 120px;
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .banners-movil-indicators {
        display: none;
    }
}

/* ===== OCULTAR/MOSTRAR SEGÚN DISPOSITIVO ===== */

/* Para pantallas grandes (escritorio) */
@media (min-width: 769px) {
    .banners-movil-container {
        display: none !important;
    }
    
    .banners-laterales {
        display: block !important;
    }
}




/* MANTENER EXACTA PROPORCIÓN DE DESKTOP */
@media (max-width: 768px) {
    .banners-movil-container {
        max-width: 300px; /* Un poco más ancho que los 260px de desktop para móvil */
    }
    
    .banners-movil-carrusel {
        width: 100%;
        height: 208px; /* 300px / 1.44 = ~208px (misma proporción que desktop) */
    }
    
    .banner-movil-imagen {
        width: 100%;
        height: 100%;
        object-fit: contain; /* Mostrar imagen completa */
        background-color: white; /* Fondo si la imagen es más pequeña */
    }
}





/* ===== BANNERS LATERALES PARA MÓVIL - CENTRADO ===== */

/* Contenedor principal - CENTRADO */
.banners-movil-container {
    display: none;
    margin: 25px auto; /* ← Ya está centrado horizontalmente con 'auto' */
    width: 100%;
    max-width: 400px; /* Ancho máximo para no ser demasiado ancho */
    padding: 0 15px;
    order: 0;
    text-align: center; /* ← Añadir para centrar contenido interno */
}

/* Carrusel - CENTRADO DENTRO DEL CONTENEDOR */
.banners-movil-carrusel {
    position: relative;
    width: 100%;
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: var(--blanco);
    border: 2px solid var(--azul_oficial);
    margin: 0 auto; /* ← CENTRADO: margen automático izquierdo/derecho */
    display: block; /* ← Asegurar que sea block para centrar con margin auto */
}

/* ===== RESPONSIVE - CENTRADO EN TODOS LOS DISPOSITIVOS MÓVILES ===== */

/* MOSTRAR Y CENTRAR EN MÓVIL (768px o menos) */
@media (max-width: 768px) {
    .banners-movil-container {
        display: block;
        order: 2;
        margin: 20px auto; /* ← Centrado arriba/abajo y laterales */
        text-align: center;
        width: 100%;
        padding: 0; /* ← Quitar padding lateral del contenedor */
    }
    
    /* Ajustar el contenido central para mejor centrado */
    .contenido-central {
        display: flex;
        flex-direction: column;
        align-items: center; /* ← CENTRAR elementos hijos horizontalmente */
        gap: 20px;
        width: 100%;
    }
    
    .banner-contenedor {
        order: 1;
        width: 100%; /* ← Asegurar ancho completo */
    }
    
    .banners-movil-container {
        order: 2;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center; /* ← CENTRAR contenido interno */
    }
    
    .ultimas-noticias-seccion {
        order: 3;
        width: 100%; /* ← Asegurar ancho completo */
    }
    
    .banner-rotativo-index {
        order: 4;
        width: 100%;
    }
    
    /* Carrusel dentro de su contenedor */
    .banners-movil-carrusel {
        width: 90%; /* ← 90% del contenedor padre, centrado automáticamente */
        max-width: 400px;
        margin: 0 auto; /* ← CENTRADO */
    }
}

/* Móviles medianos (640px o menos) */
@media (max-width: 640px) {
    .banners-movil-container {
        margin: 15px auto;
    }
    
    .banners-movil-carrusel {
        width: 92%;
        max-width: 350px;
    }
}

/* Móviles pequeños (480px o menos) */
@media (max-width: 480px) {
    .banners-movil-container {
        margin: 12px auto;
    }
    
    .banners-movil-carrusel {
        width: 95%;
        max-width: 300px;
    }
}

/* Móviles muy pequeños (360px o menos) */
@media (max-width: 360px) {
    .banners-movil-carrusel {
        width: 98%;
        max-width: 280px;
    }
}




/* SOLUCIÓN ALTERNATIVA PARA CENTRADO PERFECTO */
@media (max-width: 768px) {
    .banners-movil-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 20px 0;
        padding: 0;
    }
    
    .banners-movil-carrusel {
        width: 90%;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
    
    /* Asegurar que los indicadores también estén centrados */
    .banners-movil-indicators {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 15px;
    }
}



/* Asegurar que .principal también esté centrando contenido */
@media (max-width: 768px) {
    .principal {
        display: flex;
        flex-direction: column;
        align-items: center; /* ← CENTRAR todo el contenido */
        justify-content: flex-start;
        width: 100%;
        max-width: 100%;
        padding: 15px;
        margin: 0 auto;
    }
    
    .alertas {
        width: 100%;
        max-width: 600px; /* Limitar ancho máximo */
    }
    
    .contenido-central {
        width: 100%;
        max-width: 800px; /* Limitar ancho máximo */
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}


/* SOLUCIÓN DEFINITIVA CON FLEXBOX */
@media (max-width: 768px) {
    /* Reestructurar completamente el layout móvil */
    .principal {
        display: flex;
        flex-direction: column;
        align-items: center; /* ← ESTO ES CLAVE */
        gap: 20px;
        width: 100%;
        padding: 15px;
        box-sizing: border-box;
    }
    
    /* Todos los hijos directos se centran */
    .principal > * {
        width: 100%;
        max-width: 800px; /* Ancho máximo consistente */
    }
    
    /* Específico para el carrusel móvil */
    .banners-movil-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin: 20px 0;
        padding: 0;
    }
    
    .banners-movil-carrusel {
        width: 100%;
        max-width: 400px; /* Ancho máximo específico para banners */
        margin: 0 auto;
    }
}





/* ===== FIX: ALTURA MÍNIMA PARA BANNERS MÓVIL ===== */

.banners-movil-carrusel {
    position: relative;
    width: 100%;
    min-height: 180px; /* ← ALTURA MÍNIMA para evitar que colapse */
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: var(--blanco);
    border: 2px solid var(--azul_oficial);
    margin: 0 auto;
    display: block;
}

/* Asegurar que los slides ocupen toda la altura */
.banner-movil-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* ← 100% del contenedor padre */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    z-index: 1;
}

/* IMAGEN - Altura 100% del contenedor */
.banner-movil-imagen {
    width: 100%;
    height: 100%; /* ← Cambiar de 'auto' a '100%' */
    object-fit: cover; /* ← Cambiar de 'contain' a 'cover' */
    display: block;
    background-color: #f0f0f0; /* Color de fondo si la imagen no carga */
}






/* ===== FIX PARA BANNER PRINCIPAL EN MÓVIL ===== */

/* MÓVIL: Asegurar que el banner se vea bien en todos los dispositivos */
@media (max-width: 768px) {
    /* BANNER PRINCIPAL - CORRECCIÓN COMPLETA */
    .banner-principal {
        height: 220px !important; /* Altura fija para móvil */
        border-radius: 10px;
        overflow: hidden;
        position: relative;
    }
    
    .banner-carrusel {
        width: 100% !important;
        height: 100% !important;
        position: relative !important;
    }
    
    .banner-slide {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        opacity: 0;
        transition: opacity 0.6s ease;
    }
    
    .banner-slide.active {
        opacity: 1 !important;
    }
    
    /* ENLACE - debe cubrir toda la imagen */
    .banner-slide a {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        cursor: pointer !important;
        position: relative !important;
    }
    
    /* IMAGEN - debe cubrir todo el contenedor */
    .banner-slide img.banner-imagen {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* Esto es CLAVE para que no se corte */
        object-position: center !important;
        display: block !important;
        position: relative !important;
    }
    
    /* Botones de navegación */
    .banner-nav {
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
        z-index: 20 !important;
    }
    
    .banner-prev {
        left: 10px !important;
    }
    
    .banner-next {
        right: 10px !important;
    }
    
    /* Eliminar controles de puntos si existen */
    .banner-controls {
        display: none;
    }
}

/* MÓVILES MÁS PEQUEÑOS */
@media (max-width: 480px) {
    .banner-principal {
        height: 180px !important;
    }
    
    .banner-nav {
        width: 32px !important;
        height: 32px !important;
        font-size: 16px !important;
    }
}

/* MÓVILES MUY PEQUEÑOS */
@media (max-width: 360px) {
    .banner-principal {
        height: 150px !important;
    }
}




/* FIX MÍNIMO PARA ENLACES DE BANNER */
.banner-slide > a,
.banner-lateral-item > a,
.banner-movil-slide > a,
.banner-slide-index > a,
.banner-nota-carousel > a {
    cursor: pointer !important;
    display: block !important;
}






/* === DIAGNÓSTICO BANNER === */

/* 1. Forzar enlace visible y clickeable */
.banner-slide a {
    border: 1px solid white;
    background: rgba(255,0,0,0.1) !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1 !important;
    cursor: pointer !important;
}

/* 2. La imagen detrás */
.banner-slide img {
    position: relative !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

/* 3. Botones sobre el enlace */
.banner-nav {
    z-index: 1001 !important;
}









/* ===== FIX PARA BUSCADOR EN MÓVIL ===== */

@media (max-width: 768px) {
    /* 1. CONTENEDOR PRINCIPAL DEL BUSCADOR */
    .buscador-compacto.buscador-elegante {
        position: relative !important;
        width: auto !important;
        max-width: 100% !important;
        margin-right: 10px !important;
    }
    
    /* 2. BOTÓN TOGGLE (lupa) */
    .btn-buscador-toggle {
        width: 40px !important;
        height: 40px !important;
        padding: 8px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
    }
    
    /* 3. CONTENEDOR EXPANDIBLE - FIX PRINCIPAL */
    .buscador-expandible {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        width: 100vw !important; /* Ocupa toda la pantalla */
        max-width: 100vw !important;
        background: white !important;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
        z-index: 1000 !important;
        padding: 10px 15px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        transform: translateX(0) !important;
    }
    
    /* 4. FORMULARIO DENTRO DEL EXPANDIBLE */
    .form-buscador {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 5. INPUT DE BÚSQUEDA */
    .input-buscador {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 15px !important;
        font-size: 16px !important;
        border: 1px solid #ddd !important;
        border-radius: 4px 0 0 4px !important;
        margin: 0 !important;
        flex: 1 !important;
    }
    
    /* 6. BOTÓN DE SUBMIT */
    .btn-buscador-submit {
        width: 50px !important;
        min-width: 50px !important;
        box-sizing: border-box !important;
        background: var(--azul_oficial) !important;
        color: white !important;
        border: none !important;
        border-radius: 0 4px 4px 0 !important;
        cursor: pointer !important;
        padding: 10px !important;
        margin: 0 !important;
    }
    
    /* 7. RESULTADOS DE BÚSQUEDA */
    .resultados-busqueda {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-top: 10px !important;
        overflow-y: auto !important;
        max-height: 300px !important;
    }
    
    /* 8. CUANDO EL BUSCADOR ESTÁ ABIERTO */
    .buscador-expandible.activo {
        display: block !important;
    }
    
    /* 9. PREVENIR SCROLL HORIZONTAL EN EL BODY */
    body.buscador-activo {
        overflow-x: hidden !important;
        position: fixed !important;
        width: 100% !important;
    }
}

/* PARA MÓVILES MÁS PEQUEÑOS */
@media (max-width: 480px) {
    .buscador-expandible {
        padding: 8px 10px !important;
        width: calc(100vw - 20px) !important;
        right: -10px !important;
    }
    
    .input-buscador {
        padding: 8px 12px !important;
        font-size: 14px !important;
    }
    
    .btn-buscador-submit {
        width: 45px !important;
        padding: 8px !important;
    }
    
    .btn-buscador-toggle {
        width: 35px !important;
        height: 35px !important;
        padding: 6px !important;
    }
}