/* ========================================
   MADERAS E INVERSIONES GLOBALES M&M, C.A.
   Design System — style.css
   ======================================== */

/* Fix 4: compensar navbar fija y optimizar espaciado al navegar por anclas */
section[id] {
  scroll-margin-top: 75px;
  padding-top: var(--section-pad-top);
  padding-bottom: var(--section-pad-bottom);
}
#hero {
  padding-top: 0;
  padding-bottom: 0;
}

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Inter:wght@300;400;500;600&display=swap');

/* ── Design Tokens ── */
:root {
  --forest-green:   #1A4A2E;
  --forest-light:   #2a6642;
  --gold-bronze:    #A0692A;
  --warm-oak:       #C4883A;
  --warm-oak-light: #d9a55c;
  --cream:          #F5F0E8;
  --light-sand:     #FAF6EE;
  --charcoal:       #1C1C1C;
  --dark-bg:        #111410;
  --text-dark:      #1a1a1a;
  --text-mid:       #4a4a4a;
  --text-light:     #7a7a7a;
  --white:          #ffffff;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  24px;
  --radius-xl:  40px;

  --shadow-sm:  0 2px 8px rgba(0,0,0,.08);
  --shadow-md:  0 8px 32px rgba(0,0,0,.14);
  --shadow-lg:  0 20px 60px rgba(0,0,0,.22);

  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.18s ease;

  --section-pad-top: clamp(36px, 4vw, 56px);
  --section-pad-bottom: clamp(56px, 7vw, 90px);
  --section-pad: clamp(48px, 6vw, 80px);
  --container:   1200px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--light-sand);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

/* ── Typography Scale ── */
.display-xl {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.display-lg {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
}
.display-md {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.2;
}
.section-tag {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bronze);
}
.body-lg { font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.75; }
.body-md { font-size: 1rem; line-height: 1.7; }

/* ── Scroll Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold-bronze);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(160,105,42,.4);
}
.btn-primary:hover {
  background: var(--warm-oak);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(160,105,42,.5);
}
.btn-outline {
  border: 2px solid rgba(255,255,255,.5);
  color: var(--white);
}
.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,.1);
  transform: translateY(-2px);
}
.btn-green {
  background: var(--forest-green);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(26,74,46,.4);
}
.btn-green:hover {
  background: var(--forest-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26,74,46,.5);
}
.btn-whatsapp {
  background: #25D366;
  color: var(--white);
  font-size: 1rem;
  padding: 18px 38px;
  box-shadow: 0 4px 24px rgba(37,211,102,.4);
}
.btn-whatsapp:hover {
  background: #1ebe57;
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(37,211,102,.5);
}
.btn-whatsapp-sm {
  background: #25D366;
  color: var(--white);
  padding: 12px 24px;
  font-size: 0.85rem;
  box-shadow: 0 4px 16px rgba(37,211,102,.35);
}
.btn-whatsapp-sm:hover {
  background: #1ebe57;
  transform: translateY(-2px);
}

/* ── Section Divider ── */
.section-divider {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--gold-bronze), var(--warm-oak-light));
  border-radius: 2px;
  margin: 16px 0 24px;
}
.section-divider.center { margin: 16px auto 24px; }

/* ─────────────────────────────────────────
   NAVBAR
───────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 24px 0;
  transition: var(--transition);
}
#navbar.scrolled {
  background: rgba(17, 20, 16, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 16px 0;
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.nav-logo img {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
  transition: var(--transition);
}
#navbar.scrolled .nav-logo img { height: 44px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: rgba(255,255,255,.85);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  position: relative;
  transition: var(--transition-fast);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gold-bronze);
  transition: width var(--transition-fast);
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  background: rgba(255,255,255,.1);
  border-radius: 50px;
  padding: 3px;
  gap: 2px;
  border: 1px solid rgba(255,255,255,.2);
}
.lang-btn {
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,.6);
  transition: var(--transition-fast);
  letter-spacing: 0.05em;
}
.lang-btn.active {
  background: var(--gold-bronze);
  color: var(--white);
}
.lang-btn:hover:not(.active) { color: var(--white); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17,20,16,.98);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-nav.open { display: flex; opacity: 1; }
.mobile-nav a {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--white);
  transition: color var(--transition-fast);
}
.mobile-nav a:hover { color: var(--gold-bronze); }
.mobile-nav-close {
  position: absolute;
  top: 24px; right: 24px;
  color: var(--white);
  font-size: 2rem;
  padding: 8px;
}

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
/* Fix 3: Hero usa flexbox column — nunca hay overlap entre contenido y stats */
#hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--dark-bg);
}

