/* ===== CSS VARIABLES - DARK/LIGHT THEME ===== */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #1a1a28;
  --bg-card-hover: #22223a;
  --text-primary: #f0f0f8;
  --text-secondary: #a0a0b8;
  --text-muted: #6a6a88;
  --border: #2a2a45;
  --fire-orange: #ff6b35;
  --fire-red: #e63946;
  --fire-yellow: #ffd60a;
  --accent: #4ecdc4;
  --accent-dark: #38b2ac;
  --gradient-fire: linear-gradient(135deg, #ff6b35, #e63946, #ffd60a);
  --gradient-hero: linear-gradient(180deg, rgba(10,10,15,0.3) 0%, rgba(10,10,15,0.85) 100%);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.3);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 72px;
}

[data-theme="light"] {
  --bg-primary: #f8f9fc;
  --bg-secondary: #eef0f8;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f2fc;
  --text-primary: #0d0d1a;
  --text-secondary: #4a4a6a;
  --text-muted: #8a8aaa;
  --border: #dde0f0;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.1);
  --gradient-hero: linear-gradient(180deg, rgba(248,249,252,0.1) 0%, rgba(10,10,15,0.75) 100%);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== CONTAINER ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 50px; font-weight: 600;
  font-size: 0.95rem; cursor: pointer; border: none;
  transition: var(--transition); text-decoration: none; white-space: nowrap;
}
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-primary {
  background: var(--gradient-fire); color: #fff;
  box-shadow: 0 4px 20px rgba(255,107,53,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,107,53,0.6); }
.btn-emergency {
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,0.6); backdrop-filter: blur(8px);
}
.btn-emergency:hover { background: rgba(255,255,255,0.15); border-color: #fff; transform: translateY(-2px); }
.btn-whatsapp {
  background: #25D366; color: #fff;
  box-shadow: 0 4px 15px rgba(37,211,102,0.4);
  padding: 10px 20px; border-radius: 50px;
}
.btn-whatsapp:hover { background: #1da851; transform: translateY(-2px); }

/* ===== HEADER ===== */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2000;
  height: var(--header-h);
  /* Sin backdrop-filter aquí: evita que iOS Safari lo use como containing block
     para los hijos con position:fixed (como el nav-menu móvil) */
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
/* El blur se aplica en el pseudo-elemento para no afectar hijos fixed */
.header::before {
  content: '';
  position: absolute; inset: 0;
  background: transparent;
  z-index: -1;
}
[data-theme="light"] .header::before { background: rgba(248,249,252,0.15); }
.header.scrolled { box-shadow: var(--shadow); }
.nav { display: flex; align-items: center; gap: 32px; height: 100%; }
.nav-logo { flex-shrink: 0; }
.logo-img { height: 48px; width: auto; object-fit: contain; }
.nav-menu { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  padding: 8px 14px; border-radius: 8px; font-size: 0.9rem; font-weight: 500;
  color: var(--text-secondary); transition: var(--transition);
}
.nav-link:hover { color: var(--fire-orange); background: rgba(255,107,53,0.08); }
.nav-admin { color: var(--text-muted); font-size: 0.85rem; }
/* WhatsApp link dentro del menú móvil (solo visible en mobile) */
.nav-whatsapp-mobile { display: none; }
/* Ocultar iconos en desktop nav */
.nav-link i { display: none; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--bg-card); color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: var(--transition);
}
.theme-toggle:hover { background: var(--bg-card-hover); transform: rotate(20deg); }
/* ===== LANGUAGE MODAL ===== */
.lang-modal-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,0.88); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity 0.35s ease;
}
.lang-modal-overlay.hidden { opacity: 0; pointer-events: none; }
.lang-modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 44px 36px 36px;
  text-align: center; max-width: 400px; width: 90%;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
  animation: modalPop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalPop {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.lang-modal-logo { width: 90px; margin-bottom: 18px; }
.lang-modal h2 { font-size: 1.35rem; font-weight: 800; color: var(--text-primary); margin-bottom: 6px; }
.lang-modal p  { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 28px; }
.lang-modal-btns { display: flex; gap: 14px; justify-content: center; }
.lang-modal-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 16px; border-radius: var(--radius); border: 2px solid var(--border);
  background: var(--bg-secondary); cursor: pointer;
  transition: var(--transition); color: var(--text-primary); font-family: var(--font-body);
}
.lang-modal-btn:hover {
  border-color: var(--fire-orange); background: var(--bg-card-hover);
  transform: translateY(-4px); box-shadow: 0 8px 24px rgba(255,107,53,0.2);
}
.lang-flag { font-size: 2.6rem; line-height: 1; }
.lang-modal-flag { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; border: 2px solid var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.lang-name { font-size: 1rem; font-weight: 700; letter-spacing: 0.5px; }

.lang-toggle {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--border);
  cursor: pointer; background: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); flex-shrink: 0; padding: 0;
  overflow: hidden;
}
.lang-toggle:hover { border-color: var(--fire-orange); transform: scale(1.1); box-shadow: 0 0 10px rgba(255,107,53,0.5); }
.lang-flag-img {
  width: 42px; height: 42px;
  object-fit: cover; border-radius: 50%; display: block; flex-shrink: 0;
}
.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: var(--bg-card); border: 1px solid var(--border);
  cursor: pointer; padding: 10px 11px; border-radius: 10px;
  width: 42px; height: 42px; flex-shrink: 0; z-index: 2100;
  transition: var(--transition);
}
.hamburger:hover { border-color: var(--fire-orange); background: rgba(255,107,53,0.08); }
.hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: var(--transition); transform-origin: center;
}
/* Hamburger → X animation */
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow-x: hidden; background: #0a0808;
  z-index: 1;        /* Crea un stacking context explícito para el hero */
  isolation: isolate; /* Encierra todos los z-index hijos dentro del hero */
}
#fireCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: var(--gradient-hero);
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center; padding-top: var(--header-h);
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.hero-logo-wrap {
  position: relative; display: inline-block;
  filter: drop-shadow(0 0 40px rgba(255,107,53,0.5));
}
.hero-logo {
  width: clamp(180px, 30vw, 320px);
  height: auto;
  max-width: 88vw;
  display: block;
  object-fit: contain;
  animation: logoFloat 4s ease-in-out infinite;
}
.hero-logo-glow {
  position: absolute; inset: -20px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,53,0.2) 0%, transparent 70%);
  animation: glowPulse 3s ease-in-out infinite;
  pointer-events: none; z-index: -1;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}
.hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 5vw, 3.8rem); font-weight: 800;
  line-height: 1.2; color: #fff;
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.gradient-text {
  background: var(--gradient-fire);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.85); max-width: 620px;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.badge {
  background: rgba(255,255,255,0.1); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2); color: #fff;
  padding: 8px 18px; border-radius: 50px; font-size: 0.85rem; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
.badge i { color: var(--fire-yellow); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.hero-scroll-indicator {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.5); font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase;
}
.scroll-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--fire-orange);
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--gradient-fire); padding: 40px 0;
  position: relative; overflow: hidden;
}
.stats-bar::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.3), transparent);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px; text-align: center; position: relative; z-index: 1;
}
.stat-item { color: #fff; }
.stat-num {
  font-family: 'Poppins', sans-serif; font-size: 3rem; font-weight: 800;
  line-height: 1;
}
.stat-unit { font-size: 2rem; font-weight: 700; }
.stat-item p { font-size: 0.9rem; opacity: 0.85; margin-top: 6px; font-weight: 500; }

/* ===== SECTIONS ===== */
.section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-label {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--fire-orange);
  background: rgba(255,107,53,0.1); border: 1px solid rgba(255,107,53,0.2);
  padding: 6px 18px; border-radius: 50px; margin-bottom: 16px;
}
.section-header h2 {
  font-family: 'Poppins', sans-serif; font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; line-height: 1.2; margin-bottom: 16px;
}
.section-header p { color: var(--text-secondary); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ===== SERVICES ===== */
.servicios { background: var(--bg-secondary); }
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.service-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 28px;
  transition: var(--transition); position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-fire); transform: scaleX(0);
  transition: transform 0.3s ease; transform-origin: left;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); border-color: rgba(255,107,53,0.3); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: rgba(255,107,53,0.1); color: var(--fire-orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 20px;
  border: 1px solid rgba(255,107,53,0.2);
}
.service-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; }
.service-card p { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 16px; }
.service-card ul { display: flex; flex-direction: column; gap: 6px; }
.service-card ul li { font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.service-card ul li i { color: var(--accent); font-size: 0.75rem; }

/* ── Card destacada: Humo y Hollín ── */
.service-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 36px;
  align-items: start;
  background: linear-gradient(135deg, rgba(255,107,53,0.11) 0%, rgba(230,57,70,0.07) 100%);
  border: 2px solid rgba(255,107,53,0.55);
}
.service-card--featured::before { transform: scaleX(1); height: 4px; }
.service-card--featured:hover { transform: translateY(-4px); }
.service-card--featured .service-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gradient-fire); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 5px 14px; border-radius: 50px; margin-bottom: 14px;
  width: fit-content;
}
.service-card--featured .service-icon {
  width: 96px; height: 96px; font-size: 2.3rem; border-radius: 20px;
  background: rgba(255,107,53,0.15);
  flex-shrink: 0;
}
.service-card--featured h3 { font-size: 1.45rem; }
.service-card--featured p  { font-size: 0.97rem; }
.service-card--featured ul li { font-size: 0.88rem; }

