/* estyle.css */

/* ======= VARIABLES GLOBALES ======= */
:root {
  --color-principal: #0e0e0e;
  --color-secundario: #ffffff;
  --color-acento: #ffca28;
  --color-fondo: #f8f8f8;
  --fuente-principal: 'Inter', sans-serif;
}

/* ======= RESETEO Y BASE ======= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--fuente-principal);
  background-color: var(--color-fondo);
  color: var(--color-principal);
  scroll-behavior: smooth;
}

h1, h2, h3, p, a {
  line-height: 1.4;
}

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

/* ======= HEADER FIJO ======= */
.header-fijo {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: var(--color-principal);
  color: var(--color-secundario);
  z-index: 1000;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.header-fijo .contenedor {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  height: 40px;
  width: auto;
  display: block;
}

/* Menú normal (escritorio) */
.menu {
  display: flex;
  gap: 1.5rem;
}

.menu a {
  font-weight: 500;
  transition: color 0.3s;
  color: var(--color-secundario);
  text-decoration: none;
}

.menu a:hover {
  color: var(--color-acento);
}

/* Redes en escritorio */
.redes {
  display: flex;
}

.redes a img {
  height: 20px;
  margin-left: 0.75rem;
  transition: transform 0.3s;
}

.redes a:hover img {
  transform: scale(1.1);
}

/* Botón hamburguesa oculto por defecto */
.menu-toggle {
  display: none;
}

/* ===== VERSIÓN MÓVIL ===== */
@media (max-width: 768px) {
  .logo {
    height: 32px; /* más pequeño en móvil */
  }

  /* mostrar el botón hamburguesa */
  .menu-toggle {
    display: block;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--color-secundario);
    margin-left: auto;
  }

  /* ocultar menú horizontal */
  .menu {
    display: none;
    position: absolute;
    top: 60px; /* debajo del header */
    left: 0;
    width: 100%;
    background-color: var(--color-principal);
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
  }

  .menu a {
    margin: 1rem 0;
    font-size: 1rem;
  }

  /* mostrar menú cuando está activo */
  .menu.active {
    display: flex;
  }

  /* opcional: ocultar redes en móvil */
  .redes {
    display: none;
  }
}

/* ======= INICIO ======= */
#inicio {
  position: relative;
  background-image: url("imagenes/fondo1.png");
  background-size: cover;           /* Hace que cubra toda la sección */
  background-position: center;      /* Centra la imagen */
  background-attachment: fixed;     /* Evita que se repita */
  color: var(--color-secundario);                     /* Para que el texto se lea sobre el fondo */
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  padding: 2rem;
}

#inicio .overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

#inicio .contenido-inicio {
  position: relative;
  z-index: 1;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 2rem;
  gap: 3rem;
  max-width: 1200px;
  width: 100%;
  flex-wrap: wrap;
  margin: 0 auto
}

.inicio-texto {
  flex: 1 1 50%;
  max-width: 650px;
  min-width: 280px;
  margin-left: 2rem;
}

.inicio-texto h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.inicio-texto p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.inicio-imagen1 {
  position: absolute;
  bottom: -50px;  /* NEGATIVO para que se salga del fondo */
  right: 0;
  z-index: 0;  /* IMPORTANTE: queda detrás del contenido de abajo */
  pointer-events: none; /* Por si el bot está sobre botones */
}

.inicio-imagen1 img {
  max-height: 500px;
  width: auto;
  object-fit: contain;
}  

@media (max-width: 768px) {
  .ilubot-imagen img {
    max-height: 300px;
    transform: translate(10%, 0%);
  }
}

.boton {
  background-color: var(--color-acento);
  color: #000;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  transition: background-color 0.3s;
}

.boton:hover {
  background-color: #ffca28;
}

/* ======= SECCIÓN SERVICIOS ======= */
#servicios {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-image: url("imagenes/fondo2.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--color-secundario);
  padding: 4rem 2rem;
  box-sizing: border-box;
}

/* Centrado y tamaño del título */
#servicios h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  font-weight: bold;
}

.seccion {
  padding: 6rem 2rem 4rem;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  box-sizing: border-box;
}

.seccion h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.grid-servicios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.tarjeta-servicio {
  background: rgba(0, 0, 0, 0.4); /* Fondo obscuro semitransparente */
  border-radius: 1rem;
  padding: 2rem;
  color: #fff;
  backdrop-filter: blur(8px); /* Efecto glassmorphism */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tarjeta-servicio:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

/* Títulos alineados iguales */
.tarjeta-servicio h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
  text-align: center;
}

/* Párrafos centrados */
.tarjeta-servicio p {
  text-align: center;
}

