/* === VARIABLES BASE === */
:root {
  --rosa: #ee38be;
  --amarillo: #c5fb31;
  --azul-fondo: #3eb3ff;
  --azul-claro: #4ccdff;
  --blanco: #fff;
}

/* === ESTILOS GENERALES === */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--rosa);
  background: radial-gradient(circle at center, var(--azul-claro), var(--azul-fondo));
  background-attachment: fixed;
  transition: background-position 0.3s ease;
  line-height: 1.8;
  font-size: 1.2rem;
}

ul, ol {
  line-height: 2.0;
  padding-left: 1.5em;
}

h1, h2, h3 {
  font-weight: 900;
  margin-bottom: 0.5em;
}

/* === HEADER === */
header {
  background-color: var(--amarillo);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 20px 40px;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

nav button {
  background-color: var(--rosa);
  color: var(--amarillo);
  border: 2px solid var(--rosa);
  padding: 16px 28px;
  font-size: 1.1rem;
  font-weight: 900;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

nav button:hover {
  background-color: var(--amarillo);
  color: var(--rosa);
  transform: scale(1.05);
}

nav button.active {
  background-color: var(--amarillo);
  color: var(--rosa);
  border: 2px solid var(--rosa);
}

.logo img {
  max-width: 260px;
  height: auto;
  cursor: pointer;
}

/* === CONTENEDOR PRINCIPAL === */
main {
  max-width: 1300px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

section {
  display: none;
}
#home {
  display: block;
}

/* === TÍTULOS DE SECCIÓN === */
.section-title {
  font-size: 3.5rem;
  text-align: center;
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--amarillo);
}
.section-subtitle {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 30px;
  font-weight: 600;
}

/* === CUADROS DE TEXTO === */
.section {
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  animation: fadeIn 0.5s ease;
  transition: all 0.3s ease;
  flex: 1 1 48%;
}

.section:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  transform: scale(1.01);
}

.section-row {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.pink {
  background-color: var(--rosa);
  color: var(--amarillo);
}

.yellow {
  background-color: var(--amarillo);
  color: var(--rosa);
}

/* === IMÁGENES Y CARTELES === */
.cartel-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
}

img.large {
  width: 23%; /* 4x23% + 3x20px = 92% + 60px ≈ caben bien */
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img.large:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.banner-inscripciones {
  display: block;
  margin: 40px auto;
  width: 80%;
  max-width: 800px;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.banner-inscripciones:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 28px rgba(0,0,0,0.3);
}

/* === FORMULARIOS === */
form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

label {
  margin-top: 10px;
  font-weight: 600;
}

input, textarea {
  padding: 12px;
  background-color: var(--amarillo);
  color: var(--rosa);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
}

button[type="submit"] {
  background-color: var(--rosa);
  color: var(--amarillo);
  padding: 14px;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  border: 2px solid var(--amarillo);
}

button[type="submit"]:hover {
  background-color: var(--amarillo);
  color: var(--rosa);
  transform: scale(1.05);
}

/* === TABLAS === */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th, td {
  border: 2px solid var(--rosa);
  padding: 12px;
  text-align: center;
}

th {
  background-color: var(--rosa);
  color: var(--amarillo);
  font-weight: bold;
}

.bold-cell {
  font-weight: bold;
}

/* === FOOTER === */
footer {
  background-color: var(--rosa);
  border-top: 4px solid var(--amarillo);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 100px;
  padding: 30px 20px;
}

footer .footer-logo img {
  height: 120px;
  cursor: pointer;
}

footer .footer-left img,
footer .footer-right img {
  height: 80px;
  opacity: 0.95;
}

/* === MODAL === */
#modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}

#modal button {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: var(--amarillo);
  color: var(--rosa);
  border: none;
  padding: 12px;
  cursor: pointer;
  font-weight: bold;
  border-radius: 8px;
}

/* === ANIMACIONES === */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {

  nav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .cartel-container {
    flex-direction: column;
    align-items: center;
  }

  footer {
    flex-direction: column;
    gap: 20px;
  }

  footer .footer-logo img {
    height: 100px;
  }
}

#formato .section.pink h2 {
  font-size: 1.3rem;
  text-align: center;
  iframe {
    border: none;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
    background: white;
}

}

/* === MENÚ DESPLEGABLE === */
.menu-toggle {
  display: none;
  background: var(--rosa);
  color: var(--amarillo);
  border: none;
  padding: 12px 20px;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 12px;
}

.table-wrapper {
  width: 100%;
}

#formato table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* columnas flexibles */
}

#formato table th,
#formato table td {
  padding: 12px;
  word-wrap: break-word; /* corta textos largos */
}

nav .nav-links button.active {
  background-color: var(--amarillo);
  color: var(--rosa);
  border: 2px solid var(--rosa);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 10px;
  }

  .nav-links.show {
    display: flex;
  }

  nav button {
    width: 90%;
    max-width: 300px;
  }

  .section-row {
    flex-direction: column;
  }

  .section iframe {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 1200px;
  }

  .nav-links button {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  #formato table th,
  #formato table td {
    font-size: 0.45rem; /* Reduce tipografía en móvil */
    padding: 6px;
  }
}
