/* styles.css */
:root{
  --bg-dark:      #1B1B1B;
  --bg-light:     #F5F3EE;
  --bg-light-t:   rgba(245, 243, 238, 0.9);
  --accent-red:   #C42B30;
  --accent-red-2: #E57A6F;
  --accent-teal:  #2C7C79;
  --accent-gold:  #C5A66A;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body, html {
  font-family: 'Segoe UI', sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
  background: var(--bg-light);
  animation-delay: 0ms;
  animation-fill-mode: backwards;
}

/* Pantalla completa al cargar */
#preloader {
  background-color: var(--bg-light); /* o blanco si usas fondo claro */
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}
.loader-img {
  width: 96px;
  height: 96px;
  opacity: 0.9;
}
/* Logo o letras animadas */
.loader {
  font-size: 2.5rem;
  color: val( --accent-red); /* carmesí */
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0.2rem;
  animation: pulse 1.5s infinite ease-in-out;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--bg-light); 
  /* linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.0)); */
  /* box-shadow:0 4px 8px rgba(0,0,0,.3); */
  color: var(--bg-dark);
  padding: 0.4rem 5vw;
  box-sizing: border-box ;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
header a{
  text-decoration: none;
  color: var(--bg-dark);
}
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.site-header.hide {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}


header h1 {
  font-family: "Montserrat", sans-serif;
  font-style: normal;
  font-size: clamp(1.25rem, 1.22vi + 0.94rem, 3rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}
header h1 p {
  color: var(--bg-dark);
  font-size: clamp(0.4rem, 0.34vi + 0.6rem, 1.19rem);
  margin-left: 1rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: clamp(0.4rem, 0.5vi + 0.6rem, 1.19rem);
}

nav a {
  color: var(--bg-dark);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--accent-red-2);
}

.dropdown { position:relative; }
.dropbtn {
  font-size: inherit;
  font-style: inherit;
  font-weight: inherit;
  background:none;
  border:none;
  color:inherit; 
  cursor:pointer;
}
.dropdown-content {
  display:none; position:absolute; top:100%; left:0;
  background:var(--bg-light-t);
  padding:.5rem 0;
}
.dropdown-content a { display:block; padding:.5rem 1rem; white-space:nowrap; }

.dropdown:hover .dropdown-content { display:block; }

.menu-toggle {
  display: none;
  font-size: clamp(1.3rem, 1.4vi + 0.6rem, 2rem);
  background: none;
  border: none;
  color: rgb(0, 0, 0);
  cursor: pointer;
}
.hero, .parallax-section {
  position: relative;
}


.hero {
  height: 100vh;
  background: url('../img/hero.jpg') no-repeat fixed bottom/90% 95%;
  color: rgb(255, 20, 20);
  text-shadow: 2px 2px 6px black;
  overflow-x: hidden;
  animation: fade-in 1.2s;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  /* animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1); */
}

.hero-content {
  display: flex;
  height: 100vh;
  z-index: 1;
}
.hero-text{
   text-align: righ;
}
.hero-overlay {
  position: absolute;
  top: 0;
  right: 0;
  width: 50vw;
  height: 100%;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.6), transparent);
  z-index: 0;
}

.hero-block-left{
  flex: 0 0 50%;
   
}
.hero-block {
  flex: 0 0 50%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* centrado vertical */
  z-index: 1;
  height: 100vh;
  padding-bottom: 15vh;
}


.hero h2 {
  
  font-family: "Allura", cursive;
  /* font-family: "Alex Brush", cursive; */
  /* font-family: "Emblema One", system-ui; */
  color: rgb(255, 255, 255);
  text-shadow: 2px 2px 6px black;
  font-weight: 400;
  font-size: clamp(0.8rem, 3.5vi + 0.3rem, 10rem);
  line-height: 1.8;
  letter-spacing: clamp(0.2rem, 1.2vi, 1rem);
  word-break: break-word;
  overflow-wrap: break-word;
  text-align: right;
  margin-right: 1vi;
/*   padding: 0 1rem; */
}

.hero h3{
  /* font-family: "Alex Brush", cursive; */
  font-family: "Emblema One", system-ui;
  color: --accent-red;
  text-shadow: 2px 2px 6px black;
  font-weight: 400;
  font-size: clamp(0.6rem, 8vi+0.2rem, 8rem);
  /* font-size: 1rem; */
  text-align: right;
  margin-top: -1rem;
  margin-right: 2vi;
}

.hero-description {
 position: absolute;
  top: calc(50% + 10rem); /* aparece debajo del título */
  left: 50%;
  transform: translate(-50%, 0);
  background-color: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  text-align: justify;
  line-height: 1.6;
  overflow: hidden;
  height: 1.5vh;
  width: 1.5vw;
  max-width: 30vw;
  max-height: 40vh;
  padding: 1.5rem;
  margin: 0;
  cursor: pointer;
  transition: width 0.4s ease-in, height 0.4s ease-in;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.hero-description a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: normal;
  /* font-size: clamp(0.8rem, 1.2vw + 0.3rem, 1.5rem); */
}

.hero-description p {
  opacity: 0;
  transition: opacity 1s ease-in;
  overflow: hidden;
  margin: 0;
}

.info-icon {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.5);
  transition: opacity 0.6s height 0.6s ;
  pointer-events: none;
}


/* Al pasar el ratón, se expande */
/* EXPANSIÓN al hover */
.hero-description:hover {
  width: 30vw;
  height: 25vh;
}

/* Mostrar texto al expandirse */
.hero-description:hover p {
   opacity: 1;
   padding-right: 1rem; /* Ajusta según grosor del scrollbar */
   overflow-y: auto;
}

