/* ═══════════════════════════════════════════════════════
   MHG ARQUITECTOS — Design System
   Paleta: verde oscuro MHG + grises neutros + blanco
═══════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────── */
:root {
  --green:       #1a4f2e;
  --green-mid:   #22643a;
  --green-light: #2d7a48;
  --green-fade:  rgba(26, 79, 46, 0.08);

  --dark:        #111614;
  --dark-2:      #1c2220;
  --mid:         #3a4240;
  --muted:       #6b7572;
  --border:      #e0e4e2;
  --border-dark: #d0d6d3;

  --white:       #ffffff;
  --off-white:   #f7f8f7;
  --light:       #eef1ef;

  --font-body:   'Outfit', sans-serif;
  --font-display:'Playfair Display', serif;

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   22px;
  --radius-xl:   32px;

  --shadow-sm:   0 2px 8px rgba(0,0,0,.07);
  --shadow-md:   0 6px 24px rgba(0,0,0,.10);
  --shadow-lg:   0 16px 48px rgba(0,0,0,.14);

  --transition:  0.28s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

a { text-decoration: none; color: inherit; }

/* ── Utility ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 80px 0; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green-mid);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto;
}

.accent { color: var(--green-mid); }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  border-radius: 50px;
  padding: 13px 28px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(26,79,46,.35);
}
.btn-primary:hover {
  background: var(--green-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26,79,46,.45);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.6);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.12);
  border-color: var(--white);
}

.btn-nav {
  background: var(--green);
  color: var(--white);
  padding: 10px 20px;
  font-size: .88rem;
  border-radius: 50px;
}
.btn-nav:hover { background: var(--green-mid); }

.btn-full { width: 100%; justify-content: center; }

/* ── Navbar ──────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 20px;
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(255,255,255,.97);
  box-shadow: 0 2px 24px rgba(0,0,0,.10);
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--dark);
  transition: color var(--transition);
}

.navbar:not(.scrolled) .nav-logo-text { color: var(--white); }
.navbar:not(.scrolled) .nav-logo-text .accent { color: rgba(255,255,255,.75); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: .9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--dark);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--green); background: var(--green-fade); }
.navbar:not(.scrolled) .nav-link { color: rgba(255,255,255,.88); }
.navbar:not(.scrolled) .nav-link:hover { color: var(--white); background: rgba(255,255,255,.12); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}
.navbar:not(.scrolled) .nav-toggle span { background: var(--white); }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  animation: heroZoom 10s ease-out forwards;
}

@keyframes heroZoom {
  to { transform: scale(1); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 30, 18, 0.82) 0%,
    rgba(10, 30, 18, 0.55) 60%,
    rgba(10, 30, 18, 0.30) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 120px 24px 80px;
  margin: 0 auto 0 max(24px, calc(50vw - 600px));
  animation: fadeUp .9s .2s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,.9);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 50px;
  margin-bottom: 28px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4adf82;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(.8); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 22px;
}

.hero-title em {
  font-style: normal;
  color: #7dcea0;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.78);
  margin-bottom: 40px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.6);
  animation: bounce 2.5s ease infinite;
  z-index: 1;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Services ────────────────────────────────────────── */
.services { background: var(--off-white); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.service-number {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--green-fade);
  line-height: 1;
  margin-bottom: 12px;
  transition: color var(--transition);
  user-select: none;
}

.service-card:hover .service-number {
  color: rgba(26,79,46,.15);
}

.service-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-dark);
}

.service-card:hover::before { transform: scaleX(1); }

.service-icon-wrap {
  width: 52px;
  height: 52px;
  background: var(--green-fade);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--green);
  transition: var(--transition);
}

.service-card:hover .service-icon-wrap {
  background: var(--green);
  color: var(--white);
}

.service-icon { width: 28px; height: 28px; }

.service-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.service-desc {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 20px;
}

.service-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--green);
  border: 1.5px solid var(--green);
  border-radius: 50px;
  padding: 9px 18px;
  transition: var(--transition);
  align-self: flex-start;
  margin-top: auto;
}

.service-cta:hover {
  background: var(--green);
  color: var(--white);
}

/* ── Projects (tabs + grid) ──────────────────────── */
.projects-section { background: var(--dark); }
.projects-section .section-label { color: #7dcea0; }
.projects-section .section-title { color: var(--white); }
.projects-section .section-desc { color: rgba(255,255,255,.55); }

.proj-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}

