/* RESET & VARIABLES GLOBALES */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #0a0a0a;
  --bg-dark-card: #121212;
  --bg-light: #f7f7f8;
  --text-light: #f5f5f7;
  --text-dark: #111111;
  --accent-gold: #d4af37;
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-light: rgba(0, 0, 0, 0.08);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  width: 100%;
  overflow-x: hidden;
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* CONTAINER & LAYOUT */
.container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.section-header {
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  text-transform: uppercase;
  line-height: 1.1;
}

.section-subtitle {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
}

/* HEADER & NAV */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.8rem 4rem;
  background-color: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-dark);
  transition: all 0.3s ease;
}

.brand {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 3px;
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.8;
  transition: opacity 0.3s ease, color 0.3s ease;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-gold);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  opacity: 1;
  color: #ffffff;
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.8rem;
  cursor: pointer;
}

/* HERO SECTION */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 650px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.5rem;
  overflow: hidden;
}

.video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  z-index: -2;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: grayscale(100%) brightness(0.35);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(10,10,10,0.2) 0%, rgba(10,10,10,0.9) 100%);
  z-index: -1;
}

.hero-content {
  max-width: 900px;
}

.hero-subtitle {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 1.2rem;
  display: block;
}

.hero-content h1 {
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  max-width: 650px;
  margin: 0 auto;
}

/* SECCIÓN ACERCA DE MÍ */
.section-black {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 9rem 0;
}

.about-grid {
  display: flex;
  flex-direction: column;
  gap: 8rem;
}

/* ESTRUCTURA BASE DESKTOP (ANCHO DE TEXTO FIJO A 360PX) */
.about-item {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 4rem;
  align-items: center;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ELEMENTOS PARES (2 Y 4): TEXTO A LA DERECHA, PERO CON ANCHO EXACTO DE 360PX */
.about-item:nth-child(even) {
  grid-template-columns: 1fr 360px;
}

.about-item:nth-child(even) .about-text {
  order: 2;
  width: 360px; /* Fuerza el mismo ancho en bloques pares */
}

.about-item:nth-child(even) .about-gallery-stack {
  order: 1;
}

.about-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 360px; /* Fuerza el mismo ancho en bloques impares */
}

.item-number {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
  display: block;
}

.about-text h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.about-text p {
  font-size: 1.05rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.8;
  text-align: justify;
  text-justify: inter-word;
}

/* GALERÍA APILADA EN REPOSO DESKTOP */
.about-gallery-stack {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 440px;
  margin: 0 auto;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-gallery-stack img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.5s ease, 
              box-shadow 0.5s ease;
  user-select: none;
}

/* ROTACIONES EN REPOSO DESKTOP */
.about-gallery-stack img:nth-child(1) {
  z-index: 3;
  transform: rotate(-3deg) translate(0, 0);
}

.about-gallery-stack img:nth-child(2) {
  z-index: 2;
  transform: rotate(4deg) translate(15px, 10px);
}

.about-gallery-stack img:nth-child(3) {
  z-index: 1;
  transform: rotate(-7deg) translate(-15px, 15px);
}

/* HOVER EN REPOSO */
.about-gallery-stack:not(.is-open):hover img:nth-child(1) {
  transform: rotate(-1deg) translate(-5px, -5px) scale(1.01);
}

.about-gallery-stack:not(.is-open):hover img:nth-child(2) {
  transform: rotate(8deg) translate(25px, 15px);
}

.about-gallery-stack:not(.is-open):hover img:nth-child(3) {
  transform: rotate(-12deg) translate(-30px, 20px);
}

/* DESPLIEGUE DESKTOP (GALERÍAS Y TEXTOS UNIFORMES) */
.about-item.is-open {
  grid-template-columns: 360px 1fr !important;
  gap: 2.5rem !important;
}

.about-item.is-open:nth-child(even) {
  grid-template-columns: 1fr 360px !important;
  gap: 2.5rem !important;
}

.about-gallery-stack.is-open {
  max-width: 100% !important;
  height: auto !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.2rem !important;
}

.about-gallery-stack.is-open img {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 100% !important;
  height: 440px !important;
  object-fit: cover !important;
  transform: none !important;
  z-index: 1 !important;
}

/* SECCIÓN SERVICIOS */
.section-white {
  background-color: var(--bg-light);
  color: var(--text-dark);
  padding: 9rem 0;
}

.section-white .section-subtitle {
  color: #888888;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.service-card {
  background-color: #ffffff;
  padding: 3.5rem 2.5rem;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.342);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  position: relative;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(19, 19, 19, 0.726);
  border-color: #5c5c5c(0, 0, 0, 0.904);
}

.service-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: #999999;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
  display: block;
}

.service-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
  color: #000000;
}

.service-card p {
  font-size: 1rem;
  color: #555555;
  line-height: 1.7;
  font-weight: 400;
}

/* CONTACTO & REDES */
.contact-block {
  display: flex;
  flex-direction: column;
}

.contact-email {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-top: 1rem;
  color: #ffffff;
  transition: color 0.3s ease;
}

.contact-email:hover {
  color: var(--accent-gold);
}

.social-buttons {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.6rem;
  background-color: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: 50px;
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-social i {
  font-size: 1.2rem;
  color: var(--accent-gold);
  transition: transform 0.3s ease;
}

.btn-social:hover {
  background-color: #ffffff;
  color: var(--text-dark);
  border-color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-social:hover i {
  color: var(--text-dark);
  transform: scale(1.1);
}

/* FOOTER */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-dark);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

/* BOTÓN WHATSAPP */
.btn-whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  background-color: #25d366;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
  z-index: 1000;
  transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-whatsapp:hover {
  transform: scale(1.1);
  background-color: #20ba5a;
  box-shadow: 0 15px 30px rgba(37, 211, 102, 0.5);
}

/* RESPONSIVE MÓVIL Y TABLET */
@media (max-width: 768px) {
  .header {
    padding: 1.5rem 2rem;
  }

  .about-grid {
    gap: 4rem;
  }

  .about-item,
  .about-item:nth-child(even),
  .about-item.is-open,
  .about-item.is-open:nth-child(even) {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .about-text,
  .about-item:nth-child(even) .about-text {
    width: 100% !important; /* En móvil recupera el 100% del ancho */
  }

  .about-item .about-text,
  .about-item:nth-child(even) .about-text {
    order: 1 !important;
  }

  .about-item .about-gallery-stack,
  .about-item:nth-child(even) .about-gallery-stack {
    order: 2 !important;
  }

  /* REDUCCIÓN DE TAMAÑO EN REPOSO PARA MÓVIL */
  .about-gallery-stack {
    max-width: 240px !important;
    height: 330px !important;
  }

  /* AL DAR TAP EN MÓVIL */
  .about-gallery-stack.is-open {
    max-width: 100% !important;
    height: auto !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.8rem !important;
  }

  .about-gallery-stack.is-open img {
    height: auto !important;
    aspect-ratio: 4 / 5 !important;
  }

  .about-gallery-stack.is-open img:nth-child(3) {
    grid-column: span 2 !important;
    aspect-ratio: 16 / 9 !important;
  }
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    align-items: center;
    padding: 3rem 0;
    gap: 2rem;
    display: none;
    border-bottom: 1px solid var(--border-dark);
  }

  .nav-links.active {
    display: flex;
  }
}