/* Área principal: crece para ocupar el espacio y centra verticalmente */
.hero-content-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  padding-top: 100px;  /* clearance del navbar */
  position: relative;
  z-index: 2;
}

/* Área inferior: stats + scroll hint — siempre al fondo, sin overlap */
.hero-bottom {
  position: relative;
  z-index: 2;
  padding-bottom: 36px;
}
.hero-bottom-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/projects/WhatsApp Image 2026-09-21 at 22.35.21 (2).jpeg');
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.05);
  transition: transform 8s ease;
}
#hero.loaded .hero-bg { transform: scale(1); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(17,20,16,.85) 0%,
    rgba(26,74,46,.6) 50%,
    rgba(17,20,16,.7) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(160,105,42,.2);
  border: 1px solid rgba(160,105,42,.4);
  border-radius: 50px;
  padding: 8px 20px;
  margin-bottom: 28px;
}
.hero-tag span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--warm-oak-light);
}
.hero-dot {
  width: 6px; height: 6px;
  background: var(--warm-oak-light);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7.5vw, 6.5rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 8px;
}
.hero-title .highlight {
  background: linear-gradient(135deg, var(--warm-oak-light) 0%, var(--gold-bronze) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,.75);
  max-width: 560px;
  line-height: 1.7;
  margin: 24px 0 40px;
  font-weight: 300;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
/* Stats: ya NO son absolute — están en el flujo normal (hero-bottom) */
.hero-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
  padding: 20px 28px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
}
.hero-stat .num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--warm-oak-light);
  line-height: 1;
}
.hero-stat .label {
  font-size: 0.72rem;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}
/* Scroll hint: en el flujo normal, a la derecha de los stats */
.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.5);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: bounce 2.5s infinite;
  flex-shrink: 0;
}
.hero-scroll svg { color: rgba(255,255,255,.5); }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ─────────────────────────────────────────
   NOSOTROS
───────────────────────────────────────── */
#nosotros {
  padding: var(--section-pad) 0;
  background: var(--light-sand);
}
.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.nosotros-images {
  position: relative;
}
.img-stack-main {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.img-stack-accent {
  position: absolute;
  bottom: -32px;
  right: -32px;
  width: 55%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 6px solid var(--light-sand);
  box-shadow: var(--shadow-md);
}
.nosotros-badge {
  position: absolute;
  top: 24px;
  left: -24px;
  background: var(--forest-green);
  color: var(--white);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.nosotros-badge .years {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--warm-oak-light);
}
.nosotros-badge .badge-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-top: 4px;
}
.values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}
.value-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  border-left: 3px solid var(--gold-bronze);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.value-card h4 {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--forest-green);
  margin-bottom: 4px;
}
.value-card p {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ─────────────────────────────────────────
   SERVICIOS
───────────────────────────────────────── */
#servicios {
  padding: var(--section-pad) 0;
  background: var(--charcoal);
  position: relative;
  overflow: hidden;
}
#servicios::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-bronze), transparent);
}
.servicios-header {
  text-align: center;
  margin-bottom: 64px;
}
.servicios-header .display-lg { color: var(--white); }
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.servicio-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.servicio-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(160,105,42,.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}
.servicio-card:hover { 
  border-color: rgba(160,105,42,.4);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.servicio-card:hover::after { opacity: 1; }
.servicio-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--forest-green), var(--forest-light));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(26,74,46,.4);
  transition: var(--transition);
}
.servicio-card:hover .servicio-icon {
  background: linear-gradient(135deg, var(--gold-bronze), var(--warm-oak));
  box-shadow: 0 8px 24px rgba(160,105,42,.4);
}
.servicio-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}
.servicio-card p {
  font-size: 0.9rem;
  color: rgba(255,255,255,.6);
  line-height: 1.65;
}
.servicio-num {
  position: absolute;
  top: 24px; right: 28px;
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 900;
  color: rgba(255,255,255,.05);
  line-height: 1;
}

/* ─────────────────────────────────────────
   PRODUCTOS
───────────────────────────────────────── */
#productos {
  padding: var(--section-pad) 0;
  background: var(--cream);
}
.productos-header {
  text-align: center;
  margin-bottom: 56px;
}
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.producto-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.producto-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.producto-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}
.producto-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.producto-card:hover .producto-img-wrap img { transform: scale(1.06); }
.producto-badge {
  position: absolute;
  top: 16px; left: 16px;
  background: var(--forest-green);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
}
.producto-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.producto-body h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.producto-body p {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 20px;
}

