﻿/* ============================================
   JyL Construcciones - Estilos v2
   Mobile-First | Dark Elegant | Animaciones Avanzadas
   ============================================ */

/* ==================== RESET ==================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Red de seguridad para los anclas: el header es fixed y ocupa 80px, así que
   un salto nativo (URL con #servicios, o JS desactivado) dejaría el título
   del section tapado detrás del header. El JS ya descuenta los 80px a mano,
   pero si falla este bloque es lo único que evita el solapamiento. */
section[id] {
  scroll-margin-top: 88px;
}

/* ==================== SKIP LINK ==================== */
/* Sólo visible al recibir foco con el teclado: permite saltar el header y
   la navegación para llegar directo al contenido. */
.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 200;
  padding: 12px 18px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  background-color: var(--accent);
  color: var(--text-on-accent);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: top 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 8px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: #e8e4de;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ==================== VARIABLES / TEMA OSCURO (por defecto) ==================== */
:root {
  /* --- Marca (idÃ©ntica en ambos temas) --- */
  --color-primary: #c8953c;
  --color-primary-light: #daa84e;
  --color-primary-dark: #a67830;
  --color-accent: #d4542a;
  --color-whatsapp: #25d366;
  --color-whatsapp-hover: #1ebe57;
  --color-navy: #1a2942;

  /* --- Superficies --- */
  --bg: #0f0f0f;
  --bg-card: #1a1a1a;
  --bg-elevated: #222222;
  --bg-footer: #0a0a0a;
  --bg-header: rgba(15, 15, 15, 0.92);
  --bg-nav-mobile: rgba(15, 15, 15, 0.97);
  --bg-soft: #141210;
  --hero-base-1: #121212;
  --hero-base-2: #1a1a1a;
  --hero-tint-1: rgba(200, 149, 60, 0.25);
  --hero-tint-2: rgba(26, 41, 66, 0.8);
  --hero-tint-3: rgba(200, 149, 60, 0.15);
  --glow-1: rgba(200, 149, 60, 0.30);
  --glow-2: rgba(212, 84, 42, 0.20);
  --glass-bg: rgba(15, 15, 15, 0.55);
  --glass-bg-strong: rgba(15, 15, 15, 0.72);
  --badge-bg: rgba(26, 26, 26, 0.72);

  /* --- Texto --- */
  --text: #e8e4de;
  --text-strong: #ffffff;
  --text-muted: #9a9590;
  --text-accent: #daa84e;   /* dorado legible sobre fondo oscuro */
  --text-on-accent: #0f0f0f;
  --badge-text: #f0e7d8;

  /* --- Bordes y sombras --- */
  --color-border: rgba(200, 149, 60, 0.15);
  --border-strong: rgba(200, 149, 60, 0.28);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-soft: 0 6px 24px rgba(0, 0, 0, 0.45);

  /* --- TipografÃ­a, radios y transiciones --- */
  --font-heading: 'Bebas Neue', 'Arial Black', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: all 0.3s ease;
  --max-width: 1200px;
}

/* ==================== TEMA CLARO ==================== */
[data-theme="light"] {
  --bg: #f6f3ee;
  --bg-card: #ffffff;
  --bg-elevated: #fffdf9;
  --bg-footer: #ece6dc;
  --bg-header: rgba(255, 255, 255, 0.9);
  --bg-nav-mobile: rgba(246, 243, 238, 0.97);
  --bg-soft: #f0eae0;
  --hero-base-1: #fbf8f3;
  --hero-base-2: #f0e8da;
  --hero-tint-1: rgba(200, 149, 60, 0.32);
  --hero-tint-2: rgba(26, 41, 66, 0.10);
  --hero-tint-3: rgba(212, 84, 42, 0.14);
  --glow-1: rgba(200, 149, 60, 0.38);
  --glow-2: rgba(212, 84, 42, 0.16);
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-bg-strong: rgba(255, 255, 255, 0.9);
  --badge-bg: rgba(255, 255, 255, 0.86);

  --text: #33302c;
  --text-strong: #14120f;
  --text-muted: #6d6862;
  --text-accent: #8a5f1a;   /* dorado oscurecido: mantiene contraste AA */
  --text-on-accent: #ffffff;
  --badge-text: #4a443c;

  --color-border: rgba(200, 149, 60, 0.28);
  --border-strong: rgba(200, 149, 60, 0.45);
  --shadow-card: 0 4px 20px rgba(80, 60, 30, 0.10);
  --shadow-elevated: 0 10px 40px rgba(80, 60, 30, 0.14);
  --shadow-soft: 0 6px 20px rgba(80, 60, 30, 0.10);
}

