/* Quitamos márgenes por defecto del navegador */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* --- CONFIGURACIÓN GLOBAL --- */
body {
  font-family: 'Inter', sans-serif; /* Fuente base */
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased; /* Suaviza la fuente en Mac/Chrome */
}

/* --- TÍTULOS DE SECCIÓN --- */
h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;    /* Bien Bold */
  font-size: 2.5rem;
  letter-spacing: -0.02em; /* Un truco de Apple para que se vea más pro */
  margin-bottom: 20px;
  text-transform: none; /* Mantener mayúsculas y minúsculas naturales */
}

/* --- TÍTULOS DE LOS ITEMS (Sección 2) --- */
.info-servicio h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px; /* Aquí sí expandimos un poco para el look de cine */
}

/* --- DESCRIPCIONES --- */
p, .subtitulo, .texto-col p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #666; /* Un gris oscuro para que el título resalte más */
}

/* --- TU NOMBRE (H1) --- */
h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 4rem;
  letter-spacing: -3px;
}


/* --- SECCION 1 --- */
.Seccion1 {
  display: flex;
  flex-direction: row-reverse;
  min-height: 60vh; /* Cambiamos height por min-height y subimos a 80 */
  width: 100%;
  background-color: #111111;
  color: white;
  position: relative;
  overflow: hidden;
  padding-top: 70px; 
}

.izquierda, .derecha {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.derecha {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-left: 10%;
  min-width: 300px; /* Ajusta según tu diseño */
  min-height: 200px; /* Espacio reservado para texto */
}

#perfil1 {
  max-width: 350px;
  width: 60%;
  height: auto;
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

#avata {
  max-width: 180px;
  width: 35%;
  height: auto;
  position: absolute;
  z-index: 2;
  left: 90%; /* En desktop a la derecha */
  top: 35%;
  transform: translate(-50%, -50%);
  transition: transform 0.5s ease-out;
}

/* Ajuste de los textos */
.derecha h1 {
  font-size: 3.5rem;
  margin: 0;
  font-weight: 900;
}

.derecha h2 {
  font-size: 1.2rem;
  color: #888;
  letter-spacing: 5px;
  margin-top: 10px;
}

#Seccion2 {
  display: flex;
  width: 100%;
  height: 60vh; /* Altura del rectángulo */
  overflow: hidden;
}

.item-servicio {
  flex: 1; /* Todos iguales al inicio */
  position: relative;
  transition: all 0.5s ease; /* Movimiento suave al expandir */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- CUANDO PASAS EL MOUSE --- */
.item-servicio:hover {
  flex: 2; /* El item crece */
}

/* --- MANEJO DE FOTO Y VIDEO --- */
.media-preview, .media-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Para que llenen el espacio sin deformarse */
}

.media-video {
  opacity: 0; /* Oculto por defecto */
  transition: opacity 0.3s ease;
}

.item-servicio:hover .media-video {
  opacity: 1; /* Aparece el video */
}

/* --- TEXTOS --- */
.item-servicio::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Gradiente que va de transparente arriba a negro abajo */
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 40%, transparent 100%);
  z-index: 2;
  transition: opacity 0.3s ease;
}

.item-servicio:hover::after {
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
}


.info-servicio {
  position: relative;
  z-index: 5;
  color: #ffffff; /* Texto siempre blanco */
  padding: 20px;
  text-align: center;
  text-shadow: 0px 4px 15px rgba(0,0,0,0.5);
}

.subtitulo {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.4s ease;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9); /* Blanco un pelín transparente */
  font-weight: 400;
}

.item-servicio:hover .subtitulo {
  max-height: 50px;
  opacity: 1;
  margin-top: 10px;
}

.item-servicio {
  cursor: pointer;
}

/* Esto hace que el navegador entienda que "el inicio" de la sección 
   está un poco más arriba, ideal si tienes un nav fijo */
.detalle-servicio {
  padding: 0 10%;       /* Cero espacio arriba/abajo, mantenemos 10% a los lados */
  min-height: auto;
  display: flex;
  align-items: center;
  background-color: #ffffff;
  /* Quitamos el border-bottom si quieres que la transición de colores sea limpia */
  border-bottom: none; 
}

/* Para que el scroll sea suave incluso si el usuario usa links normales */
html {
  scroll-behavior: smooth;
}

/* Fondo gris claro para las secciones pares para diferenciarlas */
.detalle-servicio.alt {
  background-color: #f4f4f4;
}

/* Alternar orden de columnas */
.detalle-servicio.alt .contenedor-detalle {
  flex-direction: row-reverse;
}

