.newssiayec-grid:only-child,
.newssiayec-grid:empty,
.newssiayec-grid:has(.newssiayec-card:only-child) {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
/* Estilos para el acordeón de newsletter */
.newssiayec-accordion {
  margin: 0 auto 30px auto;
  width: 100%;
  max-width: 1300px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
  padding: 0 0 10px 0;
}

.newssiayec-summary {
  font-size: 1.5rem;
  font-weight: 700;
  color: #005189;
  padding: 18px 30px;
  cursor: pointer;
  border-radius: 18px 18px 0 0;
  background: #f7fafc;
  outline: none;
  border: none;
  transition: background 0.2s;
  margin-bottom: 0;
}

.newssiayec-accordion > .newssiayec-grid {
  margin-top: 24px;
}

.newssiayec-accordion[open] > .newssiayec-summary {
  background: #e6f0fa;
}

.newssiayec-trimester {
  margin: 0 0 10px 0;
  border-radius: 12px;
  background: #f7fafc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.newssiayec-summary-trimester {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
  padding: 12px 24px;
  cursor: pointer;
  background: #e6f0fa;
  border: none;
  outline: none;
  transition: background 0.2s;
}
.newssiayec-trimester[open] > .newssiayec-summary-trimester {
  background: #96c93f;
  color: #fff;
}

details[open] > summary::after {
  content: "▲";
  float: right;
  font-size: 1rem;
  color: #005189;
  margin-left: 10px;
}
summary::after {
  content: "▼";
  float: right;
  font-size: 1rem;
  color: #005189;
  margin-left: 10px;
}

/* Quitar el triángulo nativo de summary */
summary::-webkit-details-marker {
  display: none;
}

@media (max-width: 768px) {
  .newssiayec-accordion {
    max-width: 100%;
    padding: 0;
  }
  .newssiayec-summary {
    font-size: 1.1rem;
    padding: 14px 12px;
  }
  .newssiayec-summary-trimester {
    font-size: 1rem;
    padding: 10px 10px;
  }
}
.newssiayec-section {
  padding: 80px 20px;
}

.newssiayec-container {
  margin: 0 auto;
  width: 100%;
  text-align: center;
}

.newssiayec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  justify-items: center;
  align-items: start;
  padding: 0 2rem 0 2rem;
}

.newssiayec-grid:only-child,
.newssiayec-grid:empty {
  justify-content: center;
}

.newssiayec-header h2 {
  font-size: 40px;
  color: #005189;
  margin-bottom: 10px;
  font-weight: 650;
}

.newssiayec-header h3 {
  font-size: 20px;
  color: #475569;
  margin-bottom: 40px;
  font-weight: 400;
}

.newssiayec-card {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  animation: fadeInUp 1s ease;
  max-width: 290px;
}

.newssiayec-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.219);
}

.newssiayec-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.newssiayec-content {
  padding: 20px;
  text-align: center; /* ahora todo el contenido está centrado */
}

.newssiayec-content h4 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #0f172a;
}

.newssiayec-button {
  margin-top: 10px;
  display: inline-block;
  background-color: #005189;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 15px;
  font-weight: 600;
  font-size: 16px;
  transition: background-color 0.3s ease;
  text-align: center;
}

.newssiayec-button:hover {
  background-color: #96c93f;
  color: #ffffff;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Media Queries para Responsividad */

/* Para pantallas de tabletas */
@media (max-width: 768px) {
  .newssiayec-grid {
    grid-template-columns: 1fr; /* Una columna en tabletas */
    grid-template-areas:
      "item1"
      "item2"
      "item3"
      "item4"; /* Organiza los elementos en una sola columna */
  }

  .newssiayec-header h2 {
    font-size: 30px; /* Reducir tamaño del título */
  }

  .newssiayec-header h3 {
    font-size: 16px; /* Reducir tamaño de subtítulo */
  }

  .newssiayec-card {
    width: 100%; /* Aumentar el tamaño de las tarjetas para que ocupen más espacio */
    max-width: none; /* Quitar el límite máximo de ancho */
  }
}

/* Para pantallas móviles */
@media (max-width: 480px) {
  .newssiayec-header h2 {
    font-size: 24px; /* Reducir más el tamaño del título */
  }

  .newssiayec-header h3 {
    font-size: 14px; /* Reducir el tamaño del subtítulo */
  }

  .newssiayec-card {
    width: 90%; /* Aumentar aún más el tamaño de las tarjetas */
  }

  .newssiayec-button {
    font-size: 14px; /* Reducir el tamaño del texto del botón */
    padding: 8px 16px; /* Ajustar el tamaño del botón */
  }
}