/* ===== BRAND PROMISE ===== */
.brand-promise {
  background: linear-gradient(160deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
  position: relative; overflow: hidden;
}
.brand-promise::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(255,107,53,0.06), transparent);
  pointer-events: none;
}
.brand-promise-inner {
  display: flex; flex-direction: column; align-items: center; gap: 48px;
}
/* Logo */
.bp-logo-wrap {
  position: relative; width: 340px; height: 340px;
  display: flex; align-items: center; justify-content: center;
}
.bp-logo {
  width: 300px; height: 300px; object-fit: contain;
  position: relative; z-index: 2;
  filter: drop-shadow(0 0 40px rgba(255,107,53,0.55)) drop-shadow(0 0 80px rgba(255,68,0,0.25));
  animation: bpFloat 4s ease-in-out infinite;
}
.bp-logo-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid rgba(255,107,53,0.5);
  animation: bpPulse 3s ease-in-out infinite;
}
.bp-logo-ring::after {
  content: ''; position: absolute; inset: -14px; border-radius: 50%;
  border: 1.5px solid rgba(255,107,53,0.2);
  animation: bpPulse 3s ease-in-out infinite 0.8s;
}
@keyframes bpFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes bpPulse {
  0%, 100% { transform: scale(1);    opacity: 0.6; }
  50%       { transform: scale(1.15); opacity: 0.15; }
}
/* Content */
.bp-content { max-width: 760px; text-align: center; display: flex; flex-direction: column; gap: 20px; }
.bp-intro {
  font-size: 1.2rem; line-height: 1.7; color: var(--text-primary);
  padding: 20px 24px; border-left: 4px solid var(--fire-orange);
  background: var(--bg-card); border-radius: var(--radius); text-align: left;
}
.bp-body { font-size: 1rem; line-height: 1.8; color: var(--text-secondary); }
.bp-highlight {
  display: inline-block; color: var(--fire-orange);
  font-weight: 700; font-size: 1.05rem;
}
/* Cards */
.bp-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin: 12px 0; text-align: left; }
.bp-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 18px;
  display: flex; flex-direction: column; gap: 12px;
  transition: var(--transition);
}
.bp-card i { font-size: 1.4rem; color: var(--fire-orange); }
.bp-card span { font-size: 0.9rem; line-height: 1.6; color: var(--text-secondary); }
.bp-card:hover { border-color: var(--fire-orange); transform: translateY(-4px); box-shadow: 0 8px 28px rgba(255,107,53,0.15); }
.bp-card--featured {
  border-color: var(--fire-orange); background: linear-gradient(135deg, rgba(255,107,53,0.12), rgba(255,68,0,0.06));
}
.bp-card--featured i { font-size: 1.8rem; }
.bp-card--featured span { font-size: 1rem; }
/* Closing */
.bp-closing { font-size: 1.05rem; color: var(--text-primary); font-weight: 500; }
.bp-tagline {
  font-size: 1.15rem; font-weight: 800; color: var(--text-primary);
  line-height: 1.6; letter-spacing: 0.2px;
}
.bp-cta { margin-top: 8px; font-size: 1rem; padding: 14px 36px; }

@media (max-width: 768px) {
  .bp-cards { grid-template-columns: 1fr; }
  .bp-logo { width: 200px; height: 200px; }
  .bp-logo-wrap { width: 230px; height: 230px; }
  .bp-intro { font-size: 1rem; }
}