.contenedor-detalle {
  display: flex;
  gap: 30px;
  align-items: center;
  width: 100%;
  /* El margen del contenedor definirá el espacio mínimo real */
  margin: 0; 
}

.texto-col, .media-col {
  flex: 1;
}

.media-col {
  padding: 40px 0; /* Un pequeño respiro interno para el celular */
}

.media-col video {
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.texto-col h2 {
  font-size: 2rem;      /* Achicamos un poco el título para que no empuje tanto */
  margin-bottom: 15px;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.texto-col p {
  line-height: 1.5;     /* Ajustamos el interlineado para que el bloque de texto sea más bajo */
  margin-bottom: 10px;
}

.celular-wrapper {
  position: relative;
  width: 100%; /* Ocupa el ancho de su columna */
  height: 80%;
  max-width: 300px;      /* Pero no más de 300px (tamaño real de un celu) */
  aspect-ratio: 9 / 19;  /* Mantiene la proporción de un smartphone moderno */
  margin: 0 auto;        /* Lo centra en la columna */
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame-png {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Asegura que el PNG no se deforme ni se aplaste */
  z-index: 10;
  pointer-events: none;
}

.video-slider {
  position: absolute;
  /* Ajusta estos % según los bordes de tu PNG específico */
  top: 2%; 
  left: 5%;
  right: 5%;
  bottom: 2%;
  cursor: pointer;
  overflow: hidden;
  border-radius: 30px; /* Bordes redondeados para coincidir con el celu */
  z-index: 5;
  background-color: #000;
}

.video-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* El video llena la pantalla del celu sin estirarse */
  opacity: 0;
  transition: opacity 0.4s ease;
}

.video-item.active {
  opacity: 1;
}

/* Botones de navegación */
.prev-btn, .next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30; /* Por encima de TODO */
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  width: 45px;
  height: 45px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background 0.3s;
}

.prev-btn { left: -60px; } /* Los sacamos hacia afuera del celular */
.next-btn { right: -60px; }


.celular-wrapper {
    overflow: visible; /* Permite que las flechas que están afuera se vean */
}

.prev-btn, .next-btn {
    z-index: 100 !important; /* Fuerza a que estén arriba de todo */
}


/* Overlay de Play */
.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2); /* Sutil oscurecimiento al pausar */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  transition: opacity 0.3s ease;
  pointer-events: none; /* Para que el click pase al video-slider */
}

.play-icon {
  font-size: 50px;
  color: white;
  opacity: 0.8;
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

/* Botón de Mute */
.mute-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 20;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Clases de estado (las controlaremos con JS) */
.play-overlay.hidden {
  opacity: 0;
}




/* Efecto de flash blanco */
.flash-white {
  animation: flashAnim 0.3s ease-in-out;
}

@keyframes flashAnim {
  0% { filter: brightness(1) contrast(1); }
  50% { filter: brightness(5) contrast(0.5); background-color: white; }
  100% { filter: brightness(1) contrast(1); }
}

/* Contenedor para el efecto Typewriter */
#profesion {
  display: block;
  min-height: 1.5em;
  line-height: 1.5em;
  margin-top: 10px;
  position: relative; /* Cambiado a relative para que no flote loco */
  width: auto;
  text-align: center;
  white-space: nowrap;
  border-right: none !important; 
  border-left: none !important;
}

#profesion::after, #profesion::before {
  content: none !important;
  display: none !important;
}


@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: white; }
}



#contenedor-perfil {
  position: relative;
  width: 100%;
  height: 100%;
}

.grupo-foto {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0; /* Ocultas por defecto */
  transition: opacity 0.3s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grupo-foto.active {
  opacity: 1;
  pointer-events: auto;
}

/* Reutilizamos tus medidas para las imágenes internas */
.perfil-img {
  max-width: 550px; width: 80%; height: auto;
  position: absolute; z-index: 1;
  left: 0%;           /* Cuanto más alto el %, más a la derecha se va */
  bottom: 0%;

}

.dron-img {
  max-width: 180px; width: 35%; height: auto;
  position: absolute; z-index: 2;
  left: 05%; top: 35%;
  transform: translate(-50%, -50%);
}






/* LA ANIMACIÓN DEBE IR FUERA DEL MEDIA QUERY O BIEN IDENTADA */
@keyframes flotarMobile {
  0%   { transform: translate(-50%, -50%); }
  50%  { transform: translate(-50%, -70%); } /* Sube un poco */
  100% { transform: translate(-50%, -50%); }
}




/* --- NAVEGACIÓN --- */
.nav-principal {
  position: fixed;
  top: 0;
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  background: rgba(17, 17, 17, 0.9); /* Transparente oscuro */
  backdrop-filter: blur(10px); /* Efecto vidrio */
  z-index: 1000;
  box-sizing: border-box;
}

.nav-logo {
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: opacity 0.3s;
}

.nav-links a:hover {
  opacity: 0.6;
}

/* --- SECCIÓN CONTACTO --- */
.seccion-contacto {
  background-color: #111;
  color: black;
  padding: 10px 10% 40px 10%;
  text-align: center;
}

.contacto-wrapper h2 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: white;
}

