* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
  -webkit-tap-highlight-color: transparent;
}

/* VARIABLES POR DEFECTO: DARK SIDE */
:root {
  --bg-done: #1a0b05 url('/img/home/fondo.jpeg') center/cover no-repeat;
  --menu-color: #f7e6d0;
  --social-fill: #edd9c4;
  --lang-btn-bg: #e5cb9f;
  --lang-btn-text: #0d1b2a;
}

/* VARIABLES MODO LIGHT SIDE */
body.light-side {
  --bg-done: #1a0b05 url('/img/home/fondo-light.png') center/cover no-repeat;
  --menu-color: #713600;
  --social-fill: #713600;
  --lang-btn-bg: #e5cb9f;
  --lang-btn-text: #0d1b2a;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000 !important;
  font-family: 'Times New Roman', Times, serif;
}

/* CONTENEDOR HERO */
.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #000;
  overflow: hidden;
}

/* PREVENCIÓN DE PARPADEO E INICIALIZACIÓN */
.hero:not(.ready) .main-content,
.hero:not(.ready) .top-bar {
  opacity: 0;
  pointer-events: none;
}

.hero.ready .main-content {
  opacity: 1;
  transition: opacity 0.15s ease-in;
}

/* VIDEO DE FONDO */
.video-fondo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.6s ease;
  background-color: #000;
}

.hero.done {
  background: var(--bg-done);
  transition: background 0.5s ease-in-out;
}

.hero.done .video-fondo {
  opacity: 0;
  pointer-events: none;
}

/* BARRA SUPERIOR */
.top-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 30;
  opacity: 0;
  transition: opacity 1s ease 0.2s;
  pointer-events: none;
}

.hero.done .top-bar {
  opacity: 1;
  pointer-events: auto;
}

.top-left {
  display: flex;
  gap: 12px;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-btn svg {
  width: 24px;
  height: 24px;
  fill: var(--social-fill);
  transition: fill 0.3s ease;
}

/* BOTÓN DE CAMBIO DE TEMA */
.theme-btn {
  background-color: transparent;
  color: var(--lang-btn-bg);
  border: 1px solid rgb(235, 205, 107);
  padding: 5px 12px;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-weight: bold;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.2s, background-color 0.3s;
}

.theme-btn:hover {
  transform: scale(1.05);
}

body.light-side .theme-btn {
  background: transparent;           /* Mantiene transparencia */
  color: #713600;                    /* Letras tono marrón oscuro/café */
  border: 1px solid #713600;         /* Borde tono marrón oscuro/café */
}

body.light-side .theme-btn:hover {
  background-color: rgba(113, 54, 0, 0.1); /* Efecto sutil al pasar el ratón */
}

/* DESPLEGABLE IDIOMA */
.lang-container {
  position: relative;
}

.lang-checkbox { display: none; }

.lang-btn {
  background-color: var(--lang-btn-bg);
  color: var(--lang-btn-text);
  padding: 3px 8px 3px 3px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-weight: bold;
  font-size: 0.85rem;
  transition: background-color 0.3s, color 0.3s;
}

.lang-active {
  background-color: #000;
  color: #fff;
  padding: 2px 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.arrow { font-size: 8px; }

.lang-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 110%;
  background-color: #e5cb9f;
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  z-index: 100;
  min-width: 80px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  color: #0d1b2a;
  text-decoration: none;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  font-size: 0.8rem;
  font-weight: bold;
}

.flag {
  width: 16px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
}

.lang-checkbox:checked ~ .lang-menu { 
  display: flex; 
  flex-direction: column; 
}
.lang-checkbox:checked + .lang-btn .arrow { 
  transform: rotate(180deg); 
}

/* CONTENEDOR PRINCIPAL FLUIDO */
.main-content {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 80px 20px;
  margin-top: -60px;
}

/* LOGO */
.logo-container {
  position: relative;
  width: 85vw;
  max-width: 440px; 
  aspect-ratio: 1 / 1;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: scale(1.65);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), margin 1.2s ease;
}

.hero.done .logo-container {
  width: 50vw;
  transform: scale(1.65); 
  margin-bottom: 40px; 
}

.fuego-animado { 
  position: absolute; 
  width: 98%; 
  height: 85%; 
  object-fit: cover; 
  z-index: 1; 
}
.marco-plantilla { 
  position: absolute; 
  width: 100%; 
  height: 100%; 
  object-fit: contain; 
  z-index: 5; 
}
.logo-dorado { 
  position: absolute; 
  width: 100%; 
  height: 100%; 
  object-fit: contain; 
  z-index: 10; 
  opacity: 0; 
  transition: opacity 0.6s ease; 
}

.hero.done .fuego-animado,
.hero.done .marco-plantilla { 
  display: none !important; 
}
.hero.done .logo-dorado { 
  opacity: 1 !important; 
}

/* MENÚ VERTICAL */
.main-menu {
  display: none;
  flex-direction: column;
  align-items: center;
  opacity: 0;
}

.hero.done .main-menu {
  display: flex;
  -webkit-animation: puff-in-center 0.7s cubic-bezier(0.470, 0.000, 0.745, 0.715) 0.3s both;
  animation: puff-in-center 0.7s cubic-bezier(0.470, 0.000, 0.745, 0.715) 0.3s both;
}

@keyframes puff-in-center {
  0% {
    transform: scale(2);
    filter: blur(4px);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    filter: blur(0px);
    opacity: 1;
  }
}

.main-menu a {
  color: var(--menu-color);
  text-decoration: none;
  font-size: 1.85rem; 
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: color 0.3s, transform 0.3s;
}

.img-separador {
  width: 280px; 
  height: 35px;
  margin: 8px 0;
  object-fit: contain;
}

.main-menu a:hover {
  color: #d4af37;
  transform: scale(1.04);
}

@media (min-width: 768px) {
  .hero.done {
    background-size: contain;
    background-position: center center;
  }

  .top-bar {
    width: 100%;
    max-width: 440px; 
    left: 50%;
    transform: translateX(-50%);
    padding: 25px 20px 0 20px;
  }

  body.light-side .social-btn svg {
    fill: #3a1c0d;
  }

  body.light-side .lang-btn {
    background-color: #3a1c0d;
    color: #e5cb9f;
  }

  .main-content {
    max-width: 440px;
    margin: 0 auto;
    padding-top: 70px;
  }

  .hero.done .logo-container {
    width: 100%;
    max-width: 300px;
    transform: scale(1) !important;
    margin-top: 0;
    margin-bottom: 10px;
  }

  .main-menu a {
    font-size: 1.2rem;
  }

  .img-separador {
    width: 150px;
  }
}
