/* ============================================================
   S.I. Control de Plagas & Desinfección Montes — Hoja de Estilos Principal
   ============================================================ */

/* --- Variables --- */
:root {
  --primary:        #1565C0;
  --primary-dark:   #0D47A1;
  --primary-light:  #1976D2;
  --primary-lighter:#42A5F5;
  --primary-50:     #E3F2FD;
  --accent:         #FF8C00;
  --accent-dark:    #E65100;
  --accent-light:   #FFA726;
  --dark:           #0A1628;
  --dark-2:         #0d2137;
  --text:           #1e2d3d;
  --text-muted:     #5c6f7f;
  --bg-light:       #F0F7FF;
  --border:         #D0E4F7;
  --white:          #ffffff;
  --success:        #2e7d32;
  --radius:         12px;
  --shadow:         0 4px 20px rgba(13,71,161,.12);
  --shadow-lg:      0 8px 40px rgba(13,71,161,.18);

  /* Z-index scale — evita conflictos entre capas */
  --z-base:         1;
  --z-dropdown:     1000;
  --z-sticky:       1020;
  --z-fixed:        1030;
  --z-modal-back:   1040;
  --z-modal:        1050;
  --z-popover:      1060;
  --z-tooltip:      1070;
  --z-chatbot:      1080;
  --z-topmost:      9999;
}

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

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  font-size: 16px;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.25;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

/* Focus visible global — accesibilidad teclado */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Respeta preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* --- Utility --- */
.text-accent   { color: var(--accent) !important; }
.bg-primary-50 { background: var(--primary-50) !important; }
.section-pad   { padding: 80px 0; }
.section-pad-sm{ padding: 50px 0; }

/* --- Botones --- */
.btn-accent {
  background: var(--accent);
  color: var(--white);
  border: 2px solid transparent;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  padding: .55rem 1.4rem;
  border-radius: 8px;
  transition: background .2s, transform .15s, box-shadow .2s;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.btn-accent:hover {
  background: var(--accent-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230,81,0,.3);
}
.btn-accent:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 3px;
}

.btn-primary-custom {
  background: var(--primary);
  color: var(--white);
  border: 2px solid transparent;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  padding: .55rem 1.4rem;
  border-radius: 8px;
  transition: background .2s, transform .15s, box-shadow .2s;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.btn-primary-custom:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13,71,161,.25);
}

.btn-outline-primary-custom {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  padding: .5rem 1.3rem;
  border-radius: 8px;
  transition: background .2s, color .2s, transform .15s;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.btn-outline-primary-custom:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
}

/* --- Topbar --- */
.topbar {
  background: var(--dark);
  padding: 6px 0;
  font-size: .8rem;
}
.topbar-link {
  color: #a8c0d6;
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: color .2s;
}
.topbar-link:hover { color: var(--white); }
.topbar-badge {
  color: #7fa8c0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.topbar-wa {
  background: #25D366;
  color: var(--white);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: background .2s;
}
.topbar-wa:hover { background: #128C7E; color: var(--white); }

/* --- Navbar --- */
#mainNav {
  background: var(--primary-dark);
  padding: 10px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  transition: background .3s;
  z-index: var(--z-sticky);
}
#mainNav.scrolled { background: rgba(10,22,40,.97); }
.navbar-brand .logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.navbar-brand .brand-name { font-family: 'Poppins',sans-serif; font-weight: 700; font-size: .9rem; color: var(--accent-light); }
.navbar-brand .brand-sub  { font-family: 'Poppins',sans-serif; font-weight: 400; font-size: .75rem; color: rgba(255,166,38,.75); letter-spacing: .5px; }
.navbar-brand img { height: 72px; }
@media (max-width: 991.98px) {
  .navbar-brand img { height: 52px; }
  .navbar-brand .brand-name { font-size: .95rem; }
  .navbar-brand .brand-sub  { font-size: .65rem; }
}
@media (max-width: 575.98px) {
  .navbar-brand img { height: 38px; }
  .navbar-brand .brand-sub { display: none; }
  .navbar-brand .brand-name { font-size: .9rem; }
}
.navbar-nav .nav-link {
  color: rgba(255,255,255,.85) !important;
  font-family: 'Poppins',sans-serif;
  font-size: .88rem;
  font-weight: 500;
  padding: .45rem .75rem !important;
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--white) !important;
  background: rgba(255,255,255,.12);
}
.navbar-nav .nav-link:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
/* Dropdown mobile — sin colapso visual brusco */
.navbar-collapse { transition: none; }
.dropdown-menu-dark {
  background: var(--dark) !important;
  border: 1px solid rgba(255,255,255,.08);
  z-index: var(--z-dropdown);
}
.dropdown-item {
  font-size: .85rem;
  padding: .45rem 1rem;
  color: rgba(255,255,255,.8) !important;
  transition: background .15s, color .15s;
}
.dropdown-item:hover,
.dropdown-item:focus { background: rgba(255,255,255,.1) !important; color: var(--white) !important; }