.proj-tab {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.65);
  border-radius: 50px;
  padding: 10px 22px;
  font-size: .88rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
}

.proj-tab:hover {
  background: rgba(255,255,255,.14);
  color: var(--white);
}

.proj-tab.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
  font-weight: 600;
}

.proj-panel {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.proj-panel[hidden] {
  display: none !important;
}

.proj-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 260px;
  gap: 8px;
  grid-auto-flow: dense;
}

.proj-item {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  border-radius: 4px;
}

.proj-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.proj-item:hover img { transform: scale(1.06); }

.proj-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,30,18,.8) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: var(--transition);
}

.proj-item:hover .proj-overlay { opacity: 1; }

.proj-overlay span {
  color: var(--white);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.proj-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
}

.proj-cta-card {
  background: var(--green);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.proj-cta-card p {
  color: rgba(255,255,255,.9);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

.proj-cta-card .btn-primary {
  background: var(--white);
  color: var(--green);
  box-shadow: none;
  font-size: .88rem;
  padding: 10px 22px;
}

.proj-cta-card .btn-primary:hover {
  background: var(--off-white);
  transform: translateY(-2px);
}

/* ── Branches / Sucursales ──────────────────────── */
.branches-section { background: var(--off-white); }

.branches-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 24px;
  align-items: start;
}

.branch-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.branch-card:hover { box-shadow: var(--shadow-md); }

.branch-card--main {
  border-color: var(--green);
  border-width: 2px;
}

.branch-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.branch-card--main .branch-header {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-mid) 100%);
  border-bottom: none;
}

.branch-card--main .branch-header .branch-city,
.branch-card--main .branch-header .branch-tag,
.branch-card--main .branch-icon { color: var(--white); }
.branch-card--main .branch-icon { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.15); }

.branch-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--green);
  background: var(--green-fade);
}

