
/* ═══════════════════════════════════════════
   TOKENS — LIGHT MODE (DEFAULT)
═══════════════════════════════════════════ */
:root {
  --navy:       #1B3070;
  --navy-dark:  #0E1E4A;
  --navy-mid:   #2A4494;
  --silver:     #8B9EBC;
  --silver-lt:  #B8C6D8;
  --silver-xl:  #DCE6F0;
  --bg:         #F2F6FC;
  --bg2:        #E8EFF8;
  --surface:    #FFFFFF;
  --surface2:   #F8FAFD;
  --text:       #0E1E40;
  --text2:      #3A527A;
  --muted:      #6B82A0;
  --border:     rgba(27,48,112,0.13);
  --border2:    rgba(27,48,112,0.22);
  --shadow:     0 8px 32px rgba(27,48,112,0.1);
  --shadow-lg:  0 20px 60px rgba(27,48,112,0.15);
  --nav-bg:     rgba(255,255,255,0.96);
  --hero-bg:    #FFFFFF;
  --card-bg:    #FFFFFF;
  --dark-sec:   #0E1E4A;
  --dark-sec-t: #FFFFFF;
  --sans: 'Montserrat', sans-serif;
  --body: 'Lato', sans-serif;
}

[data-theme="dark"] {
  --bg:         #0A0F1E;
  --bg2:        #101828;
  --surface:    #141E30;
  --surface2:   #1A2640;
  --text:       #E8EFF8;
  --text2:      #B8C6D8;
  --muted:      #7A90B0;
  --border:     rgba(139,158,188,0.15);
  --border2:    rgba(139,158,188,0.28);
  --shadow:     0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.5);
  --nav-bg:     rgba(10,15,30,0.96);
  --hero-bg:    #0D1528;
  --card-bg:    #141E30;
  --dark-sec:   #080E1C;
  --dark-sec-t: #E8EFF8;
  --silver-xl:  rgba(139,158,188,0.12);
  --bg3-shape:  rgba(26,36,64,0.9);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  transition: background 0.35s, color 0.35s;
}

/* LOGO IMG */
.logo-img-nav {
  height: 88px;
  width: auto;
  max-width: 260px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(27,48,112,0.18));
  transition: filter 0.35s, transform 0.3s;
}
.logo-img-nav:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 4px 16px rgba(27,48,112,0.28));
}
[data-theme="dark"] .logo-img-nav {
  filter: brightness(0) invert(1) opacity(0.92) drop-shadow(0 2px 10px rgba(139,158,188,0.35));
}
[data-theme="dark"] .logo-img-nav:hover {
  filter: brightness(0) invert(1) opacity(1) drop-shadow(0 4px 18px rgba(139,158,188,0.5));
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

/* The house icon — recreated faithfully */
.logo-icon svg { display: block; }

.logo-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-jabes {
  font-family: var(--sans);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--navy);
  transition: color 0.35s;
}
[data-theme="dark"] .logo-jabes { color: #C8D8EE; }

.logo-multi {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  color: var(--silver);
  text-transform: uppercase;
  margin-top: 1px;
  transition: color 0.35s;
}
[data-theme="dark"] .logo-multi { color: #7A90B0; }

/* ═══════════════════════════════════════════
   DARK MODE TOGGLE
═══════════════════════════════════════════ */
.theme-toggle {
  width: 44px; height: 24px;
  background: var(--border2);
  border-radius: 50px;
  border: none;
  cursor: pointer;
  position: relative;
  transition: background 0.3s;
  flex-shrink: 0;
}
[data-theme="dark"] .theme-toggle { background: var(--navy-mid); }
.theme-toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: var(--navy);
  border-radius: 50%;
  transition: transform 0.3s, background 0.3s;
}
[data-theme="dark"] .theme-toggle::after {
  transform: translateX(20px);
  background: #fff;
}
.toggle-label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  transition: color 0.35s;
}
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sun-icon, .moon-icon { width: 16px; height: 16px; color: var(--muted); transition: color 0.35s; }

/* ═══════════════════════════════════════════
   NAV
═══════════════════════════════════════════ */
nav {
  position: fixed; top:0; left:0; right:0; z-index:100;
  padding: 0.5rem 5%;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.35s, border-color 0.35s;
}
.nav-right { display: flex; align-items: center; gap: 2rem; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--navy); }
[data-theme="dark"] .nav-links a:hover { color: var(--silver-lt); }

