/* ===================================================
   GOVER — Constructora | Stylesheet
   =================================================== */

:root {
  /* Brand palette sampled directly from the official GOVER logo
     (charcoal #3e3e3e background, red #d6091f accent). The ink/paper
     tones are neutral warm-grays derived from that same charcoal so
     every dark surface on the site reads as "the same gray" as the mark. */
  --ink: #1b1a1a;
  --ink-soft: #262424;
  --charcoal: #3e3e3e;
  --slate: #55524f;
  --slate-light: #86817c;
  --paper: #f6f5f3;
  --paper-alt: #ece9e4;
  --white: #ffffff;
  --brand: #d6091f;
  --brand-dark: #a30717;
  --brand-light: #ff3b4e;
  --safety: #ff6b35;
  --whatsapp: #25d366;
  --whatsapp-dark: #1ebe59;
  --whatsapp-darker: #179c49;
  --line: rgba(27, 26, 26, 0.1);

  --font-display: 'Archivo', sans-serif;
  --font-body: 'Inter', sans-serif;

  --container: 1240px;
  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(27, 26, 26, 0.08);
  --shadow-md: 0 10px 30px rgba(27, 26, 26, 0.12);
  --shadow-lg: 0 25px 60px rgba(27, 26, 26, 0.3);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ===================================================
   SCROLL-REVEAL ANIMATIONS
   =================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 0.8, 0.24, 1),
              transform 0.7s cubic-bezier(0.16, 0.8, 0.24, 1);
  will-change: opacity, transform;
}
[data-reveal="left"],
[data-reveal][data-reveal-dir="left"] { transform: translateY(20px) translateX(-34px); }
[data-reveal][data-reveal-dir="right"] { transform: translateY(20px) translateX(34px); }
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0) translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--brand);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(214, 9, 31, 0.35);
}
.btn-primary:hover { background: var(--brand-dark); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); }

.btn-whatsapp {
  background: var(--whatsapp);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}
.btn-whatsapp:hover { background: var(--whatsapp-dark); }

.btn-lg { padding: 16px 30px; font-size: 1.02rem; }

/* ---------- Section headings ---------- */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-dark);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  max-width: 720px;
}
.section-lead {
  margin-top: 14px;
  font-size: 1.05rem;
  color: var(--slate);
  max-width: 620px;
  line-height: 1.6;
}

/* ===================================================
   HEADER
   =================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: rgba(27, 26, 26, 0.75);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(27, 26, 26, 0.94);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand { display: flex; align-items: center; }
.brand-logo {
  height: 34px;
  width: auto;
  transition: transform 0.3s ease, filter 0.3s ease;
}
.brand:hover .brand-logo { transform: scale(1.04); }

.nav {
  display: flex;
  gap: 32px;
  font-weight: 600;
  font-size: 0.94rem;
}
.nav a {
  color: rgba(255, 255, 255, 0.82);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.nav a:hover { color: var(--brand-light); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav a.nav-emergency { color: var(--safety); }
.nav a.nav-emergency::after { background: var(--safety); }
.nav a.nav-emergency:hover { color: #ff8659; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ===================================================
   HERO
   =================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  animation: kenburns 16s ease-out forwards;
}
@keyframes kenburns {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,18,17,0.55) 0%, rgba(20,18,17,0.55) 40%, rgba(20,18,17,0.92) 100%),
    linear-gradient(90deg, rgba(20,18,17,0.85) 0%, rgba(20,18,17,0.35) 60%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 140px;
  padding-bottom: 90px;
  max-width: 780px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 20px;
  opacity: 0;
  animation: heroFadeUp 0.8s 0.1s cubic-bezier(0.16, 0.8, 0.24, 1) forwards;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--brand);
  display: inline-block;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  color: var(--white);
  opacity: 0;
  animation: heroFadeUp 0.9s 0.22s cubic-bezier(0.16, 0.8, 0.24, 1) forwards;
}
.hero h1 span { color: var(--brand); }
.hero-sub {
  font-size: 1.14rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 34px;
  opacity: 0;
  animation: heroFadeUp 0.9s 0.36s cubic-bezier(0.16, 0.8, 0.24, 1) forwards;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 56px;
  opacity: 0;
  animation: heroFadeUp 0.9s 0.5s cubic-bezier(0.16, 0.8, 0.24, 1) forwards;
}

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

.hero-stats {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding: 28px 0 0;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  opacity: 0;
  animation: heroFadeUp 0.9s 0.64s cubic-bezier(0.16, 0.8, 0.24, 1) forwards;
}
.hero-stats li { display: flex; flex-direction: column; gap: 4px; }
.hero-stats strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--white);
  font-weight: 800;
}
.hero-stats span { font-size: 0.86rem; color: rgba(255,255,255,0.65); }

.scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.7);
  animation: bounce 2.2s infinite;
}
.scroll-cue svg { width: 26px; height: 26px; }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===================================================
   TRUST BAR (marquee)
   =================================================== */
