* {
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
}

body {
  background-color: #f4f4f4;
  color: #333;
  font-family: 'Poppins', sans-serif;
}

/* HEADER */
header {
  background-color: #004080;
  color: white;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.header-logo {
  max-height: 60px;
}

.header-texto {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: right;
  flex: 1;
  color: #c2deff;
}

header.main-header {
  background-color: #ffffff;
  color: rgb(13, 100, 150);
  padding: 1rem 2rem;
  width: 100%;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

.logo {
  height: 60px;
  width: auto;
}

.convenio-text {
  font-weight: 700;
  font-size: 1.5rem;
  color: #004080;
  text-align: right;
}

/* NAV */
nav {
  background-color: #003366;
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

nav a:hover,
nav a.active {
  background-color: #0059b3;
}

/* HERO */
.hero {
  background: #0066cc;
  color: white;
  padding: 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
}

/* CURSOS */
.container {
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columnas en escritorio */
  gap: 1.5rem;
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 180px; /* Tamaño fijo en todas las pantallas */
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.9rem;
}

.btn {
  margin-top: 1rem;
  display: inline-block;
  background-color: #004080;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  text-decoration: none;
  border-radius: 4px;
}

/* FOOTER */
footer {
  background-color: #003366;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .container {
    grid-template-columns: repeat(2, 1fr); /* Tablets = 2 columnas */
  }
}

@media (max-width: 600px) {
  .container {
    grid-template-columns: 1fr; /* Celulares = 1 columna */
  }

  .card img {
    height: 160px; /* Ajuste proporcional en móviles */
  }
}

/* LOGOS Y TEXTOS EN PANTALLAS PEQUEÑAS */
@media (max-width: 768px) {
  .logo {
    height: 45px;
  }
  .convenio-text {
    font-size: 0.95rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .logo {
    height: 40px;
  }
  .convenio-text {
    font-size: 0.85rem;
  }
  .hero h1 {
    font-size: 1.5rem;
  }
}

/* MODAL */
#modalMesaPartes {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 90%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1000;
}

#modalMesaPartes .contenido {
  background: white;
  width: 90%;
  max-width: 500px;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  position: relative;
}

#modalMesaPartes h3 {
  text-align: center;
}

#modalMesaPartes label {
  display: block;
  margin-top: 10px;
  font-weight: 500;
}

#modalMesaPartes input,
#modalMesaPartes select,
#modalMesaPartes textarea {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  margin-bottom: 10px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

#modalMesaPartes button {
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
}

#modalMesaPartes .enviar {
  background: #005baa;
  color: white;
}

#modalMesaPartes .cancelar {
  background: #999;
  color: white;
  margin-left: 10px;
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  padding: 1rem;
  background-color: #003366;
  color: white;
  cursor: pointer;
  text-align: right;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav.main-nav {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  nav.main-nav.active {
    display: flex;
  }
}