/* ─────────────────────────────────────────
   PROYECTOS GALLERY
───────────────────────────────────────── */
#proyectos {
  padding: var(--section-pad) 0;
  background: var(--light-sand);
}
.proyectos-header {
  text-align: center;
  margin-bottom: 48px;
}
/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 48px;
}
.filter-btn {
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid rgba(26,74,46,.2);
  color: var(--text-mid);
  background: var(--white);
  transition: var(--transition-fast);
  letter-spacing: 0.03em;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--forest-green);
  border-color: var(--forest-green);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(26,74,46,.3);
}

/* Gallery Grid - Strict Uniform Image Dimensions */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.gallery-item {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.gallery-item.hidden {
  display: none;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.07); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,74,46,.85) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay-content {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gallery-overlay-content .cat-tag {
  background: var(--gold-bronze);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
}
.gallery-overlay-content .zoom-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1rem;
  margin-left: auto;
}

/* ─────────────────────────────────────────
   LIGHTBOX
───────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
#lightbox.open { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
}
.lightbox-close {
  position: fixed;
  top: 24px; right: 24px;
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
  padding: 8px;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white);
  font-size: 2rem;
  opacity: 0.7;
  padding: 16px;
  transition: opacity var(--transition-fast);
  background: rgba(255,255,255,.08);
  border-radius: 50%;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-nav:hover { opacity: 1; background: rgba(255,255,255,.15); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.6);
  font-size: 0.85rem;
}

/* ─────────────────────────────────────────
   SOSTENIBILIDAD
───────────────────────────────────────── */
#sostenibilidad {
  padding: var(--section-pad) 0;
  background: var(--forest-green);
  position: relative;
  overflow: hidden;
}
#sostenibilidad::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
}
#sostenibilidad::after {
  content: '';
  position: absolute;
  bottom: -120px; left: -60px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,.02);
}
.sost-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.sost-text .section-tag { color: var(--warm-oak-light); }
.sost-text .display-lg { color: var(--white); margin: 12px 0 20px; }
.sost-text p { color: rgba(255,255,255,.75); }
.sost-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}
.sost-pillar {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  transition: var(--transition);
}
.sost-pillar:hover { background: rgba(255,255,255,.12); }
.sost-pillar .pill-icon { font-size: 1.8rem; margin-bottom: 10px; }
.sost-pillar h4 { font-family: var(--font-serif); color: var(--white); font-size: 1rem; margin-bottom: 6px; }
.sost-pillar p { font-size: 0.82rem; color: rgba(255,255,255,.65); line-height: 1.5; }
.sost-visual {
  position: relative;
}
.sost-visual img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.sost-visual-badge {
  position: absolute;
  bottom: -20px; left: -20px;
  background: var(--gold-bronze);
  color: var(--white);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.sost-visual-badge .big { font-family: var(--font-serif); font-size: 2rem; font-weight: 900; }
.sost-visual-badge .small { font-size: 0.75rem; opacity: 0.9; margin-top: 2px; }

/* ─────────────────────────────────────────
   CONTACTO
───────────────────────────────────────── */
#contacto {
  padding: var(--section-pad) 0;
  background: var(--light-sand);
}
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contacto-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.contact-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.contact-icon {
  width: 52px; height: 52px;
  background: var(--forest-green);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(26,74,46,.3);
}
.contact-item h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}
.contact-item p, .contact-item a {
  color: var(--text-mid);
  font-size: 0.95rem;
  line-height: 1.6;
}
.contact-item a:hover { color: var(--gold-bronze); }

.whatsapp-cta-block {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-md);
  text-align: center;
  margin-top: 8px;
}
.whatsapp-cta-block h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--text-dark);
}
.whatsapp-cta-block p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 24px;
}
.whatsapp-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.whatsapp-num-label {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 2px;
  text-align: left;
}

