/* ======== ESTILOS GLOBALES ======== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
}

body {
  background: #fff;
  color:#00396b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ======== HEADER ======== */
header {
  text-align: center;
  padding: 0px 10px;
}

.logo-box {
  width: 150px;
  height: 150px;
  margin: 0 auto 20px;
  background: #005da8;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 800;
  font-size: 22px;
  color: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
}

h1 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: 1px;
}

/* ======== CUADRICULA ======== */
.grid-wrapper {
  padding: 60px 10px 60px;
  flex: 1;
}

.grid {
  max-width: 1500px;
  margin: auto;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, 1fr);
}


.grid-item {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 72px;        /* 🔒 todos iguales */
  padding: 14px;
  text-align: center;

  font-weight: 700;
  background: #00559f;
  border-radius: 14px;
  color: #fff;
  font-size: clamp(13px, 2vw, 16px);

  text-decoration: none;  /* 🔒 saca subrayado */
  cursor: pointer;
  transition: .15s ease;
}


.grid-item:hover {
  background: #0066cc;
  transform: translateY(-4px);
  box-shadow: 0 5px 12px rgba(0,0,0,.3);
}


/* ======== MODAL ======== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  width: min(90%, 600px);
  background: #ffffff;
  color: #000;
  padding: 30px 20px;
  border-radius: 22px;
  position: relative;
  box-shadow: 0 5px 16px rgba(0,0,0,.3);
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 12px;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
}

.modal-title {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 12px;
}

.modal-body {
  font-size: 15px;
  line-height: 1.5;
}

/* ======== MOBILE OPTIMIZATION ======== */
@media (max-width: 500px) {
  .logo-box {
    width: 120px;
    height: 120px;
    font-size: 18px;
  }

  .modal-body {
    font-size: 14px;
  }
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* CONTENEDOR DE AUTORIDADES */
.autoridades-3col {
  column-count: 3;
  column-gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  color: #00396b;
;
}

/* Texto */
.autoridades-3col p {
  break-inside: avoid;
  margin-bottom: 12px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .autoridades-3col {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .autoridades-3col {
    column-count: 1;
  }
}

/* ===========================
   SECCIÓN DE FOTOS - CDC
   =========================== */
/* ===========================
   SECCIÓN DE FOTOS - CDC RESPONSIVE
   =========================== */

.cdc-fotos {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 50px 20px;
    text-align: center;
}

.cdc-titulo {
  margin-top: 20px;
    font-size: clamp(22px, 4vw, 36px);
    font-weight: 800;
}

/* Grid responsive REAL */
.cdc-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 22px;
    justify-items: center;
    width: 100%;
    padding-top: 30px;
    padding-bottom: 20px;
}

/* Tarjeta */
.cdc-card {
    background: white;
    color: #00396b;
    width: 100%;
    max-width: 220px;
    box-shadow: 0 4px 15px rgb(0 0 0 / 25%);
    transition: .2s ease;
    padding-bottom: 25px;
}

.cdc-card:hover {
    transform: translateY(-4px);
}

/* Imagen */
.cdc-card img {
    width: 100%;
    margin-bottom: 10px;
    
}

/* Texto */
.cdc-card p {
    font-size: clamp(12px, 2vw, 14px);
    font-weight: 600;
    line-height: 1.5;
}

/* ===========================
   BREAKPOINTS
   =========================== */

/* Tablets */
@media (max-width: 900px) {
    .cdc-row {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 18px;
    }
}

/* Celulares */
@media (max-width: 600px) {
    .cdc-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .cdc-card {
        max-width: 170px;
        padding: 12px;
    }
}

/* Celulares muy pequeños */
@media (max-width: 420px) {
    .cdc-row {
        grid-template-columns: 1fr 1fr;
    }
}