/* ===== PROCESO ===== */
.proceso { background: var(--bg-primary); }
.proceso-steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  position: relative;
}
.proceso-steps::before {
  content: ''; position: absolute; top: 36px; left: 10%; right: 10%;
  height: 2px; background: var(--gradient-fire); z-index: 0;
}
.step {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 0 20px; position: relative; z-index: 1;
}
.step-num {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--gradient-fire); color: #fff;
  font-family: 'Poppins', sans-serif; font-size: 1.3rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; box-shadow: 0 4px 20px rgba(255,107,53,0.4);
}
.step-content h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.step-content p { color: var(--text-secondary); font-size: 0.88rem; }

/* ===== ASEGURADORAS ===== */
.aseguradoras { background: var(--bg-secondary); padding: 52px 0; }
.aseguradoras .section-header { margin-bottom: 28px; }
.aseguradoras .section-header h2 { font-size: clamp(1.2rem, 2.8vw, 1.7rem); margin-bottom: 8px; }
.aseguradoras .section-header p { font-size: 0.84rem; opacity: 0.75; }
.insurers-grid {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.insurer-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 50px; padding: 7px 16px 7px 10px;
  display: flex; align-items: center; gap: 8px;
  transition: var(--transition); cursor: default;
}
.insurer-card:hover { border-color: rgba(255,107,53,0.35); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.insurer-card.insurer-more { opacity: 0.5; }
.insurer-logo-placeholder {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,107,53,0.1); color: var(--fire-orange);
  display: flex; align-items: center; justify-content: center; font-size: 0.72rem;
  flex-shrink: 0;
}
.insurer-card span { font-size: 0.74rem; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }

/* ===== GALLERY ===== */
.galeria { background: var(--bg-primary); }
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.gallery-placeholder {
  border-radius: var(--radius-lg); aspect-ratio: 4/3;
  border: 2px dashed var(--border); overflow: hidden;
}
.placeholder-inner {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  color: var(--text-muted); font-size: 0.88rem; text-align: center;
}
.placeholder-inner i { font-size: 2.5rem; color: var(--border); }
.gallery-items-container {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px;
}
.gallery-item { border-radius: var(--radius-lg); overflow: hidden; position: relative; cursor: pointer; }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px; opacity: 0; transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-overlay h4 { color: #fff; font-size: 0.95rem; margin-bottom: 4px; }
.gallery-item-overlay p { color: rgba(255,255,255,0.7); font-size: 0.8rem; }
.gallery-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--gradient-fire); color: #fff;
  padding: 4px 12px; border-radius: 50px; font-size: 0.72rem; font-weight: 700;
}

