/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif;
}

/* Fondo general */
body {
  background: #f4f6f9;
  color: #333;
}

/* Header */
.header {
  background: linear-gradient(135deg, #003366, #004b99);
  padding: 40px 20px;
  text-align: center;
  color: white;
  border-bottom: 5px solid #CDA657;
}
.header-content {
  max-width: 900px;
  margin: auto;
}
.logo {
  width: 80px;
  margin-bottom: 15px;
}
.header h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
  color: #CDA657; /* Dorado ICAL */
}
.header p {
  font-size: 1rem;
  opacity: 0.9;
}

/* Contenedor */
.container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Grid responsive */
.grid-convenios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

/* Tarjetas */
.card-convenio {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}
.card-convenio:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}
.card-convenio img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.card-body {
  padding: 15px;
  text-align: center;
}
.card-body h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #003366;
}

/* Botón */
.btn {
  display: inline-block;
  padding: 8px 15px;
  background: #003366;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}
.btn:hover {
  background: #CDA657;
  color: #003366;
  font-weight: bold;
}

.logo {
  width: 340px;       
  max-width: 40%;     
  height: auto;       
  margin-bottom: 15px;
}

/* Modal (fondo) */
.modal {
  display: none; 
  position: fixed; 
  z-index: 9999; 
  padding-top: 60px; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgba(0,0,0,0.8); 
}

/* Imagen dentro del modal */
.modal-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

/* Botón cerrar */
.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}
.close:hover {
  color: #CDA657;
}

/* Animación suave */
.modal-content {
  animation: zoom 0.3s;
}
@keyframes zoom {
  from {transform: scale(0.7);}
  to {transform: scale(1);}
}

.card-body h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #003366;
  text-transform: uppercase; 
}

/* Filtros */
.filtros {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 30px auto;
  flex-wrap: wrap;
}

.filtro-card {
  background: #fff;
  border: 2px solid #003366;
  color: #003366;
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.filtro-card:hover {
  background: #003366;
  color: #fff;
}

.filtro-card.active {
  background: #CDA657;
  border-color: #CDA657;
  color: #fff;
}
