/* ===== RESET Y BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.fechas-grid.dos-eventos {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.fechas-grid.dos-eventos .fecha-card {
  flex: 0 1 360px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  padding-top: 70px;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
header {
  background: #000;
  color: white;
  height: 70px;
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.header-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  gap: 20px;
}

.header-title {
  font-size: clamp(12px, 1.4vw, 20px);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-title .bold { font-weight: 700; }
.header-title .regular { font-weight: 400; }

.header-code {
  font-size: clamp(12px, 1.4vw, 20px);
  white-space: nowrap;
}

/* ===== MEGABANNER ===== */
.megabanner {
  width: 100%;
  height: 60vh;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: sticky;
  top: 70px;
  z-index: 999;
  overflow: visible;
}

.megabanner-item {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.megabanner-item:nth-child(1) { background-color: #9FBFBF; }
.megabanner-item:nth-child(2) { background-color: #B29696; }
.megabanner-item:nth-child(3) { background-color: #9FAF95; }

.megabanner-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.megabanner-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
}

.megabanner-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.megabanner-item h2 {
  color: white;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Sticky reducido en mobile */
.megabanner.sticky { height: 70px; }

.megabanner.sticky .megabanner-content {
  position: relative;
  padding: 6px 10px;
}

.megabanner.sticky .megabanner-content-wrapper {
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

.megabanner.sticky .megabanner-icon {
  width: 24px;
  height: 24px;
  margin: 0 8px 0 0;
}

.megabanner.sticky .megabanner-item h2 {
  font-size: clamp(10px, 3.2vw, 14px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80vw;
}

/* ===== SECCIONES ===== */
.content-section {
  padding: 80px 20px;
  scroll-margin-top: 100px;
}

#que-puedes-ver { background: #B8D4D4; }
#para-que-sirve { background: #D4B8B8; }
#que-puedes-aportar { background: #C4D4B8; }

.content-section h2 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 40px;
  text-align: center;
  font-weight: 400;
}

.content-section p {
  max-width: 900px;
  margin: 0 auto 30px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333;
  text-align: center;
}

/* ===== DESCARGAS ===== */
.download-section {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.download-card {
  background: white;
  padding: 30px 40px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  text-align: center;
  min-width: 250px;
}

.download-card h4 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.4;
}

/* ===== BOTONES ===== */
.btn {
  display: inline-block;
  padding: 12px 30px;
  background: rgba(151, 201, 61, 0.9);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s ease-in-out;
}
.btn:hover { background: rgba(151, 201, 61, 1); }

.btn-secondary {
  background: rgba(44, 95, 45, 0.85);
}
.btn-secondary:hover {
  background: rgba(44, 95, 45, 1);
}

/* ===== FORMULARIO EMBEBIDO ===== */
.form-iframe-wrapper {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  max-width: 100%;
}
.form-iframe-wrapper iframe {
  width: 100%;
  max-width: 900px;
  height: 1150px;
  border: none;
}

/* Fallback móvil para Forms */
.mobile-form-fallback {
  display: none;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-width: 680px;
  margin: 0 auto;
}
.mobile-form-fallback h4 {
  margin-bottom: 12px;
  font-weight: 600;
  color: #333;
}
.mobile-form-fallback p {
  margin-bottom: 18px;
  color: #333;
  line-height: 1.5;
}

/* ===== FECHAS DESTACADAS ===== */
.fechas-destacadas {
  background: #F5D0B5;
  color: #000;
  padding: 80px 20px;
}
.fechas-heading {
  font-weight: 700;
  font-size: clamp(1.4rem, 3.2vw, 2.2rem);
  text-align: center;
  margin: 0 auto 36px;
}
.fechas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.fecha-card {
  border: 2px solid rgba(0, 0, 0, 0.85);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  text-align: center;
}
.fecha-marca {
  font-weight: 900;
  font-size: clamp(2.2rem, 7vw, 4rem);
  line-height: 0.9;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.fecha-hora {
  font-weight: 600;
  font-size: clamp(0.9rem, 2.4vw, 1.1rem);
  opacity: 0.9;
  margin-bottom: 12px;
}
.fecha-titulo {
  font-weight: 900;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  text-transform: uppercase;
}
.fecha-lugar {
  margin-top: 6px;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
}

/* ===== FOOTER ===== */
footer {
  background: #1a1a1a;
  color: white;
  padding: 40px 20px;
  text-align: center;
}
footer p { opacity: 0.8; }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .fechas-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  header {
    height: clamp(50px, 8vw, 70px);
  }
  body {
    padding-top: clamp(50px, 8vw, 70px);
  }
  .megabanner {
    height: calc(100vh - clamp(50px, 8vw, 70px));
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
    top: clamp(50px, 8vw, 70px);
  }

  .header-title,
  .header-code {
    font-size: clamp(11px, 3.4vw, 16px);
    white-space: nowrap;
  }

  .content-section h2 {
    font-size: 1.8rem;
  }

  .download-section {
    flex-direction: column;
    align-items: center;
  }

  /* Forms mobile fallback */
  .form-iframe-wrapper { display: none; }
  .mobile-form-fallback { display: block; }

  .fechas-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .header-content {
    padding: 0 10px;
  }
  .megabanner-item h2 {
    font-size: clamp(0.9rem, 3.5vw, 1.2rem);
    padding: 0 10px;
  }
  .megabanner-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
  }
}