.btn-nav {
  background: var(--navy); color:#fff;
  padding: 0.58rem 1.4rem; border-radius: 3px;
  text-decoration: none; font-family: var(--sans);
  font-size: 0.73rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; align-items: center; gap: 0.45rem;
  transition: background 0.3s, transform 0.2s;
}
.btn-nav:hover { background: var(--navy-mid); transform: translateY(-1px); }

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
#inicio {
  min-height: 100vh; display: flex; align-items: center;
  padding: 7rem 5% 4rem; position: relative; overflow: hidden;
  background: var(--hero-bg); transition: background 0.35s;
}
.hero-bg-shape {
  position: absolute; right: -5%; top:0; bottom:0; width: 50%;
  background: linear-gradient(135deg, var(--bg2) 0%, var(--silver-xl) 60%, var(--bg2) 100%);
  clip-path: polygon(18% 0%, 100% 0%, 100% 100%, 0% 100%);
  z-index:0; transition: background 0.35s;
}
.hero-content { position: relative; z-index:2; max-width: 580px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 50px; padding: 0.35rem 1rem 0.35rem 0.4rem; margin-bottom: 1.75rem;
  transition: background 0.35s, border-color 0.35s;
}
.badge-dot { width:8px; height:8px; background: var(--navy); border-radius:50%; }
[data-theme="dark"] .badge-dot { background: var(--silver-lt); }
.hero-badge span {
  font-family: var(--sans); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy);
  transition: color 0.35s;
}
[data-theme="dark"] .hero-badge span { color: var(--silver-lt); }