.mail-contacto {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 50px;
  color: #888;
  transition: color 0.3s;
  cursor: pointer;
}

.mail-contacto:hover {
  color: white;
}

.redes-sociales {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 80px;
  flex-wrap: wrap;
}

.red-link {
  color: white;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  position: relative;
  padding-bottom: 5px;
}

.red-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: white;
  transition: width 0.3s;
}

.red-link:hover::after {
  width: 100%;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 0px;
  font-size: 0.8rem;
  color: #444;
}

/* Ajuste para que la Seccion1 no quede debajo del Nav */
.Seccion1 {
  margin-top: 0; 
  padding-top: 70px; /* Compensa la altura del nav */
}


/* --- AJUSTE PARA MAIL Y TELÉFONO EN LÍNEA --- */
.mailytelefono {
  display: flex;             /* Los pone uno al lado del otro */
  justify-content: center;    /* Los centra horizontalmente */
  gap: 30px;                 /* Espacio entre el mail y el número */
  flex-wrap: wrap;           /* Si la pantalla es muy chica, uno baja para no romperse */
  margin-bottom: 40px;       /* Espacio respecto a las redes sociales */
}

.mailytelefono .mail-contacto {
  margin-bottom: 0;          /* Quitamos el margen inferior para que alineen bien */
}



.mail-contacto {
  text-decoration: none; /* Quita el subrayado */
  color: #888;           /* Mantiene tu color gris */
  transition: color 0.3s;
  cursor: pointer;
}

.mail-contacto:hover {
  color: white;          /* Se ilumina al pasar el mouse */
}




.seccion-trabajos {
  background-color: #111;
  padding: 80px 0;
  overflow: hidden; /* Importante para que no salga scroll horizontal */
}

.titulo-galeria {
  text-align: center;
  color: white;
  margin-bottom: 50px;
  padding-left: 10px;
  padding-right: 10px;
}

.marquee-container {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Espacio entre las dos filas */
}

.marquee-row {
  width: 100%;
  overflow: hidden;
  display: flex;
}

.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content; /* Permite que el div sea tan largo como las fotos */
}

/* Cubos individuales */
.trabajo-cubo {
  width: 250px;
  height: 250px;
  background-color: #222;
  border-radius: 15px;
  flex-shrink: 0;
  overflow: hidden;
}

.trabajo-cubo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  /* filter: grayscale(40%); */
}

.trabajo-cubo:hover img {
  transform: scale(1.1);
  filter: grayscale(0%);
}

/* ANIMACIONES */
.track-left {
  animation: scrollLeft 50s linear infinite;
}

.track-right {
  animation: scrollRight 50s linear infinite;
}

@keyframes scrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* Se mueve hacia la izquierda */
}

@keyframes scrollRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); } /* Se mueve hacia la derecha */
}

/* Pausar al pasar el mouse (opcional, queda muy pro) */
.marquee-row:hover .marquee-track {
  animation-play-state: paused;
}







