.noticias {
  padding: 60px 20px;
  background: #f8f8f8;
  font-family: 'Inter', sans-serif;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: #800000; /* guinda */
}

/* CONTENEDOR CON SCROLL */
.news-feed {
  display: flex;           /* mejor que grid para un feed vertical */
  flex-direction: column;  /* apila las tarjetas */
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;

  max-height: 600px;       /* altura fija */
  overflow-y: auto;        /* scroll vertical */
  padding-right: 10px;     /* espacio para la barra */
}

/* Scroll personalizado */
.news-feed::-webkit-scrollbar { width: 8px; }
.news-feed::-webkit-scrollbar-track { background: #eee; border-radius: 10px; }
.news-feed::-webkit-scrollbar-thumb { background: #800000; border-radius: 10px; }

.news-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.2s;
  cursor: pointer; /* ahora clickeable */
}
.news-card:hover { transform: translateY(-5px); }

/* Imagen más pequeña y completa dentro de la tarjeta */
.news-img {
  width: 100%;
  height: 150px;       /* más pequeña */
  object-fit: contain; /* que se vea completa */
  background: #f0f0f0; /* relleno gris si sobra espacio */
}

.news-content { padding: 15px; }
.news-content h3 { margin: 0 0 10px; font-size: 1.3rem; color: #333; }
.news-date { display: block; font-size: 0.9rem; color: #666; margin-bottom: 10px; }
.news-content p { margin: 0; line-height: 1.5; color: #444; }

/* ===== MODAL ===== */
.modal {
  display: none; /* oculto por defecto */
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 900px; /* más ancho */
  width: 95%;
  padding: 20px;
  text-align: center;
  position: relative;
  animation: fadeIn 0.3s ease-in-out;
}

/* Imagen más grande dentro del modal */
.modal-content img {
  width: 100%;
  max-height: 500px;   /* más grande que antes */
  object-fit: contain; /* que se vea completa */
  border-radius: 10px;
  margin-bottom: 15px;
  background: #f0f0f0;
}

.modal-content h3 {
  margin: 10px 0;
  font-size: 1.5rem;
  color: #800000;
}

.modal-content span {
  display: block;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.modal-content p { color: #333; line-height: 1.6; }

.close {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 2rem;
  color: #333;
  cursor: pointer;
}

@keyframes fadeIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

    /* Modal */
    .modal {
      display: none;
      position: fixed;
      z-index: 1000;
      left: 0; top: 0;
      width: 100%; height: 100%;
      background: rgba(0,0,0,0.8);
      align-items: center;
      justify-content: center;
    }

    .modal-content {
      background: #fff;
      color: #000;
      padding: 20px;
      border-radius: 10px;
      max-width: 800px;
      width: 90%;
      text-align: center;
    }

    .close {
      position: absolute;
      top: 15px;
      right: 20px;
      font-size: 30px;
      color: #fff;
      cursor: pointer;
    }

    /* Carrusel */
    .carousel {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .carousel img {
      max-width: 100%;
      max-height: 400px;
      object-fit: contain;
      border-radius: 10px;
    }

    .carousel button {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: rgba(0,0,0,0.6);
      color: white;
      border: none;
      padding: 10px 15px;
      cursor: pointer;
      font-size: 20px;
      border-radius: 50%;
    }

    .carousel .prev { left: 10px; }
    .carousel .next { right: 10px; }


/* Scroll vertical en el <main> con color guinda */
.noticias {
  height: 100vh;        /* ocupa toda la ventana */
  overflow-y: auto;     /* activa scroll vertical */
}

/* Scroll personalizado para el main */
.noticias::-webkit-scrollbar {
  width: 10px; /* grosor */
}
.noticias::-webkit-scrollbar-track {
  background: #eee;      /* color del fondo */
  border-radius: 10px;
}
.noticias::-webkit-scrollbar-thumb {
  background: #800000;   /* guinda */
  border-radius: 10px;
}