h1 {
  font-family: var(--sans);
  font-size: clamp(2.3rem, 5.5vw, 3.9rem);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.02em;
  color: var(--navy-dark); margin-bottom: 1.25rem;
  transition: color 0.35s;
}
[data-theme="dark"] h1 { color: #D8E6F5; }

h1 .hl {
  color: var(--navy-mid);
  border-bottom: 4px solid var(--silver-lt);
  transition: color 0.35s, border-color 0.35s;
}
[data-theme="dark"] h1 .hl { color: #7BAAD8; border-bottom-color: rgba(139,158,188,0.4); }

.hero-desc { font-size: 1rem; color: var(--muted); max-width: 440px; margin-bottom: 2.5rem; line-height: 1.85; }
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.65rem;
  background: var(--navy); color: #fff;
  padding: 0.95rem 2rem; border-radius: 4px; text-decoration: none;
  font-family: var(--sans); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
}
.btn-primary:hover { background: var(--navy-mid); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(27,48,112,0.3); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--navy); border: 1.5px solid var(--navy); background: transparent;
  padding: 0.9rem 1.75rem; border-radius: 4px; text-decoration: none;
  font-family: var(--sans); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.2s;
}
.btn-outline:hover { background: var(--navy); color:#fff; transform: translateY(-2px); }
[data-theme="dark"] .btn-outline { color: var(--silver-lt); border-color: var(--silver); }
[data-theme="dark"] .btn-outline:hover { background: var(--navy-mid); color:#fff; border-color: var(--navy-mid); }

.hero-stats {
  display: flex; gap: 2.5rem; margin-top: 3.5rem;
  padding-top: 2.5rem; border-top: 1px solid var(--border);
  transition: border-color 0.35s;
}
.stat-num { font-family: var(--sans); font-size: 2rem; font-weight: 800; color: var(--navy); display: block; transition: color 0.35s; }
[data-theme="dark"] .stat-num { color: #7BAAD8; }
.stat-label { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--sans); font-weight: 600; }

/* ═══════════════════════════════════════════
   SECTIONS BASE
═══════════════════════════════════════════ */
section { padding: 6rem 5%; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-tag {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--navy);
  margin-bottom: 0.75rem;
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  transition: color 0.35s;
}
[data-theme="dark"] .section-tag { color: var(--silver-lt); }
.section-tag::before, .section-tag::after { content:''; width:28px; height:1px; background: var(--silver); }
h2 {
  font-family: var(--sans); font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800;
  color: var(--navy-dark); line-height: 1.15; letter-spacing: -0.01em; transition: color 0.35s;
}
[data-theme="dark"] h2 { color: #D0DFF2; }
.section-sub { color: var(--muted); max-width: 460px; margin: 0.75rem auto 0; font-size: 0.95rem; }

/* ═══════════════════════════════════════════
   SERVICIOS
═══════════════════════════════════════════ */
#servicios { background: var(--surface); transition: background 0.35s; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 1100px; margin: 0 auto; }
.service-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 2.25rem 2rem; position: relative; overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s, background 0.35s;
}
.service-card::before {
  content:''; position: absolute; top:0; left:0; right:0; height:3px;
  background: linear-gradient(90deg, var(--navy), var(--silver));
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--silver-lt); }
.service-card:hover::before { transform: scaleX(1); }
.service-num { font-family: var(--sans); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em; color: var(--silver); margin-bottom: 1.25rem; display: block; }
.svc-icon { width:52px; height:52px; background: var(--bg2); border-radius:12px; display:flex; align-items:center; justify-content:center; margin-bottom:1.25rem; transition: background 0.3s; }
.service-card:hover .svc-icon { background: var(--navy); }
.svc-icon svg { color: var(--navy); transition: color 0.3s; }
.service-card:hover .svc-icon svg { color:#fff; }
.service-card h3 { font-family: var(--sans); font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 0.65rem; transition: color 0.35s; }
.service-card p { color: var(--muted); font-size: 0.88rem; line-height: 1.75; }

/* ═══════════════════════════════════════════
   PROYECTOS (GALERÍA)
═══════════════════════════════════════════ */
#proyectos { background: var(--bg); transition: background 0.35s; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 1rem;
  max-width: 1100px; margin: 0 auto;
}
.gallery-item {
  position: relative; overflow: hidden; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  aspect-ratio: 4/3; cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}
.gallery-item:nth-child(1) { grid-column: span 2; aspect-ratio: 16/9; }
.gallery-item:nth-child(4) { grid-column: span 2; aspect-ratio: 16/9; }
.gallery-item:nth-child(6) { grid-column: span 1; }
.gallery-item:hover { transform: scale(1.015); box-shadow: var(--shadow-lg); z-index:2; }
.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(14,30,74,0.88) 0%, rgba(14,30,74,0.1) 55%, transparent 75%);
  opacity:0; transition: opacity 0.35s;
  display: flex; align-items: flex-end; padding: 1.25rem 1.5rem;
}
.gallery-item:hover .gallery-overlay { opacity:1; }
.overlay-label { 
  font-family: var(--sans); font-size: 0.88rem; font-weight: 700; 
  color: #fff; letter-spacing: 0.05em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}


/* Gallery caption chips */
.gallery-caption {
  position: absolute; bottom: 0.75rem; left: 0.75rem;
  background: rgba(14,30,74,0.82);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  pointer-events: none;
  transition: opacity 0.3s;
}
.gallery-item:hover .gallery-caption { opacity: 0; }
/* Placeholder when no image */
.gallery-placeholder {
  width:100%; height:100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem;
  color: var(--silver);
}
.gallery-placeholder svg { opacity: 0.4; }
.gallery-placeholder span { font-family: var(--sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; opacity: 0.5; }

/* ═══════════════════════════════════════════
   NOSOTROS
═══════════════════════════════════════════ */
#nosotros { background: var(--surface); transition: background 0.35s; }
.why-wrap { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.why-left .section-tag { justify-content: flex-start; }
.why-left .section-tag::before { display: none; }
.why-left h2 { text-align: left; margin-bottom: 1rem; }
.why-left p { color: var(--muted); font-size: 0.93rem; line-height: 1.85; margin-bottom: 0.85rem; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.feature {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
  padding: 1.25rem; transition: border-color 0.3s, transform 0.3s, background 0.35s;
}
.feature:hover { border-color: var(--navy); transform: translateY(-2px); }
.feat-icon { width:36px; height:36px; background: var(--bg2); border-radius:8px; display:flex; align-items:center; justify-content:center; margin-bottom:0.75rem; transition: background 0.35s; }
.feature h4 { font-family: var(--sans); font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; transition: color 0.35s; }
.feature p { font-size: 0.78rem; color: var(--muted); line-height: 1.6; }

/* ═══════════════════════════════════════════
   PROCESO
═══════════════════════════════════════════ */
#proceso { background: var(--dark-sec); transition: background 0.35s; }
#proceso .section-tag { color: var(--silver-lt); }
#proceso .section-tag::before, #proceso .section-tag::after { background: rgba(255,255,255,0.2); }
#proceso h2 { color: var(--dark-sec-t); }
#proceso .section-sub { color: rgba(255,255,255,0.45); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.07); border-radius: 8px; overflow: hidden; max-width: 1000px; margin: 0 auto; position: relative; z-index:1; }
.step { background: var(--dark-sec); padding: 2.5rem 1.75rem; transition: background 0.3s; }
.step:hover { background: rgba(255,255,255,0.04); }
.step-num { font-family: var(--sans); font-size: 2.5rem; font-weight: 800; color: rgba(139,158,188,0.2); display: block; margin-bottom: 0.5rem; line-height: 1; }
.step h4 { font-family: var(--sans); font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.step p { font-size: 0.82rem; color: rgba(255,255,255,0.42); line-height: 1.65; }

/* ═══════════════════════════════════════════
   CTA FINAL
═══════════════════════════════════════════ */
#contacto { background: var(--surface); text-align: center; padding: 7rem 5%; position: relative; overflow: hidden; transition: background 0.35s; }
.cta-arc { position: absolute; top:-2px; left:0; right:0; height:80px; background: var(--bg); clip-path: ellipse(55% 100% at 50% 0%); transition: background 0.35s; }
.cta-inner { position: relative; z-index:1; max-width: 600px; margin: 0 auto; }
.cta-logo { margin-bottom: 2rem; }
.cta-title { font-family: var(--sans); font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; color: var(--navy-dark); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 1rem; transition: color 0.35s; }
[data-theme="dark"] .cta-title { color: #D0DFF2; }
.cta-sub { color: var(--muted); max-width: 400px; margin: 0 auto 2.5rem; font-size: 0.95rem; }
.whatsapp-btn { display: inline-flex; align-items: center; gap: 0.8rem; background: #25D366; color:#fff; padding: 1.1rem 2.5rem; border-radius: 4px; text-decoration: none; font-family: var(--sans); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.03em; transition: background 0.3s, transform 0.2s, box-shadow 0.3s; }
.whatsapp-btn:hover { background: #1db954; transform: translateY(-3px); box-shadow: 0 16px 40px rgba(37,211,102,0.3); }
.contact-note { margin-top: 1.25rem; font-size: 0.8rem; color: var(--muted); }
.social-links { display: flex; justify-content: center; gap: 1rem; margin-top: 0.75rem; }
.social-links a { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; color: var(--navy); text-decoration: none; letter-spacing: 0.05em; padding: 0.35rem 0.85rem; border: 1px solid var(--border); border-radius: 3px; transition: background 0.3s, color 0.3s; }
.social-links a:hover { background: var(--navy); color:#fff; border-color: var(--navy); }
[data-theme="dark"] .social-links a { color: var(--silver-lt); }
[data-theme="dark"] .social-links a:hover { background: var(--navy-mid); border-color: var(--navy-mid); }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
footer { background: var(--navy-dark); padding: 2rem 5%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-links { display: flex; gap: 2rem; list-style: none; }
.footer-links a { font-family: var(--sans); font-size: 0.72rem; font-weight: 500; color: rgba(255,255,255,0.38); text-decoration: none; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.3s; }
.footer-links a:hover { color: rgba(255,255,255,0.8); }
.footer-copy { font-size: 0.72rem; color: rgba(255,255,255,0.35); letter-spacing: 0.04em; }

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
.reveal { opacity:0; transform: translateY(22px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity:1; transform: translateY(0); }
.d1 { transition-delay: 0.1s; } .d2 { transition-delay: 0.2s; } .d3 { transition-delay: 0.3s; }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */


/* ═══════════════════════════════════════════
   ANTES / DESPUÉS COMPARISON SLIDER
═══════════════════════════════════════════ */
.compare-wrap {
  max-width: 900px;
  margin: 0 auto;
}
.compare-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1080/562;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(27,48,112,0.18);
  cursor: col-resize;
  user-select: none;
  border: 1px solid var(--border);
}
.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.compare-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.compare-before {
  clip-path: inset(0 50% 0 0);
  transition: clip-path 0.02s;
}
.compare-badge {
  position: absolute;
  bottom: 1.25rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  backdrop-filter: blur(10px);
  z-index: 3;
  pointer-events: none;
}
.badge-after  { right: 1.25rem; background: rgba(27,48,112,0.82); color:#fff; }
.badge-before { left:  1.25rem; background: rgba(255,255,255,0.88); color: var(--navy); }
.compare-divider {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 3px;
  background: #fff;
  transform: translateX(-50%);
  z-index: 10;
  box-shadow: 0 0 12px rgba(0,0,0,0.3);
  transition: left 0.02s;
}
.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(27,48,112,0.35);
  color: var(--navy);
  gap: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.compare-container:hover .compare-handle {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 28px rgba(27,48,112,0.45);
}
.compare-hint {
  text-align: center;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 1rem;
  text-transform: uppercase;
}
.compare-info {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
  padding: 1.5rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: background 0.35s, border-color 0.35s;
}
.compare-info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 160px;
}
.ci-icon {
  width: 40px; height: 40px;
  background: var(--bg2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
  flex-shrink: 0;
  transition: background 0.35s;
}
.compare-info-item strong {
  display: block;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  transition: color 0.35s;
}
.compare-info-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}
@media (max-width: 600px) {
  .compare-info { flex-direction: column; align-items: flex-start; gap: 1rem; }
}


/* ═══════════════════════════════════════════
   GALERÍA MEJORADA
═══════════════════════════════════════════ */
.gallery-grid {
  max-width: 1100px;
  margin: 0 auto;
}
.gallery-item {
  box-shadow: 0 4px 20px rgba(27,48,112,0.08);
}
.gallery-item:hover {
  box-shadow: 0 16px 48px rgba(27,48,112,0.22);
}
.gallery-caption {
  font-size: 0.74rem !important;
  padding: 0.38rem 0.9rem !important;
  background: rgba(14,30,74,0.78) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
}

/* ═══════════════════════════════════════════
   HERO — Mejora tipográfica
═══════════════════════════════════════════ */
#inicio h1 {
  text-shadow: 0 2px 8px rgba(27,48,112,0.06);
}

/* Pulse en botón WhatsApp del CTA */
@keyframes pulse-wa {
  0%   { box-shadow: 0 0 0 0   rgba(37,211,102,0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(37,211,102,0);   }
  100% { box-shadow: 0 0 0 0   rgba(37,211,102,0);    }
}
.whatsapp-btn {
  animation: pulse-wa 2.2s infinite;
}
.whatsapp-btn:hover { animation: none; }

/* Floating WhatsApp button fijo */
.wa-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 999;
  width: 58px; height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,0.45);
  text-decoration: none;
  animation: pulse-wa 2.5s infinite;
  transition: transform 0.25s, box-shadow 0.25s;
}
.wa-float:hover {
  transform: scale(1.12);
  box-shadow: 0 10px 32px rgba(37,211,102,0.55);
  animation: none;
}
.wa-float svg { color: #fff; }

/* Stats bar mejorada */
.hero-stats .stat-num {
  font-size: 2.4rem;
}

/* Sección Antes/Después nav highlight */
a[href="#antesdespues"]:hover { color: var(--navy) !important; }


/* ═══════════════════════════════════════════
   IMAGE PROTECTION
═══════════════════════════════════════════ */
img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
/* Buttons and links need pointer-events back */
a img, button img, .theme-toggle, a, button, 
.compare-container, .gallery-item, nav a, 
.btn-primary, .btn-outline, .btn-nav,
.whatsapp-btn, .wa-float, .social-links a {
  pointer-events: auto !important;
}
.gallery-item img, .compare-img img {
  pointer-events: none !important;
}
/* Overlay blocker on gallery items */
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  cursor: pointer;
}
.compare-img::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
}
/* Prevent text selection on image captions */
.gallery-caption, .compare-badge, .overlay-label {
  -webkit-user-select: none;
  user-select: none;
}


/* ═══════════════════════════════════════════
   HERO — EQUIPMENT IMAGE + MINI ICONS
═══════════════════════════════════════════ */
.hero-equipment-wrap {
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.hero-equipment-img {
  width: clamp(220px, 28vw, 420px);
  height: auto;
  filter: drop-shadow(0 20px 50px rgba(27,48,112,0.22));
  animation: float-equip 4s ease-in-out infinite;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
@keyframes float-equip {
  0%,100% { transform: translateY(0px);   }
  50%      { transform: translateY(-12px); }
}
[data-theme="dark"] .hero-equipment-img {
  filter: drop-shadow(0 20px 50px rgba(139,158,188,0.28)) brightness(1.08);
}

/* Mini icon cards */
.hero-icon-chips {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-icon-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(27,48,112,0.12);
  border-radius: 50px;
  padding: 0.4rem 0.9rem 0.4rem 0.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(27,48,112,0.1);
  transition: transform 0.25s, box-shadow 0.25s;
}
.hero-icon-chip:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(27,48,112,0.15); }
[data-theme="dark"] .hero-icon-chip {
  background: rgba(20,30,48,0.82);
  border-color: rgba(139,158,188,0.2);
}
.hero-icon-chip svg { flex-shrink: 0; }
.hero-icon-chip span {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--navy);
  white-space: nowrap;
  transition: color 0.35s;
}
[data-theme="dark"] .hero-icon-chip span { color: var(--silver-lt); }




/* ═══════════════════════════════════════════════════════
   RESPONSIVE COMPLETO — Todos los tamaños de pantalla
   Desktop (>1024px) | Tablet (768-1024px) | Mobile (<768px)
═══════════════════════════════════════════════════════ */

/* ── MOBILE HAMBURGER MENU ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  z-index: 200;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.3s ease;
}
[data-theme="dark"] .hamburger span { background: var(--silver-lt); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE NAV OVERLAY ── */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  z-index: 150;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.mobile-nav-overlay.open { display: flex; }
.mobile-nav-overlay ul {
  list-style: none;
  text-align: center;
  padding: 0;
  margin: 0;
}
.mobile-nav-overlay ul li { margin-bottom: 1.5rem; }
.mobile-nav-overlay ul a {
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
  transition: color 0.3s;
}
[data-theme="dark"] .mobile-nav-overlay ul a { color: var(--silver-lt); }
.mobile-nav-overlay ul a:hover { color: var(--navy-mid); }
.mobile-nav-overlay .btn-nav-mobile {
  background: var(--navy);
  color: #fff;
  padding: 0.9rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── HERO — MOBILE RE-LAYOUT ── */
@media (max-width: 1023px) {
  /* En tablet/mobile: texto primero, luego imagen y iconos debajo */
  #inicio {
    flex-direction: column;
    align-items: flex-start;
    padding: 6rem 5% 3rem;
    min-height: auto;
  }
  .hero-bg-shape { display: none; }

  /* En móvil/tablet el wrap va AL FINAL del flujo de la sección */
  .hero-equipment-wrap {
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2.5rem;   /* espacio entre hero-content y equipment */
    padding-top: 1rem;
    flex-wrap: wrap;
    order: 10;            /* siempre después del hero-content */
  }
  .hero-equipment-img {
    width: clamp(160px, 40vw, 260px);
    animation: float-equip 4s ease-in-out infinite;
  }
  .hero-icon-chips {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
  /* hero-content primero */
  .hero-content {
    max-width: 100%;
    order: 1;
  }
}

/* ── HERO — PEQUEÑO MOBILE ── */
@media (max-width: 600px) {
  #inicio { padding: 5rem 4% 2rem; }

  h1 { font-size: clamp(2rem, 8vw, 2.8rem); }

  .hero-badge span { font-size: 0.65rem; letter-spacing: 0.07em; }

  .hero-equipment-wrap {
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    padding-top: 0.5rem;
    gap: 1rem;
  }
  .hero-equipment-img { width: clamp(140px, 55vw, 220px); }
  .hero-icon-chips {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero-icon-chip { padding: 0.35rem 0.75rem 0.35rem 0.4rem; }
  .hero-icon-chip span { font-size: 0.65rem; }

  .hero-stats { gap: 1.2rem; }
  .stat-num { font-size: 1.6rem; }

  .btn-group { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .btn-primary, .btn-outline { font-size: 0.82rem; padding: 0.85rem 1.5rem; }
}

/* ── NAVBAR — MOBILE ── */
@media (max-width: 900px) {
  nav { padding: 0.6rem 4%; }
  .nav-links { display: none !important; }
  .hamburger { display: flex; }
  .logo-img-nav { height: 60px; }
}

/* ── SECCIONES — GENERAL MOBILE ── */
@media (max-width: 768px) {
  section { padding: 4rem 4%; }

  h2 { font-size: clamp(1.5rem, 5vw, 2.2rem); }

  .section-tag { font-size: 0.65rem; gap: 0.5rem; }
  .section-tag::before, .section-tag::after { width: 20px; }

  /* SERVICIOS */
  .services-grid { grid-template-columns: 1fr; gap: 1rem; }
  .service-card { padding: 1.75rem 1.5rem; }

  /* ANTES / DESPUÉS */
  .compare-wrap { max-width: 100%; }
  .compare-container { aspect-ratio: 16/9; border-radius: 10px; }
  .compare-badge { font-size: 0.7rem; padding: 0.35rem 0.8rem; bottom: 0.75rem; }
  .badge-after { right: 0.75rem; }
  .badge-before { left: 0.75rem; }
  .compare-handle { width: 40px; height: 40px; }
  .compare-hint { font-size: 0.65rem; }
  .compare-info { flex-direction: column; padding: 1.25rem; gap: 1rem; }
  .compare-info-item { min-width: auto; }

  /* GALERÍA */
  .gallery-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }
  .gallery-item,
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4) {
    grid-column: span 1 !important;
    aspect-ratio: 4/3 !important;
  }

  /* NOSOTROS */
  .why-wrap { grid-template-columns: 1fr; gap: 2rem; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .feature { padding: 1rem; }
  .feature h4 { font-size: 0.82rem; }
  .feature p { font-size: 0.74rem; }

  /* PROCESO */
  .steps { grid-template-columns: 1fr 1fr; }
  .step { padding: 1.5rem 1.25rem; }
  .step-num { font-size: 1.8rem; }

  /* FOOTER */
  footer { flex-direction: column; text-align: center; padding: 2rem 4%; gap: 1.25rem; }
  .footer-links { justify-content: center; flex-wrap: wrap; gap: 0.75rem; }

  /* COMPARADOR CTA */
  .cta-title { font-size: clamp(1.7rem, 5vw, 2.5rem); }
  .cta-logo img { height: 130px !important; }

  /* WhatsApp btn */
  .whatsapp-btn { font-size: 0.82rem; padding: 0.9rem 1.5rem; }
  .wa-float { width: 50px; height: 50px; bottom: 1.25rem; right: 1.25rem; }

  /* Toggle */
  .toggle-label { display: none; }
}

/* ── EXTRA PEQUEÑO (< 400px) ── */
@media (max-width: 400px) {
  nav { padding: 0.5rem 3.5%; }
  .logo-img-nav { height: 60px; }

  section { padding: 3.5rem 3.5%; }
  h1 { font-size: clamp(1.8rem, 9vw, 2.5rem); }

  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }

  .compare-container { aspect-ratio: 4/3; }
  .compare-hint { display: none; }

  .hero-stats { gap: 1rem; }
  .stat-num { font-size: 1.4rem; }
  .stat-label { font-size: 0.65rem; }

  .whatsapp-btn { font-size: 0.78rem; padding: 0.8rem 1.2rem; }
}

/* ── TABLET (768 - 1023px) ── */
@media (min-width: 769px) and (max-width: 1023px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .gallery-item:nth-child(1),
  .gallery-item:nth-child(4) { grid-column: span 2 !important; aspect-ratio: 16/9 !important; }
  .gallery-item { aspect-ratio: 4/3 !important; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}

/* ── DESKTOP (>1024px) ── */
@media (min-width: 1024px) {
  .hero-equipment-wrap {
    position: absolute;
    right: 4%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    order: 0;   /* reset order on desktop */
    margin-top: 0;
    padding-top: 0;
  }
  .hero-content { order: 0; }
}


/* ── LOGO FLOTANTE CTA ── */
.cta-logo-float {
  display: flex;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.cta-logo-float img {
  width: clamp(260px, 45vw, 480px);
  height: auto;
  animation: float-cta 3.5s ease-in-out infinite;
  filter: drop-shadow(0 20px 50px rgba(255,255,255,0.18))
          drop-shadow(0 4px 20px rgba(27,48,112,0.25));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
@keyframes float-cta {
  0%,100% { transform: translateY(0px);   }
  50%      { transform: translateY(-14px); }
}