@media (max-width: 768px) {

#Seccion2 .media-video {
    display: none !important;
    pointer-events: none !important;
  }
  
  /* 1. SECCIÓN HERO (ORDEN INVERTIDO) */
  .Seccion1 {
    display: flex !important;
    flex-direction: column-reverse !important; 
    height: auto !important; 
    min-height: 40vh !important; /* Altura equilibrada */
    padding-top: 50px !important; 
    padding-bottom: 0 !important;
    justify-content: center !important;
    overflow: visible !important;
  }

  /* 2. TEXTO (NOMBRE ARRIBA) */
  .derecha {
    flex: none !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    margin-bottom: -150px;  /* Acerca la foto al nombre */
  }

  .derecha h1 { font-size: 2.5rem !important; margin: 0; }
  

  /* 3. FOTOS (ABAJO Y GRANDES) */
  .izquierda {
    flex: none !important;
    width: 100% !important;
    height: 420px !important; /* Espacio para que la foto sea grande */
    position: relative !important;
    margin-top: 0px;
  }

  #contenedor-perfil {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
  }

  .perfil-img {
    width: 95% !important; 
    max-width: 400px !important;
    height: auto !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1;
  }

  /* 4. EL DRON (MOVIMIENTO CORREGIDO) */
  #avata, .dron-img {
      width: 140px !important;
      height: auto !important;
      position: absolute !important;
      z-index: 10 !important;
      left: 25% !important; 
      top: 45% !important;
      transform: translate(-50%, -50%) !important; /* Lo posicionamos y NO LO TOCAMOS MÁS */
      
      /* Nueva animación que no toca el transform */
      animation: flotarConMargin 3s ease-in-out infinite !important;
      
      display: block !important;
      opacity: 1 !important;
      visibility: visible !important;
    }

  /* 5. NAVEGACIÓN Y OTROS */
  .nav-links { display: none; } /* Aquí iría tu hamburger */
  
  #Seccion2 { flex-direction: column; height: auto; }
  .item-servicio { width: 100%; height: 180px; }
  
  .contenedor-detalle { flex-direction: column !important; padding: 40px 20px; }
  .prev-btn { left: 10px !important; }
  .next-btn { right: 10px !important; }

  .mailytelefono {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
    align-items: center;
  }

  .nav-links {
    position: fixed;
    top: 0; /* Que empiece desde arriba de todo */
    left: -100vw; /* Usamos vw (viewport width) para que sea el ancho total exacto */
    width: 100vw; 
    height: 100vh;
    background: rgba(17, 17, 17, 0.98);
    display: flex !important;
    flex-direction: column;
    justify-content: center; /* Centra los links verticalmente */
    align-items: center;     /* Centra los links horizontalmente */
    transition: transform 0.4s ease-in-out, left 0.4s ease-in-out;
    z-index: 999;
    margin: 0;
    padding: 0;
  }

  /* La clase que activa el JS */
  .nav-links.active {
    left: 0 !important;
  }

  /* Ajuste para que los links no hereden márgenes raros */
  .nav-links li {
    list-style: none;
    margin: 20px 0;
  }

  .menu-toggle {
    display: block !important;
    z-index: 1000;
  }


    .bar {
      display: block;
      width: 25px;
      height: 3px;
      margin: 5px auto;
      background-color: white;
      transition: 0.3s;
    }


.celular-wrapper {
    position: relative !important;
    width: 240px !important; /* Un poquito más chico para que no desborde */
    margin: 40px auto !important;
    overflow: visible !important; /* PARA QUE SE VEAN LAS FLECHAS */
    display: flex !important;
  }

  .video-slider {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 9 / 19 !important; /* Proporción de celular moderno */
    overflow: hidden !important; /* EL RECORTE ESTÁ ACÁ */
    border-radius: 35px !important;
    background: #000 !important;
    left: 0 !important;
    top: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    transform: scale(0.98) !important;
  }

  .video-item {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Llena el espacio sin bordes */
    display: none;
  }

  .video-item.active {
    display: block !important;
  }

  /* --- 3. LAS FLECHAS (VISIBLES Y AFUERA) --- */
  .prev-btn, .next-btn {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 100 !important;
    display: flex !important; /* Aseguramos que se vean */
    background: rgba(0, 0, 0, 0.5) !important; /* Fondo para que resalten */
    color: white !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: 1px solid white !important;
    justify-content: center;
    align-items: center;
  }

  .prev-btn { left: -55px !important; }
  .next-btn { right: -55px !important; }

  /* --- 4. CONTENEDOR DE DETALLE (EL FIX DEL DESBORDE) --- */
  .contenedor-detalle {
    flex-direction: column !important;
    padding-left: 0 !important; /* Quitamos el padding que empujaba el video */
    padding-right: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }


  .titulo-galeria {
  padding-left: 40px !important;
  padding-right: 40px !important;
}


}



@keyframes flotarConMargin {
  0%, 100% {
    margin-top: 0px;
  }
  50% {
    margin-top: -25px; /* Sube 25 píxeles */
  }
}


.menu-toggle {
  display: none;
}



/* --- CURSOR DEL TYPEWRITER --- */
#profesion {
  position: relative;
}

/* --- MANTENÉ ESTO PARA EL CURSOR DE JS --- */
.cursor-typewriter {
  display: inline-block;
  font-weight: 100;
  color: white;
  margin-left: 2px;
  animation: parpadeoCursor 0.8s infinite;
}

@keyframes parpadeoCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.span.cursor-typewriter {
  display: none;
  }



#Seccion2 {
  /* Poné acá la misma altura que tiene tu nav (en tu caso 70px) */
  scroll-margin-top: 70px !important; 
}
