:root {
  --azul:#0d1b4c;
  --rojo:#b91c1c;
  --gris:#f5f7fb;
  --borde:#e6e8f0;
  --texto:#1b1f29;
  --card:#fff;
  --sombra:0 8px 28px rgba(0,0,0,.08);
  --muted:#6b7280;
  --azul-pill:#1f3a8a;
}
/* ========== AVISOS URGENTES ========== */
.avisos-urgentes {
  background: #fff3cd;
  border: 1px solid #f59e0b;
  padding: 18px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: var(--sombra);
}
.avisos-urgentes h2 {
  margin: 0 0 12px;
  color: #92400e;
  font-size: 1.2rem;
}
.avisos-urgentes ul {
  margin: 0;
  padding-left: 18px;
  color: #6b4226;
  line-height: 1.6;
}

/* ========== NOTICIAS GRID ========== */
.noticias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.noticia-card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 14px;
  box-shadow: var(--sombra);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.noticia-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.noticia-img-frame {
  width: 100%;
  height: 200px;
  overflow: hidden;
}
.noticia-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 🔑 evita distorsión */
}
.noticia-body {
  padding: 16px;
}
.noticia-body h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: var(--azul);
}
.noticia-body .date {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.noticia-body p {
  font-size: .95rem;
  color: var(--texto);
}

/* ========== SEPARADORES POR MES ========== */
.noticias-mes {
  margin-bottom: 40px;
}
.mes-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--rojo);
  margin: 20px 0 16px;
  border-left: 6px solid var(--azul);
  padding-left: 10px;
}

/* ========== ÍNDICE DE MESES (sticky) ========== */
.indice-meses {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 10px 16px;
  justify-content: center;
  background: #f9fafb;
  border-bottom: 1px solid var(--borde);
  position: sticky;
  top: 70px; /* justo debajo del header */
  z-index: 900;
}
.indice-meses a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: #fff;
  color: var(--azul);
  font-weight: 700;
  text-decoration: none;
  transition: .2s ease;
}
.indice-meses a:hover {
  background: var(--azul);
  color: #fff;
  border-color: var(--azul);
}
.indice-meses a.active {
  background: var(--azul);
  color: #fff;
  border-color: var(--azul);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* Scroll suave */
html { scroll-behavior: smooth; }
/* ========== HISTORIA ========== */
.historia-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 30px 16px;
  line-height: 1.7;
}

.historia-page h1 {
  text-align: center;
  font-size: 1.8rem;
  color: var(--azul);
  margin-bottom: 20px;
}

.historia-block {
  margin: 40px 0;
}

.historia-block h2 {
  color: var(--azul);
  margin-bottom: 12px;
  font-size: 1.4rem;
  font-weight: 800;
}

.historia-block p {
  margin-bottom: 16px;
  text-align: justify;
}

/* Lista de directores */
.lista-directores {
  list-style: disc;
  padding-left: 20px;
  line-height: 1.6;
}

/* Himno */
.himno {
  margin-top: 30px;
}
.himno h2 {
  margin-bottom: 14px;
}
.himno pre {
  background: #f9fafb;
  padding: 18px;
  border: 1px solid var(--borde);
  border-radius: 12px;
  white-space: pre-wrap;
  font-family: "Inter", sans-serif;
  line-height: 1.6;
}

/* Índice interno */
.indice-historia {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 30px;
  justify-content: center;
}
.indice-historia a {
  padding: 8px 14px;
  border: 1px solid var(--azul);
  border-radius: 999px;
  background: #fff;
  color: var(--azul);
  font-weight: 700;
  text-decoration: none;
  transition: .2s ease;
}
.indice-historia a:hover {
  background: var(--azul);
  color: #fff;
}
/* ========== HOMEPAGE ========== */
#homepage {
  background: var(--gris);
  color: var(--texto);
}

/* Hero principal */
.hero-home {
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.hero-home-text h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 12px;
  color: var(--azul);
}
.hero-home-text p {
  font-size: 1rem;
  line-height: 1.6;
  color: #374151;
}
.hero-home-img img {
  width: 100%;
  border-radius: 14px;
  box-shadow: var(--sombra);
  object-fit: cover;
}