/* Ocultar el icono al expandirse */
.hero-description:hover .info-icon {
  opacity: 0;
  height: 0;
  transition: opacity 0.6s height 0.6s ;
}

.scroll-down {
  position: absolute;
  bottom: 2rem;
  top:90%;
  left: 50%;
  transform: translateX(-50%);
  text-decoration: none;
  z-index: 10;
}

.scroll-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.2rem;
  background-color: rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.scroll-icon:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--bg-light);
}



/* --- CONTENEDOR PRINCIPAL (texto + galería) --- */
.parallax-section{
  height: auto;
  min-height: 90vh; 
  padding: 0;
  display:flex;
}
.gallery-content{
  padding-top: 8vh;
  display:flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
}

/* -------- Columna izquierda : texto -------- */
.gallery-text{
  /* flex:0 0 50%;           ocupa mitad izquierda           */
  width: 90%;
  padding:1rem;
  /* overflow-y:auto;        scroll interno si hace falta    */
  height: auto;
  box-sizing: border-box;
  text-align: justify;
  animation-name: fade-in;
  /* scrollbar-width:thin;                               Firefox */
  /* scrollbar-color:rgba(255,255,255,0.3) rgba(0,0,0,0.2); */
  /* scrollbar-gutter:stable; */
}

/* Personalización del scroll para que combine con fondo oscuro  */

.gallery-text::-webkit-scrollbar{
  width:8px;
}
.gallery-text::-webkit-scrollbar-track{
  background:rgba(0,0,0,0.2);
}
.gallery-text::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,0.3);
  border-radius:10px;
}



/* COLUMNA DERECHA: COLLAGE DE IMÁGENES */
.gallery {
  /* flex: 0 0 50%; */
  height: auto;
  width: 80%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 0.5rem;
  padding: 1rem;
  /* height: 100%; */
  /* box-sizing: border-box; */
}
.gallery.three-only {
  grid-template-columns: repeat(3, 1fr);
}

.gallery img{
  width:100%;
  height:100%;
  object-fit:cover;       /* recorta exceso sin deformar     */
  border-radius:3px;
  box-shadow:0 4px 8px rgba(0,0,0,.3);
  border: 2px solid transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  animation: fade-in 0.5s ease-in-out;
}

/* Las verticales ocupan 2 filas para crear el patrón intercalado */
.gallery img.vertical{
  grid-row:span 2;
}

/* Efecto hover opcional */
.gallery img:hover{
  border: 2px solid;
  transform:scale(1.02);
  border-color: var(--accent-teal);
  box-shadow: 0 6px 12px rgba(44, 124, 121, 0.4);
}
.works {
  align-items: center;
  height: auto;
  width: 80%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: 2rem;
  padding: 1rem;
  animation: fade-in 0.5s ease-in-out;
}

.work-img {
  overflow: hidden;
  position: relative;
  padding: 0;
  margin: 0;
}

.works img{
  align-items: center;
  width: 100%;
  height: 100%;
  object-fit:cover;       /* recorta exceso sin deformar     */
  /* border-radius:3px;
  box-shadow:0 4px 8px rgba(0,0,0,.3);
  border: 2px solid transparent; */
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  animation: fade-in 0.5s ease-in-out;
}
.works img:hover{
  transform: scale(1.1);
  /* box-shadow: 0 6px 12px rgba(44, 124, 121, 0.4); */
  /* border: 2px solid var(--accent-teal); */
}
.works a {
  color: var(--bg-dark);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}
.work-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius:3px;
  box-shadow:0 4px 8px rgba(0,0,0,.3);
  border: 2px solid transparent;
  /* margin-bottom: 1rem; */
}
.works figcaption {
  width: 100%;
  height: 7rem;
  align-items: center;      /* centra verticalmente */
  justify-content: center;  /* centra horizontalmente */
  font-size: clamp(0.6rem, 1.2vi + 0.3rem, 1.5rem);
  color: var(--bg-dark);
  padding: 1rem;
}

footer {
  background: #111;
  color: #eee;
  padding: 2rem;
  text-align: center;
}

footer p {
  margin-bottom: 0.5rem;
}

.contact-social {
  margin-top: 0rem;
  font-size: 1rem;
  text-align: center;
}

.contact-social a {
  color: var(--bg-light); /* o el que uses */
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.social-icon {
  width: 24px;
  height: 24px;
  filter: brightness(0) saturate(100%) invert(26%) sepia(92%) saturate(522%) hue-rotate(338deg) brightness(98%) contrast(91%);
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}


.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  object-fit: contain;
}

.close-btn {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2rem;
  color: rgb(0, 0, 0);
  cursor: pointer;
  z-index: 10000;
  transition: transform 0.2s ease;
}
.close-btn:hover {
  transform: scale(1.4);
}
.prev-btn {
  position: absolute;
  bottom: 0.5rem;
  left:40%;
  padding-top: 0.5rem;
  /* padding-right: 4rem; */
  font-size: 1.5rem;
  color: rgb(0, 0, 0);
  cursor: pointer;
  z-index: 10000;
  transition: transform 0.2s ease;
}
.prev-btn:hover {
  transform: scale(1.4);
}
.next-btn {
  position: absolute;
  bottom: 0.5rem;
  right: 40%;
  font-size: 1.5rem;
  color: rgb(0, 0, 0);
  cursor: pointer;
  z-index: 10000;
  transition: transform 0.2s ease;
}
.next-btn:hover {
  transform: scale(1.4);
}
.lightbox-counter {
  position: absolute;
  padding-top: 1rem;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: black;
  font-size: 1rem;
  /* background-color: rgba(0, 0, 0, 0.5); */
  padding: 0.3rem 0.6rem;
  border-radius: 1rem;
  z-index: 1001;
  font-family: 'Montserrat', sans-serif;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}