/* --- Section Headers --- */
.section-label {
  display: inline-block;
  background: var(--primary-50);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: .75rem;
}
.section-title { font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--dark); margin-bottom: .6rem; }
.section-subtitle { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 55%, #1a5fa8 100%);
  min-height: 92vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 80px 0 60px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,140,0,.2);
  border: 1px solid rgba(255,140,0,.4);
  color: var(--accent-light);
  font-size: .82rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 1.2rem;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--white);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}
.hero-title .highlight { color: var(--accent-light); }
.hero-desc { color: rgba(255,255,255,.8); font-size: 1.1rem; margin-bottom: 2rem; max-width: 500px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 2.5rem; }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.12);
}
.hero-stat-num { font-family: 'Poppins',sans-serif; font-size: 1.8rem; font-weight: 800; color: var(--accent-light); line-height: 1; }
.hero-stat-label { font-size: .8rem; color: rgba(255,255,255,.65); }

/* Hero ilustración lado derecho */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-circle {
  width: clamp(280px,40vw,440px);
  height: clamp(280px,40vw,440px);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hero-circle-inner {
  width: 70%;
  height: 70%;
  background: rgba(255,140,0,.1);
  border: 1px solid rgba(255,140,0,.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(80px,12vw,130px);
}
.hero-float-badge {
  position: absolute;
  background: var(--white);
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins',sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: var(--dark);
  animation: float 4s ease-in-out infinite;
}
.hero-float-badge:nth-child(8)  { top: 10%; right: -5%; animation-delay: 1s; }
.hero-float-badge:nth-child(9)  { bottom: 15%; left: -8%; animation-delay: 2s; }
.hero-float-badge:nth-child(10) { top: 50%; right: -12%; animation-delay: .5s; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ============================================================
   BICHOS ANIMADOS — HERO
   ============================================================ */
.bug {
  position: absolute;
  font-size: 1.5rem;
  line-height: 1;
  pointer-events: none;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
  z-index: 2;
}

/* Bug 1 — cucaracha */
.bug-1 { animation: bug-move-1 5s infinite; }
@keyframes bug-move-1 {
  0%   { transform: translate(-160px, -160px) rotate(0deg)   scale(1);   opacity: 0; }
  8%   { transform: translate(-160px, -160px) rotate(0deg)   scale(1);   opacity: 1; }
  25%  { transform: translate(-110px, -90px)  rotate(20deg)  scale(1);   opacity: 1; }
  45%  { transform: translate(-80px,  -120px) rotate(-15deg) scale(1);   opacity: 1; }
  62%  { transform: translate(-42px,  -42px)  rotate(25deg)  scale(1.1); opacity: 1; }
  70%  { transform: translate(-52px,  -52px)  rotate(185deg) scale(1);   opacity: 1; }
  85%  { transform: translate(-115px, -115px) rotate(200deg) scale(1);   opacity: 0.7; }
  100% { transform: translate(-160px, -160px) rotate(215deg) scale(0.8); opacity: 0; }
}

/* Bug 2 — ratón */
.bug-2 { animation: bug-move-2 6s infinite; animation-delay: .8s; }
@keyframes bug-move-2 {
  0%   { transform: translate(160px, -150px) rotate(0deg)   scale(1);   opacity: 0; }
  8%   { transform: translate(160px, -150px) rotate(0deg)   scale(1);   opacity: 1; }
  25%  { transform: translate(110px, -100px) rotate(-20deg) scale(1);   opacity: 1; }
  45%  { transform: translate(135px, -60px)  rotate(15deg)  scale(1);   opacity: 1; }
  62%  { transform: translate(38px,  -36px)  rotate(-25deg) scale(1.1); opacity: 1; }
  70%  { transform: translate(47px,  -45px)  rotate(185deg) scale(1);   opacity: 1; }
  85%  { transform: translate(115px, -110px) rotate(200deg) scale(1);   opacity: 0.7; }
  100% { transform: translate(160px, -150px) rotate(215deg) scale(0.8); opacity: 0; }
}

/* Bug 3 — mosquito */
.bug-3 { animation: bug-move-3 5s infinite; animation-delay: 1.6s; }
@keyframes bug-move-3 {
  0%   { transform: translate(150px, 150px) rotate(0deg)   scale(1);   opacity: 0; }
  8%   { transform: translate(150px, 150px) rotate(0deg)   scale(1);   opacity: 1; }
  25%  { transform: translate(100px, 110px) rotate(30deg)  scale(1);   opacity: 1; }
  45%  { transform: translate(125px, 65px)  rotate(-20deg) scale(1);   opacity: 1; }
  62%  { transform: translate(40px,  40px)  rotate(20deg)  scale(1.1); opacity: 1; }
  70%  { transform: translate(50px,  50px)  rotate(185deg) scale(1);   opacity: 1; }
  85%  { transform: translate(112px, 112px) rotate(200deg) scale(1);   opacity: 0.7; }
  100% { transform: translate(150px, 150px) rotate(215deg) scale(0.8); opacity: 0; }
}

/* Bug 4 — hormiga */
.bug-4 { animation: bug-move-4 5.5s infinite; animation-delay: 2.4s; }
@keyframes bug-move-4 {
  0%   { transform: translate(-150px, 150px) rotate(0deg)   scale(1);   opacity: 0; }
  8%   { transform: translate(-150px, 150px) rotate(0deg)   scale(1);   opacity: 1; }
  25%  { transform: translate(-100px, 100px) rotate(-30deg) scale(1);   opacity: 1; }
  45%  { transform: translate(-125px, 58px)  rotate(20deg)  scale(1);   opacity: 1; }
  62%  { transform: translate(-40px,  40px)  rotate(-20deg) scale(1.1); opacity: 1; }
  70%  { transform: translate(-50px,  50px)  rotate(185deg) scale(1);   opacity: 1; }
  85%  { transform: translate(-112px, 112px) rotate(200deg) scale(1);   opacity: 0.7; }
  100% { transform: translate(-150px, 150px) rotate(215deg) scale(0.8); opacity: 0; }
}

/* Bug 5 — araña */
.bug-5 { animation: bug-move-5 5s infinite; animation-delay: 3.2s; }
@keyframes bug-move-5 {
  0%   { transform: translate(180px, 10px)  rotate(0deg)   scale(1);   opacity: 0; }
  8%   { transform: translate(180px, 10px)  rotate(0deg)   scale(1);   opacity: 1; }
  25%  { transform: translate(130px, -15px) rotate(25deg)  scale(1);   opacity: 1; }
  45%  { transform: translate(155px, 18px)  rotate(-20deg) scale(1);   opacity: 1; }
  62%  { transform: translate(55px,  3px)   rotate(15deg)  scale(1.1); opacity: 1; }
  70%  { transform: translate(65px,  5px)   rotate(185deg) scale(1);   opacity: 1; }
  85%  { transform: translate(135px, 8px)   rotate(200deg) scale(1);   opacity: 0.7; }
  100% { transform: translate(180px, 10px)  rotate(215deg) scale(0.8); opacity: 0; }
}

/* Bug 6 — abeja */
.bug-6 { animation: bug-move-6 5.5s infinite; animation-delay: 4s; }
@keyframes bug-move-6 {
  0%   { transform: translate(20px,  -180px) rotate(0deg)   scale(1);   opacity: 0; }
  8%   { transform: translate(20px,  -180px) rotate(0deg)   scale(1);   opacity: 1; }
  25%  { transform: translate(-15px, -130px) rotate(20deg)  scale(1);   opacity: 1; }
  45%  { transform: translate(25px,  -88px)  rotate(-25deg) scale(1);   opacity: 1; }
  62%  { transform: translate(3px,   -55px)  rotate(20deg)  scale(1.1); opacity: 1; }
  70%  { transform: translate(5px,   -65px)  rotate(185deg) scale(1);   opacity: 1; }
  85%  { transform: translate(15px,  -132px) rotate(200deg) scale(1);   opacity: 0.7; }
  100% { transform: translate(20px,  -180px) rotate(215deg) scale(0.8); opacity: 0; }
}

/* ============================================================
   SECCIÓN: SERVICIOS RÁPIDOS
   ============================================================ */
.quick-services { background: var(--primary-50); padding: 36px 0; }
.quick-service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
  height: 100%;
  border: 1px solid var(--border);
}
.quick-service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.quick-service-icon {
  width: 60px; height: 60px;
  background: var(--primary-50);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.7rem;
  color: var(--primary);
}
.quick-service-card h5 { font-size: .95rem; margin-bottom: 6px; }
.quick-service-card p { font-size: .82rem; color: var(--text-muted); margin: 0; }

/* ============================================================
   SECCIÓN: POR QUÉ ELEGIRNOS
   ============================================================ */
.feature-item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}
.feature-icon {
  width: 52px; height: 52px;
  min-width: 52px;
  background: var(--primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1.3rem;
}
.feature-icon.accent { background: var(--accent); }
.feature-item h5 { font-size: 1rem; margin-bottom: 4px; }
.feature-item p  { font-size: .88rem; color: var(--text-muted); margin: 0; }

/* ============================================================
   SECCIÓN: PLAGAS GRID
   ============================================================ */
.pest-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px 22px;
  text-align: center;
  transition: border-color .25s, box-shadow .25s, transform .25s;
  cursor: pointer;
  display: block;
  color: var(--text);
  height: 100%;
  text-decoration: none;
}
.pest-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
  color: var(--text);
}
.pest-emoji { font-size: 3rem; display: block; margin-bottom: 10px; }
.pest-card h5 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; color: var(--primary-dark); }
.pest-card p  { font-size: .8rem; color: var(--text-muted); margin: 0; }
.pest-card .badge-risk {
  display: inline-block;
  font-size: .7rem;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 10px;
}
.risk-high   { background: #fde8e8; color: #c62828; }
.risk-medium { background: #fff3e0; color: #e65100; }
.risk-low    { background: #e8f5e9; color: #2e7d32; }

/* ============================================================
   ESTADÍSTICAS (COUNTER)
   ============================================================ */
.stats-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 60px 0;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: 'Poppins',sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { color: rgba(255,255,255,.75); font-size: .9rem; }
.stat-divider {
  width: 1px;
  height: 70px;
  background: rgba(255,255,255,.2);
  margin: 0 auto;
}

/* ============================================================
   TESTIMONIOS
   ============================================================ */
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  height: 100%;
}
.testimonial-stars { color: #f59e0b; font-size: 1.1rem; margin-bottom: 12px; }
.testimonial-text { font-style: italic; color: var(--text); margin-bottom: 16px; font-size: .92rem; line-height: 1.7; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 44px; height: 44px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.testimonial-name { font-weight: 700; font-size: .9rem; }
.testimonial-loc  { font-size: .78rem; color: var(--text-muted); }

/* ============================================================
   EMERGENCIA / CTA BAND
   ============================================================ */
.emergency-band {
  background: linear-gradient(90deg, #b71c1c, #d32f2f);
  padding: 18px 0;
}
.emergency-band .text-white { font-family: 'Poppins',sans-serif; font-weight: 600; }

/* ============================================================
   BLOG CARDS
   ============================================================ */
.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform .25s, box-shadow .25s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-img {
  height: 180px;
  overflow: hidden;
  background: var(--primary-50);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}
.blog-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.blog-card-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--dark); line-height: 1.4; }
.blog-card-excerpt { font-size: .85rem; color: var(--text-muted); flex: 1; line-height: 1.6; }
.blog-card-footer { margin-top: 14px; font-size: .78rem; color: var(--text-muted); }

/* ============================================================
   PAGE HEADER (banner interno)
   ============================================================ */
.page-header {
  background: linear-gradient(135deg, var(--dark), var(--primary-dark));
  padding: 60px 0 50px;
  position: relative;
}
.page-header h1 { color: var(--white); font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .4rem; }
.page-header .breadcrumb-item { color: rgba(255,255,255,.6); font-size: .85rem; }
.page-header .breadcrumb-item a { color: rgba(255,255,255,.8); }
.page-header .breadcrumb-item.active { color: rgba(255,255,255,.95); }
.page-header .breadcrumb-item+.breadcrumb-item::before { color: rgba(255,255,255,.4); }

/* ============================================================
   CITAS (Formulario)
   ============================================================ */
.cita-form-wrapper {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 40px;
  border: 1px solid var(--border);
}
.form-label { font-weight: 600; font-size: .88rem; color: var(--text); }
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: .55rem .9rem;
  font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(21,101,192,.12);
  outline: none;
}
.step-indicator {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
}
.step-item {
  flex: 1;
  text-align: center;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
}
.step-item.active::after, .step-item.done::after { background: var(--primary); }
.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 6px;
  font-weight: 700;
  font-size: .85rem;
  position: relative;
  z-index: var(--z-base);
  transition: background .3s, color .3s;
}
.step-item.active .step-circle { background: var(--primary); color: var(--white); }
.step-item.done   .step-circle { background: var(--success); color: var(--white); }
.step-label { font-size: .72rem; color: var(--text-muted); font-weight: 600; }

/* Calendario Flatpickr inline */
#fechaInput { visibility: hidden; height: 0; padding: 0; border: 0; margin: 0; }

.flatpickr-calendar.inline {
  box-shadow: none !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius) !important;
  width: 100% !important;
  max-width: 100% !important;
  background: var(--white) !important;
  display: block !important;
  position: static !important;
  margin-top: 4px;
}
.flatpickr-calendar.inline .flatpickr-months { background: var(--primary); border-radius: 10px 10px 0 0; }
.flatpickr-calendar.inline .flatpickr-month,
.flatpickr-calendar.inline .flatpickr-monthDropdown-months,
.flatpickr-calendar.inline .cur-month,
.flatpickr-calendar.inline .cur-year { color: #fff !important; }
.flatpickr-calendar.inline .flatpickr-prev-month svg,
.flatpickr-calendar.inline .flatpickr-next-month svg { fill: #fff !important; }
.flatpickr-calendar.inline .flatpickr-day.selected,
.flatpickr-calendar.inline .flatpickr-day.selected:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
}
.flatpickr-calendar.inline .flatpickr-day:hover:not(.flatpickr-disabled):not(.flatpickr-day.selected) {
  background: var(--primary-50) !important;
}
.flatpickr-calendar.inline .flatpickr-day.flatpickr-disabled {
  color: #ccc !important; text-decoration: line-through;
}

/* Horarios disponibles grid */
.time-slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px,1fr)); gap: 10px; }
.time-slot {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  font-size: .84rem;
  font-weight: 600;
  transition: border-color .2s, color .2s, background .2s;
}
.time-slot:hover:not(.disabled) { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.time-slot.selected { border-color: var(--primary); background: var(--primary); color: var(--white); }
.time-slot.disabled { opacity: .4; cursor: not-allowed; background: #f5f5f5; }

/* ============================================================
   PLAGAS — página detalle
   ============================================================ */
.pest-detail-header {
  background: linear-gradient(135deg, var(--dark), #15325a);
  padding: 50px 0;
  position: relative;
}
.pest-detail-emoji { font-size: 5rem; line-height: 1; }
.pest-detail-title { color: var(--white); font-size: clamp(2rem,4vw,3rem); }
.pest-info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
  margin-bottom: 24px;
}
.pest-info-card.danger  { border-left-color: #c62828; }
.pest-info-card.success { border-left-color: var(--success); }
.pest-info-card.warning { border-left-color: var(--accent); }
.pest-info-card h4 { font-size: 1.1rem; margin-bottom: 10px; }

/* ============================================================
   GALERÍA
   ============================================================ */
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--primary-50);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,71,161,.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .3s;
  color: var(--white);
  font-size: 2rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--dark);
  padding: 60px 0 0;
}
.footer-heading {
  color: var(--white);
  font-family: 'Poppins',sans-serif;
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 7px; }
.footer-links a { color: #7fa8c0; font-size: .88rem; transition: color .2s; }
.footer-links a:hover { color: var(--white); }
.footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-contact li {
  display: flex; align-items: flex-start; gap: 10px;
  color: #7fa8c0; font-size: .88rem; margin-bottom: 10px;
}
.footer-contact a { color: #7fa8c0; transition: color .2s; }
.footer-contact a:hover { color: var(--white); }
.footer-social {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.08);
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #7fa8c0 !important;
  font-size: 1.1rem;
  transition: background .2s, color .2s;
  text-decoration: none;
}
.footer-social:hover { background: var(--primary); color: var(--white) !important; }
.footer-social:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; }
.footer-divider { border-color: rgba(255,255,255,.08); margin: 30px 0 20px; }