/* Bienvenida */
.home-section {
  max-width: 1120px;
  margin: 40px auto;
  padding: 0 16px;
}
.home-section h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--azul);
}
.home-section p {
  color: #47506b;
  line-height: 1.6;
}

/* Tarjetas de bloques */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.home-card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--sombra);
  transition: transform .2s ease, box-shadow .2s ease;
}
.home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0,0,0,.1);
}
.home-card h4 {
  margin: 0 0 10px;
  color: var(--rojo);
  font-size: 1.1rem;
}
.home-card p {
  font-size: .95rem;
  color: var(--texto);
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-home {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-home-img img {
    max-height: 240px;
    object-fit: cover;
  }
}
/* ========== DOCENTES ========== */
.docentes-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 30px 16px;
}

.docentes-page h1 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 24px;
  color: var(--azul);
}

/* Grid de docentes */
.docentes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.docente-card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 14px;
  box-shadow: var(--sombra);
  padding: 18px;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.docente-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}
.docente-card img {
  width: 100%;
  max-width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
}
.docente-card h3 {
  font-size: 1.1rem;
  margin: 6px 0;
  color: var(--azul);
}
.docente-card p {
  font-size: .9rem;
  color: var(--texto);
  margin: 0;
}

/* Responsive */
@media (max-width: 600px) {
  .docente-card img {
    max-width: 100px;
    height: 100px;
  }
}
/* ===== HOME CLEAN STYLE ===== */
.center-text {
  text-align: center;
}

.home-section {
  max-width: 720px;
  margin: 30px auto;
  padding: 0 16px;
}

.home-section h1 {
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 10px;
  font-weight: 800;
  color: var(--azul);
}

.home-section .lead {
  font-size: 1rem;
  color: #47506b;
  line-height: 1.6;
}

.home-card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--sombra);
  margin-bottom: 20px;
}

.home-card h3 {
  font-size: 1.2rem;
  margin: 8px 0;
  color: var(--azul);
}

.home-card p {
  margin: 0 0 12px;
  color: var(--texto);
}

.home-card img.banner {
  width: 100%;
  border-radius: 12px;
  margin-top: 8px;
  object-fit: cover;
}

/* Redes sociales */
.social-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.social-row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  background: #fff;
  color: var(--azul);
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
}

.social-row a:hover {
  background: var(--azul);
  color: #fff;
}

.social-row img.ico {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* Mapa */
.map {
  width: 100%;
  border: 0;
  border-radius: 12px;
  height: 220px;
  margin: 10px 0;
}

.note {
  font-size: .9rem;
  color: var(--muted);
}
/* ===== FOOTER ===== */
footer {
  background: var(--azul);
  color: #fff;
  margin-top: 40px;
  font-size: 0.95rem;
}

.foot {
  max-width: 1120px;
  margin: auto;
  padding: 30px 16px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  
}

.foot h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.foot p {
  margin: 6px 0;
  line-height: 1.5;
}

.lista-enlaces {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
}
.lista-enlaces a {
  color: #e0e7ff;
  transition: color .2s ease;
}
.lista-enlaces a:hover {
  color: #fff;
  text-decoration: underline;
}

.discreto {
  font-size: 0.9rem;
  opacity: .85;
  text-decoration: underline;
  cursor: pointer;
}
.discreto:hover {
  opacity: 1;
}

.copy {
  text-align: center;
  padding: 14px;
  font-size: 0.85rem;
  border-top: 1px solid #ffffff33;
  background: #ed0101; /* un azul más oscuro que el header */
}

/* ===== MODAL BUZÓN ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(255, 2, 2, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 2000;
}
.modal.open { display: flex; }

.modal-card {
  background: #fff;
  border-radius: 14px;
  max-width: 600px;
  width: 100%;
  padding: 24px;
  box-shadow: var(--sombra);
  color: var(--texto);
}

.modal-card h3 {
  margin-top: 0;
  color: var(--azul);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.form-grid .full { grid-column: 1/-1; }

.modal input,
.modal textarea,
.modal select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--borde);
  border-radius: 8px;
  font-size: 0.95rem;
}

.modal .row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.modal .nota {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .foot {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .lista-enlaces {
    padding-left: 0;
    list-style: none;
  }
}
