:root {
  --bg-color: #050505;
  --bg-sidebar: rgba(10, 10, 10, 0.45);
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --accent-cyan: #00f0ff;
  --accent-pink: #ff00c8;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --card-overlay: linear-gradient(to top, rgba(0, 0, 0, 0.8) 20%, rgba(0, 0, 0, 0.4) 50%, rgba(245, 5, 5, 0.1) 100%);
  --glass-bg: rgba(255, 255, 255, 0.05);
}

.light-mode {
  --bg-color: #f0f0f0;
  --bg-sidebar: rgba(240, 240, 240, 0.85);
  --text-primary: #111111;
  --text-secondary: #444444;
  --accent-cyan: #0088cc;
  --accent-pink: #cc0088;
  --sidebar-border: rgba(0, 0, 0, 0.1);
  /* Mantenemos una sombra oscura en las cards para legibilidad del texto blanco */
  --card-overlay: linear-gradient(to top, rgba(0, 0, 0, 0.8) 20%, rgba(0, 0, 0, 0.3) 60%, rgba(255, 255, 255, 0.1) 100%);
  --glass-bg: rgba(0, 0, 0, 0.05);
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


a {
  text-decoration: none;
  color: inherit;
}

html, body {
  height: 100%;
}

/* CONTENEDOR HERO PRINCIPAL */
.hero-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 5;
  background-color: var(--bg-color); /* Fondo oscuro por si tarda en cargar el video */
}

/* Fullscreen Video Hero */
.video-hero {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  /* Efecto Viñeta Premium */
  background: radial-gradient(
    circle, 
    rgba(5, 5, 5, 0.1) 0%, 
    rgba(5, 5, 5, 0.4) 60%, 
    rgba(5, 5, 5, 0.8) 100%
  );
}

.light-mode .video-overlay {
  background: radial-gradient(
    circle, 
    rgba(0, 0, 0, 0.1) 0%, 
    rgba(0, 0, 0, 0.3) 60%, 
    rgba(0, 0, 0, 0.5) 100%
  );
}



body {
  font-family: 'Michroma', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.hero-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10; /* Muy por encima del video y su overlay */
  text-align: center;
}

.hero-title {
  width: 100%;
  text-align: center;
  /* Efecto Premium: "Spotlight" oscuro y desenfoque (glassmorphism) solo detrás del texto */
  padding: 60px 20px;
  background: radial-gradient(
    ellipse at center, 
    rgba(0, 0, 0, 0.65) 0%, 
    rgba(0, 0, 0, 0.3) 40%, 
    transparent 70%
  );
  backdrop-filter: blur(3px); /* Desenfoque sutil del video detrás de las letras */
  -webkit-backdrop-filter: blur(3px);
  border-radius: 50%; /* Evita cortes cuadrados duros */
}

.hero-title h1 {
  font-family: 'Michroma', sans-serif;
  font-size: clamp(32px, 6vw, 75px);
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--text-primary);
  line-height: 1.2;
  padding: 0 20px;
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
}


.hero-title h1 span {
  background: linear-gradient(90deg, #00f0ff, #ff00c8, #00f0ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shineGradient 5s linear infinite;
}

.hero-subtitle {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(16px, 2vw, 22px);
  color: var(--text-secondary);
  font-weight: 300;
  margin-top: 20px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.9;
}


.btn-premium {
  margin-top: 40px;
  display: inline-block;
  padding: 18px 45px;
  font-family: 'Michroma', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--glass-bg);
  border: 1px solid rgba(0, 240, 255, 0.5);
  border-radius: 50px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
  overflow: hidden;
  position: relative;
}


.btn-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 0, 200, 0.4),
    transparent
  );
  transition: all 0.6s ease;
}

.btn-premium:hover {
  border-color: #ff00c8;
  box-shadow: 0 0 30px rgba(255, 0, 200, 0.5);
  transform: translateY(-3px);
  background: rgba(255, 0, 200, 0.1);
  color: #fff;
}

.btn-premium:hover::before {
  left: 100%;
}

@keyframes shineGradient {
  to {
    background-position: 200% center;
  }
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url('img/fondo.jpg') center/cover no-repeat;
  z-index: -1;
}

.main-grid {
  margin-left: 90px;
  min-height: 100vh;
  padding: 80px 80px 80px 60px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 45px;
  position: relative;
  z-index: 1;
  transition: margin-left 0.4s ease;
}


.card {
  position: relative;
  height: 360px;
  overflow: hidden;
  border-radius: 32px;
  cursor: pointer;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  text-decoration: none;
  color: #fff;
  display: block;
  will-change: transform;
}

.card:visited {
  color: #fff;
}

.card:hover {
  color: #fff;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, opacity 0.8s ease;
  position: absolute; /* Needed for stacking images in the gallery */
  top: 0;
  left: 0;
  opacity: 0;
}

.card img.active {
  opacity: 1;
}

.card:hover img.active {
  transform: scale(1.08);
}


.overlay {
  position: absolute;
  inset: 0;
  background: var(--card-overlay);
}


.card-content {
  position: absolute;
  bottom: 30px;
  left: 30px;
  z-index: 2;
}