.trustbar {
  background: var(--ink);
  overflow: hidden;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.trustbar-inner {
  display: flex;
  gap: 18px;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  animation: marquee 26s linear infinite;
  width: max-content;
}
.trustbar-inner span:nth-child(odd) { color: var(--brand); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===================================================
   SERVICES
   =================================================== */
.services { padding: clamp(64px, 11vw, 100px) 0 clamp(56px, 9vw, 90px); background: var(--paper); }
.services-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.6s cubic-bezier(0.16, 0.8, 0.24, 1),
              transform 0.35s ease, box-shadow 0.35s ease;
  border: 1px solid var(--line);
}
.service-card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: var(--shadow-md);
}
.service-img { height: 190px; overflow: hidden; }
.service-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.service-card:hover .service-img img { transform: scale(1.08); }
.service-body { padding: 24px 22px 28px; }
.service-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.82rem;
  color: var(--brand-dark);
  letter-spacing: 0.05em;
}
.service-body h3 {
  font-size: 1.14rem;
  font-weight: 800;
  margin: 10px 0 10px;
}
.service-body p {
  font-size: 0.92rem;
  color: var(--slate);
  line-height: 1.55;
}

/* Specialty services — condensed list of additional work types */
.specialty-services {
  margin-top: 44px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.specialty-eyebrow {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 18px;
}
.specialty-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 20px;
}
.specialty-grid li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}
.specialty-grid svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--brand-dark);
}

/* ===================================================
   EMERGENCY
   =================================================== */
.emergency {
  position: relative;
  background: var(--ink);
  color: var(--white);
  padding: clamp(56px, 10vw, 90px) 0;
  overflow: hidden;
}
.emergency::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255, 107, 53, 0.07) 0 14px, transparent 14px 28px);
  pointer-events: none;
}
.emergency-inner { position: relative; z-index: 1; max-width: 760px; }
.emergency-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 107, 53, 0.14);
  border: 1px solid rgba(255, 107, 53, 0.4);
  color: var(--safety);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.emergency-badge svg { width: 15px; height: 15px; }
.emergency-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 16px;
}
.emergency-lead {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
  max-width: 600px;
  margin-bottom: 32px;
}
.emergency-list {
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 24px;
}
.emergency-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}
.emergency-list li::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--safety);
  flex-shrink: 0;
}
.emergency-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.btn-emergency {
  background: var(--safety);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(255, 107, 53, 0.35);
}
.btn-emergency:hover { background: #e0561f; }
.btn-call {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.btn-call:hover { background: rgba(255, 255, 255, 0.18); }

/* ===================================================
   ABOUT
   =================================================== */
.about { padding: clamp(60px, 11vw, 96px) 0; background: var(--paper-alt); }
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}
.about-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/5;
}
.about-media img { width: 100%; height: 100%; object-fit: cover; }

.feature-list {
  list-style: none;
  margin: 34px 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 24px;
}
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(214, 9, 31, 0.14);
  color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-list h4 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.feature-list p {
  font-size: 0.86rem;
  color: var(--slate);
  line-height: 1.5;
}

.about-highlight {
  border-left: 3px solid var(--brand);
  background: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 22px 26px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}
.about-highlight p {
  font-size: 0.92rem;
  color: var(--slate);
  line-height: 1.6;
}
.about-highlight blockquote {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
  font-style: italic;
}
.about-highlight blockquote::before { content: "\201C"; }
.about-highlight blockquote::after { content: "\201D"; }

/* ===================================================
   GALLERY
   =================================================== */
.gallery { padding: clamp(64px, 11vw, 100px) 0 clamp(64px, 11vw, 110px); background: var(--paper); }

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 40px 0 34px;
}
.filter-btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--slate);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: var(--brand); color: var(--ink); }
.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 12px;
}
.g-item {
  position: relative;
  padding: 0; border: none;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--ink);
  display: block;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.g-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.45s ease, opacity 0.3s ease;
}
.g-item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.g-item::before {
  content: "";
  position: absolute; inset: 0;
  border: 2px solid var(--brand);
  border-radius: 10px;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 2;
}
.g-item:hover img { transform: scale(1.09); }
.g-item:hover::after { opacity: 1; }
.g-item:hover::before { opacity: 1; transform: scale(1); }
.g-item.is-filtered-out {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}
.g-item.is-hidden { display: none; }