/* ============================================================
   CHATBOT WIDGET
   ============================================================ */
#chatbot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-chatbot);
  font-family: 'Open Sans', sans-serif;
}
#chatbot-toggle {
  width: 60px; height: 60px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(21,101,192,.4);
  transition: background .2s, transform .2s;
  position: relative;
}
#chatbot-toggle:hover { background: var(--primary-dark); transform: scale(1.06); }
#chatbot-toggle:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 3px; }
.chatbot-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 20px; height: 20px;
  background: var(--accent);
  color: var(--white);
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
#chatbot-window {
  position: absolute;
  bottom: 72px; right: 0;
  width: 340px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 520px;
}
#chatbot-header {
  background: var(--primary);
  color: var(--white);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chatbot-avatar {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.chatbot-online-dot {
  width: 7px; height: 7px;
  background: #4ade80;
  border-radius: 50%;
  display: inline-block;
}
#chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.chat-msg { display: flex; }
.chat-msg.user  { justify-content: flex-end; }
.chat-msg.assistant { justify-content: flex-start; }
.chat-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: .85rem;
  line-height: 1.55;
}
.chat-msg.assistant .chat-bubble {
  background: var(--primary-50);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.chat-msg.user .chat-bubble {
  background: var(--primary);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.chat-typing {
  display: flex; gap: 4px; padding: 12px 14px;
  background: var(--primary-50); border-radius: 16px; border-bottom-left-radius: 4px;
}
.typing-dot {
  width: 7px; height: 7px;
  background: var(--primary-lighter);
  border-radius: 50%;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes typingBounce { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-8px); } }
#chatbot-suggestions {
  padding: 8px 16px;
  display: flex; flex-wrap: wrap; gap: 6px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-suggestion {
  background: var(--primary-50);
  color: var(--primary);
  border: 1px solid var(--primary-lighter);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.chat-suggestion:hover { background: var(--primary); color: var(--white); }
.chat-suggestion:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 2px; }
#chatbot-input-area {
  display: flex;
  padding: 10px 12px;
  gap: 8px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
#chatbot-input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: .85rem;
  outline: none;
  transition: border-color .2s;
  font-family: 'Open Sans', sans-serif;
  min-width: 0;
}
#chatbot-input:focus { border-color: var(--primary); }
#chatbot-send {
  width: 38px; height: 38px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s;
}
#chatbot-send:hover { background: var(--primary-dark); }
#chatbot-send:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 3px; }
#chatbot-close:focus-visible { outline: 2px solid rgba(255,255,255,.8); outline-offset: 2px; border-radius: 4px; }

