/* ===============================
    VARIABLES GLOBALES
=============================== */
:root {
  /* Paleta para modo Día (Amanecer) */
  --color-fondo: linear-gradient(180deg, #fff9f0, #FFE9D6);
  --color-texto: #333333;
  /* Texto oscuro */
  --color-primary: #FFA726;
  /* Acento cálido */
  --color-secondary: #F8BBD0;
  /* Acento pastel */
  --color-icono: #333333;
  /* Color ícono por defecto (oscuro) */

  /* Navbar y otros elementos */
  --color-navbar-bg: rgba(255, 255, 255, 0.7);
  --color-navbar-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --color-menu-bg: rgba(240, 240, 240, 0.98);

  /* Unidades de espaciado */
  --espacio-base: 1rem;
  /* ~16px */
}

.dark-mode {
  /* Paleta para modo Noche (Black mode) */
  --color-fondo: linear-gradient(180deg, #121212, #181818);
  --color-texto: #E0E0E0;
  /* Texto claro */
  --color-primary: #BB86FC;
  /* Acento vibrante */
  --color-secondary: #3700B3;
  /* Acento complementario */
  --color-icono: #ffffff;
  /* Color ícono en modo oscuro (blanco) */

  --color-navbar-bg: rgba(0, 0, 0, 0.7);
  --color-navbar-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --color-menu-bg: rgba(40, 40, 40, 0.98);
}

/* ===============================
    ESTILO GENERAL
=============================== */
body {
  font-family: 'IBM Plex Sans', sans-serif;
  /* Asegúrate de importar esta fuente si la usas */
  background: var(--color-fondo);
  color: var(--color-texto);
  margin: 0;
  transition: background-color 0.5s ease, color 0.5s ease;
  position: relative;
  min-height: 100vh;
}

/* Modo oscuro con fondo de estrellas */
.dark-mode::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('img/Estrellas.jpg') repeat;
  /* Revisa la ruta */
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

/* Animación al cambiar de modo */
@keyframes fadeFlash {
  0% {
    opacity: 1;
    filter: brightness(1);
  }

  50% {
    opacity: 0.6;
    filter: brightness(1.2);
  }

  100% {
    opacity: 1;
    filter: brightness(1);
  }
}

body.dark-mode-animating {
  animation: fadeFlash 0.7s ease;
}

/* ===============================
    NAVBAR
=============================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--color-navbar-bg);
  padding: calc(var(--espacio-base) * 0.625) calc(var(--espacio-base) * 1.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  box-shadow: var(--color-navbar-shadow);
  box-sizing: border-box;
  backdrop-filter: blur(5px);
  /* Efecto vidrio esmerilado */
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.navbar.hidden {
  transform: translateY(-100%);
  opacity: 0;
}

/* ===============================
    LOGO (botón de menú)
=============================== */
.logo img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid rgba(47, 0, 255, 0.2);
  /* Considera usar una variable aquí */
  object-fit: cover;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logo img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* ===============================
    MENÚ DESPLEGABLE
=============================== */
.navbar ul#menu {
  list-style: none;
  padding: calc(var(--espacio-base) * 1.5);
  margin: 0;
  display: none;
  /* Oculto por defecto */
  position: absolute;
  top: 80px;
  /* Ajusta según altura de navbar */
  left: 10px;
  width: 220px;
  /* O el ancho que prefieras */
  background-color: var(--color-menu-bg);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  z-index: 11;
  /* Encima de la navbar si es necesario */
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  backdrop-filter: blur(5px);
  /* También en el menú */
}

.navbar ul#menu.active {
  display: flex;
  /* Se muestra al hacer clic en el logo */
}

.navbar ul#menu li a {
  color: var(--color-texto);
  font-size: 1rem;
  font-weight: bold;
  display: block;
  padding: calc(var(--espacio-base) * 1) calc(var(--espacio-base) * 1.5);
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

/* Hover específico para modo claro */
body:not(.dark-mode) .navbar ul#menu li a:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #000000;
  /* Texto más oscuro al hacer hover */
  transform: translateX(3px);
  text-shadow: none;
}

/* Hover específico para modo oscuro */
.dark-mode .navbar ul#menu li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #eeeeee;
  /* Texto ligeramente menos brillante al hacer hover */
  transform: translateX(3px);
  text-shadow: none;
}

