/*
 * Globals
 */

/* Custom default button */
.btn-light,
.btn-light:hover,
.btn-light:focus {
  color: #333;
  text-shadow: none; /* Prevent inheritance from `body` */
}

/*
 * Base structure
 */

/* Override Bootstrap styles with higher specificity */
html body,
body {
  margin: 0 !important;
  padding: 0 !important;
  background-color: #ffcc01 !important;
  transition: background-color 1.5s ease-in-out;
  /* Removemos overflow: hidden para permitir scroll */
  overflow-x: hidden; /* Solo bloqueamos scroll horizontal */
  min-height: 100vh; /* Aseguramos altura mínima */
}

body.activated {
  background-color: #ffcc01 !important;
  /* Permitimos scroll cuando se activa */
  overflow: auto;
}

.cover-container {
    max-width: 100% !important; /* Ocupa todo el ancho */
    padding: 0 !important; /* Elimina padding lateral */
  }

/*
 * Header
 */

header {
  margin-bottom: 20px;
}

.navbar {
  border-radius: 0; /* Removemos border-radius para fixed-top */
  padding: 10px 15px !important;
  /* Removemos la sombra */
  backdrop-filter: blur(10px); /* Efecto moderno para navbar fixed */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Sombra en el borde inferior */
}

/* Agregamos padding-top al body para compensar el navbar fixed */
body.activated {
  padding-top: 70px; /* Altura aproximada del navbar */
}

.navbar-brand {
  margin-right: 0 !important;
}

.header-logo {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
}

/* Estilos de texto del header */
header h3.header-title {
  color: #000 !important;
  font-weight: bold;
  transition: color 0.3s ease;
  cursor: pointer;
  margin: 0;
}

/* Hover para el h3 */
header h3.header-title:hover {
  color: #ffcd01 !important;
}

/* Estilos para el botón hamburguesa */
.navbar-toggler {
  border: 1px solid #000 !important;
  padding: 4px 8px;
  border-radius: 4px;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 205, 1, 0.25) !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  width: 20px;
  height: 20px;
}

/* Navegación */
.nav-masthead {
  gap: 0;
}

.nav-masthead .nav-link {
  color: #000 !important;
  border-bottom: .25rem solid transparent;
  transition: color 0.3s ease, border-bottom-color 0.3s ease;
  text-decoration: none;
  padding: 8px 16px !important;
}

.nav-masthead .nav-link:hover,
.nav-masthead .nav-link:focus {
  border-bottom-color: #ffcd01 !important;
  color: #ffcd01 !important;
}

.nav-masthead .nav-link.active {
  color: #000 !important;
  border-bottom-color: #ffcd01 !important;
}

/* Removemos estilos de disabled ya que todas las opciones serán funcionales */

/* Desktop: links en línea horizontal */
@media (min-width: 768px) {
  .nav-masthead .nav-link + .nav-link {
    margin-left: 0.5rem;
  }
}

/* Mobile: menú colapsable */
@media (max-width: 767.98px) {
  .header-logo {
    width: 2rem;
    height: 2rem;
  }
  
  header h3.header-title {
    font-size: 1.1rem;
  }
  
  /* Ajustamos padding para móvil */
  body.activated {
    padding-top: 60px;
  }
  
  .main-content.show {
    padding-top: 70px;
  }
  
  /* Menú colapsado en móviles */
  .navbar-collapse {
    margin-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 15px;
    background-color: rgba(255, 255, 255, 0.95); /* Fondo semi-transparente */
    border-radius: 0 0 8px 8px;
  }
  
  .nav-masthead {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  
  .nav-masthead .nav-item {
    width: 100%;
  }
  
  .nav-masthead .nav-link {
    padding: 12px 15px !important;
    margin: 0 !important;
    width: 100%;
    border-bottom: none;
    border-left: 3px solid transparent;
  }
  
  .nav-masthead .nav-link:hover,
  .nav-masthead .nav-link:focus {
    border-left-color: #ffcd01 !important;
    border-bottom-color: transparent !important;
    color: #ffcd01 !important;
  }
  
  .nav-masthead .nav-link.active {
    border-left-color: #ffcd01 !important;
    border-bottom-color: transparent !important;
    color: #000 !important;
  }
}

/*
 * Custom intro screen styles
 */

.intro-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 1s ease-in-out;
  cursor: pointer;
  padding: 20px; /* Padding para evitar que toque los bordes */
}

.intro-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.intro-icon {
  /* Tamaño responsive basado en el viewport */
  width: min(60vw, 80vh, 400px); /* 60% del ancho o 80% del alto, máximo 400px */
  height: auto; /* Mantener proporción */
  max-width: 90%; /* No superar 90% del contenedor */
  margin-bottom: 30px;
  animation: pulse 2s infinite;
  object-fit: contain; /* Mantener proporción sin distorsión */
}

.intro-text {
  color: white;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  animation: fadeInOut 2s infinite;
}

/* Media queries para diferentes tamaños de imagen */
@media (max-width: 576px) {
  .intro-icon {
    width: min(70vw, 70vh, 280px);
  }
  
  .intro-text {
    font-size: 20px;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .intro-icon {
    width: min(50vw, 60vh, 350px);
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .intro-icon {
    width: min(40vw, 50vh, 400px);
  }
}

@media (min-width: 1201px) {
  .intro-icon {
    width: min(30vw, 40vh, 450px);
  }
}

.main-content {
  opacity: 0;
  transition: opacity 1s ease-in-out;
  transition-delay: 0.5s;
  /* Permitimos que el contenido principal crezca */
  min-height: 100vh;
  flex: 1;
}

.main-content.show {
  opacity: 1;
  /* Agregamos padding-top cuando se muestra el contenido */
  padding-top: 80px;
}


/* Aseguramos que el main pueda crecer */
main {
    width: 100%;
    max-width: 100vw; /* Máximo ancho = ancho de viewport */
    padding: 0; /* Elimina padding interno */
  }

  main .w-100 {
  width: 100% !important;
  padding: 0 !important; /* Pequeño padding para no tocar bordes */
  overflow: hidden; /* Para recortar la imagen */
}

/* Estilos para recortar la imagen */
main .w-100 img {
  width: 100% !important;
  height: auto;
  object-fit: cover;
  object-position: top center; /* Mantiene la parte superior y centra horizontalmente */
  /* Opción 1: Recortar altura específica */
  
  /* Opción 2: Recortar con clip-path (descomenta si prefieres esta opción) */
  clip-path: inset(0 0 -10% 0); 
  
  /* Opción 3: Recortar con transform (descomenta si prefieres esta opción) */
  /* transform: scale(1.2) translateY(-10%); */
}

/* Ensure text colors work properly with Bootstrap */
.text-white-50 {
  color: rgba(255, 255, 255, 0.5) !important;
}

.text-white {
  color: white !important;
}

/* Animaciones */

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes fadeInOut {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

/* Animación para el contenido que aparece desde abajo */
@keyframes slideUpFromBottom {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.animated-content {
  background: transparent;
  padding: 40px 20px;
  margin: 20px 0;
  opacity: 0;
  transform: translateY(100%);
  animation: slideUpFromBottom 1s ease-out forwards;
  animation-delay: 2s; /* Se activa 2 segundos después de que aparece el contenido principal */
}