.branch-tag {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.branch-card--main .branch-tag { color: rgba(255,255,255,.75); }

.branch-city {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.2;
}

.branch-body {
  padding: 20px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.branch-address, .branch-phone {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.4;
}

.branch-address svg, .branch-phone svg { flex-shrink: 0; margin-top: 2px; color: var(--green); }

.branch-note {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.5;
}

.branch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.btn-sm {
  padding: 9px 18px;
  font-size: .85rem;
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--green);
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-outline:hover {
  background: var(--green);
  color: var(--white);
}

.branch-map {
  height: 220px;
  overflow: hidden;
}

.branch-map iframe {
  width: 100%; height: 100%;
  border: none;
  display: block;
}

.branch-map .map-placeholder {
  height: 100%;
  border-radius: 0;
}

/* ── Gallery ─────────────────────────────────────────── */
.gallery-section { background: var(--dark); padding-bottom: 80px; }
.gallery-section .section-header { padding-bottom: 0; margin-bottom: 40px; }
.gallery-section .section-label { color: #7dcea0; }
.gallery-section .section-title { color: var(--white); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 280px 320px;
  gap: 6px;
  padding: 0 6px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-item--wide { grid-column: span 2; }
.gallery-item--tall { grid-row: span 2; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,30,18,.75) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay span {
  color: var(--white);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── Trust / Nosotros ────────────────────────────────── */
.trust-section { background: var(--white); }

.trust-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.trust-visual {
  position: relative;
}

.trust-img-wrap {
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.trust-img { object-position: center; }

.trust-badge-card {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  min-width: 180px;
}

.trust-badge-card svg { flex-shrink: 0; color: #7dcea0; }

.trust-badge-card div {
  display: flex;
  flex-direction: column;
}

.trust-badge-card strong {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.trust-badge-card span {
  font-size: .75rem;
  opacity: .8;
  margin-top: 2px;
}

.trust-text {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 18px;
  line-height: 1.7;
}

.trust-text strong { color: var(--dark); }

.trust-slogan {
  display: flex;
  gap: 0;
  flex-direction: column;
  margin: 28px 0 32px;
  border-left: 3px solid var(--green);
  padding-left: 18px;
}

.slogan-line {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
}

/* ── Contact ─────────────────────────────────────────── */
.contact-section { background: var(--off-white); }

.contact-grid {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  transition: var(--transition);
}

.contact-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-dark);
}

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon--green { background: rgba(26,79,46,.1); color: var(--green); }
.contact-icon--dark  { background: var(--light); color: var(--mid); }

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 600;
}

.contact-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--dark);
}

.contact-link { color: var(--green-mid); }
.contact-link:hover { text-decoration: underline; }

.social-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.social-label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 600;
}

.social-links { display: flex; gap: 10px; }

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 9px 16px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--mid);
  transition: var(--transition);
}
.social-btn:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.map-wrap {
  height: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.map-wrap iframe { width: 100%; height: 100%; }

/* ── Footer ──────────────────────────────────────────── */
.footer {
  background: var(--dark-2);
  padding: 56px 20px 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 40px;
  align-items: start;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 24px;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.footer-name {
  font-weight: 700;
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.footer-loc {
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  margin-bottom: 4px;
}

.footer-slogan {
  font-family: var(--font-display);
  font-size: .85rem;
  color: rgba(255,255,255,.35);
  font-style: italic;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav a {
  font-size: .88rem;
  color: rgba(255,255,255,.55);
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--white); }

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-social a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: rgba(255,255,255,.55);
  transition: color var(--transition);
}
.footer-social a:hover { color: #7dcea0; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: .8rem;
  color: rgba(255,255,255,.35);
}

.footer-email {
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  transition: color var(--transition);
}
.footer-email:hover { color: #7dcea0; }

/* ── WhatsApp Float ──────────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 900;
  width: 58px;
  height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 6px 24px rgba(37,211,102,.5);
  transition: var(--transition);
}

.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 36px rgba(37,211,102,.65);
}

.wa-float-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  animation: waPulse 2.5s ease-out infinite;
  z-index: -1;
}

@keyframes waPulse {
  0%   { opacity: .6; transform: scale(1); }
  70%  { opacity: 0;  transform: scale(1.7); }
  100% { opacity: 0;  transform: scale(1.7); }
}

/* ── Hamburger animation (moved from JS) ──────────── */
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-link.active { color: var(--green) !important; }

/* ── Lightbox nav buttons ───────────────────────── */
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background .2s;
  font-size: 1.4rem;
  line-height: 1;
  user-select: none;
}
.lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* ── Map lazy placeholder ───────────────────────── */
.map-placeholder {
  width: 100%; height: 100%;
  background: var(--light);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius-lg);
  transition: background var(--transition);
}
.map-placeholder:hover { background: var(--border); }
.map-placeholder svg { color: var(--green); }
.map-placeholder span { font-size: .9rem; font-weight: 500; }

/* ── Animations on Scroll ────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .trust-container {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .trust-visual { max-width: 500px; margin: 0 auto; }

  .contact-grid { grid-template-columns: 1fr; }
  .map-wrap { height: 360px; }

  /* Projects grid */
  .proj-panel { flex-direction: column; }
  .proj-sidebar { width: 100%; position: static; }
  
  .proj-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
  }

  /* Branches */
  .branches-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .section-header { margin-bottom: 40px; }

  /* Navbar mobile */
  .nav-toggle { display: flex; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    padding: 16px 20px 24px;
    box-shadow: var(--shadow-md);
    gap: 4px;
  }

  .nav-menu.open { display: flex; }

  .nav-link { padding: 12px 16px; }
  .navbar:not(.scrolled) .nav-link { color: var(--dark); }

  .btn-nav {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
  }

  /* Hero */
  .hero-content {
    margin: 0;
    padding: 120px 24px 80px;
  }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 200px 200px;
    gap: 4px;
    padding: 0 4px;
  }

  .gallery-item--wide { grid-column: span 2; }
  .gallery-item--tall { grid-row: span 1; }

  /* Trust */
  .trust-badge-card {
    right: 10px;
    bottom: -14px;
    min-width: auto;
    padding: 12px 16px;
  }

  /* Services grid */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Projects */
  .proj-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 180px;
  }
  .proj-tabs { gap: 8px; }
  .proj-tab { padding: 8px 16px; font-size: .82rem; }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-nav, .footer-social { flex-direction: row; flex-wrap: wrap; gap: 12px; }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .gallery-item--wide { grid-column: span 1; }
  .gallery-item { height: 240px; }

  .slogan-line { font-size: 1.2rem; }

  .footer-top { gap: 20px; }
}

/* ── Accesibilidad: reduced motion ───────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .hero-img { animation: none; transform: scale(1); }
  .badge-dot { animation: none; }
  .hero-scroll { animation: none; }
  .wa-float-pulse { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