/* ==================== UTILITIES ==================== */
.section__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section__header {
  text-align: center;
  margin-bottom: 48px;
}

.section__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-accent);
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 8vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: 1px;
  color: var(--text-strong);
}

.text-accent {
  color: var(--text-accent);
}

/* ==================== HEADER ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
  background: transparent;
}

.header.scrolled {
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.header__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  /* Permite que la columna de texto se encoja en pantallas angostas */
  min-width: 0;
  flex: 0 1 auto;
}

.header__logo-icon {
  width: 48px;
  height: 48px;
  background-color: var(--color-navy);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header__logo-icon span {
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
}

.header__logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Sin esto el texto conserva su ancho intrínseco y desborda sobre el menú */
  min-width: 0;
}

.header__logo-title {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1.2;
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header__logo-sub {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header__nav {
  display: none;
  gap: 32px;
}

.header__nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition);
}

.header__nav-link:hover {
  color: var(--text-strong);
}

.header__nav-link:hover::after {
  width: 100%;
}

.header__menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  /* Objetivo táctil de 48x48 (antes 40x30) */
  width: 48px;
  height: 48px;
  padding: 0;
}

.header__menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

.header__menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.header__menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.header__menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== ACCIONES DEL HEADER + THEME TOGGLE ==================== */
.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  /* El toggle y el menú nunca se comprimen: la marca cede espacio */
  flex-shrink: 0;
}

.theme-toggle {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--glass-bg);
  color: var(--text);
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(200, 149, 60, 0.18);
}

.theme-toggle__icon {
  position: absolute;
  width: 20px;
  height: 20px;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

/* Tema oscuro: se muestra la luna */
.theme-toggle__icon--sun  { transform: rotate(-70deg) scale(0.3); opacity: 0; }
.theme-toggle__icon--moon { transform: rotate(0deg) scale(1);     opacity: 1; }

/* Tema claro: se muestra el sol */
[data-theme="light"] .theme-toggle__icon--sun  { transform: rotate(0deg) scale(1);     opacity: 1; }
[data-theme="light"] .theme-toggle__icon--moon { transform: rotate(70deg) scale(0.3);  opacity: 0; }

/* Foco visible para navegación por teclado */
.theme-toggle:focus-visible,
.header__menu-btn:focus-visible,
.btn:focus-visible,
.social-btn:focus-visible,
.map-frame__cta:focus-visible,
.about__carousel-toggle:focus-visible,
.gallery__filter:focus-visible,
.gallery-card__view:focus-visible,
.gallery-card__cta:focus-visible,
.lightbox__btn:focus-visible,
.footer__links a:focus-visible,
.service-card__cta:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Mobile Nav Overlay */
.header__nav.mobile-open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-nav-mobile);
  backdrop-filter: blur(20px);
  justify-content: center;
  align-items: center;
  gap: 40px;
  z-index: 999;
}

.header__nav.mobile-open .header__nav-link {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--text-strong);
  letter-spacing: 2px;
}

/* ==================== HERO ==================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 20% 50%, var(--hero-tint-1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, var(--hero-tint-2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, var(--hero-tint-3) 0%, transparent 50%),
    linear-gradient(135deg, var(--hero-base-1) 0%, var(--hero-base-2) 50%, var(--hero-base-1) 100%);
  background-size: 200% 200%;
  animation: moveGradient 12s ease-in-out infinite alternate;
  overflow: hidden;
}

@keyframes moveGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 50% 100%;
  }
}

/* Canvas Particles */
.hero__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ==================== HERO GLOW (dorado/Ã¡mbar en movimiento) ==================== */
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__glow::before,
.hero__glow::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.hero__glow::before {
  width: 62vw;
  height: 62vw;
  max-width: 620px;
  max-height: 620px;
  top: -16%;
  left: -12%;
  background: radial-gradient(circle, var(--glow-1) 0%, transparent 68%);
  animation: glowDriftA 18s ease-in-out infinite alternate;
}