.card-content h2 {
  font-size: 28px;
  letter-spacing: 2px;
}

.card-content p {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: 14px;
  opacity: 0.8;
  margin-top: 6px;
}

.card:hover img {
  transform: scale(1.08);
}

.card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 34px;
  background: linear-gradient(
    120deg,
    #00f0ff,
    #ff00d4,
    #00f0ff
  );
  background-size: 300% 300%;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  animation: neonMove 6s linear infinite;
  filter: blur(12px);
}
.card:hover::before {
  opacity: 0.7;
}



/* SIDEBAR */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 90px; /* colapsado */
  height: 100vh;
  background: var(--bg-sidebar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  justify-content: space-between;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
  z-index: 10;
  border-right: 1px solid var(--sidebar-border);
  animation: subtlePulse 6s ease-in-out infinite;
  transition: width 0.4s ease;
}

.sidebar.expanded {
  width: 230px;
  align-items: flex-start;
  padding-left: 25px;
}

.sidebar.expanded ~ .main-grid {
  margin-left: 230px;
}

@media (max-width: 900px) {
  .sidebar, .sidebar.animate-sidebar {
    width: 280px !important;
    transform: translateX(-100%) !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-right: none !important;
    background: rgba(10, 10, 15, 0.98) !important;
    backdrop-filter: blur(15px) !important;
    overflow-y: auto !important;
    z-index: 9990 !important;
    animation: none !important;
    align-items: flex-start !important;
    padding-left: 30px !important;
    padding-top: 80px !important; /* Dejar espacio para la hamburguesa */
  }

  .sidebar.expanded, .sidebar.expanded.animate-sidebar {
    transform: translateX(0) !important;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.8) !important;
  }

  /* En móvil el menú se superpone y no empuja el contenido */
  .sidebar.expanded ~ .main-grid,
  .main-grid {
    margin-left: 0 !important;
  }

  .main-grid {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 20px;
  }

  /* Mostrar los items siempre en móvil porque el sidebar entero se oculta */
  .sidebar .sidebar-header,
  .sidebar .menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    width: 100%;
  }

  .sidebar .desktop-toggle {
    display: none !important;
  }

  /* Hamburger Menu visible fijo superior izquierdo */
  .menu-toggle.mobile-toggle {
    display: grid !important;
    position: fixed !important;
    top: 20px !important;
    left: 20px !important;
    z-index: 9999 !important;
    width: 48px !important;
    height: 48px !important;
    background: rgba(0, 240, 255, 0.15) !important;
    border: 1px solid rgba(0, 240, 255, 0.4) !important;
    border-radius: 12px !important;
    color: #fff !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease !important;
  }

  .menu-toggle.mobile-toggle:hover, 
  .menu-toggle.mobile-toggle:active {
    background: rgba(0, 240, 255, 0.3) !important;
    transform: scale(1.05) !important;
  }

  .menu-toggle.mobile-toggle.open {
    background: rgba(255, 0, 200, 0.2) !important;
    border-color: rgba(255, 0, 200, 0.5) !important;
  }

  .card {
    height: 250px;
  }

  .card-content h2 {
    font-size: 18px;
  }
}

/* Header inside sidebar: logo + toggle */
.sidebar-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}

.sidebar.expanded .sidebar-header {
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  padding: 0 18px;
}

.menu-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.menu-toggle.mobile-toggle {
  display: none;
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.menu-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.5);
}

.menu-toggle svg {
  display: block;
  width: 18px;
  height: 18px;
}

.menu-toggle svg path {
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

.menu-toggle.open svg path:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.menu-toggle.open svg path:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open svg path:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.sidebar.expanded .menu-toggle {
  margin-left: 8px;
}

.sidebar.expanded .menu-item {
  justify-content: flex-start;
  padding: 12px 15px;
  gap: 15px;
}

.sidebar.expanded .menu-item span{
  opacity: 1;
  width: auto;
}
.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 10px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.logo img {
  width: 45px;
}

.menu {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

.menu::before {
  content: "";
  width: 60%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
  margin: 0 auto 20px auto;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  padding: 12px 0;
  border-radius: 12px;
  color: rgb(255, 255, 255);
  transition: 0.3s ease;
}

.menu-item span {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: 0.3s ease;
}


.menu-item img {
  width: 22px;
  opacity: 0.6;
  transition: 0.3s;
}

.menu-item:hover img {
 filter: drop-shadow(0 0 8px rgb(0, 26, 255))
          drop-shadow(0 0 16px rgb(255, 0, 212));
  transform: scale(1.1);
}

/* Animación entrada sidebar */
.animate-sidebar {
  transform: translateX(-100%);
  animation: slideInSidebar 0.8s ease forwards;
}

@keyframes slideInSidebar {
  to {
    transform: translateX(0);
  }
}

@keyframes ambientGlow {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
/* Hover dinámico avanzado */

@keyframes subtlePulse {
  0% { box-shadow: 0 0 0 rgba(0,240,255,0.05); }
  50% { box-shadow: 0 0 40px rgba(0,240,255,0.08); }
  100% { box-shadow: 0 0 0 rgba(0,240,255,0.05); }
}

@keyframes neonMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.menu-item::before, .logo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #00f0ff, #ff00d4);
  opacity: 0;
  transition: 0.4s ease;
  z-index: -1;
}

.menu-item:hover::before, .logo:hover::before {
  opacity: 0.15;
}

.menu-item:hover, .logo:hover {
  background: rgba(255,255,255,0.05);
  transform: translateY(-4px) scale(1.05);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 32px;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.6);
  pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
}

/* Fix Hero Mobile height and overlay */
@media (max-width: 768px) {
  .hero-wrapper {
    height: 80vh; /* Un poco más corto en móvil para ver el contenido debajo */
  }
  .hero-title {
    backdrop-filter: none; /* Quitamos el blur del título en móvil para evitar cuadros negros */
    -webkit-backdrop-filter: none;
    background: none;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
    background:
    radial-gradient(circle at 20% 30%, rgba(255, 0, 200, 0.274), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(3, 55, 224, 0.534), transparent 50%);
  z-index: 0;
  animation: ambientGlow 12s ease-in-out infinite;
}

.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, #00f0ff, #ff00c8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.35);
  z-index: 2000;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: pulse 4s infinite;
}

.whatsapp-float img {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(255, 0, 200, 0.6);
}

/* Tooltip */
.tooltip {
  position: absolute;
  right: 80px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.whatsapp-float:hover .tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* Animación sutil */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(0, 240, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0); }
}

