/* Navegación SER: clases propias para evitar los estilos móviles antiguos. */
.ser-toggle, .ser-subtoggle, .ser-backdrop { display: none; }
.ser-menu { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.ser-menu > li { position: relative; }
.ser-menu a { text-decoration: none; }
.ser-menu a[aria-current="page"] { color: #168447; }
.ser-dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; padding: 14px; background: white; border-radius: 14px; box-shadow: 0 15px 40px #12352426; }
.ser-dropdown a { display: block; padding: 10px; border-radius: 8px; }
.ser-dropdown a:hover { background: #edf8f0; }

.ser-socials { display: flex; gap: 14px; align-items: center; }
.ser-socials a { display: inline-flex; align-items: center; justify-content: center; }
.ser-socials svg { width: 23px; height: 23px; fill: #168447; }
.ser-nav :focus-visible { outline: 3px solid #168447; outline-offset: 4px; }
@media (max-width: 768px) {
  body.ser-menu-open { overflow: hidden; }
  body.ser-menu-open .whatsapp-float, body.ser-menu-open .btn-top { visibility: hidden; }
  body.ser-menu-open header { z-index: 10001; }
  header .nav-container { padding: 12px 20px; }
  .ser-nav .ser-toggle { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 48px; height: 48px; padding: 0; border: 1px solid #dceade; border-radius: 14px; background: #f2f8f3; cursor: pointer; }
  .ser-toggle .bar { display: block; width: 22px; height: 2px; margin: 0; border-radius: 2px; background: #17683b; transition: transform .2s, opacity .2s; }
  .ser-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .ser-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
  .ser-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .ser-nav .ser-backdrop { display: block; position: fixed; inset: 0; z-index: 1; background: #0d281c80; opacity: 0; visibility: hidden; transition: opacity .22s, visibility .22s; }
  .ser-nav .ser-menu { box-sizing: border-box; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 6px; position: fixed; inset: 0 0 0 auto; width: min(88vw, 380px); height: 100vh; height: 100dvh; margin: 0; padding: 104px 22px max(24px, env(safe-area-inset-bottom)); background: #fff; box-shadow: -12px 0 45px #102b1926; z-index: 2; overflow-y: auto; overscroll-behavior: contain; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
  .ser-menu-open .ser-nav .ser-menu { transform: translateX(0); visibility: visible; }
  .ser-menu-open .ser-nav .ser-backdrop { visibility: visible; opacity: 1; }
  .ser-nav .ser-menu > li { display: block; flex-shrink: 0; margin: 0; padding: 0; border-bottom: 1px solid #edf1ed; }
  .ser-nav .ser-menu > li > a { display: block; padding: 17px 14px; font: 600 18px/1.4 'Inter', sans-serif; color: #203c2a; text-align: left; border-radius: 12px; }
  .ser-nav .ser-menu a::after { display: none; }
  .ser-nav .ser-menu > li > a[aria-current="page"], .ser-nav .ser-menu > li > a:hover { background: #edf8f0; color: #146b39; }
  .ser-nav .ser-menu > li:has(.ser-subtoggle) > a { margin-right: 54px; }
  .ser-nav .ser-subtoggle { display: flex; position: absolute; right: 0; top: 5px; width: 46px; height: 46px; align-items: center; justify-content: center; border: 1px solid #dceade; border-radius: 12px; color: #17683b; background: #f2f8f3; font-size: 24px; cursor: pointer; }
  .ser-subtoggle[aria-expanded="true"] { transform: rotate(180deg); }
  .ser-nav .ser-menu .ser-dropdown { display: none; position: static; min-width: 0; margin: 6px 0 14px; padding: 7px; background: #f6f9f6; border-radius: 12px; box-shadow: none; }
  .ser-nav .ser-menu .ser-subtoggle[aria-expanded="true"] + .ser-dropdown { display: block; }
  .ser-nav .ser-dropdown a { padding: 13px 12px; color: #46604d; font: 400 15px/1.4 'Inter', sans-serif; }
  .ser-nav .ser-menu > .ser-socials { display: flex; justify-content: flex-start; gap: 12px; margin-top: 22px; border: 0; }
  .ser-nav .ser-menu > .ser-socials > a { display: flex; width: 48px; height: 48px; padding: 0; align-items: center; justify-content: center; background: #edf8f0; }
}
@media (prefers-reduced-motion: reduce) {
  .ser-nav .ser-menu, .ser-nav .ser-backdrop, .ser-toggle .bar { transition: none; }
}

/* Barra flotante: conserva las tipografías del sitio y el panel móvil. */
header:has(.ser-nav) { top: 12px; width: calc(100% - 48px); max-width: 1120px; margin: 12px auto; padding: 0; background: transparent !important; border: 0; box-shadow: none; }
header:has(.ser-nav) .nav-container { max-width: none; gap: 18px; padding: 12px 26px !important; background: #fff !important; border-radius: 24px; box-shadow: 0 12px 32px #14382410, 0 2px 6px #14382408; transition: padding .25s, border-radius .25s, box-shadow .25s; }
header:has(.ser-nav) .logo { height: 78px !important; width: auto; max-width: 140px; object-fit: contain; transform: none; transition: height .25s; }
header.ser-scrolled .nav-container { padding: 8px 26px !important; border-radius: 18px; box-shadow: 0 8px 26px #14382420; }
header.ser-scrolled .logo { height: 54px !important; }
.ser-desktop-trigger, .ser-all-services { display: none; }
@media (min-width: 769px) {
  .ser-menu { gap: 6px; }
  .ser-menu > li > a, .ser-desktop-trigger { padding: 12px 15px; border: 0; border-radius: 999px; font-family: 'Segoe UI', Tahoma, sans-serif; font-size: 16px; font-weight: 600; line-height: 1.4; white-space: nowrap; color: #34483b; background: transparent; }
  .ser-menu > li > a { display: block; }
  .ser-menu > li > a::after { display: none; }
  .ser-menu > li > a[aria-current="page"], .ser-menu > li > a:hover, .ser-desktop-trigger:hover, .ser-desktop-trigger[aria-expanded="true"], .ser-services-link[aria-current="page"] + .ser-desktop-trigger { background: #eaf6ed; color: #16733f; }
  .ser-menu .ser-services-link { display: none; }
  .ser-desktop-trigger { display: block; cursor: pointer; }
  .ser-dropdown { top: calc(100% + 8px); left: 0; width: 245px; padding: 8px; background: #fff; border: 1px solid #e6eee8; border-radius: 16px; box-shadow: 0 12px 30px #14382418; }
  .ser-menu .ser-desktop-trigger[aria-expanded="true"] ~ .ser-dropdown { display: block; }
  .ser-dropdown a { padding: 12px 14px; border-radius: 9px; font: 400 15px/1.4 'Segoe UI', Tahoma, sans-serif; }
  .ser-dropdown a::after { display: none; }
  .ser-dropdown .ser-all-services { display: block; }
  .ser-socials { border-left: 1px solid #e8eee9; padding-left: 14px; margin-left: 8px; gap: 6px; }
  .ser-menu > .ser-socials > a { display: flex; width: 40px; height: 40px; padding: 0; background: #f3f8f4; border-radius: 50%; align-items: center; justify-content: center; }
}
@media (min-width: 769px) and (max-width: 1000px) {
  header:has(.ser-nav) .nav-container { padding: 10px 16px !important; gap: 10px; }
  .ser-menu > li > a, .ser-desktop-trigger { padding: 12px 9px; }
  .ser-socials { padding-left: 8px; margin-left: 0; }
}
@media (max-width: 768px) {
  header:has(.ser-nav) { top: 10px; width: calc(100% - 24px); margin: 10px auto; }
  header:has(.ser-nav) .nav-container { padding: 10px 16px !important; border-radius: 20px; }
  header:has(.ser-nav) .logo { height: 62px !important; }
  header.ser-scrolled .logo { height: 54px !important; }
  .ser-nav .ser-dropdown .ser-all-services { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  header:has(.ser-nav) .nav-container, header:has(.ser-nav) .logo { transition: none; }
}

/* Portada: foto nítida, texto legible y composición natural. */
.hero.hero-index {
  box-sizing: border-box;
  height: auto;
  min-height: 560px;
  padding: clamp(112px, 15vh, 156px) 8% 180px !important;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  color: #fff;
}
.hero.hero-index::before {
  background-position: center 46%;
  filter: none;
  transform: none;
}
.hero.hero-index::after {
  background: linear-gradient(90deg, rgba(12, 42, 28, .88) 0%, rgba(16, 51, 34, .78) 36%, rgba(18, 51, 35, .40) 61%, rgba(10, 24, 18, .05) 100%);
}
.hero-index .hero-copy {
  position: relative;
  z-index: 3;
  width: min(100%, 620px);
  padding-left: 24px;
  border-left: 4px solid #22c55e;
}
.hero-index .hero-copy h1 {
  max-width: 590px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(2.35rem, 4.4vw, 3.55rem);
  line-height: 1.12;
  text-align: left;
}
.hero-index .hero-copy p {
  max-width: 510px;
  margin: 0 0 28px;
  color: #f0f5f1;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.65;
}
.hero-index .hero-copy .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 27px;
  border-radius: 8px;
  background: #22a957;
  color: #fff;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .16);
  transition: background .2s ease, transform .2s ease;
}
.hero-index .hero-copy .btn-primary:hover {
  background: #198847;
  transform: translateY(-1px);
}
@media (max-width: 768px) {
  .hero.hero-index {
    min-height: 90vh;
    min-height: min(760px, 90svh);
    padding: 144px 22px 180px !important;
    justify-content: center;
  }
  .hero.hero-index::before { background-position: 52% center; }
  .hero.hero-index::after {
    background: linear-gradient(180deg, rgba(12, 42, 28, .86) 0%, rgba(16, 51, 34, .76) 40%, rgba(18, 51, 35, .28) 76%, rgba(10, 24, 18, .08) 100%);
  }
  .hero-index .hero-copy {
    width: min(100%, 540px);
    padding-left: 18px;
    border-left-width: 3px;
  }
  .hero-index .hero-copy h1 {
    max-width: 500px;
    margin-bottom: 16px;
    font-size: clamp(2.1rem, 9vw, 2.65rem);
    line-height: 1.12;
  }
  .hero-index .hero-copy p {
    max-width: 440px;
    margin-bottom: 24px;
    font-size: 1rem;
    line-height: 1.55;
  }
}

/* Reglas antiguas del sitio usan !important en móvil: se mantiene la portada alineada. */
@media (max-width: 768px) {
  .hero.hero-index { align-items: flex-start !important; }
  .hero-index .hero-copy h1 {
    max-width: 100% !important;
    margin-bottom: 16px !important;
    padding: 0 !important;
    font-size: clamp(2.1rem, 9vw, 2.65rem) !important;
    text-align: left !important;
  }
  .hero-index .hero-copy p {
    margin-bottom: 24px !important;
    font-size: 1rem !important;
  }
  .hero-index .hero-copy .btn-primary {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 13px 27px !important;
    font-size: 1rem !important;
  }
}

/* Cabeceras interiores: misma línea visual de la portada. */
.hero.hero-nosotros,
.hero.hero-servicios,
.hero.hero-contacto {
  box-sizing: border-box;
  height: auto;
  min-height: 560px;
  padding: clamp(112px, 15vh, 156px) 8% 180px !important;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  color: #fff;
}
.hero.hero-nosotros::before,
.hero.hero-servicios::before,
.hero.hero-contacto::before {
  background-position: center 46%;
  filter: none;
  transform: none;
}
.hero.hero-nosotros::after,
.hero.hero-servicios::after,
.hero.hero-contacto::after {
  background: linear-gradient(90deg, rgba(12, 42, 28, .88) 0%, rgba(16, 51, 34, .78) 36%, rgba(18, 51, 35, .40) 61%, rgba(10, 24, 18, .05) 100%);
}
.hero-nosotros .hero-copy,
.hero-servicios .hero-copy,
.hero-contacto .hero-copy {
  position: relative;
  z-index: 3;
  width: min(100%, 620px);
  padding-left: 24px;
  border-left: 4px solid #22c55e;
}
.hero-nosotros .hero-copy h1,
.hero-servicios .hero-copy h1,
.hero-contacto .hero-copy h1 {
  max-width: 590px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(2.35rem, 4.4vw, 3.55rem);
  line-height: 1.12;
  text-align: left;
}
.hero-nosotros .hero-copy p,
.hero-servicios .hero-copy p,
.hero-contacto .hero-copy p {
  max-width: 510px;
  margin: 0;
  color: #f0f5f1;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.65;
}
@media (max-width: 768px) {
  .hero.hero-nosotros,
  .hero.hero-servicios,
  .hero.hero-contacto {
    min-height: 90vh;
    min-height: min(760px, 90svh);
    padding: 144px 22px 180px !important;
    align-items: flex-start !important;
    justify-content: center;
  }
  .hero.hero-nosotros::before { background-position: 54% center; }
  .hero.hero-servicios::before { background-position: 58% center; }
  .hero.hero-contacto::before { background-position: 52% center; }
  .hero.hero-nosotros::after,
  .hero.hero-servicios::after,
  .hero.hero-contacto::after {
    background: linear-gradient(180deg, rgba(12, 42, 28, .86) 0%, rgba(16, 51, 34, .76) 40%, rgba(18, 51, 35, .28) 76%, rgba(10, 24, 18, .08) 100%);
  }
  .hero-nosotros .hero-copy,
  .hero-servicios .hero-copy,
  .hero-contacto .hero-copy {
    width: min(100%, 540px);
    padding-left: 18px;
    border-left-width: 3px;
  }
  .hero-nosotros .hero-copy h1,
  .hero-servicios .hero-copy h1,
  .hero-contacto .hero-copy h1 {
    max-width: 100% !important;
    margin-bottom: 16px !important;
    padding: 0 !important;
    font-size: clamp(2.1rem, 9vw, 2.65rem) !important;
    text-align: left !important;
  }
  .hero-nosotros .hero-copy p,
  .hero-servicios .hero-copy p,
  .hero-contacto .hero-copy p {
    margin-bottom: 0 !important;
    font-size: 1rem !important;
  }
}

.hero-servicios .service-hero-actions {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
}
.hero-servicios .service-hero-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.hero-servicios .service-hero-form-link,
.hero-servicios .service-hero-phone a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero-servicios .service-hero-phone {
  margin-top: 12px !important;
  font-size: .98rem !important;
}
.service-text-side .service-inline-link {
  color: #17683b;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 768px) {
  .hero-servicios .service-hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-top: 22px;
  }
  .hero-servicios .service-hero-actions .btn-primary {
    padding: 13px 24px;
    font-size: .98rem;
  }
  .hero-servicios .service-hero-phone {
    margin-top: 14px !important;
  }
}

/* Carrusel de clientes */
.clients-slider-section {
  padding: 62px 0 72px;
  background: #f6faf7;
  overflow: hidden;
}
.clients-slider-section .section-title {
  position: relative;
  margin: 0 0 34px;
  color: #183b28;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.25;
  text-align: center;
}
.clients-slider-section .section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 3px;
  background: #22a957;
}
.clients-slider-section .slider-wrapper {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.clients-slider-section .logos-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: clients-marquee 67s linear infinite;
  will-change: transform;
}
.clients-slider-section .logos-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 20px;
  padding-right: 20px;
}
.clients-slider-section .logo-item {
  box-sizing: border-box;
  display: flex;
  flex: 0 0 210px;
  align-items: center;
  justify-content: center;
  min-height: 108px;
  margin: 0;
  padding: 18px;
  border: 1px solid #e7eee8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(24, 59, 40, .055);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.clients-slider-section .logo-item:hover {
  transform: translateY(-3px);
  border-color: #c7dfce;
  box-shadow: 0 9px 24px rgba(24, 59, 40, .10);
}
.clients-slider-section .logo-item img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 66px;
  object-fit: contain;
  filter: grayscale(20%);
  opacity: .88;
  transition: filter .22s ease, opacity .22s ease;
}
.clients-slider-section .logo-item:hover img {
  filter: grayscale(0);
  opacity: 1;
}
.clients-slider-section .slider-wrapper:hover .logos-track {
  animation-play-state: paused;
}
@keyframes clients-marquee {
  to { transform: translateX(-50%); }
}
@media (max-width: 768px) {
  .clients-slider-section { padding: 48px 0 56px; }
  .clients-slider-section .section-title { margin-bottom: 26px; }
  .clients-slider-section .logos-group { gap: 14px; padding-right: 14px; }
  .clients-slider-section .logo-item {
    flex-basis: 165px;
    min-height: 88px;
    padding: 14px;
    border-radius: 12px;
  }
  .clients-slider-section .logo-item img { max-height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .clients-slider-section .logos-track {
    animation: none;
    transform: none;
    will-change: auto;
  }
  .clients-slider-section .logo-item,
  .clients-slider-section .logo-item img { transition: none; }
}

/* Franja compacta de confianza en Servicios y Contacto */
.client-proof {
  padding: 36px 0 40px;
  background: #f6faf7;
  border-top: 1px solid #eaf1eb;
}
.client-proof h2 {
  margin: 0 0 20px;
  color: #496653;
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}
.client-proof-logos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 900px);
  margin: 0 auto;
}
.client-proof-logo {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid #e7eee8;
  border-radius: 12px;
  background: #fff;
}
.client-proof-logo img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 50px;
  object-fit: contain;
}
@media (max-width: 768px) {
  .client-proof { padding: 30px 0 34px; }
  .client-proof h2 { margin-bottom: 16px; }
  .client-proof-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .client-proof-logo { min-height: 68px; padding: 9px; }
  .client-proof-logo img { max-height: 44px; }
}

/* Canales de llamada y WhatsApp en Contacto */
.contact-channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.contact-channel-option {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #e1e9e3;
  border-radius: 13px;
  background: #f7faf8;
}
.contact-channel-label {
  color: #587362;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.35;
  text-transform: uppercase;
}
.contact-channel-number {
  margin: 7px 0 12px;
  color: #183b28;
  font-size: clamp(14px, 1.4vw, 16px);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
.contact-channel-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 0 13px;
  border: 1px solid #178447;
  border-radius: 8px;
  color: #178447;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}
.contact-channel-action.whatsapp {
  color: #fff;
  background: #178447;
}
.contact-channel-action:hover { background: #edf7f0; }
.contact-channel-action.whatsapp:hover { background: #126f3a; }
@media (max-width: 380px) {
  .contact-channel-grid { grid-template-columns: 1fr; }
  .contact-channel-option { padding: 12px 14px; }
  .contact-channel-number { margin: 5px 0 10px; }
}

/* Encuadre visual de los ocho logos: se conservan los archivos originales. */
.clients-slider-section .logo-item { min-height: 124px; }
.client-proof-logo { box-sizing: border-box; min-height: 112px; padding: 14px; }
.client-logo-frame {
  position: relative;
  width: min(100%, calc(var(--client-logo-height, 80px) * var(--logo-ratio)));
  max-width: 174px;
  aspect-ratio: var(--logo-ratio);
  overflow: hidden;
}
.clients-slider-section .logo-item .client-logo-frame img,
.client-proof-logo .client-logo-frame img {
  position: absolute;
  display: block;
  left: var(--logo-left);
  top: var(--logo-top);
  width: var(--logo-width);
  height: var(--logo-height);
  max-width: none;
  max-height: none;
  object-fit: fill;
  opacity: 1;
  filter: none;
}
@media (max-width: 768px) {
  .client-logo-frame { --client-logo-height: 68px; }
  .client-proof-logo { min-height: 100px; padding: 12px; }
  .clients-slider-section .logo-item { min-height: 112px; }
}

/* La curva de Inicio continúa sobre el fondo del carrusel de clientes. */
.cta-banner.cta-home .leaf-shape .fill-bg {
  fill: #f6faf7 !important;
}

/* La curva de la portada continúa sobre el fondo de Nuestros servicios. */
.hero.hero-index .leaf-shape .fill-bg {
  fill: #f6f9fc !important;
}

/* Las curvas interiores continúan sobre el fondo de la sección siguiente. */
.hero.hero-servicios .leaf-shape .fill-bg,
.hero.hero-nosotros .leaf-shape .fill-bg {
  fill: #f6f9fc !important;
}
.hero.hero-contacto .leaf-shape .fill-bg {
  fill: #f8fafc !important;
}
.hero-servicios ~ .cta-banner .leaf-shape .fill-bg {
  fill: #f6faf7 !important;
}
.hero-nosotros ~ .cta-banner .leaf-shape .fill-bg {
  fill: #0f172a !important;
}
