/* Reset y estilos generales */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background-color: #f0f0f0;
  color: #333;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Encabezado */
.header {
  background-color: #b81273;
  color: white;
  padding: 20px 15px;
  text-align: center;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 15px;
  margin-bottom: 15px;
}

.logo-item {
  flex: 1;
  min-width: 100px;
  max-width: 300px;
}

.logo {
  max-width: 100%;
  height: auto;
}

.slogan {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.4;
  padding: 0 15px;
}

/* Contenido principal */
.main-content {
  padding: 20px 15px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  flex: 1 0 auto; /* Esto hace que el contenido ocupe todo el espacio disponible */
}

.items-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 10px;
}

/* Estilos para secciones generadas por JS */
.seccion {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
}

.seccion-titulo {
  color: #51266e;
  margin-bottom: 15px;
  font-size: 1.5rem;
  padding: 0 15px;
}

.subseccion {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
}

.subseccion h3 {
  color: #b81273;
  font-size: 1.2rem;
  margin-bottom: 10px;
  padding: 0 15px;
}

.content-card {
  background-color: #51266e;
  border-radius: 8px;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.card-info {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.icon-container {
  min-width: 60px;
  min-height: 60px;
  background-color: #b81273;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.feature-icon {
  background-color: #b81273;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
}

.card-text {
  flex: 1;
}

.card-text h2 {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.card-text p {
  font-size: 0.9rem;
}

.btn-container {
  min-width: 80px;
  text-align: center;
  flex-shrink: 0;
  margin-left: 15px;
}

.btn-ver {
  display: inline-block;
  background-color: #e5b725;
  color: white;
  padding: 8px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
}

.btn-ver:hover {
  background-color: #d9aa1e;
}

/* Footer - modificado para que siempre esté al final */
.footer {
  background-color: #51266e;
  color: white;
  padding: 25px 15px;
  text-align: center;
  flex-shrink: 0; /* Impide que el footer se encoja */
  width: 100%;
  margin-top: auto; /* Empuja el footer al fondo cuando hay poco contenido */
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
}

.social-icon {
  color: white;
  background-color: transparent;
  width: 40px;
  height: 40px;
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  text-decoration: none;
  transition: background-color 0.3s;
}

.social-icon:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.copyright {
  margin-bottom: 15px;
}

.logo-municipalidad {
  max-width: 80px;
}

/* Estilos para el indicador de carga */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #b81273;
}

.spinner {
  border: 4px solid rgba(184, 18, 115, 0.3);
  border-radius: 50%;
  border-top: 4px solid #b81273;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Estilos para mensajes de error */
.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: center;
}

/* Media queries para mantener la estructura en todos los dispositivos */
@media (max-width: 768px) {
  .logo-container {
    flex-direction: row;
    justify-content: center;
  }

  .logo-item {
    max-width: 150px;
  }

  .slogan {
    font-size: 1rem;
  }

  /* Mantenemos la estructura horizontal para las tarjetas en móvil */
  .content-card {
    flex-direction: row;
    text-align: left;
    gap: 0;
  }

  .card-info {
    flex-direction: row;
  }

  .btn-container {
    min-width: 60px;
  }

  .btn-ver {
    padding: 6px 15px;
    white-space: nowrap;
  }

  .icon-container {
    min-width: 50px;
    min-height: 50px;
  }

  .feature-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .card-text h2 {
    font-size: 1.1rem;
  }

  .card-text p {
    font-size: 0.8rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .logo-item {
    max-width: 200px;
  }

  .card-text h2 {
    font-size: 1.2rem;
  }
}

@media (min-width: 1025px) {
  .items-container {
    padding: 10px 30px;
  }

  .content-card {
    padding: 20px;
  }
}