@media (max-width: 768px) {
  .whatsapp-float {
    width: 55px;
    height: 55px;
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-float img {
    width: 24px;
    height: 24px;
  }
}

/* Hide custom cursor on touch devices */
/* Theme Toggle Icon Styles */
.theme-toggle-item {
  position: relative;
  cursor: pointer !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 0;
  transition: 0.3s ease;
}


.theme-toggle-item svg {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease, color 0.3s ease;
  color: var(--text-primary);
  opacity: 0.6;
}

.theme-toggle-item:hover svg {
  transform: rotate(20deg) scale(1.1);
  opacity: 1;
  filter: drop-shadow(0 0 8px var(--accent-cyan));
}

.sidebar.expanded .theme-toggle-item {
  justify-content: flex-start;
  padding: 12px 15px; /* Matched padding with menu-item */
  gap: 15px;
}


.sidebar.expanded .theme-toggle-item span {
  opacity: 1;
  width: auto;
}

.theme-toggle-item span {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: 0.3s ease;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
}

.light-mode .menu-item img {
  filter: invert(1) brightness(0.2);
}

/* Retiramos la inversión del logo para que mantenga sus colores originales */
.light-mode .logo img {
  filter: none;
}

.light-mode .whatsapp-float img {
  filter: brightness(0) invert(0);
}


/* --- ESTILOS DEL BUSCADOR SUPERIOR --- */
.top-search-bar {
  position: fixed;
  top: 30px;
  right: 40px;
  z-index: 9999;
  display: flex;
  align-items: center;
  background: var(--glass-bg);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 50px;
  padding: 8px 18px;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s ease;
}

.top-search-bar:focus-within, .top-search-bar:hover {
  border-color: #ff00c8;
  box-shadow: 0 0 25px rgba(255, 0, 200, 0.3);
  background: rgba(255, 0, 200, 0.05);
}

.top-search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  width: 160px;
  transition: width 0.4s ease;
  padding: 5px 8px;
}

/* Light mode support for the search bar */
.light-mode .top-search-bar {
  border: 1px solid rgba(0, 136, 204, 0.3);
  box-shadow: 0 0 15px rgba(0, 136, 204, 0.1);
}

.light-mode .top-search-bar:focus-within, .light-mode .top-search-bar:hover {
  border-color: #cc0088;
  box-shadow: 0 0 25px rgba(204, 0, 136, 0.2);
  background: rgba(204, 0, 136, 0.05);
}

.top-search-bar input::placeholder {
  color: var(--text-secondary);
  opacity: 0.8;
  font-weight: 300;
}

.top-search-bar input:focus {
  width: 240px;
}

.top-search-bar button {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  transition: transform 0.3s ease, color 0.3s ease, filter 0.3s ease;
}

.top-search-bar button:hover {
  transform: scale(1.15);
  color: #00f0ff;
  filter: drop-shadow(0 0 8px #00f0ff);
}

.light-mode .top-search-bar button:hover {
  color: #0088cc;
  filter: drop-shadow(0 0 8px #0088cc);
}

@media (max-width: 768px) {
  .top-search-bar {
    top: 20px;
    right: 20px;
    padding: 6px 12px;
  }
  
  .top-search-bar input {
    width: 100px;
    font-size: 14px;
    padding: 4px;
  }
  
  .top-search-bar input:focus {
    width: 150px;
  }
}

@media (hover: none) and (pointer: coarse), (max-width: 1024px) {
  .custom-cursor {
    display: none !important;
  }
  * {
    cursor: auto !important;
  }
  a, button, .card, .theme-toggle-item {
    cursor: pointer !important;
  }
}