.hero__glow::after {
  width: 54vw;
  height: 54vw;
  max-width: 560px;
  max-height: 560px;
  bottom: -18%;
  right: -10%;
  background: radial-gradient(circle, var(--glow-2) 0%, transparent 68%);
  animation: glowDriftB 22s ease-in-out infinite alternate;
}

@keyframes glowDriftA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(14%, 12%, 0) scale(1.16); }
}

@keyframes glowDriftB {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-12%, -10%, 0) scale(1); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, var(--hero-tint-3) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, var(--hero-tint-2) 0%, transparent 50%);
  z-index: 1;
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* Malla geomÃ©trica premium en movimiento */
.hero__overlay::after {
  content: '';
  position: absolute;
  inset: -35%;
  background-image:
    linear-gradient(rgba(200, 149, 60, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 149, 60, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 15%, transparent 68%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000 15%, transparent 68%);
  animation: meshDrift 40s linear infinite;
  will-change: transform;
  pointer-events: none;
}

@keyframes meshDrift {
  to { transform: translate3d(64px, 64px, 0); }
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 110px 20px 96px;
  max-width: 700px;
}

.hero__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-accent);
  margin-bottom: 20px;
  padding: 8px 20px;
  border: 1px solid var(--color-border);
  border-radius: 100px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 12vw, 6rem);
  line-height: 0.95;
  color: var(--text-strong);
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.hero__highlight {
  color: var(--text-accent);
  position: relative;
}

/* ==================== TYPEWRITER EFFECT ==================== */
.typewriter-cursor {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 100;
  animation: blink 0.7s step-end infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero__subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero__buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* ==================== HERO ENTRANCE (progresivo) ==================== */
@keyframes heroSlideUp {
  from { opacity: 0; transform: translate3d(0, 32px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

[data-anim="hero"] {
  opacity: 0;
  animation: heroSlideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0ms);
  will-change: transform, opacity;
}

/* ==================== HERO BADGES (placas flotantes) ==================== */
.hero__badges {
  position: static;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
  pointer-events: none;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--badge-text);
  background: var(--badge-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(200, 149, 60, 0.28);
  border-radius: 100px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  max-width: 100%;
  text-align: left;
  animation: badgeFloat 6s ease-in-out infinite;
  will-change: transform;
}

.hero__badge--b { animation-delay: -2s; }
.hero__badge--c { animation-delay: -4s; }

.hero__badge-icon {
  font-size: 0.95rem;
  line-height: 1;
  color: var(--color-primary);
  flex-shrink: 0;
}

@keyframes badgeFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -9px, 0); }
}

/* ==================== BUTTONS (Ripple + Glow) ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

/* Shine sweep - destello diagonal refinado al hover */
.btn::after {
  content: '';
  position: absolute;
  top: -20%;
  left: -150%;
  width: 55%;
  height: 140%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 35%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0.18) 65%,
    transparent 100%
  );
  transform: skewX(-18deg);
  transition: left 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 4;
}

.btn:hover::after,
.btn:focus-visible::after {
  left: 150%;
}

.btn:hover,
.btn:focus-visible {
  will-change: transform, box-shadow;
}

/* Ripple effect container */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out forwards;
  pointer-events: none;
  z-index: 5;
}

@keyframes rippleAnim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.btn--whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
  min-width: 220px;
}

.btn--whatsapp:hover {
  background: var(--color-whatsapp-hover);
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 10px 30px rgba(37, 211, 102, 0.4),
    0 0 0 1px rgba(37, 211, 102, 0.35),
    0 0 24px rgba(37, 211, 102, 0.25),
    0 0 60px rgba(37, 211, 102, 0.15);
}

.btn--whatsapp:hover .btn__icon {
  animation: iconBounce 0.5s ease;
}

.btn--call {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  min-width: 220px;
}

