/* ==========================================
   ESTILOS EXCLUSIVOS — GRILLA DE ACTIVIDADES
   ========================================== */

@font-face {
    font-family: 'Boomme';
    src: url('../fonts/boomme.woff2') format('woff2'),
         url('../fonts/boomme.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Hero de la Grilla (Fondo verde de marca con 5% de opacidad) */
.grid-hero-section {
  padding: 60px 20px 50px;
  background-color: rgba(2, 101, 103, 0.05); /* Verde #026567 suave */
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(2, 101, 103, 0.08);
}

.grid-hero-container {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* Bloque de Texto y Buscador */
.grid-hero-content {
  flex: 1;
  text-align: left;
  max-width: 650px;
  z-index: 2;
}

.grid-pretitle {
  color: #C01A7A; /* Magenta del sitio */
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.grid-main-title {
  font-family: 'Sink', 'DM Sans', sans-serif; /* Tipografía oficial Sink */
  font-size: 2.8rem;
  font-weight: 800;
  color: #026567; /* Verde oscuro oficial */
  margin-bottom: 10px;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: 0.03em;
}

.grid-main-subtitle {
  font-size: 1.1rem;
  color: #555555;
  margin-bottom: 28px;
  font-family: 'DM Sans', sans-serif;
}

/* Buscador */
.search-input-box {
  max-width: 480px;
  margin: 0;
}

.search-input-box input {
  width: 100%;
  border: 2px solid #cbd5e1;
  background-color: #ffffff;
  border-radius: 50px;
  padding: 14px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-box input:focus {
  border-color: #026567;
  box-shadow: 0 0 0 4px rgba(2, 101, 103, 0.1);
}

/* Mancha decorativa lateral */
.grid-hero-decoration {
  flex: 0 0 320px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.img-mancha {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.05));
}

/* Sección Contenedora de Actividades (Fondo blanco contrastado) */
.grid-content-section {
  background-color: #ffffff;
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.grid-instruction {
  text-align: left; /* Alineado a la izquierda */
  color: #64748b;
  margin-bottom: 24px;
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
}

/* Barra de Filtros Desplegables */
.filters-row {
  display: flex;
  gap: 12px;
  justify-content: flex-start; /* Alineados a la izquierda */
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-pill-wrapper select {
  background-color: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  padding: 10px 36px 10px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #026567;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23026567%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 14px top 50%;
  background-size: 10px auto;
  transition: border-color 0.2s;
}

.filter-pill-wrapper select:hover {
  border-color: #026567;
}

@media (max-width: 768px) {

  .filters-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
  }

  .filter-pill-wrapper {
    width: 100%;
  }

  .filter-pill-wrapper select {
    width: 100%;
    box-sizing: border-box;
  }

  .btn-export-agenda {
    grid-column: 1 / -1;
    width: 100%;
  }

}

/* Cabecera de resultados */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 12px;
}

.results-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
}

.results-count {
  font-weight: 700;
  color: #17A899;
  font-size: 0.9rem;
}

/* Grilla de Tarjetas */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.activity-card-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s, box-shadow 0.2s;
}

.activity-card-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.card-box-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.card-tags-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.badge-teal { background-color: #026567; color: #ffffff; }
.badge-magenta { background-color: #C01A7A; color: #ffffff; }
.badge-yellow { background-color: #ECA00B; color: #ffffff; }
.badge-gray { background-color: #e2e8f0; color: #333333; }

.card-tags-list .badge {
  text-transform: uppercase;
}

.btn-check-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background-color: #ffffff;
  color: #026567;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-check-circle.checked {
  background-color: #ECA00B;
  color: #ffffff;
  border-color: #ECA00B;
}

.card-box-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #026567;
  margin-bottom: 10px;
  line-height: 1.3;
}

.card-box-info {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 20px;
  line-height: 1.4;
}

.btn-card-more {
  align-self: flex-start;
  background: transparent;
  border: 2px solid #026567;
  padding: 8px 20px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  color: #026567;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-card-more:hover {
  background-color: #026567;
  color: #ffffff;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal-card {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: #f1f5f9;
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
}

.modal-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #026567;
  margin: 12px 0 8px;
}

.modal-meta {
  font-size: 0.85rem;
  color: #17A899;
  font-weight: 700;
  margin-bottom: 16px;
}

.modal-description {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 24px;
}

.btn-modal-pdf {
  background-color: #026567;
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
}

/* Estado Vacío */
.empty-state-box {
  text-align: center;
  padding: 50px 20px;
}

.empty-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.2rem;
  color: #026567;
  margin-bottom: 8px;
}

.empty-text {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.btn-empty-action {
  background-color: #C01A7A;
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
}



/* Adaptación Mobile */
@media (max-width: 850px) {
  .grid-hero-container {
    flex-direction: column;
    text-align: center;
  }
  .grid-hero-content {
    text-align: center;
    max-width: 100%;
  }
  .grid-instruction, .filters-row {
    justify-content: center;
    text-align: center;
  }
  .search-input-box {
    margin: 0 auto;
  }
  .grid-hero-decoration {
    flex: none;
    max-width: 100px;
  }
  .grid-hero-section {
    padding: 60px 20px 30px;
  }
  .grid-hero-container {
    gap: 25px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

.campus-day-card {
  background-image: url('../../imagenes/campus-day-bg-card.webp?id=2');
  background-size: cover;
  background-position: center;
}
.campus-day-card,
.campus-day-card .card-box-title,
.campus-day-card .card-box-info,
.campus-day-card .card-box-top,
.campus-day-card .badge {
  color: #000000 !important;
}
.campus-day-card .btn-card-more {
  color: #000000 !important;
  border-color: #000000 !important;
}
.campus-day-card .btn-card-more:hover {
  background-color: #000000;
  color: #ffffff !important;
}

.campus-day-modal {
  background-image: url('../../imagenes/campus-day-bg-card.webp?id=2');
  background-size: cover;
  background-position: center;
  color: #000000;
}
.campus-day-modal .modal-title,
.campus-day-modal .modal-meta,
.campus-day-modal .modal-description,
.campus-day-modal .badge {
  color: #000000 !important;
}
.campus-day-modal .modal-description a {
  color: #000000;
}
.campus-day-modal .btn-modal-pdf {
  color: #000000 !important;
  border-color: #000000 !important;
}
.campus-day-modal .btn-modal-pdf:hover {
  background-color: #000000;
  color: #ffffff !important;
}
.campus-day-modal .modal-close {
  color: #000000;
}

.title-boomme {
  font-family: 'Boomme', sans-serif;
  font-weight: normal;
}

/*PDF*/

.export-agenda-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.btn-export-agenda {
  background-color: #C01A7A;
  color: #ffffff;
  border: none;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
  margin-left: auto;
}

.btn-export-agenda:hover {
  background-color: #026567;
  transform: translateY(-2px);
}

@media (max-width: 768px) {

  /* El botón que está junto a los filtros desaparece */
  .btn-export-top {
    display: none;
  }

  /* El botón inferior será el flotante */
  .btn-export-bottom {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    width: calc(100% - 40px);
    z-index: 999;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  }

  .export-agenda-wrapper {
    position: relative;
    min-height: 54px;
    margin-top: 30px;
  }

  /* Cuando termina la sección */
  .btn-export-bottom.at-section-end {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
  }
}

/* ==========================================
   MODAL DESCARGAR GRILLA
========================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-download {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: #ffffff;
    border-radius: 18px;
    padding: 40px;
    box-sizing: border-box;
}

.modal-download-close {
    position: absolute;
    top: 15px;
    right: 18px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #026567;
    cursor: pointer;
}

.modal-download-content h2 {
    margin: 0 0 15px;
    color: #026567;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
}

.modal-download-content p {
    margin: 0 0 25px;
    color: #475569;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-download-content label {
    display: block;
    margin-bottom: 7px;
    color: #026567;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
}

.modal-download-content input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 13px 15px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    outline: none;
    margin-bottom: 20px;
}

.modal-download-content input:focus {
    border-color: #026567;
}

.btn-download-modal {
    width: 100%;
    border: 0;
    border-radius: 50px;
    background: #026567;
    color: #ffffff;
    padding: 14px 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.btn-download-modal:hover {
    background: #C01A7A;
}

.btn-download-modal:disabled {
    opacity: 0.6;
    cursor: wait;
}