/* ===== RADAR ===== */
.radar-section { background: var(--bg-secondary); }
.radar-container {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.radar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 12px;
}
.radar-status { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9rem; }
.radar-dot {
  width: 10px; height: 10px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 8px #22c55e; animation: radarPulse 2s infinite;
}
@keyframes radarPulse { 0%, 100% { box-shadow: 0 0 8px #22c55e; } 50% { box-shadow: 0 0 20px #22c55e; } }
.radar-legend { display: flex; gap: 16px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--text-secondary); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.legend-dot.high { background: #ef4444; }
.legend-dot.medium { background: #f97316; }
.legend-dot.low { background: #eab308; }
.fire-map { height: 480px; }
.radar-note { padding: 12px 24px; font-size: 0.8rem; color: var(--text-muted); border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.radar-note i { color: var(--accent); }

/* ===== TESTIMONIOS ===== */
.testimonios { background: var(--bg-primary); overflow: hidden; }

.testi-slider-wrap {
  position: relative; overflow: hidden;
  padding-bottom: 56px;
}

/* Track que se mueve */
.testi-track {
  display: flex; gap: 24px;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Card */
.testi-card {
  flex: 0 0 calc(33.333% - 16px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px 22px;
  display: flex; flex-direction: column; gap: 18px;
  transition: box-shadow 0.3s, border-color 0.3s, transform 0.3s;
  position: relative; overflow: hidden;
}
.testi-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--fire-orange), var(--fire-red));
  opacity: 0; transition: opacity 0.3s;
}
.testi-card:hover { border-color: var(--fire-orange); transform: translateY(-6px); box-shadow: 0 16px 48px rgba(255,107,53,0.15); }
.testi-card:hover::before { opacity: 1; }

/* Top row */
.testi-top { display: flex; align-items: center; gap: 14px; }
.testi-avatar-wrap { position: relative; flex-shrink: 0; }
.testi-avatar { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; border: 3px solid var(--fire-orange); display: block; }
.testi-verified {
  position: absolute; bottom: -2px; right: -4px;
  background: var(--bg-card); border-radius: 50%; line-height: 1;
  font-size: 0.85rem; color: #22c55e; padding: 1px;
}
.testi-meta { display: flex; flex-direction: column; gap: 3px; }
.testi-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.testi-location { font-size: 0.78rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.testi-stars { color: #f59e0b; font-size: 0.8rem; display: flex; gap: 2px; margin-top: 2px; }

/* Quote */
.testi-quote {
  font-size: 0.92rem; line-height: 1.75; color: var(--text-secondary);
  margin: 0; padding: 0; position: relative; padding-left: 12px;
  border-left: 2px solid rgba(255,107,53,0.3);
  flex: 1;
}
.testi-icon-quote { color: var(--fire-orange); margin-right: 6px; opacity: 0.6; font-size: 0.9rem; }
.testi-date { font-size: 0.75rem; color: var(--text-muted); align-self: flex-end; }

/* Flechas */
.testi-btn {
  position: absolute; top: 50%; transform: translateY(-60%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-card); border: 1.5px solid var(--border);
  color: var(--text-primary); cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: var(--transition);
}
.testi-btn:hover { background: var(--fire-orange); border-color: var(--fire-orange); color: #fff; }
.testi-prev { left: -8px; }
.testi-next { right: -8px; }

/* Dots */
.testi-dots {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; align-items: center;
}
.testi-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border); cursor: pointer;
  transition: background 0.3s, width 0.3s; border: none;
}
.testi-dot.active { background: var(--fire-orange); width: 24px; border-radius: 4px; }

/* Responsive */
@media (max-width: 900px) {
  .testi-card { flex: 0 0 calc(50% - 12px); }
}
@media (max-width: 580px) {
  .testi-card { flex: 0 0 calc(100% - 0px); }
  .testi-prev { left: 0; }
  .testi-next { right: 0; }
}

/* ===== FAQ ===== */
.faq-section { background: var(--bg-secondary); }

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.faq-item[open] {
  border-color: var(--fire-orange);
  box-shadow: 0 4px 24px rgba(255,107,53,0.1);
}

.faq-question {
  list-style: none;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: '\f067';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.8rem;
  color: var(--fire-orange);
  flex-shrink: 0;
  transition: transform 0.3s;
}
.faq-item[open] .faq-question::after {
  content: '\f068';
}

.faq-answer {
  padding: 0 24px 20px;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}
.faq-answer p { margin: 12px 0 0; }

@media (max-width: 700px) {
  .faq-grid { grid-template-columns: 1fr; }
}

/* ===== CONTACT ===== */
.contacto { background: var(--bg-primary); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-channels { display: flex; flex-direction: column; gap: 16px; }
.contact-card {
  display: flex; align-items: center; gap: 20px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px; transition: var(--transition);
}
.contact-card:hover { transform: translateX(6px); border-color: rgba(255,107,53,0.4); box-shadow: var(--shadow-card); }
.contact-card i { font-size: 1.8rem; flex-shrink: 0; width: 40px; text-align: center; }
.contact-card.whatsapp i { color: #25D366; }
.contact-card.phone i { color: var(--fire-orange); }
.contact-card.sms i { color: var(--accent); }
.contact-card.email i { color: #60a5fa; }
.contact-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 2px; }
.contact-card p { color: var(--text-muted); font-size: 0.82rem; }
/* Teléfonos/emails ocultos hasta hover o toque */
.contact-card span {
  color: var(--fire-orange); font-weight: 600; font-size: 0.9rem;
  display: block; overflow: hidden;
  max-height: 0; opacity: 0; margin-top: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.3s ease;
}
.contact-card:hover span,
.contact-card.revealed span {
  max-height: 2em; opacity: 1; margin-top: 4px;
}

/* Formulario de contacto colapsable */
.form-collapse-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 20px 28px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); cursor: pointer;
  color: var(--text-primary); font-family: 'Poppins', sans-serif;
  font-size: 1.05rem; font-weight: 700; transition: var(--transition);
  text-align: left;
}
.form-collapse-toggle:hover { border-color: rgba(255,107,53,0.4); box-shadow: var(--shadow-card); }
.form-collapse-toggle.open { border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom-color: transparent; }
.form-collapse-toggle .toggle-label { display: flex; align-items: center; gap: 10px; }
.form-collapse-toggle .chevron { transition: transform 0.35s ease; color: var(--fire-orange); }
.form-collapse-toggle.open .chevron { transform: rotate(180deg); }

.form-collapse-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.form-collapse-body.open { max-height: 1400px; }

.contact-form-wrap {
  background: var(--bg-card); border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg); padding: 32px 40px;
}
.contact-form h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.form-group input, .form-group select, .form-group textarea {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px; color: var(--text-primary);
  font-family: 'Inter', sans-serif; font-size: 0.92rem;
  transition: var(--transition); width: 100%; resize: vertical;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--fire-orange); box-shadow: 0 0 0 3px rgba(255,107,53,0.15);
}
.form-group select option { background: var(--bg-card); }
.form-success {
  margin-top: 16px; padding: 16px; border-radius: 8px;
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3);
  color: #22c55e; display: flex; align-items: center; gap: 10px; font-weight: 600;
}

/* ===== FOOTER ===== */
.footer { background: var(--bg-secondary); border-top: 1px solid var(--border); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-logo { height: 52px; margin-bottom: 16px; }
.footer-brand p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.7; }
.social-links { display: flex; gap: 12px; margin-top: 20px; }
.social-links a {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 0.9rem; transition: var(--transition);
}
.social-links a:hover { background: var(--fire-orange); color: #fff; border-color: var(--fire-orange); transform: translateY(-3px); }
.footer-col h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 20px; color: var(--text-primary); }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a, .footer-col ul li { color: var(--text-secondary); font-size: 0.88rem; transition: var(--transition); display: flex; align-items: center; gap: 8px; }
.footer-col ul li a:hover { color: var(--fire-orange); }
.footer-col ul li i { color: var(--fire-orange); font-size: 0.8rem; width: 16px; }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.82rem; color: var(--text-muted);
}
.footer-admin-link { color: var(--text-muted); transition: var(--transition); }
.footer-admin-link:hover { color: var(--fire-orange); }

/* ===== FLOATING BUTTONS ===== */
.floating-buttons {
  position: fixed; bottom: 28px; right: 28px; z-index: 900;
  display: flex; flex-direction: column; gap: 14px;
}
.float-btn {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff; cursor: pointer;
  box-shadow: var(--shadow); transition: var(--transition);
  position: relative;
}
.float-btn:hover { transform: scale(1.1); }
.whatsapp-float { background: #25D366; box-shadow: 0 4px 20px rgba(37,211,102,0.5); }
.call-float { background: var(--gradient-fire); box-shadow: 0 4px 20px rgba(255,107,53,0.5); }
.float-tooltip {
  position: absolute; right: 68px; top: 50%; transform: translateY(-50%);
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 12px; font-size: 0.8rem; font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.float-btn:hover .float-tooltip { opacity: 1; }

/* ===================================================
   RESPONSIVE – TABLET (≤1024px)
   =================================================== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .insurers-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .proceso-steps { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .proceso-steps::before { display: none; }
  .gallery-grid, .gallery-items-container { grid-template-columns: repeat(2, 1fr); }
}

/* ===================================================
   RESPONSIVE – MOBILE NAVBAR (≤900px)
   =================================================== */
@media (max-width: 900px) {

  /* ── NAV LAYOUT: logo izquierda, acciones derecha ── */
  .nav {
    gap: 0;
    justify-content: space-between;
  }
  .nav-menu {
    /* Menú móvil: panel lateral desde la derecha */
    position: fixed;
    top: var(--header-h); right: 0; bottom: 0;
    width: min(320px, 85vw);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 4px;
    padding: 24px 16px;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2050;
    box-shadow: -8px 0 32px rgba(0,0,0,0.35);
    overflow-y: auto;
  }
  .nav-menu.open { transform: translateX(0); }

  /* Overlay oscuro detrás del menú */
  .nav-menu.open::before {
    content: '';
    position: fixed;
    inset: 0;
    right: min(320px, 85vw);
    background: rgba(0,0,0,0.5);
    z-index: -1;
    backdrop-filter: blur(4px);
  }

  .nav-link {
    font-size: 1.05rem;
    padding: 14px 16px;
    border-radius: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .nav-link:last-child { border-bottom: none; }
  .nav-admin { margin-top: 8px; }

  /* Botones de acción: tema + hamburger en la derecha */
  .nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
  }
  .btn-whatsapp { display: none; }
  .hamburger { display: flex; }
  .nav-whatsapp-mobile { display: flex; color: #25D366 !important; }
  .nav-whatsapp-mobile:hover { background: rgba(37,211,102,0.1) !important; color: #1da851 !important; }
  /* Ocultar iconos en desktop nav */
  .nav-link i { display: inline-flex; }

  /* Secciones */
  .section { padding: 72px 0; }
  .section-header { margin-bottom: 48px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ===================================================
   RESPONSIVE – MOBILE SMALL (≤640px)
   =================================================== */
@media (max-width: 640px) {
  :root { --header-h: 64px; }

  /* Header compacto */
  .logo-img { height: 38px; }
  .theme-toggle { width: 36px; height: 36px; font-size: 1rem; }
  .lang-toggle { width: 36px; height: 36px; }

  /* Hero */
  .hero-content { gap: 16px; padding-top: calc(var(--header-h) + 56px); }
  .hero-logo {
    width: clamp(220px, 78vw, 320px);
    max-width: 88vw;
  }
  .hero-title { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .hero-subtitle { font-size: 0.95rem; padding: 0 8px; }
  .hero-badges { gap: 8px; }
  .badge { font-size: 0.78rem; padding: 6px 14px; }
  .hero-ctas { flex-direction: column; align-items: center; width: 100%; padding: 0 16px; }
  .btn-lg { padding: 14px 28px; font-size: 0.95rem; width: 100%; justify-content: center; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stat-num { font-size: 2.2rem; }

  /* Sections */
  .section { padding: 56px 0; }
  .section-header { margin-bottom: 36px; }
  .section-header h2 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .section-header p { font-size: 0.92rem; }
  .container { padding: 0 16px; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; gap: 16px; }
  .service-card { padding: 24px 20px; }
  .service-card--featured { grid-template-columns: 1fr; gap: 0; }
  .service-card--featured .service-icon { width: 72px; height: 72px; font-size: 1.9rem; margin-bottom: 20px; }
  .service-card--featured h3 { font-size: 1.2rem; }

  /* Proceso */
  .proceso-steps {
    grid-template-columns: 1fr;
    gap: 0;
    position: relative;
    padding-left: 36px;
  }
  .proceso-steps::after {
    content: '';
    position: absolute;
    left: 34px; top: 36px; bottom: 36px;
    width: 2px;
    background: var(--gradient-fire);
  }
  .step { flex-direction: row; text-align: left; align-items: flex-start; gap: 20px; padding: 0 0 32px 0; }
  .step-num { width: 52px; height: 52px; font-size: 1rem; flex-shrink: 0; position: relative; z-index: 1; }
  .step:last-child { padding-bottom: 0; }

  /* Aseguradoras */
  .insurers-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .insurer-card { padding: 16px 12px; }
  .insurer-card span { font-size: 0.72rem; }

  /* Gallery */
  .gallery-grid, .gallery-items-container { grid-template-columns: 1fr; gap: 16px; }

  /* Radar */
  .radar-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .radar-legend { gap: 10px; }
  .fire-map { height: 340px; }

  /* Contact */
  .contact-card { padding: 16px 18px; gap: 14px; }
  .contact-card i { font-size: 1.5rem; }
  .form-collapse-toggle { padding: 16px 20px; font-size: 0.95rem; }
  .contact-form-wrap { padding: 20px 18px; }
  .form-row { grid-template-columns: 1fr; }
  /* Aseguradoras mobile */
  .insurers-grid { gap: 8px; }
  .insurer-card { padding: 6px 14px 6px 8px; gap: 7px; }
  .insurer-card span { font-size: 0.7rem; }

  /* Footer */
  .footer { padding: 48px 0 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-logo { height: 44px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  /* Floating buttons */
  .floating-buttons { bottom: 20px; right: 16px; gap: 10px; }
  .float-btn { width: 50px; height: 50px; font-size: 1.2rem; }
  .float-tooltip { display: none; }
}

/* ===== LEAFLET DARK MODE ===== */
[data-theme="dark"] .leaflet-tile { filter: brightness(0.85) invert(1) hue-rotate(180deg); }
[data-theme="dark"] .leaflet-container { background: #1a1a28; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--fire-orange); border-radius: 3px; }

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.95); display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.lightbox.active { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 90vw; max-height: 80vh; border-radius: var(--radius); object-fit: contain; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px; background: none; border: none;
  color: #fff; font-size: 2rem; cursor: pointer; opacity: 0.7; transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }

