/* ==========================
   RESET / VARIABLES
========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --morado: #8c52ff;
  --bg: #f4f4f4;
  --txt: #333;
  --gap: 20px;
  --container-max: 1200px;
  --header-h: 90px;
}

html,
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body {
  font-family: "Arial", sans-serif;
  background-color: var(--bg);
  color: var(--txt);
}

/* ==========================
   HEADER / NAV
========================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--morado);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 15px 20px;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 60px;
  transition: height 0.3s ease, transform 0.6s ease;
  transform-style: preserve-3d;
}
.logo img:hover {
  transform: rotateY(360deg);
}

.menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  position: relative;
}
.nav-links li {
  position: relative;
}

.nav-links li a {
  padding: 8px 15px;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.nav-links li a:hover {
  background-color: #fff;
  color: var(--morado);
}

/* Dropdown */
.dropdown-menu,
.dropdown-submenu {
  display: none;
  position: absolute;
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  top: 100%;
  left: 0;
  list-style: none;
  padding: 5px 0;
  z-index: 10;
}
.dropdown:hover > .dropdown-menu {
  display: block;
}
.dropdown-menu li:hover > .dropdown-submenu {
  display: block;
}
.dropdown-menu li {
  padding: 5px 20px;
}
.dropdown-submenu {
  top: 0;
  left: 100%;
}

.dropdown-menu li a {
  text-decoration: none;
  color: #333;
}
.dropdown-menu li a:hover {
  background-color: #fff;
  color: var(--morado);
}

/* Menú con logos */
.menu-logo,
.submenu-logo {
  width: auto;
  margin: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 5px;
}
.menu-logo {
  height: 40px;
}
.submenu-logo {
  height: 30px;
}
.menu-logo:hover,
.submenu-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 8px var(--morado);
}
.dropdown-menu li a.logo-item:hover,
.nav-links li a.logo-item:hover {
  background-color: transparent;
}

/* Buscador */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  width: 200px;
}
.search-bar input {
  width: 100%;
  height: 40px;
  padding: 8px;
  border: 2px solid #ccc;
  outline: none;
}
.search-bar input:focus {
  border-color: var(--morado);
}

/* Selector de idioma */
.language-selector {
  position: relative;
  display: inline-block;
}
#lang-btn {
  border: none;
  background: none;
  font-weight: bold;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  padding: 5px;
}
#lang-btn:hover {
  color: var(--morado);
}

.lang-menu {
  display: none;
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  padding: 5px;
}
.lang-menu li {
  list-style: none;
}
.lang-menu li a {
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  padding: 5px;
  display: block;
}
.lang-menu li a:hover {
  color: var(--morado);
}
.language-selector:hover .lang-menu {
  display: block;
}

/* Hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.hamburger .bar {
  width: 25px;
  height: 4px;
  background-color: #fff;
}

/* ==========================
   FOOTER
========================== */
footer {
  background-color: var(--morado);
  color: #fff;
  padding: 40px 20px;
  text-align: center;
  box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.2);
}
footer a {
  color: #f4f4f9;
  text-decoration: dotted;
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.footer-logo img {
  height: 60px;
  margin-bottom: 15px;
  opacity: 0.9;
}
.footer-socials {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}
.footer-socials img {
  width: 30px;
  transition: transform 0.1s ease, opacity 0.3s ease;
}
.footer-socials a:hover img {
  transform: scale(1.2);
  opacity: 0.7;
}
.footer-bottom {
  font-size: 14px;
  opacity: 0.8;
}

/* ==========================
   MAIN / LAYOUT
========================== */
main {
  flex-grow: 1;
  padding-top: calc(var(--header-h) + 10px);
}

/* ==========================
   SLIDER
========================== */
/* Arreglo universal de la “línea blanca”: el slider ocupa el viewport
   MÁS la altura del header y se sitúa por detrás de él. */
.slider {
  position: relative;
  height: calc(100vh + var(--header-h));   /* fallback */
  height: calc(100svh + var(--header-h));  /* UI visible */
  height: calc(100dvh + var(--header-h));  /* viewport real */
  margin-top: calc(-1 * var(--header-h));  /* se mete bajo el header fijo */
  overflow: hidden;
}

.slider .list .item {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: 0.5s;
}
.slider .list .item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Gradiente algo más fuerte para legibilidad del CTA blanco */
.slider .list .item::after {
  content: "";
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  bottom: 0;
  background-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.6) 44%,
    rgba(0, 0, 0, 0.25) 64%,
    transparent
  );
}
.slider .list .item .content {
  position: absolute;
  left: 10%;
  top: 20%;
  width: 500px;
  max-width: 80%;
  z-index: 12; /* por encima de thumbnails */
}
.slider .list .item .content h2 {
  font-size: 100px;
  margin: 0;
  color: #fff;
  -webkit-text-stroke: 2px #000;
}
.slider .list .item.active {
  opacity: 1;
  z-index: 10;
}

/* Animación contenido */
@keyframes showContent {
  to {
    transform: translateY(0);
    filter: blur(0);
    opacity: 1;
  }
}

.slider .list .item .content h2,
.slider .list .item .content .cta {
  transform: translateY(30px);
  filter: blur(20px);
  opacity: 0;
}
.slider .list .item.active .content h2 {
  animation: showContent 0.5s 1s ease-in-out forwards;
}
.slider .list .item.active .content .cta {
  animation: showContent 1s 0.9s ease-in-out forwards;
}

/* CTA blanco entero (fondo/borde blancos, texto oscuro para contraste) */
.slider .list .item .content .cta {
  display: inline-block;
  margin-top: 10px;        /* un poco más arriba */
  padding: 12px 18px;
  font-weight: 800;
  text-decoration: none;
  color: #111;             /* contraste sobre fondo blanco */
  background: #fff;        /* blanco entero */
  border: 2px solid #fff;  /* borde blanco */
  border-radius: 12px;
  box-shadow:
    0 0 12px rgba(255, 255, 255, 0.55),
    inset 0 0 10px rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.slider .list .item .content .cta:hover,
.slider .list .item .content .cta:focus {
  outline: none;
  transform: translateY(-1px);
  box-shadow:
    0 0 18px rgba(255, 255, 255, 0.8),
    inset 0 0 12px rgba(255, 255, 255, 0.45);
}

/* Flechas */
.arrows {
  position: absolute;
  top: 30%;
  right: 50px;
  z-index: 100;
}
.arrows button {
  background-color: #eee5;
  border: none;
  font-family: monospace;
  width: 40px;
  height: 40px;
  border-radius: 5px;
  font-size: x-large;
  color: #eee;
  transition: 0.5s;
}
.arrows button:hover {
  background-color: #eee;
  color: black;
}

/* Thumbnails */
.thumbnail {
  position: absolute;
  bottom: 50px;
  z-index: 11;
  display: flex;
  gap: 10px;
  width: 100%;
  height: 250px;
  padding: 0 50px;
  box-sizing: border-box;
  overflow: auto;
  justify-content: center;
}
.thumbnail::-webkit-scrollbar {
  width: 0;
}
.thumbnail .item {
  width: 150px;
  height: 220px;
  filter: brightness(0.5);
  transition: 0.5s;
  flex-shrink: 0;
}
.thumbnail .item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.thumbnail .item.active {
  filter: brightness(1.5);
}
.thumbnail .item .content {
  position: absolute;
  inset: auto 10px 10px 10px;
}

/* ==========================
   RESPONSIVE + “aire” progresivo
========================== */

/* <= 1200px: baja tamaño de H2 y sube el bloque para dar aire */
@media (max-width: 1200px) {
  .slider .list .item .content {
    top: auto;
    bottom: 360px;   /* más aire sobre la tira */
    left: 8%;
    max-width: 88%;
  }
  .slider .list .item .content h2 {
    font-size: 84px;
  }
}

/* <= 1024px (iPad en vertical/tablets pequeñas) */
@media (max-width: 1024px) {
  .slider .list .item .content {
    bottom: 380px;   /* aún más aire */
    left: 8%;
    max-width: 88%;
  }
  .slider .list .item .content h2 {
    font-size: 72px;
  }
  .thumbnail { bottom: 42px; }
}

/* Menú responsive (mantén lo que ya tenías) */
@media (max-width: 768px) {
  .menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    background-color: #fff;
    position: absolute;
    top: 70px;
    left: 0;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,.1);
  }
  .menu.active { display: flex; }
  .hamburger { display: flex; }
  .nav-links { flex-direction: column; gap: 10px; width: 100%; }
  .nav-links li a {
    display: block;
    padding: 10px;
    text-align: left;
    color: #333;
    background-color: #fff;
    border-radius: 5px;
  }
  .dropdown-menu, .dropdown-submenu {
    display: none;
    position: static;
    background-color: #f9f9f9;
    margin-left: 20px;
  }
  .dropdown-menu li:hover > .dropdown-submenu,
  .dropdown:hover > .dropdown-menu { display: block; }
  .menu-logo, .submenu-logo { height: 25px; }
}

/* <= 678px: móviles; más aire y títulos más compactos */
@media screen and (max-width: 678px) {
  .thumbnail { justify-content: start; bottom: 38px; }
  .slider .list .item .content {
    bottom: 410px;   /* separa claramente del carrusel de miniaturas */
    left: 6%;
    max-width: 90%;
  }
  .slider .list .item .content h2 { font-size: 56px; }
  .arrows { top: 10%; }
  .logo img { height: 48px; }
}