/* Map */
.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/3;
}
.map-wrap iframe {
  width: 100%; height: 100%;
  border: 0;
  display: block;
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
#footer {
  background: var(--dark-bg);
  padding: 56px 0 32px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-logo img {
  height: 60px;
  margin-bottom: 20px;
  filter: brightness(1.1);
}
.footer-logo p {
  font-size: 0.88rem;
  color: rgba(255,255,255,.5);
  max-width: 280px;
  line-height: 1.65;
}
.footer-col h4 {
  font-family: var(--font-serif);
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 20px;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col ul li a {
  color: rgba(255,255,255,.5);
  font-size: 0.88rem;
  transition: color var(--transition-fast);
}
.footer-col ul li a:hover { color: var(--warm-oak-light); }
.footer-col .footer-contact-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  color: rgba(255,255,255,.55);
  font-size: 0.88rem;
  line-height: 1.5;
}
.footer-contact-line span:first-child { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-bottom p {
  color: rgba(255,255,255,.3);
  font-size: 0.82rem;
}
.footer-bottom a { color: var(--warm-oak-light); }
.footer-brand-tag {
  font-size: 0.78rem;
  color: rgba(255,255,255,.2);
}

/* ── Floating WhatsApp Bubble ── */
.wa-float {
  position: fixed;
  bottom: 32px; right: 32px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.wa-float-btn {
  width: 60px; height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,.5);
  font-size: 1.8rem;
  transition: var(--transition);
  animation: wa-bounce 3s ease-in-out infinite;
}
.wa-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 36px rgba(37,211,102,.6);
  animation: none;
}
@keyframes wa-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}
.wa-tooltip {
  background: var(--charcoal);
  color: var(--white);
  font-size: 0.8rem;
  padding: 8px 16px;
  border-radius: 50px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-shadow: var(--shadow-md);
}
.wa-float:hover .wa-tooltip { opacity: 1; }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 1024px) {
  .nosotros-grid,
  .sost-inner,
  .contacto-grid,
  .footer-grid { grid-template-columns: 1fr; gap: 48px; }

  .nosotros-images { max-width: 480px; margin: 0 auto; }
  .img-stack-accent { right: -16px; bottom: -20px; }
  .nosotros-badge { left: -12px; }

  .hero-stats { flex-wrap: wrap; gap: 12px; }
  .hero-stat { padding: 14px 18px; }
  .hero-stat .num { font-size: 1.6rem; }

  .sost-visual { order: -1; max-width: 480px; margin: 0 auto; }
  .sost-visual img { aspect-ratio: 16/9; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions .btn-primary { display: none; }
  .hamburger { display: flex; }

  .hero-title { font-size: clamp(2.4rem, 8vw, 3.5rem); }

  .servicios-grid { grid-template-columns: 1fr; }
  .productos-grid { grid-template-columns: 1fr; }

  .values-grid { grid-template-columns: 1fr; }
  .sost-pillars { grid-template-columns: 1fr; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .filter-bar { gap: 8px; }
  .filter-btn { padding: 8px 16px; font-size: 0.8rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .hero-actions { flex-direction: column; align-items: flex-start; }

  .whatsapp-cta-block { padding: 24px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-scroll { display: none; }
  .wa-float { bottom: 20px; right: 20px; }
}

/* ── SVG Icon Styling Fix ── */
.servicio-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.servicio-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--white);
  transition: stroke var(--transition);
}
.value-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: rgba(160,105,42,.12);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.value-icon svg {
  width: 24px; height: 24px;
  stroke: var(--gold-bronze);
}
.sost-pillar .pill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.sost-pillar .pill-icon svg {
  width: 24px; height: 24px;
  stroke: var(--warm-oak-light);
}


/* ─────────────────────────────────────────
   INSTALACIÓN Y REMODELACIÓN (CARRUSEL - TEMA MARRÓN MADERA)
───────────────────────────────────────── */
#instalaciones {
  padding: var(--section-pad-top) 0 var(--section-pad-bottom);
  background: linear-gradient(135deg, #241810 0%, #170F09 100%);
  position: relative;
  overflow: hidden;
}
#instalaciones::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-bronze), transparent);
}
#instalaciones .servicios-header .section-tag {
  color: var(--warm-oak-light);
}
#instalaciones .servicios-header .display-lg {
  color: var(--white);
}

.inst-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.inst-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  border-top: 3px solid var(--gold-bronze);
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  transition: var(--transition);
}
.inst-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,.09);
  border-color: rgba(196,136,58,.4);
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.inst-icon {
  width: 44px; height: 44px;
  background: rgba(196,136,58,.2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--warm-oak-light);
  margin-bottom: 14px;
}
.inst-icon svg {
  stroke: var(--warm-oak-light);
}
.inst-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.inst-card p {
  font-size: 0.85rem;
  color: rgba(255,255,255,.75);
  line-height: 1.6;
}

