* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #050816;
  --primary: #21d1f9;
  --text: #ffffff;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #050816;
  color: var(--text);
  overflow-x: hidden;
}

/* 🌌 FONDO (SIN OSCURECER) */
body::before {
  content: "";
  position: fixed;
  inset: 0;

  background: url("img/FondoP.jpg");
  background-size: 2000px; /* 👈 tamaño del patrón */
  background-repeat: repeat; /* 👈 CLAVE */
  background-position: 0 0;

  opacity: 0.9;
  z-index: -2;

  animation: moveBg 180s linear infinite;
}

@keyframes moveBg {
  from {
    background-position: 0 0;
  }

  to {
    background-position: -2000px 2000px;
  }
}

/* 🔥 NAVBAR PRO */
.navbar {
  position: fixed;
  width: 100%;
  padding: 20px 10%;
  display: flex;
  justify-content: space-between;
  align-items: center;

  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.navbar nav a{

  transition:
    color .3s,
    text-shadow .3s;
}

.navbar nav a:hover{

  color:#21d1f9;

  text-shadow:
    0 0 5px #21d1f9,
    0 0 10px #21d1f9,
    0 0 20px #21d1f9;
}

/* LOGO */
.logo {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--primary);
  text-shadow: 0 0 3px #21d1f9;
}

.logo a:hover,
.logo:hover{

  color:#7be7ff;

  text-shadow:
    0 0 2px #21d1f9,
    0 0 2px #21d1f9,
    0 0 2px #21d1f9;

}

/* NAV LINKS */
.navbar nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

/* BOTONES NAV */
.navbar nav a {
  text-decoration: none;
  color: #dff9ff;
  font-size: 0.95rem;
  letter-spacing: 1px;
  position: relative;
  padding: 5px 0;
  transition: 0.3s;
}

/* LINEA HOVER */
.navbar nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: 0.3s;
}

.navbar nav a:hover {
  color: var(--primary);
}

.navbar nav a:hover::after {
  width: 100%;
}

/* 🌐 BOTÓN IDIOMA */
#lang-btn {
  border: 1px solid var(--primary);
  padding: 6px 12px;
  border-radius: 20px;
  color: var(--primary);
  font-size: 0.8rem;
  transition: 0.3s;
}

#lang-btn:hover {
  background: var(--primary);
  color: black;
  box-shadow: 0 0 10px #21d1f9;
}

/* HERO */
/* 🎬 HERO VIDEO FULL SCREEN REAL */
.hero-video {
  height: 100vh;        /* 👈 CLAVE: controla el tamaño real */
  width: auto;

  opacity: 0.9;

  max-width: 100vw;

  display: block;
  margin: 0 auto;

  object-fit: contain;

  mix-blend-mode: screen;

  filter: brightness(1.2) contrast(1.1);

  transition: transform 0.2s ease-out;
  
}

/* 🌫️ FADE RESPONSIVE */
.hero-video {
  -webkit-mask-image: radial-gradient(
    ellipse clamp(60%, 75%, 85%) clamp(40%, 30%, 25%) at center,
    black 55%,
    transparent 100%
  );

  mask-image: radial-gradient(
    ellipse clamp(60%, 75%, 85%) clamp(40%, 30%, 25%) at center,
    black 55%,
    transparent 100%
  );
}

.hero-video {
  animation:
    fadeIn 1s ease,
    glowVideo 4s ease-in-out infinite;
}

@keyframes glowVideo {
  0%, 100% {
    filter: brightness(1.1) contrast(1);
  }
  50% {
    filter: brightness(1.4) contrast(1.2);
  }
}



.hero {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ⚡ TITULO ELECTRICO */
.glow {
  font-size: clamp(3.5rem, 8vw, 7rem);
  color: var(--primary);

  text-shadow: 0 0 10px #2186f9;

  animation: glowPulse 3s infinite ease-in-out;
}

@keyframes glowPulse {

  /* base */
  0%, 100% {
    opacity: 1;
    text-shadow:
      0 0 5px #21d1f9,
      0 0 10px #21d1f9;
  }

  /* pico de intensidad */
  50% {
    opacity: 0.6;
    text-shadow:
      0 0 10px #21d1f9,
      0 0 20px #21d1f9,
      0 0 30px #0ff;
  }
}

.subtitle {
  font-size: 1.4rem;
  color: #9be7ff;
}

/* SECCIONES */
.section {
  padding: 120px 10%;
  text-align: center;
}

.section h2 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 40px;
}

/* ABOUT */
.about {
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: center;
}

/* 🎬 VIDEO MÁS GRANDE Y RESPONSIVE */
.about iframe {
  width: 700px;        /* 👈 más grande */
  max-width: 100%;     /* 👈 no se rompe en móvil */
  aspect-ratio: 16 / 9; /* 👈 mantiene proporción */
  height: auto;
  border-radius: 12px;
}