/* ============================================================
   RESPONSIVE — Mobile First improvements
   ============================================================ */
@media (max-width: 991.98px) {
  /* Menú móvil — items empilados con separación */
  #navbarMain .navbar-nav { padding: .75rem 0; gap: 2px; }
  .navbar-nav .nav-link { border-radius: 6px; }
  /* Botón CTA en menú mobile */
  #navbarMain .btn-accent { margin: .75rem 0 .25rem; width: 100%; justify-content: center; }
}

@media (max-width: 768px) {
  .section-pad { padding: 50px 0; }
  .section-pad-sm { padding: 32px 0; }
  .hero { min-height: auto; padding: 72px 0 48px; }
  .hero-visual { display: none; }
  .cita-form-wrapper { padding: 24px 16px; }
  .hero-stats { gap: 16px; }
  .hero-stat-num { font-size: 1.5rem; }
  .stat-divider { display: none; }
  /* Chatbot ocupa casi todo el ancho en móvil */
  #chatbot-window {
    width: calc(100vw - 32px);
    right: -4px;
    max-height: calc(100dvh - 110px);
  }
}

@media (max-width: 576px) {
  /* Topbar apilado verticalmente en móvil muy pequeño */
  .topbar .d-flex { flex-direction: column; gap: 4px; }
  .topbar { padding: 8px 0; }
  /* Badges de riesgo: que quepan en columnas de 2 */
  .time-slot-grid { grid-template-columns: repeat(auto-fill, minmax(78px,1fr)); }
  /* Estadísticas en columna */
  .hero-stats { flex-direction: column; gap: 12px; }
}

/* Soporte para viewport height dinámico (iOS Safari) */
@supports (height: 100dvh) {
  @media (max-width: 768px) {
    #chatbot-window { max-height: calc(100dvh - 110px); }
  }
}
