/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/* CSS del loader */
#loader {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  border: 6px solid #ccc;
  border-top: 6px solid #00e5ff;
  border-radius: 50%;
  width: 50px; height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

body {
  font-family: 'Poppins', sans-serif;
  color: #fff;
  line-height: 1.6;

  /* Fondo con degradado vertical y textura radial sutil */
  background:
    linear-gradient(to bottom, #1c1f22 0%, #181a1d 100%),
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.035), transparent 60%),
    radial-gradient(circle at 75% 40%, rgba(255, 255, 255, 0.03), transparent 60%);
  background-blend-mode: overlay;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.semestre:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.02);
}

.semestre:nth-of-type(even) {
  background-color: rgba(255, 255, 255, 0.04);
}

/* Encabezado */
.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 60px 20px;
  text-align: center;

  /* Fondo con tu imagen personalizada */
  background-image: url('../imagenes/econ-wallpaper-header.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* Estética adicional */
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45); /* Puedes ajustar la opacidad */
  z-index: 1;
}

.header * {
  position: relative;
  z-index: 2;
}

.logo {
  width: 160px;              /* Aumentamos el tamaño */
  height: 160px;
  aspect-ratio: 1 / 1;       /* ⬅️ Esta línea es clave */
  border-radius: 50%;        /* Hace el logo circular */
  object-fit: cover;         /* Asegura que se recorte bien dentro del círculo */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Sombra elegante */
  margin-bottom: 20px;
}

.titulo-contenedor {
  text-align: center;
}

.adeco {
  font-size: 2.5rem;
  font-weight: 600;
}

.subtitulo {
  font-size: 1.2rem;
  font-weight: 400;
  color: #ccc;
}

/* Sección del semestre */
.semestre {
  padding: 30px 20px;
  text-align: center;
}

/* Título del semestre */
.semestre h2 {
  margin-bottom: 20px;
  font-size: 1.8rem;
  color: #f2f2f2;
}

/* ⬇️ Contenedor que centra todo el grid */
.cursos-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* ⬇️ Grid de botones responsivo y siempre centrado */
.cursos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  max-width: 760px;
  gap: 14px;
  justify-content: center;
}

/* ⬇️ Botón curso con rebote y brillo */
.curso {
  width: 180px;
  height: 100px;
  background: linear-gradient(270deg, #00577a, #008080);
  background-size: 400% 400%;
  color: white;
  border-radius: 12px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  word-wrap: break-word;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  animation: none;
}

.curso:hover {
  animation: crecerSuave 0.25s ease forwards;
  filter: brightness(1.4);
}

@keyframes crecerSuave {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

/* efecto al hacer clic */
.curso:active {
  transform: scale(0.96);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* ⬇️ Garantiza 2 columnas mínimo en celular */
@media (max-width: 500px) {
  .cursos {
    grid-template-columns: repeat(2, 1fr);
    max-width: 400px;
  }

  .curso {
    height: 90px;          /* Más compacto */
    font-size: 0.85rem;     /* Texto un poco más pequeño */
    padding: 8px;           /* Menos padding interno */
  }
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  color: #ccc;
  border-top: 1px solid #444;
}

.social-buttons {
  margin-top: 15px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-block;
  background-size: 22px 22px;
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.social-icon:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.social-icon.instagram {
  background-image: url('https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/instagram.svg');
  filter: invert(1);
}

.social-icon.whatsapp {
  background-image: url('https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/whatsapp.svg');
  filter: invert(1);
}

@media (max-width: 600px) {
  body {
    background:
      linear-gradient(to bottom, #2a2d30 0%, #1e2023 100%),
      radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.04), transparent 60%),
      radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.03), transparent 60%);
    background-blend-mode: overlay;
    background-size: cover;
    background-repeat: no-repeat;
  }
}

.semestre {
  padding: 40px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.semestre:not(:last-of-type)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 5%;
  width: 90%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
  opacity: 0.7;
}

.header-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* capa oscura inicial */
  z-index: 1;
  animation: fadeOverlay 1.5s ease-out forwards;
}

@keyframes fadeOverlay {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Asegúrate de que el contenido esté por encima */
.logo,
.titulo-contenedor {
  position: relative;
  z-index: 2;
}

@media (max-width: 600px) {
  .logo {
    width: 100px;
    height: 100px;
    aspect-ratio: 1 / 1; /* ⬅️ Esto asegura que sea perfectamente circular */
  }

  .adeco {
    font-size: 1.8rem;
  }

  .subtitulo {
    font-size: 1rem;
  }
}

.btn-volver {
  position: absolute;
  top: 20px;
  left: 20px;
  background: linear-gradient(135deg, #00bcd4, #007c91);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
  transition: all 0.3s ease;
  z-index: 3;
}

.btn-volver:hover {
  background: linear-gradient(135deg, #00e5ff, #00838f);
  transform: scale(1.07);
  box-shadow: 0 6px 16px rgba(0, 229, 255, 0.4);
}