.btn--call:hover {
  background: var(--color-primary);
  color: var(--text-on-accent);
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 10px 30px rgba(200, 149, 60, 0.4),
    0 0 0 1px rgba(200, 149, 60, 0.35),
    0 0 24px rgba(200, 149, 60, 0.25),
    0 0 60px rgba(200, 149, 60, 0.15);
}

.btn--call:hover .btn__icon {
  animation: iconBounce 0.5s ease;
}

.btn--primary {
  background: var(--color-whatsapp);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-whatsapp-hover);
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 24px rgba(37, 211, 102, 0.35),
    0 0 0 2px rgba(37, 211, 102, 0.2),
    0 0 30px rgba(37, 211, 102, 0.15);
}

.btn--primary:hover .btn__icon {
  animation: iconBounce 0.5s ease;
}

.btn--full {
  width: 100%;
}

/* Icon bounce animation */
@keyframes iconBounce {
  0% { transform: translateY(0); }
  20% { transform: translateY(-4px) rotate(-8deg); }
  40% { transform: translateY(0) rotate(4deg); }
  60% { transform: translateY(-2px) rotate(-2deg); }
  80% { transform: translateY(0) rotate(1deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

/* ==================== SERVICES ==================== */
.services {
  padding: 80px 0;
  background: var(--bg);
  position: relative;
}

.services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-border), transparent);
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  /* Todas las filas con la misma altura: cada tarjeta estira y su botón
     "Solicitar presupuesto" queda alineado a la misma Y en toda la grilla. */
  grid-auto-rows: 1fr;
  align-items: stretch;
}

/* ==================== SERVICE CARD (3D + Spotlight) ==================== */
.service-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  position: relative;
  /* (1) La tarjeta es una columna flex: la imagen arriba, el cuerpo abajo. */
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.15s ease-out;
}

/* Glass Flash - destello diagonal al hover */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.07) 45%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.07) 55%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  z-index: 3;
  pointer-events: none;
  border-radius: var(--radius-lg);
}

.service-card:hover::before {
  transform: translateX(100%);
}

/* Mouse Spotlight Glow */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(200, 149, 60, 0.18) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.service-card:hover::after {
  opacity: 1;
}

/* Borde brillante sutil en hover */
.service-card:hover {
  border-color: rgba(255, 165, 0, 0.4);
  box-shadow: 0 0 15px rgba(255, 165, 0, 0.08);
}

.service-card__image-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  /* La imagen nunca se comprime aunque la tarjeta se estire en la grilla. */
  flex-shrink: 0;
}

.service-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-card__image {
  transform: scale(1.05);
}

.service-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 15, 15, 0.8) 0%, transparent 60%);
}

.service-card__body {
  padding: 24px;
  position: relative;
  z-index: 2;
  /* El cuerpo ocupa todo el resto de la tarjeta y se vuelve él mismo un
     contenedor flex, para que margin-top:auto del botón funcione. */
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.service-card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: inline-block;
  transition: transform 0.3s ease;
}

.service-card__icon svg {
  color: var(--color-primary);
  stroke: var(--color-primary);
}

.service-card:hover .service-card__icon {
  animation: iconPulse 0.6s ease;
}

@keyframes iconPulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.3) rotate(-5deg); }
  60% { transform: scale(0.9) rotate(3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.service-card__title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--text-strong);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.service-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.service-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-accent);
  transition: var(--transition);
  /* (2) Empuja el botón al fondo del cuerpo: absorbe todo el espacio libre
     que sobra cuando la descripción es más corta que en las otras tarjetas.
     El margin-bottom:20px del .desc sigue valiendo como separación mínima. */
  margin-top: auto;
}

.service-card__cta svg {
  transition: transform 0.3s ease;
}

.service-card:hover .service-card__cta svg {
  transform: translateX(5px);
}

/* ==================== CONTACT CTA ==================== */
.contact-cta {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 50%, var(--bg) 100%);
  text-align: center;
  position: relative;
}

.contact-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-border), transparent);
}

.contact-cta__content {
  max-width: 520px;
  margin: 0 auto;
}

.contact-cta__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  align-items: center;
}

/* Botones de acción */
.contact-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 300px;
  margin: 0 auto 32px;
}

.contact-cta__actions .btn {
  width: 100%;
  min-width: 0;
}

/* ==================== REDES SOCIALES ==================== */
.contact-cta__social {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
  margin: 0 auto;
  text-align: left;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.social-btn:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.social-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  color: #fff;
}

.social-btn__icon svg {
  width: 22px;
  height: 22px;
}

.social-btn__icon--instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-btn__icon--maps {
  background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
}

.social-btn__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.social-btn__text strong {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.3;
}

.social-btn__text small {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================== MAPA INTERACTIVO ==================== */
.map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 300px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--bg-card);
  box-shadow: var(--shadow-elevated);
}

.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-frame__cta {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-on-accent);
  background: var(--color-primary);
  border-radius: 100px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.map-frame__cta svg {
  width: 17px;
  height: 17px;
}

.map-frame__cta:hover {
  transform: translateY(-2px);
  background: var(--color-primary-light);
  box-shadow: 0 10px 26px rgba(200, 149, 60, 0.4);
}

.contact-cta__text {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 16px 0 32px;
  line-height: 1.7;
}

/* ==================== GALERÍA DE PROYECTOS ==================== */
.gallery__intro {
  max-width: 58ch;
  /* .section__header ya hereda text-align:center, pero eso sólo centra el texto
     DENTRO de la caja: un bloque con max-width y márgenes en 0 sigue pegado a
     la izquierda. Los auto lo simétrizan respecto del título de arriba. */
  margin: 14px auto 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* --- Filtros --- */
.gallery__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.gallery__filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.gallery__filter:hover {
  color: var(--text-strong);
  border-color: var(--color-primary);
}

.gallery__filter.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--text-on-accent);
}

.gallery__filter-count {
  padding: 2px 7px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
}

.gallery__filter.is-active .gallery__filter-count {
  background: rgba(0, 0, 0, 0.18);
}

.gallery__status {
  min-height: 1.5em;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

/* --- Grilla --- */
.gallery__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 8px;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.25s ease;
}

.gallery-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
  transform: translateY(-4px);
}

/* Filtrado: display:none en vez de opacity para que las tarjetas ocultas
   dejen de ocupar lugar y no queden tabulables. La entrada de las que
   reaparecen la anima el keyframe reveal-card. */
.gallery-card.is-hidden {
  display: none;
}

@keyframes reveal-card {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.gallery-card.is-entering {
  animation: reveal-card 0.42s ease both;
}

/* --- Media + insignia --- */
.gallery-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-elevated);
  cursor: zoom-in;
}

.gallery-card__image,
.gallery-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* La vista previa del video no es interactiva: el click en cualquier parte
   del media abre el lightbox. Sin esto, Chrome/Firefox togglean play/pause
   internamente al hacer click sobre el video antes de abrir el diálogo. */
.gallery-card__video {
  pointer-events: none;
}

.gallery-card:hover .gallery-card__image,
.gallery-card:hover .gallery-card__video {
  transform: scale(1.06);
}

/* --- Botón ▶ de las tarjetas de video --- */
.gallery-card__play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  /* No intercepta clicks: el click cae al media y abre el lightbox. */
  pointer-events: none;
}

.gallery-card__play svg {
  width: 64px;
  height: 64px;
  box-sizing: border-box;
  padding: 18px 18px 18px 20px; /* el triángulo queda ópticamente centrado */
  border-radius: 50%;
  color: #fff;
  background: rgba(10, 10, 10, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, background 0.25s ease;
}

.gallery-card:hover .gallery-card__play svg {
  transform: scale(1.1);
  background: rgba(200, 149, 60, 0.9);
}

.gallery-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 11px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.gallery-card__badge--antes {
  background: var(--color-accent);
  color: #fff5ef;
}

.gallery-card__badge--finalizado {
  background: var(--color-whatsapp);
  color: #06281a;
}

/* --- Cuerpo --- */
.gallery-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 20px;
}

.gallery-card__cat {
  color: var(--text-accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.gallery-card__title {
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-size: 1.42rem;
  line-height: 1.18;
  letter-spacing: 0.01em;
  color: var(--text-strong);
}

.gallery-card__desc {
  /* Sin recorte: es el pie de foto redactado a partir de las indicaciones de
     obra. Si lo limitáramos a 2 líneas el texto quedaría cortado con "…" y el
     lector de pantalla perdería el detalle del trabajo ejecutado. */
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* --- Acciones: apiladas siempre. "Cotizar trabajo similar" mide ~190px y
       "Ver foto" ~105px: juntos no entran ni en una card de 3 columnas, así
       que en vez de pelear con breakpoints van a ancho completo. --- */
.gallery-card__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.gallery-card__view,
.gallery-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: center;
}

.gallery-card__view {
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--text);
}

.gallery-card__view svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.gallery-card__view:hover {
  border-color: var(--color-primary);
  color: var(--text-strong);
}

.gallery-card__cta {
  background: var(--color-whatsapp);
  color: #06281a;
}

.gallery-card__cta svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.gallery-card__cta:hover {
  background: var(--color-whatsapp-hover);
}

/* ==================== LIGHTBOX ==================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 4, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: lightbox-fade 0.25s ease both;
}

@keyframes lightbox-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes lightbox-rise {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.lightbox__panel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 1080px;
  animation: lightbox-rise 0.28s ease both;
}

.lightbox__figure {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.lightbox__img,
.lightbox__video {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.lightbox__img {
  background: var(--bg-elevated);
}

.lightbox__video {
  background: #000;
}

.lightbox__caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.lightbox__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.lightbox__count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--text-accent);
}

.lightbox__title {
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--text-strong);
}

.lightbox__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--glass-bg-strong);
  color: var(--text);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox__btn svg {
  width: 20px;
  height: 20px;
}

.lightbox__btn:hover {
  background: var(--color-primary);
  color: var(--text-on-accent);
}

.lightbox__btn:active {
  transform: scale(0.94);
}

/* Anclada a la esquina del viewport (su padre es el overlay fixed inset:0),
   no al panel centrado: así nunca queda fuera de la pantalla ni se superpone
   de forma impredecible cuando el panel crece. */
.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
}

/* --- Tablet: 2 columnas --- */
@media (min-width: 600px) {
  .gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Desktop: 3 columnas --- */
@media (min-width: 900px) {
  .gallery__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --- Móvil: los flechitos pasan debajo de la imagen. En una columna de 360px
       no hay ancho para ponerlos a los lados sin tapar la foto. --- */
@media (max-width: 899px) {
  .lightbox__panel {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .lightbox__figure {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .lightbox__nav--prev {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .lightbox__nav--next {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .lightbox__img,
  .lightbox__video {
    max-height: 52vh;
  }
}

/* ==================== ABOUT ==================== */
.about {
  padding: 80px 0;
  background: var(--bg);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-border), transparent);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.about__content .section__tag,
.about__content .section__title {
  text-align: left;
}

.about__text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-top: 16px;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.about__stat {
  text-align: center;
  padding: 20px 8px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.about__stat:hover {
  border-color: rgba(200, 149, 60, 0.3);
  box-shadow: 0 0 16px rgba(200, 149, 60, 0.1);
}

.about__stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text-accent);
  line-height: 1;
  margin-bottom: 4px;
}

.about__stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about__visual {
  display: flex;
  justify-content: center;
}

/* ==================== ABOUT IMAGE CAROUSEL ==================== */
.about__image-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-elevated);
}

.about__slides {
  position: absolute;
  inset: 0;
}

.about__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.1s ease;
}

.about__image.is-active {
  opacity: 1;
  animation: kenBurns 9s linear forwards;
}

/* Ken Burns: acercamiento lento mientras la foto estÃ¡ en pantalla */
@keyframes kenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.14); }
}

/* Indicador de progreso */
.about__dots {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: 100px;
}

.about__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  transition: background 0.3s ease, transform 0.3s ease;
}

.about__dot.is-active {
  background: var(--color-primary);
  transform: scale(1.35);
  box-shadow: 0 0 8px rgba(200, 149, 60, 0.7);
}

/* Control de pausa del carrusel. WCAG 2.2.2 exige mecanismo de pausa para
   contenido que se mueve solo más de 5 s; la galería rota cada 4,2 s sin
   parar. 48x48 px para respetar el objetivo táctil mínimo en móvil. */
.about__carousel-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--text);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  transition: background 0.25s ease, transform 0.25s ease;
}

.about__carousel-toggle:hover {
  background: var(--glass-bg-strong);
}

.about__carousel-toggle:active {
  transform: scale(0.94);
}

/* Los dos iconos comparten celda: el swap es un crossfade, no un salto. */
.about__carousel-icon {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.about__carousel-icon--play {
  opacity: 0;
  transform: scale(0.6);
}

.about__carousel-toggle[aria-pressed="true"] .about__carousel-icon--pause {
  opacity: 0;
  transform: scale(0.6);
}

.about__carousel-toggle[aria-pressed="true"] .about__carousel-icon--play {
  opacity: 1;
  transform: scale(1);
}

/* Al pausar, el punto activo deja de "respirar" para que se note el estado. */
.about__dots.is-paused .about__dot.is-active {
  box-shadow: none;
}

/* Leyenda con el nombre del servicio */
.about__image-caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-strong);
  background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(200, 149, 60, 0.3);
  border-radius: 100px;
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.about__image-caption.is-out {
  opacity: 0;
  transform: translateY(6px);
}

.about__caption-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 8px rgba(200, 149, 60, 0.8);
  flex-shrink: 0;
}

.about__badge {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 80px;
  height: 80px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-on-accent);
}

.about__badge-number {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  line-height: 1;
}

.about__badge-text {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==================== FOOTER ==================== */
.footer {
  background: var(--bg-footer);
  border-top: 1px solid var(--color-border);
  padding: 60px 0 0;
}

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

.footer__top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.7;
}

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

.footer__links-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-accent);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.footer__links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer__links a:hover {
  color: var(--text-accent);
}

.footer__bottom {
  border-top: 1px solid var(--color-border);
  padding: 20px 0;
  text-align: center;
}

.footer__bottom p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==================== WHATSAPP FLOTANTE (ULTRA INTENSIFICADO) ==================== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: var(--color-whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 998;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: whatsappIntense 2s ease-in-out infinite;
}

.whatsapp-float:hover {
  transform: scale(1.2) rotate(5deg);
  box-shadow:
    0 8px 32px rgba(37, 211, 102, 0.6),
    0 0 0 4px rgba(37, 211, 102, 0.2),
    0 0 60px rgba(37, 211, 102, 0.2);
  animation: none;
}

.whatsapp-float svg {
  transition: transform 0.3s ease;
}

.whatsapp-float:hover svg {
  animation: whatsappIconBounce 0.6s ease;
}

@keyframes whatsappIconBounce {
  0% { transform: scale(1) rotate(0); }
  15% { transform: scale(0.8) rotate(-10deg); }
  30% { transform: scale(1.2) rotate(5deg); }
  45% { transform: scale(0.95) rotate(-3deg); }
  60% { transform: scale(1.1) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes whatsappIntense {
  0% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }
  15% {
    box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6), 0 0 0 8px rgba(37, 211, 102, 0.25);
  }
  30% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 16px rgba(37, 211, 102, 0.1);
  }
  50% {
    box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7), 0 0 0 24px rgba(37, 211, 102, 0.05);
  }
  70% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4), 0 0 0 12px rgba(37, 211, 102, 0.15);
  }
  100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }
}

/* Expanding rings */
.whatsapp-float::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2.5px solid rgba(37, 211, 102, 0.35);
  animation: whatsappRing 1.8s ease-in-out infinite;
}

.whatsapp-float::after {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.18);
  animation: whatsappRing 1.8s ease-in-out 0.4s infinite;
}

@keyframes whatsappRing {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.2;
  }
  100% {
    transform: scale(0.8);
    opacity: 1;
  }
}

/* ==================== SCROLL REVEAL ====================
   Nota: la entrada se anima con `animation` (no `transition`) para dejar
   el `transform` libre y que el tilt 3D de JS no entre en conflicto.
   Al terminar, el elemento vuelve a su estado normal y libera la capa GPU.
   ==================================================== */
.reveal-up,
.reveal-left,
.reveal-right,
.reveal-zoom,
.reveal-scale {
  opacity: 0;
  will-change: transform, opacity;
}

/* TÃ­tulos de secciÃ³n: fade + desplazamiento leve hacia arriba */
.reveal-up.visible {
  opacity: 1;
  animation: revealUp 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  animation-delay: var(--d, 0ms);
}

@keyframes revealUp {
  from { opacity: 0; transform: translate3d(0, 34px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Tarjetas de servicios: elevaciÃ³n + zoom suave (stagger) */
.reveal-zoom.visible {
  opacity: 1;
  animation: revealZoom 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  animation-delay: var(--d, 0ms);
}

@keyframes revealZoom {
  from { opacity: 0; transform: translate3d(0, 40px, 0) scale(0.93); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

/* Nosotros: texto desde la izquierda, visual desde la derecha */
.reveal-left.visible {
  opacity: 1;
  animation: revealLeft 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  animation-delay: var(--d, 0ms);
}

@keyframes revealLeft {
  from { opacity: 0; transform: translate3d(-48px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

.reveal-right.visible {
  opacity: 1;
  animation: revealRight 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  animation-delay: var(--d, 120ms);
}

@keyframes revealRight {
  from { opacity: 0; transform: translate3d(48px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* Contacto: escala desde el centro */
.reveal-scale.visible {
  opacity: 1;
  animation: revealScale 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  animation-delay: var(--d, 0ms);
}

@keyframes revealScale {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

/* ==================== PANTALLAS MUY ANGOSTAS (<=400px) ====================
   A 360px no entran el isotipo, la marca y los dos botones de 48px
   a tamaño completo. Se compacta el lockup para que nada se encime.
   A partir de 401px vuelve la bajada "PyME familiar · Zona Oeste". */
@media (max-width: 400px) {
  .header__container {
    padding: 0 14px;
    gap: 8px;
  }

  .header__brand {
    gap: 8px;
  }

  .header__logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .header__logo-icon span {
    font-size: 1rem;
  }

  .header__logo-title {
    font-size: 0.95rem;
  }

  .header__logo-sub {
    display: none;
  }

  .header__actions {
    gap: 6px;
  }
}

/* ==================== TABLET (600px+) ==================== */
@media (min-width: 600px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__buttons {
    flex-direction: row;
    justify-content: center;
  }

  .footer__top {
    grid-template-columns: repeat(2, 1fr);
  }

  .whatsapp-float {
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
  }
}

/* ==================== DESKTOP (900px+) ==================== */
@media (min-width: 900px) {
  .header__menu-btn {
    display: none;
  }

  .header__nav {
    display: flex;
  }

  .section__container {
    padding: 0 40px;
  }

  .services {
    padding: 120px 0;
  }

  .about {
    padding: 120px 0;
  }

  .about__grid {
    grid-template-columns: 1fr 1fr;
    gap: 80px;
  }

  .contact-cta__grid {
    grid-template-columns: 1fr 1.05fr;
    gap: 56px;
  }

  .footer__top {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
  }
}

/* ==================== LARGE DESKTOP (1100px+) ==================== */
@media (min-width: 1100px) {
  .services__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==================== HERO BADGES FLOTANTES (1200px+) ==================== */
@media (min-width: 1200px) {
  .hero__badges {
    position: absolute;
    inset: 0;
    display: block;
    margin-top: 0;
  }

  .hero__badge {
    position: absolute;
    max-width: 220px;
  }

  /* El header es position:fixed y ocupa 80px (16+48+16), con 68px al
     hacer scroll. Las placas arrancan por debajo de esa franja para no
     quedar jamás bajo el logo. Los offsets laterales se recalibraron:
     antes dejaban las tres placas 100% fuera de pantalla. */
  .hero__badge--a { top: 128px; left: -118px; }
  .hero__badge--b { top: 46%;   right: -132px; animation-delay: -2s; }
  .hero__badge--c { bottom: 4%; left: -104px; animation-delay: -4s; }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}