/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #0a0a0a;
  text-rendering: optimizeLegibility;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  line-height: 1.5;
  overflow-x: hidden;
}

.title, .about-title {
  letter-spacing: -0.5px;
}

/* HEADER */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 3rem;
}

/* Marca visual junto al nombre */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;          /* recupera peso original */
  font-size: 2.2rem;         /* recupera tamaño original */
  letter-spacing: 2px;       /* recupera espaciado original */
  color: #fff;               /* asegura color base */
}

.menu-toggle {
  display: none; /* por defecto oculto; se mostrará en el media query */
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 250;
  align-self: center;
}

.logo-mark {
  height: 1em;               /* igual altura que el texto */
  opacity: 0.5;
  transform: translateY(2px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo:hover .logo-mark {
  opacity: 1; /* cambiar despues de presentacion */
  transform: translateY(0);
}



.main-header ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-header a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: color 0.3s;
}

.main-header a:hover {
  color: #00e0e0;
}

/* HERO */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10%;
  position: relative;
  overflow: hidden;
}

/* — Transición suave entre el hero y la siguiente sección — */
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to bottom, rgba(10,10,10,0) 0%, #0a0a0a 100%);
  z-index: 3;
  pointer-events: none;
}

/* — Texto del hero ajustado — */
.hero-text {
  flex: 1;
  max-width: 600px;
  z-index: 4;
  position: relative;
  margin-right: 4%;
}

.title {
  font-size: 2.8rem;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.title span {
  color: #00e0e0;
}

.subtitle {
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: 2rem;
}

.cta {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: 2px solid #00e0e0;
  color: #00e0e0;
  border-radius: 50px;
  text-decoration: none;
  transition: 0.3s;
}

.cta:hover {
  background: #00e0e0;
  color: #000;
  box-shadow: 0 0 20px rgba(0, 224, 224, 0.6);
}

/* — Imagen del hero con mejor ajuste de espacio — */
.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  transform: translateY(30px);
  position: relative;
  z-index: 2;
}

.hero-image img {
  width: 100%;
  max-width: 520px;
  border-radius: 70px;
  object-fit: cover;
  filter: brightness(0.92);
  transform: scale(1.06);
  transition: transform 0.6s ease, filter 0.6s ease;
  object-position: center top;
}

/* Suaviza la unión y evita que se vea "cortada" */
.hero:hover .hero-image img {
  transform: scale(1);
  filter: brightness(1);
}

/* WORKS */
/* Contenedor tipo Rejilla */
#work{
  padding-bottom: 10rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsivo automático */
  gap: 2rem;
  padding: 2rem 10%;
}

/* La Tarjeta */
.work-card {
  position: relative;
  border-radius: 8px; /* Un poco menos redondeado para look técnico */
  overflow: hidden; 
  cursor: pointer;
  background-color: #141414; /* Fondo sólido para la info */
  border: 1px solid rgba(255, 255, 255, 0.05);
  
  /* Definimos la altura de la tarjeta */
  aspect-ratio: 1 / 1; 
  min-height: 250px; 
  
  /* Flexbox Vertical para manejar imagen arriba / texto abajo */
  display: flex;
  flex-direction: column;

  /* Transición suave para el relieve 3D */
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), /* Efecto rebote sutil */
              box-shadow 0.4s ease,
              z-index 0s; /* Z-index instantáneo */
  z-index: 1; 
  transform-origin: center center;
}

/* Efecto al pasar el mouse (Hover) */
.work-card:hover {
  /* CAMBIO CLAVE: !important fuerza el escalado sobre el translate(0,0) que deja GSAP */
  transform: scale(1.15) !important; 
  
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8); /* Sombra profunda para "flotar" */
  border-color: rgba(0, 224, 224, 0.4); 
  z-index: 100; /* Se superpone a todo */
}

/* Contenedor de Imagen */
.work-image {
  width: 100%;
  height: 100%; /* Inicialmente ocupa todo */
  position: relative; /* No absolute, para que empuje */
  overflow: hidden;
  transition: height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Suavidad en el cambio de tamaño */
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  filter: brightness(0.9);
}

/* Al hover, la imagen se hace más pequeña (altura) para dar espacio a la info */
.work-card:hover .work-image {
  height: 55%; /* Se retrae hacia arriba */
}

/* Info Container (El texto) */
.work-info {
  width: 100%;
  height: 0; /* Inicialmente oculto por altura 0 */
  opacity: 0;
  padding: 0 1.2rem;
  background: #141414; /* Fondo que cubre lo de atrás */
  
  /* Layout interno */
  display: flex;
  flex-direction: column;
  justify-content: center;
  
  overflow: hidden; /* Oculta contenido cuando height es 0 */
  transition: height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.3s ease 0.1s, /* Pequeño delay en opacidad */
              padding 0.4s ease;
}

/* Al hover, la info crece */
.work-card:hover .work-info {
  height: 45%; /* Ocupa el resto del espacio */
  opacity: 1;
  padding: 1rem 1.2rem; /* Recupera padding */
}