/* feature sizing for a masonry-ish feel */
.gallery-grid .g-item:nth-child(1),
.gallery-grid .g-item:nth-child(8) { grid-column: span 2; grid-row: span 2; }

/* ===================================================
   CTA BANNER
   =================================================== */
.cta-banner {
  position: relative;
  padding: clamp(72px, 16vw, 130px) 0;
  color: var(--white);
  text-align: center;
  overflow: hidden;
}
.cta-banner .hero-media img {
  object-position: center 65%;
  animation: kenburnsLoop 18s ease-in-out infinite alternate;
}
@keyframes kenburnsLoop {
  from { transform: scale(1); }
  to { transform: scale(1.09); }
}
.cta-content {
  position: relative; z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.cta-content h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 900;
  color: var(--white);
}
.cta-content p {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  line-height: 1.6;
}
.cta-content .btn { margin-top: 10px; }

/* ===================================================
   FOOTER
   =================================================== */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding: clamp(48px, 9vw, 76px) 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
  max-width: 280px;
}
.footer-brand .footer-tagline {
  margin-top: 8px;
  font-weight: 700;
  color: var(--brand-light);
}
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h5 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}
.footer-col a, .footer-col span {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.68);
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  padding: 26px 24px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

/* ===================================================
   WHATSAPP — shared dropdown menu (header + floating widget)
   =================================================== */
.wa-menu {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 0.8, 0.24, 1), visibility 0.22s;
  transform-origin: bottom right;
}
.wa-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.wa-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.18s ease;
  white-space: nowrap;
}
.wa-menu-item:hover { background: var(--paper-alt); }
.wa-menu-icon {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--whatsapp);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
}
.wa-menu-icon svg { width: 18px; height: 18px; }
.wa-menu-icon.icon-call { background: var(--safety); }
.wa-menu-text { display: flex; flex-direction: column; line-height: 1.35; }
.wa-menu-text strong { font-size: 0.92rem; color: var(--ink); font-weight: 700; }
.wa-menu-text small { font-size: 0.78rem; color: var(--slate); }

/* Header WhatsApp dropdown */
.header-wa { position: relative; }
.header-wa .btn-whatsapp {
  background: var(--whatsapp-dark);
  box-shadow: 0 8px 20px rgba(30, 190, 89, 0.35);
}
.header-wa .btn-whatsapp:hover { background: var(--whatsapp-darker); }
.header-wa-chevron { width: 14px; height: 14px; transition: transform 0.25s ease; margin-left: -2px; }
.header-wa .btn[aria-expanded="true"] .header-wa-chevron { transform: rotate(180deg); }
.header-wa .wa-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 260px;
  z-index: 10;
}

/* ===================================================
   WHATSAPP FLOATING WIDGET
   =================================================== */
.wa-widget {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}
.fab-item { position: relative; }
.wa-menu-float {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  min-width: 250px;
}

.wa-float {
  position: relative;
  width: 62px; height: 62px;
  background: var(--whatsapp);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.45);
  transition: transform 0.25s ease, background 0.25s ease;
  cursor: pointer;
}
.wa-float svg { width: 28px; height: 28px; position: relative; z-index: 2; }
.wa-float:hover { transform: scale(1.08); }
.wa-float .wa-icon-close { display: none; position: absolute; }
.wa-float[aria-expanded="true"] { background: var(--ink); }
.wa-float[aria-expanded="true"] .wa-icon-chat { display: none; }
.wa-float[aria-expanded="true"] .wa-icon-close { display: block; }
.wa-float[aria-expanded="true"] .wa-pulse { display: none; }

.wa-pulse {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--whatsapp);
  opacity: 0.55;
  animation: pulse 2.2s ease-out infinite;
  z-index: 1;
}

/* Emergency FAB — stacked above the WhatsApp float, mobile only:
   the dedicated Emergencias section already covers this on desktop. */