/* ===============================
    BOTONES DE NAVEGACIÓN (Toggle Modo Oscuro)
=============================== */
.nav-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dark-mode-toggle {
  background: none;
  border: none;
  padding: calc(var(--espacio-base) * 0.5) calc(var(--espacio-base) * 0.75);
  outline: none;
  color: var(--color-texto);
  /* Usa color de texto general por defecto */
  cursor: pointer;
  font-size: 1.5rem;
  transition: color 0.3s ease, transform 0.2s ease;
  border-radius: 5px;
}

/* Hover específico modo claro */
body:not(.dark-mode) .dark-mode-toggle:hover {
  color: #555;
  transform: scale(1.1);
}

/* Hover específico modo oscuro */
.dark-mode .dark-mode-toggle:hover {
  color: #ccc;
  transform: scale(1.1);
}


/* ===============================
    SECCIONES Y HOME
=============================== */
.section {
  /* Ajusta el padding top para que el contenido no quede debajo de la navbar fija */
  padding: calc(70px + var(--espacio-base) * 2)
    /* Altura navbar aprox + espacio */
    var(--espacio-base)
    /* Padding lateral */
    var(--espacio-base);
  /* Padding inferior */
  text-align: center;
}

#Home h1 {
  margin-bottom: calc(var(--espacio-base) * 0.625);
}

#Home p {
  margin-bottom: calc(var(--espacio-base) * 1.25);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ===============================
    IMAGEN PRINCIPAL CON EFECTO GLOW
=============================== */
.team-photo {
  width: 80%;
  max-width: 600px;
  margin: calc(var(--espacio-base, 20px) * 1.25) auto 0 auto;
  /* Fallback si --espacio-base no está */
  border-radius: 15px;
  display: block;
  position: relative;
  /* Necesario para z-index */
  z-index: 1;
  /* Imagen principal por encima del glow */
}

.team-photo-wrapper {
  display: block;
  /* O inline-block si prefieres, pero block facilita centrado */
  text-align: center;
  /* Centra si es inline-block */
  position: relative;
}

.team-photo-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1%;
  /* Coincide con el wrapper */
  height: 1%;
  /* Coincide con el wrapper */
  background-image: url('img/Team.jpg');
  /* ! ASEGURA ESTA RUTA ! */
  background-size: cover;
  background-position: center;
  border-radius: 15px;
  /* Coincide con la imagen */
  filter: blur(20px) saturate(1.2);
  /* Ajusta el desenfoque */
  transform: scale(1.05);
  /* Ajusta cuánto sobresale */
  z-index: 0;
  /* Detrás de la imagen principal (.team-photo con z-index: 1) */
  /* Centrado relativo al wrapper (si el wrapper no es 100% de ancho) */
  /* Si .team-photo-wrapper es display:block y centrado, esto puede no ser necesario */
  /* left: 50%;
  /* top: 50%; */
  /* transform: translate(-50%, -50%) scale(1.05); */
}


/* ===============================
  CONTADOR REGRESIVO (Countdown)
=============================== */
#countdown-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  perspective: 1000px;
}

/*.dark-mode #countdown-container {
  background-color: rgba(255, 255, 255, 0.1);
}*/

#countdown-container h2 {
  display: flex;
  justify-content: center;
  gap: 10px;
}

#countdown {
  font-size: 1.3rem;
  /* Tamaño ajustado */
  margin: 0;
  text-align: center;
  perspective: 1000px;
}

#countdown span {
  background: #222;
  /* Fondo oscuro para el panel */
  color: #fff;
  /* Texto claro */
  padding: 15px 20px;
  /* Espaciado interno para dar sensación de panel */
  border-radius: 5px;
  /* Bordes redondeados */
  font-size: 2rem;
  /* Tamaño de fuente grande */
  font-weight: bold;
  min-width: 50px;
  /* Ancho mínimo para que se vean uniformes */
  text-align: center;
  transform-style: preserve-3d;
  /* Necesario para ver el efecto 3D al rotar */
  position: relative;
}

/* Animación flip */
.flip {
  animation: flipIn 0.6s ease-out forwards;
}

@keyframes flipIn {
  0% {
    transform: rotateX(90deg);
    opacity: 0;
  }

  50% {
    transform: rotateX(-10deg);
    opacity: 1;
  }

  100% {
    transform: rotateX(0deg);
  }
}
/* ===============================
    VIDEO GALLERY (Sin cambios importantes)
=============================== */
.video-gallery {
  display: flex;
  gap: 20px;
  margin: calc(var(--espacio-base) * 2.5) auto;
  padding: calc(var(--espacio-base) * 0.625) calc(var(--espacio-base) * 1.25);
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
  margin-bottom: calc(var(--espacio-base) * 1.875);
}

.dark-mode .video-gallery {
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.video-gallery::-webkit-scrollbar {
  height: 8px;
}

.video-gallery::-webkit-scrollbar-track {
  background: transparent;
}

.video-gallery::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

.dark-mode .video-gallery::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
}

.video-item {
  flex-shrink: 0;
  width: 300px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.6);
  padding: calc(var(--espacio-base) * 1);
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dark-mode .video-item {
  background-color: rgba(30, 30, 30, 0.8);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.video-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.dark-mode .video-item:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.7);
}

.video-item img {
  width: 100%;
  height: 169px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.video-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.video-item p {
  margin: calc(var(--espacio-base) * 0.625) 0 0;
  font-size: 0.9rem;
  font-weight: bold;
  line-height: 1.3;
}

/* ===============================
    PERFIL (Team Section) (Sin cambios importantes)
=============================== */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin: calc(var(--espacio-base) * 2.5) auto;
  padding: 0 20px;
}

.profile-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.5);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark-mode .profile-item {
  background-color: #1e1e1e;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
}

.profile-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.dark-mode .profile-item:hover {
  background-color: #2a2a2a;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
}

.profile-item img {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  margin-bottom: calc(var(--espacio-base) * 0.9375);
  transition: transform 0.3s ease;
  border: 3px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .profile-item img {
  border: 3px solid rgba(255, 255, 255, 0.1);
}

.profile-item:hover img {
  transform: scale(1.08);
}

.profile-item div {
  text-align: center;
}

.profile-item h3 {
  margin: calc(var(--espacio-base) * 0.625) 0 calc(var(--espacio-base) * 0.3125) 0;
  font-size: 1.3rem;
  color: inherit;
}

.profile-item p {
  font-size: 0.95rem;
  color: inherit;
  margin: 0 0 calc(var(--espacio-base) * 0.9375) 0;
  line-height: 1.5;
}

/* ===============================
    ICONOS SOCIALES (Perfil)
=============================== */
.social-icons {
  display: flex;
  gap: 18px;
  /* Aumentado espacio */
  justify-content: center;
  align-items: center;
  margin-top: auto;
  /* Empuja hacia abajo */
  padding-top: 10px;
}

.social-icons a+a::before{
  content:none;
  display:none;
}

.social-icons a {
  display: inline-block;
  width: 28px;
  /* Tamaño icono */
  height: 28px;
  color: inherit;
  /* Hereda color de texto */
  opacity: 0.7;
  transition: transform 0.3s ease, opacity 0.3s ease;
  text-decoration: none;
  border: none;
}

.social-icons a:hover {
  opacity: 1;
  /* Opacidad completa al pasar el ratón */
}

.social-icons a svg {
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease, fill 0.3s ease;
  /* Transición también para fill */
  /* Hereda el color del 'a' (que hereda del body) */
  fill: currentColor;
}

/* Anulación específica para modo oscuro */
.dark-mode .social-icons a svg {
  /* Fuerza el blanco en modo oscuro */
  fill: #ffffff;
}

.social-icons a:hover svg {
  transform: scale(1.2);
}


/* ===============================
    TABLA (NecroProde) (Sin cambios importantes)
=============================== */
#NecroProde {
  text-align: center;
  padding: 20px;
}

#NecroProde h1 {
  margin-bottom: 30px;
  font-size: 2.5rem;
  color: inherit;
}

#NecroProde table {
  color: inherit;
  width: 100%;
  max-width: 800px;
  border-collapse: collapse;
  margin: 0 auto;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dark-mode #NecroProde table {
  background-color: rgba(52, 47, 47, 0.7);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

#NecroProde th,
#NecroProde td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-mode #NecroProde th,
.dark-mode #NecroProde td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#NecroProde th {
  background-color: rgba(0, 0, 0, 0.05);
  font-weight: bold;
}

.dark-mode #NecroProde th {
  background-color: rgba(255, 255, 255, 0.08);
}

#NecroProde tr:last-child td {
  border-bottom: none;
}

#NecroProde tr:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.dark-mode #NecroProde tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* ===============================
    CARRUSEL DE IMÁGENES (Sin cambios importantes)