/* GRID */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
  margin-top: 80px;
}

.about-grid h3 {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 15px;
}

/* PROYECTOS */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 300px));
  gap: 30px;
  justify-content: center;
}

.card {
  overflow: hidden;
  border-radius: 10px;
  transition: 0.3s;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px #21d1f9;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* CONTACT */
.contact {
  display: flex;
  justify-content: center;
  gap: 40px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .about { flex-direction: column; }
  .about-grid { grid-template-columns: 1fr; }
}

/* CONTENEDOR */
.highlight-wrapper {
  display: flex;
  justify-content: center;
}

/* 🔥 CAJA (AJUSTADA SIN ROMPER NADA MÁS) */
.highlight-box {
  position: relative;
  width: 50%;
  max-width: 700px;

  /* 👇 clave: menos padding a la izquierda */
  padding: 90px 90px 60px 60px;

  border-radius: 20px;
  border: 1px solid rgba(0, 208, 255, 0.3);
  backdrop-filter: blur(10px);
}

/* 🔥 CONTENIDO (IZQUIERDA REAL) */
.highlight-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* 👈 importante */
  justify-content: center;
  gap: 20px;

  max-width: 320px;
}

/* TITULO */
.highlight-content h2 {
  margin: 0;
  font-size: 2.5rem;
  color: var(--primary); /* 👈 AZUL COMO LOS DEMÁS */
}

/* TEXTO */
.highlight-content p {
  line-height: 1.6;
  font-size: 0.95rem;
}

/* 🔘 BOTÓN (NO LINK) */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 6px;
  background: rgba(33, 209, 249, 0.15);
  border: 1px solid var(--primary);
  color: var(--primary);
  text-decoration: none;
  transition: 0.3s;
}

.btn:hover {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 15px #21d1f9;
}

/* 🎮 CONTROL (AJUSTADO MÁS ADENTRO) */
.control {
  position: absolute;

  right: -150px;   /* 👈 MÁS ADENTRO */
  top: -80px;

  width: 520px;
  z-index: 2;
  pointer-events: none;
}

/* RESPONSIVE */
@media (max-width: 900px) {

  .highlight-box {
    width: 90%;
    padding: 60px 30px;
  }

  .control {
    right: -20px;
    top: -60px;
    width: 200px;
  }
}

/* ========================= */
/* 🎮 GALERÍA DRAGGABLE */
/* ========================= */

.projects {
  overflow-x: auto;
  overflow-y: visible;

  scrollbar-width: none;

  cursor: grab;

  padding: 40px 0;
}

.projects::-webkit-scrollbar {
  display: none;
}

.projects:active {
  cursor: grabbing;
}

.projects-track {
  display: flex;
  gap: 40px;

  width: max-content;

  padding: 20px;
}

.projects .card {
  flex: 0 0 550px;

  border-radius: 18px;
  overflow: hidden;

  transition: all .3s ease;
}

.projects .card img {
  width: 100%;
  height: 320px;
  object-fit: cover;

  display: block;
}

.projects .card:hover {
  transform: translateY(-10px) scale(1.03);

  box-shadow:
    0 0 20px rgba(33,209,249,.7),
    0 0 40px rgba(33,209,249,.4);
}

/* ========================= */
/* ✨ CONTACTO */
/* ========================= */

.contact-section {
  text-align: center;
}

.contact-divider {
  width: min(900px, 80%);
  height: 2px;

  margin: 0 auto 60px;

  background: linear-gradient(
    90deg,
    transparent,
    #21d1f9,
    transparent
  );

  box-shadow:
    0 0 10px #21d1f9,
    0 0 20px #21d1f9;
}

.contact-text {
  max-width: 700px;

  margin: 20px auto 60px;

  color: rgba(255,255,255,.8);

  line-height: 1.8;
}

.contact-grid {
  display: flex;

  justify-content: center;

  gap: 60px;

  flex-wrap: wrap;
}

.contact-card {
  width: 220px;

  padding: 30px;

  border-radius: 20px;

  text-decoration: none;

  color: white;

  border: 1px solid rgba(33,209,249,.25);

  background: rgba(255,255,255,.03);

  backdrop-filter: blur(10px);

  transition: .3s ease;
}

.contact-card img {
  width: 90px;

  margin-bottom: 20px;
}

.contact-card:hover {
  transform: translateY(-8px);

  border-color: #21d1f9;

  box-shadow:
    0 0 15px rgba(33,209,249,.5),
    0 0 35px rgba(33,209,249,.3);
}