/* Carousel Container */
.carousel-container {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--charcoal);
  aspect-ratio: 16/9;
}
@media (max-width: 768px) {
  .carousel-container {
    aspect-ratio: 4/3;
  }
}
.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.carousel-slide.active {
  opacity: 1;
  visibility: visible;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slide-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 32px 28px 24px;
  background: linear-gradient(to top, rgba(17,20,16,.92) 0%, rgba(17,20,16,.4) 70%, transparent 100%);
  color: var(--white);
}
.slide-caption .badge {
  display: inline-block;
  background: var(--gold-bronze);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 8px;
}
.slide-caption h4 {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 700;
  margin-bottom: 4px;
}
.slide-caption p {
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
  color: rgba(255,255,255,.8);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  background: rgba(0,0,0,.5);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition-fast);
  z-index: 10;
  border: 1px solid rgba(255,255,255,.2);
}
.carousel-btn:hover {
  background: var(--gold-bronze);
  border-color: var(--gold-bronze);
}
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }

.carousel-dots {
  position: absolute;
  bottom: 16px;
  right: 28px;
  display: flex;
  gap: 8px;
  z-index: 10;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  transition: var(--transition-fast);
}
.dot.active {
  background: var(--warm-oak-light);
  width: 24px;
  border-radius: 10px;
}

/* ─────────────────────────────────────────
   COMPRA DE BOSQUES & ALIANZA FORESTAL
───────────────────────────────────────── */
#bosques {
  padding: var(--section-pad-top) 0 var(--section-pad-bottom);
  background: var(--forest-green);
  position: relative;
  overflow: hidden;
}
#bosques::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(196,136,58,.15) 0%, transparent 60%);
}
.bosques-banner {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-xl);
  padding: clamp(32px, 6vw, 64px);
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}
.bosques-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 992px) {
  .bosques-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}
.bosques-badge {
  display: inline-block;
  background: rgba(196,136,58,.2);
  border: 1px solid rgba(196,136,58,.4);
  color: var(--warm-oak-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}
.bosques-content .display-lg {
  color: var(--white);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 20px;
}
.bosques-text {
  color: rgba(255,255,255,.85);
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.7;
  margin-bottom: 32px;
}
.bosques-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 36px;
}
.bosque-feat {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.bosque-feat .feat-icon {
  width: 28px; height: 28px;
  background: var(--gold-bronze);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.bosque-feat strong {
  display: block;
  color: var(--white);
  font-size: 0.95rem;
}
.bosque-feat p {
  color: rgba(255,255,255,.65);
  font-size: 0.85rem;
  margin: 0;
}
.bosques-img-wrap {
  position: relative;
}
.bosques-img-wrap img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.bosques-img-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--charcoal);
  border: 1px solid rgba(255,255,255,.15);
  color: var(--white);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.bosques-img-badge .num {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--warm-oak-light);
  display: block;
  line-height: 1;
}
.bosques-img-badge .txt {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
}


/* ── Hero Immediate Mobile & Desktop Visibility Fix ── */
#hero .reveal,
#hero .reveal-left,
#hero .reveal-right {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

@media (max-width: 768px) {
  #hero {
    height: auto !important;
    min-height: 100vh;
    padding-bottom: 30px;
  }
  .hero-content-wrapper {
    padding-top: 85px !important;
    padding-bottom: 20px;
  }
  .hero-title {
    font-size: clamp(2rem, 7.5vw, 3rem) !important;
    margin-bottom: 12px !important;
  }
  .hero-subtitle {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin: 16px 0 24px !important;
  }
  .hero-stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .hero-stat {
    padding: 10px 4px !important;
  }
  .hero-stat .num {
    font-size: 1.3rem !important;
  }
  .hero-stat .label {
    font-size: 0.62rem !important;
  }
}


/* ── Prevent Mobile Horizontal Overflow & White Side Bar Fix ── */
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

@media (max-width: 768px) {
  /* Reset all negative absolute offsets on mobile */
  .img-stack-accent {
    right: 0 !important;
    bottom: -10px !important;
    width: 48% !important;
  }
  .nosotros-badge {
    left: 10px !important;
    top: 10px !important;
    padding: 12px 16px !important;
  }
  .sost-visual-badge {
    left: 10px !important;
    bottom: 10px !important;
    padding: 12px 16px !important;
  }
  .bosques-img-badge {
    right: 10px !important;
    bottom: 10px !important;
    padding: 12px 16px !important;
  }
  .bosques-img-badge .num {
    font-size: 1.4rem !important;
  }
  .bosques-banner {
    padding: 24px 16px !important;
    overflow: hidden !important;
  }

  /* Map iframe fit */
  .map-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Ensure containers do not exceed viewport width */
  .container {
    padding: 0 16px !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}