=============================== */
.carrusel {
  display: flex;
  gap: 20px;
  margin-top: calc(var(--espacio-base) * 2.5);
  /* Ajustado margen */
  padding: calc(var(--espacio-base) * 0.625) calc(var(--espacio-base) * 1.25);
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
  margin-bottom: calc(var(--espacio-base) * 1.875);
}

.dark-mode .carrusel {
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.carrusel::-webkit-scrollbar {
  height: 8px;
}

.carrusel::-webkit-scrollbar-track {
  background: transparent;
}

.carrusel::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

.dark-mode .carrusel::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.3);
}

.carrusel img {
  width: auto;
  height: 400px;
  max-width: 80vw;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}

.carrusel img:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}


/* ===============================
    FOOTER
=============================== */
.footer {
  text-align: center;
  padding: 25px 20px;
  background-color: rgba(0, 0, 0, 0.1);
  color: inherit;
  font-size: 0.9rem;
  margin-top: 40px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .footer {
  background-color: #111;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer a {
  color: inherit;
  text-decoration: underline;
  transition: color 0.3s ease;
}

body:not(.dark-mode) .footer a:hover {
  color: #555;
}

.dark-mode .footer a:hover {
  color: #ccc;
}

/* ===============================
    MEDIA QUERIES (Responsivos)
=============================== */
@media screen and (max-width: 768px) {

  /* Reducir espacio base en móviles */
  :root {
    --espacio-base: 0.875rem;
    /* ~14px */
  }

  .section {
    padding: calc(70px + var(--espacio-base) * 1.5) var(--espacio-base) var(--espacio-base);
  }

  .navbar {
    padding: calc(var(--espacio-base) * 0.5) calc(var(--espacio-base) * 1);
  }

  .logo img {
    width: 55px;
    height: 55px;
  }

  .navbar ul#menu {
    top: 65px;
    left: 5px;
    right: 5px;
    width: auto;
    padding: var(--espacio-base);
  }

  .dark-mode-toggle {
    font-size: 1.3rem;
    padding: 5px 8px;
  }

  #Home h1 {
    font-size: 1.8rem;
  }

  #Home p {
    font-size: 1rem;
  }

  .team-photo {
    width: 90%;
    max-width: 400px;
  }

  #countdown-container h2 {
    font-size: 1.3rem;
    margin-bottom: var(--espacio-base);
  }

  /* Ajustar tamaño contador en móvil */
  .digit-container {
    width: 45px;
    height: 65px;
    font-size: 2.5rem;
    line-height: 65px;
    border-radius: 5px;
  }

  .digit-static.top,
  .card-face.top {
    line-height: 65px;
    border-radius: 5px 5px 0 0;
  }

  .digit-static.bottom,
  .card-face.bottom {
    border-radius: 0 0 5px 5px;
  }

  .separator {
    font-size: 2rem;
  }

  .time-label {
    bottom: -18px;
    font-size: 0.7rem;
  }

  .countdown {
    gap: 8px;
  }

  .time-unit {
    gap: 4px;
  }

  .video-item {
    width: 250px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 calc(var(--espacio-base) * 1);
  }

  .profile-item img {
    width: 100px;
    height: 100px;
  }

  .profile-item h3 {
    font-size: 1.1rem;
  }

  .profile-item p {
    font-size: 0.9rem;
  }

  .social-icons a {
    width: 24px;
    height: 24px;
  }

  #NecroProde h1 {
    font-size: 1.8rem;
  }

  #NecroProde th,
  #NecroProde td {
    padding: 10px 8px;
    font-size: 0.9rem;
  }

  .carrusel img {
    height: 300px;
  }

  .footer {
    padding: 20px 15px;
    font-size: 0.8rem;
  }
}

/* ===============================
    ANIMACIONES (Hover, etc.)
=============================== */
[data-animation="scale"]:hover {
  transform: scale(1.05);
}

[data-animation="rotate"]:hover {
  transform: rotate(3deg) scale(1.02);
}

[data-animation="fade"]:hover {
  opacity: 0.9;
}

/* Efectos en perfiles específicos (si aún existe .perfil) */
.perfil {
  display: flex;
  align-items: center;
  gap: 15px;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  position: relative;
  transition: all 0.3s ease-in-out;
}

.perfil-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(47, 0, 255, 0.295);
  transition: transform 0.4s ease-in-out;
  cursor: pointer;
}

.perfil-info {
  flex: 1;
  transition: filter 0.4s ease-in-out;
}

.perfil-img:hover {
  transform: scale(1.5);
}

.perfil-img:hover~.perfil-info {
  filter: blur(3px);
}