/* Tipografía dentro de la tarjeta */
.work-cat {
  font-size: 0.7rem;
  color: #00e0e0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 0.3rem;
  white-space: nowrap; /* Evita saltos de línea feos */
}

.work-title {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.6rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Etiquetas (Tags) */
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.w-tag {
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  color: #ccc;
  border: 1px solid rgba(255,255,255,0.05);
}

/* ============================================================
   ABOUT SECTION
============================================================ */
.about-intro, .about-detail { letter-spacing: 0.3px; }

.about {
  padding: 0 10%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
}

.about-text {
  flex: 1;
  opacity: 0;
  transform: translateY(50px);
}

.about-title {
  font-size: 2.5rem;
  color: #00e0e0;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
  position: relative;
}

.about-title::before {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #00e0e0;
  margin-bottom: 1.2rem;
  border-radius: 2px;
}

.about-intro {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #ccc;
  margin-bottom: 1rem;
}

.about-intro span {
  color: #00e0e0;
  font-weight: 700;
}

.about-detail {
  font-size: 1rem;
  line-height: 1.7;
  color: #aaa;
  margin-bottom: 2rem;
  max-width: 550px;
}

.about-cta {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border: 2px solid #00e0e0;
  color: #00e0e0;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.about-cta:hover {
  background: #00e0e0;
  color: #0a0a0a;
  box-shadow: 0 0 20px rgba(0, 224, 224, 0.6);
}

.about-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateY(50px);
  opacity: 0;
}

.about-image img {
  width: 100%;
  max-width: 450px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 20px 40px rgba(0, 224, 224, 0.15);
  transform: rotate(1deg);
}

/* ============================================================
   CONTACT SPLIT SECTION
============================================================ */
.contact-sticky {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 10% 15%;
  overflow: hidden;
  min-height: auto;
  justify-content: center;
}

.contact-left {
  position: sticky;
  top: 5%;
  flex: 0 0 35%;
  align-self: flex-start;
}

.contact-left h2 {
  font-size: 2.5rem;
  color: #00e0e0;
  margin-bottom: 1rem;
  text-shadow: 0 0 15px rgba(0,255,255,0.4);
}

.contact-note {
  color: #ccc;
  line-height: 1.75;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  max-width: 300px;
}

.contact-note-mobile-text{
  display:none;
}

.contact-button {
  display: inline-block;
  background: transparent;
  border: 2px solid #00e0e0;
  color: #00e0e0;
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  border-radius: 30px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.contact-button:hover {
  background: #00e0e0;
  color: #0a0a0a;
  box-shadow: 0 0 20px rgba(0, 224, 224, 0.6);
}

.contact-right {
  flex: 0 0 55%;
}

.help-section {
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

.help-item {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease-out;
}

.help-item h3 {
  font-size: 1.6rem;
  color: #00e0e0;
  margin-bottom: 0.5rem;
}

.help-item p {
  color: #ccc;
  line-height: 1.6;
  font-size: 1rem;
}


/* ==========================
   FOOTER (fusión de Chevalier, Dousa y Dennis)
========================== */
.footer {
  font-size: 0.9rem;
  padding: 8rem 10% 4rem;
  text-align: center;
  color: #ccc;
  position: relative;
  z-index: 10;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center; /* centrado vertical uniforme */
  gap: 4rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

/* --- Columna 1 --- */
.footer-about {
  flex: 1 1 35%;
}

.footer-about h3 {
  font-size: 1.6rem;
  color: #00e0e0;
  margin-bottom: 1rem;
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.3);
}

.footer-about p {
  font-size: 1rem;
  color: #aaa;
  line-height: 1.7;
}

/* --- Columna 2 --- */
.footer-links {
  flex: 1 1 25%;
}

.footer-links h4 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.7rem;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: #00e0e0;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

/* --- Columna 3 --- */
.footer-social {
  flex: 1 1 25%;
  display: flex;
  flex-direction: column;
  align-items: center; /* centra horizontalmente el grupo */
  justify-content: center; /* centra verticalmente respecto a otras columnas */
  text-align: center;
}

.footer-social h4 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1rem;
}

.social-icons {
  display: flex;
  justify-content: center; /* centra íconos en su contenedor */
  align-items: center;
  gap: 1.5rem;
}

.social-icons i {
  vertical-align: middle;
  display: inline-block;
}

.social-icons a {
  font-size: 1.5rem;
  color: #00e0e0;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
  color: #fff;
  transform: scale(1.2) rotate(5deg);
}

.cta:hover, .contact-button:hover {
  box-shadow: 0 0 20px rgba(0, 224, 224, 0.6);
}

/* Línea inferior */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

#backToTop {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background: #00e0e0;
  color: #000;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  opacity: 0;
  z-index: 100;
  transition: opacity 0.3s;
}
#backToTop.visible { opacity: 1; }

#backToTop:hover {
  transform: scale(1.15);
  box-shadow: 0 0 15px rgba(0, 224, 224, 0.6), 0 0 30px rgba(0, 224, 224, 0.3);
  background: linear-gradient(145deg, #00e0e0, #00b8b8);
  color: #0a0a0a;
}