/* Iconos amarillos */
.icono-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  width: 100%;
}

.icono-servicio {
  width: 50px;
  height: 50px;
  display: block;
  margin: 0 auto;
  filter: brightness(0) saturate(100%) invert(74%) sepia(100%) saturate(750%) hue-rotate(15deg) brightness(95%) contrast(95%);
}

/* Superposición oscura encima de la imagen */
#servicios::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

/* Para que el contenido esté encima de la superposición */
#servicios > * {
  position: relative;
  z-index: 1;
}

/* ======= POPUPS ======= */
.popup {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 9999;
}

.popup-contenido {
  background: white;
  max-width: 600px;
  width: 100%;
  border-radius: 1rem;
  padding: 2rem;
  position: relative;
  text-align: left;
}

.popup .cerrar {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}

.oculto {
  display: none;
}

/* ===== SECCIÓN NOSOTROS - ESCRITORIO ===== */
#nosotros {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 6rem 2rem;
  background-image: url("imagenes/fondo3");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  width: 100%;
  box-sizing: border-box;
}

.nosotros-contenedor {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
}

.nosotros-imagen {
  flex: 1;
  margin-left: -10vw; /* corte en el margen izquierdo */
  display: flex;
  justify-content: flex-start;
}

.nosotros-imagen img {
  width: 60%;
  height: auto;
  display: block;
}

.nosotros-texto {
  flex: 1;
  text-align: left;
  padding-left: 0;
}

.nosotros-texto h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.nosotros-texto p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.nosotros-texto .boton {
  margin-top: 1rem;
}

/* ===== SECCIÓN NOSOTROS - MÓVIL ===== */
@media (max-width: 768px) {
  #nosotros {
    flex-direction: column;
    padding: 4rem 1.5rem;
  }

  .nosotros-contenedor {
    flex-direction: column;
    gap: 2rem;
  }

  .nosotros-imagen {
    margin-left: 0; /* quitamos el corte en móvil */
    display: flex;
    justify-content: center;
  }

  .nosotros-imagen img {
    width: 80%; /* más grande en móvil */
  }

  .nosotros-texto {
    text-align: center;
  }

  .nosotros-texto h2 {
    font-size: 1.8rem;
  }
}

/* ======= SECCIÓN DE PORTAFOLIO ======= */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden; /* evita desbordamiento horizontal */
}

/* ======= SECCIÓN DE PORTAFOLIO ======= */
#portafolio {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-image: url("imagenes/fondo2.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--color-secundario);
  padding: 4rem 2rem;
  box-sizing: border-box;
  text-align: center;
}

#portafolio h2 {
  margin-bottom: 2rem;
}

/* Carrusel tipo collage */
.galeria-portafolio {
  display: flex;
  gap: 0.5rem; /* separación mínima */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
}

.proyecto {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border-radius: 0.5rem;
  overflow: hidden;
}

.proyecto img {
  display: block;
  max-height: 300px; /* controla altura máxima */
  width: auto;       /* se adapta al ancho natural */
  height: auto;      /* mantiene proporción */
  border-radius: 0.5rem;
}

/* ======= SECCIÓN DE PROCESO ======= */
#proceso {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-image: url("imagenes/fondo2.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--color-secundario);
  padding: 4rem 2rem;
  box-sizing: border-box;
}

.contenedor-proceso {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr; /* dos columnas en escritorio */
  gap: 3rem;
  align-items: center;
}

/* Bloque izquierdo */
.proceso-izquierda {
  text-align: left;
}

.proceso-izquierda h2 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.proceso-izquierda p {
  font-size: 1.3rem;
  margin: 0 0 2rem;
}

.proceso-izquierda .btn-gradiente {
  align-self: flex-start;
}

/* Botón */
.btn-gradiente {
  display: inline-block;
  background-color: #ffca28;
  padding: 0.8rem 2rem;
  color: black;
  font-weight: bold;
  border-radius: 30px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

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

/* Bloque derecho */
.proceso-derecha {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: left;
}

.paso {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.paso img {
  height: 40px;
  margin-bottom: 1rem;
}

.paso h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.paso p {
  font-size: 1rem;
  opacity: 0.9;
}

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
  .contenedor-proceso {
    grid-template-columns: 1fr; /* SOLO en móvil se apila */
    gap: 2rem;
  }

  .proceso-izquierda {
    text-align: center; /* centra el bloque izquierdo */
  }

  .proceso-izquierda .btn-gradiente {
    align-self: center;
  }
}

/* ======= SECCIÓN DE CONTACTO ======= */
#contacto {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-image: url("imagenes/fondo3.png"); /* ← cambia si tu imagen tiene otro nombre */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 6rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secundario);
  box-sizing: border-box;
}