.fab-emergency { display: none; }
.emergency-float {
  background: var(--safety);
  box-shadow: 0 10px 26px rgba(255, 107, 53, 0.45);
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* ===================================================
   LIGHTBOX
   =================================================== */
.lightbox {
  position: fixed; inset: 0;
  z-index: 999;
  background: rgba(15, 14, 13, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(90vw, 1100px);
  max-height: 86vh;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  animation: fadeScale 0.3s cubic-bezier(0.16, 0.8, 0.24, 1);
}
.lightbox img.slide-next { animation: slideInRight 0.3s cubic-bezier(0.16, 0.8, 0.24, 1); }
.lightbox img.slide-prev { animation: slideInLeft 0.3s cubic-bezier(0.16, 0.8, 0.24, 1); }
@keyframes fadeScale {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
.lb-close, .lb-nav {
  position: fixed;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--white);
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,0.2); }
.lb-nav:hover { transform: translateY(-50%) scale(1.1); }
.lb-close:hover { transform: rotate(90deg); }
.lb-close {
  top: 26px; right: 26px;
  width: 46px; height: 46px;
  font-size: 1.8rem;
  line-height: 1;
}
.lb-nav {
  top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  font-size: 2rem;
}
.lb-prev { left: 26px; }
.lb-next { right: 26px; }

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 1080px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .specialty-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 180px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-media { aspect-ratio: 16/10; }
  .feature-list { grid-template-columns: 1fr; }
  .hero-stats { gap: 26px; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  /* WhatsApp is already available via the floating widget on small screens,
     so the header button is hidden to keep the bar tidy. */
  .header-actions { display: none; }
  .brand-logo { height: 28px; }
  .hero-content { padding-top: 112px; padding-bottom: 48px; }
  .hero-sub { font-size: 1.02rem; margin-bottom: 28px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; margin-bottom: 40px; }
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 16px;
  }
  .services-grid { grid-template-columns: 1fr; }
  .service-img { height: 200px; }
  .specialty-grid { grid-template-columns: 1fr; }
  .about-highlight { padding: 18px 20px; }
  .emergency-list { grid-template-columns: 1fr; }
  .emergency-actions { flex-direction: column; }
  .emergency-actions .btn { width: 100%; justify-content: center; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; gap: 8px; }
  .gallery-grid .g-item:nth-child(1),
  .gallery-grid .g-item:nth-child(8) { grid-column: span 2; grid-row: span 1; }
  .gallery-filters {
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .gallery-filters::-webkit-scrollbar { display: none; }
  .filter-btn { padding: 8px 14px; font-size: 0.82rem; flex: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { padding: 22px 24px 160px; }
  .wa-widget {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }
  .wa-float { width: 54px; height: 54px; }
  .wa-float svg { width: 25px; height: 25px; }
  .wa-menu-float { min-width: min(78vw, 260px); }
  .fab-emergency { display: block; }
  .lightbox { padding: 16px; }
  .lb-nav { width: 42px; height: 42px; font-size: 1.6rem; top: auto; bottom: 16px; transform: none; }
  .lb-nav:hover { transform: scale(1.1); }
  .lb-prev { left: 16px; } .lb-next { right: 16px; }
  .lb-close { top: 14px; right: 14px; width: 40px; height: 40px; }
}

@media (max-width: 400px) {
  .brand-logo { height: 24px; }
  .eyebrow { font-size: 0.72rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .hero-stats strong { font-size: 0.94rem; }
  .btn-lg { padding: 14px 22px; font-size: 0.96rem; }
  .section-title { font-size: 1.5rem; }
  .gallery-grid { grid-auto-rows: 120px; }
}

/* Mobile nav open state — a solid, full-height panel so page content
   never shows through the gap below the link list (fixed positioning
   is contained by the header because of its backdrop-filter, so the
   panel's height is sized with viewport units rather than `bottom:0`). */
.nav.is-open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 65px; left: 0; right: 0;
  height: calc(100vh - 65px);
  height: calc(100dvh - 65px);
  background: var(--ink);
  padding: 6px 24px 28px;
  gap: 2px;
  overflow-y: auto;
  animation: navPanelIn 0.3s ease both;
}
@keyframes navPanelIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav.is-open a {
  padding: 16px 4px;
  font-size: 1.06rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  opacity: 0;
  transform: translateY(-8px);
  animation: navItemIn 0.4s cubic-bezier(0.16, 0.8, 0.24, 1) forwards;
}
.nav.is-open a:nth-child(1) { animation-delay: 0.06s; }
.nav.is-open a:nth-child(2) { animation-delay: 0.11s; }
.nav.is-open a:nth-child(3) { animation-delay: 0.16s; }
.nav.is-open a:nth-child(4) { animation-delay: 0.21s; }
@keyframes navItemIn {
  to { opacity: 1; transform: translateY(0); }
}

.nav-wa-cta { display: none; }
.nav.is-open .nav-wa-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding: 15px 18px;
  border-radius: 999px;
  border-bottom: none;
  background: var(--whatsapp-dark);
  color: var(--white);
  font-weight: 700;
  font-size: 0.98rem;
  animation-delay: 0.26s;
}
.nav.is-open .nav-wa-cta:hover { background: var(--whatsapp-darker); }
.nav-wa-cta svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-toggle span { transition: transform 0.3s ease, opacity 0.2s ease; }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