/* ======== MENÚ ACTIVO POR SCROLL ======== */
.main-header a.active {
  color: #00e0e0;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.7);
  font-weight: 700;
  position: relative;
}

.main-header a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00e0e0;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

/* ==========================
   MODAL DE CONTACTO
========================== */
.contact-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.96);
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 3rem;
  color: #fff;
  animation: fadeIn 0.3s ease-out;
}

.contact-content {
  background: rgba(15, 15, 15, 0.95);
  border: 1px solid rgba(0, 224, 224, 0.3);
  box-shadow: 0 0 25px rgba(0, 224, 224, 0.25);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 600px;
  text-align: center;
  position: relative;
}

.close-contact {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.8rem;
  color: #00e0e0;
  cursor: pointer;
  transition: 0.3s;
}

.close-contact:hover {
  color: #fff;
}

.contact-content h2 {
  font-size: 2rem;
  color: #00e0e0;
  margin-bottom: 0.5rem;
}

.contact-content p {
  color: #ccc;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 224, 224, 0.3);
  background: rgba(20, 20, 20, 0.9);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  resize: none;
  transition: 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #00e0e0;
  box-shadow: 0 0 10px rgba(0, 224, 224, 0.4);
}

.send-btn {
  background: #00e0e0;
  border: none;
  padding: 1rem;
  border-radius: 10px;
  color: #0a0a0a;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: 0.3s;
}

.send-btn:hover {
  background: #00ffff;
  box-shadow: 0 0 20px rgba(0, 224, 224, 0.6);
}

.form-status {
  margin-top: 1rem;
  color: #00e0e0;
  font-size: 1rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}


#lightbox {
    position: fixed;
    z-index: 2000;
    inset: 0;
    background-color: rgba(5, 5, 5, 0.98);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
    
    /* Scroll en el contenedor padre si es necesario */
    overflow-y: auto; 
    align-items: center; /* Centrar verticalmente si cabe */
    justify-content: center;
}

#lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-container {
    display: flex;
    width: 100%;
    height: 100%; /* Ocupar todo */
    overflow: hidden; /* Ocultar desbordamiento por defecto (Desktop) */
}

/* Área de Imagen */
.lightbox-image-area {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
    overflow: hidden;
}

#lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    border-radius: 4px;
    opacity: 0;
    transform: scale(0.95);
    cursor: zoom-in;
    transform-origin: center center;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#lightbox-img.loaded {
    opacity: 1;
    transform: scale(1);
}

#lightbox-img.zoomed {
    cursor: zoom-out;
    transform: scale(2.5);
}

/* Panel de Información (Derecha) */
.lightbox-panel {
    width: 350px;
    background: #111;
    border-left: 1px solid #222;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Scroll interno si el texto es muy largo en desktop */
    z-index: 20; 
}

/* --- BARRA DE CONTROLES (Móvil/Tablet) --- */
.lightbox-controls-bar {
    display: none; /* Oculto en desktop por defecto */
    width: 100%;
    align-items: center;
    justify-content: center; /* Centrado horizontalmente */
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.lightbox-nav-group {
    display: flex;
    align-items: center;
    gap: 2rem; /* Espacio generoso entre flechas */
    width: 100%;
    justify-content: space-between; /* Flechas a los extremos, contador al centro */
}

.lightbox-counter {
    font-size: 1rem;
    color: #fff;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    margin: 0; 
    min-width: 60px;
    text-align: center;
}

/* Botones de Navegación (Panel) */
.lightbox-btn-panel {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.lightbox-btn-panel:hover {
    background: var(--primary-color, #00e0e0);
    color: #000;
    border-color: var(--primary-color, #00e0e0);
}

/* Flechas Flotantes (Desktop Only) */
.lightbox-btn-float {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
    z-index: 10;
}

.lightbox-btn-float:hover {
    background: var(--primary-color, #00e0e0);
    color: #000;
    border-color: var(--primary-color, #00e0e0);
}

.lightbox-prev-float { left: 20px; }
.lightbox-next-float { right: 20px; }

/* Botón cerrar flotante */
#lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 30;
    line-height: 1;
}

#lightbox-close:hover { color: var(--primary-color, #00e0e0); }

.lightbox-info-content{
  margin-top: 2.5rem;
}
.lightbox-info-title {
    color: var(--primary-color, #00e0e0);
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
    font-weight: 700;
}

.lightbox-info-desc {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Proyecto Relacionado (Abajo) */
.lightbox-related {
    margin-top: auto; /* Empujar al fondo */
    padding-top: 1.5rem;
    border-top: 1px solid #222;
    display: none; 
}

.lightbox-related h4 {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.related-card-mini {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.03);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-card-mini:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--primary-color, #00e0e0);
    transform: translateY(-2px);
}

.related-mini-img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
}

.related-mini-info h5 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.related-mini-info span {
    color: var(--primary-color, #00e0e0);
    font-size: 0.75rem;
    font-weight: 600;
}