#contacto .overlay {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

.contenido-contacto {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 3rem;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.contenido-contacto h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contenido-contacto p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.formulario-contacto {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.formulario-contacto input,
.formulario-contacto textarea {
  padding: 0.8rem 1rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 1rem;
  font-family: inherit;
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--color-secundario);
  box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

.formulario-contacto input::placeholder,
.formulario-contacto textarea::placeholder {
  color: rgba(255,255,255,0.7);
}

.formulario-contacto button.boton {
  background-color: var(--color-acento);
  color: #000;
  padding: 0.8rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.formulario-contacto button.boton:hover {
  background-color: #ffca28;
}

/* ======= FOOTER ======= */
.footer-iluminari {
  background-color: #2f4249;
  color: #ffffff;
  padding: 3rem 2rem 2rem;
  font-size: 0.9rem;
}

.footer-contenido {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end; /* Alinea todo abajo */
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col {
  flex: 1;
  min-width: 250px;
}

.logo-footer {
  width: 150px;
  margin-bottom: 1rem;
}

.redes-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.redes-footer a img {
  height: 24px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s;
}

.redes-footer a:hover img {
  transform: scale(1.1);
}

.footer-user {
  font-size: 0.9rem;
}

.form-suscripcion {
  display: flex;
  margin-top: 1rem;
  border-radius: 999px;
  overflow: hidden;
  background-color: #ffffff;
}

.form-suscripcion input[type="email"] {
  border: none;
  padding: 0.75rem 1rem;
  flex: 1;
  font-size: 0.9rem;
  outline: none;
}

.form-suscripcion button {
  background-color: #ffca28;
  color: black;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

.footer-copy {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.75rem;
}

.footer-copy a {
  color: #ffffff;
  text-decoration: underline;
}

/* ===== MODAL ===== */
/* Fondo oscuro del modal */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
}

/* Caja del contenido */
.modal-contenido {
  background-color: #fff;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 8px;
  max-width: 800px;
  width: 90%;
  text-align: justify;
  line-height: 1.6;
  position: relative;
  
  /* Scroll interno */
  max-height: 80vh;
  overflow-y: auto;
}

/* Barra de scroll personalizada (opcional) */
.modal-contenido::-webkit-scrollbar {
  width: 8px;
}
.modal-contenido::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 4px;
}
.modal-contenido::-webkit-scrollbar-thumb:hover {
  background-color: #999;
}

/* Títulos */
.modal-contenido h2, 
.modal-contenido h3 {
  color: #2f4249;
  margin-top: 1.5rem;
}

/* Cerrar (X) */
.cerrar {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}
.cerrar:hover {
  color: red;
}

/* BASE - móvil primero */
body {
  font-size: 1rem;
  line-height: 1.6;
}

/* Contenedores fluidos e imágenes flexibles */
img, video {
  max-width: 100%;
  height: auto;
}

/* Ejemplos de elementos flexibles */
.grid-servicios,
.galeria-portafolio {
  display: grid;
  grid-template-columns: 1fr; /* una columna por defecto */
  gap: 1rem;
}

/* Media query para tablets */
@media (min-width: 768px) {
  .grid-servicios {
    grid-template-columns: repeat(2, 1fr);
  }
  .galeria-portafolio {
    grid-template-columns: repeat(2, 1fr);
  }
  body {
    font-size: 1.1rem;
  }
}

/* Media query para desktop */
@media (min-width: 1024px) {
  .grid-servicios {
    grid-template-columns: repeat(3, 1fr);
  }
  .galeria-portafolio {
    grid-template-columns: repeat(3, 1fr);
  }
  body {
    font-size: 1.125rem;
  }
}

/* Footer flex adaptativo */
.footer-contenido {
  flex-direction: column;
  align-items: start;
}
@media (min-width: 768px) {
  .footer-contenido {
    flex-direction: row;
    align-items: flex-end;
  }
}

/* Ajustes visuales de botones para pantalla táctil */
.boton,
.form-suscripcion button {
  min-height: 44px;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
}

/* ====== Ajustes RESPONSIVOS para NOSOTROS y PROCESO ====== */
  /* Sección Proceso */
  #proceso .contenedor-proceso {
    display: flex;
    flex-direction: column;   /* apila izq/der en móvil */
    gap: 2rem;
    padding: 2rem 1.5rem;
  }

  #proceso .paso {
    text-align: center;       /* todo centrado en móvil */
  }

  #proceso .paso img {
    max-width: 100px;         /* iconos más pequeños */
    margin-bottom: 1rem;
  }

  #proceso .paso h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  #proceso .paso p {
    font-size: 0.95rem;
    line-height: 1.5;
  }