.contact-card:hover img {
  filter:
    drop-shadow(0 0 10px #21d1f9)
    drop-shadow(0 0 25px #21d1f9);
}

.contact-card span {
  display: block;

  font-size: 1.1rem;

  font-weight: 600;
}

.footer {
  margin-top: 80px;

  color: rgba(255,255,255,.5);

  font-size: .9rem;

  letter-spacing: 1px;
}
.footer-divider{
  width: min(900px, 80%);
  height: 2px;

  margin: 50px auto 0;

  background: linear-gradient(
    to right,
    transparent,
    #21d1f9,
    transparent
  );

  box-shadow:
    0 0 10px #21d1f9,
    0 0 20px rgba(33,209,249,.6);
}






/* ========================= */
/* 🚀 PROJECTS PAGE */
/* ========================= */

.gallery-hero{
  text-align:center;
  padding:180px 20px 80px;
}

.gallery-hero h1{
  font-size:4rem;
  color:#21d1f9;

  text-shadow:
    0 0 3px #21d1f9,
    0 0 30px rgba(33,209,249,.5);
}

.gallery-hero p{
  max-width:700px;
  margin:20px auto;

  color:rgba(255,255,255,.8);
}

.filters{
  display:flex;
  justify-content:center;
  gap:15px;

  flex-wrap:wrap;

  margin-bottom:70px;
}

.filter-btn{

  background:transparent;

  color:white;

  border:1px solid rgba(33,209,249,.3);

  border-radius:999px;

  padding:12px 24px;

  cursor:pointer;

  transition:.3s;
}

.filter-btn:hover,
.filter-btn.active{

  background:#21d1f9;

  color:#00122b;

  box-shadow:
    0 0 15px #21d1f9;
}

.gallery-grid{

  width:min(1600px,95%);

  margin:auto;

  display:flex;

  flex-wrap:wrap;

  justify-content:center;

  gap:25px;

  padding-bottom:120px;
}

.project-card{

  position:relative;

  overflow:hidden;

  border-radius:20px;

  cursor:pointer;

  border:1px solid rgba(33,209,249,.25);
}

.project-card img{

  width:100%;

  height:380px;

  object-fit:cover;

  display:block;

  transition:.4s;
}

.project-overlay{

  position:absolute;

  inset:0;

  background:
  linear-gradient(
    to top,
    rgba(0,0,0,.95),
    rgba(0,0,0,.2)
  );

  display:flex;

  flex-direction:column;

  justify-content:flex-end;

  padding:25px;

  opacity:0;

  transition:.3s;

  pointer-events:none;
}

.project-card:hover .project-overlay{
  opacity:1;
}

.project-card:hover img{
  transform:scale(1.08);
}

.project-overlay h3{
  color:#21d1f9;
}

.gallery-divider{

  width:min(500px,70%);

  height:2px;

  margin:30px auto 35px;

  background:
  linear-gradient(
    90deg,
    transparent,
    #21d1f9,
    transparent
  );

  box-shadow:
    0 0 10px #21d1f9,
    0 0 20px rgba(33,209,249,.6);
}

/* logo igual al index */

.logo a{
  text-decoration:none;
  color:inherit;
}

#projects-start{
  scroll-margin-top: 120px;
}

.project-card a{

  display:block;

  width:100%;
  height:100%;

  color:inherit;

  text-decoration:none;
}

.project-card video{

  width:100%;
  height:380px;

  object-fit:cover;

  display:block;

  transition:.4s;
}

.project-card:hover video{
  transform:scale(1.08);
}
/* ========================= */
/* ✨ FILTRO ANIMADO */
/* ========================= */

.project-card{

  flex: 0 1 620px;

  max-width:620px;

  width:100%;

  transition:
    opacity .45s ease,
    transform .45s ease,
    flex-basis .45s ease,
    max-width .45s ease,
    width .45s ease,
    margin .45s ease;
}

.project-card.hide{
  opacity:0;
  transform:scale(.9);
}


/* ========================= */
/* 🔍 LIGHTBOX */
/* ========================= */

#lightbox{

  position:fixed;

  inset:0;

  background:rgba(0,0,0,.92);

  display:flex;

  justify-content:center;

  align-items:center;

  opacity:0;

  visibility:hidden;

  transition:.3s ease;

  z-index:9999;
}

#lightbox.active{

  opacity:1;

  visibility:visible;
}

#lightbox-img{

  max-width:90vw;

  max-height:90vh;

  border-radius:12px;

  box-shadow:
    0 0 25px rgba(33,209,249,.5),
    0 0 60px rgba(33,209,249,.3);

  transform:scale(.9);

  transition:.3s ease;
}

#lightbox.active #lightbox-img{

  transform:scale(1);
}

#close-lightbox{

  position:absolute;

  top:30px;
  right:40px;

  font-size:3rem;

  color:#21d1f9;

  cursor:pointer;

  text-shadow:
    0 0 5px #21d1f9,
    0 0 3px #21d1f9;
}