:root {
  --navy: #0a1d37;
  --orange: #ff5e14;
  --ease-elegant: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-elegant: 400ms;
  --duration-elegant-long: 500ms;
  --gradient-accent-soft: linear-gradient(
    135deg,
    rgba(255, 94, 20, 0.1) 0%,
    rgba(10, 29, 55, 0.05) 48%,
    rgba(255, 94, 20, 0.06) 100%
  );
  --gradient-surface: linear-gradient(180deg, #fafbfd 0%, #ffffff 40%, #f6f8fc 100%);
  --gradient-cta: linear-gradient(135deg, #ff5e14 0%, #e8551a 52%, #d64e16 100%);
  --scrollbar-track: #e4e9f2;
  --scrollbar-thumb: var(--orange);
  --scrollbar-thumb-hover: #ff6b28;
  --scrollbar-thumb-border: #d8dee9;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 148px;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

html::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

html::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #eef2f9 0%, var(--scrollbar-track) 100%);
  border-left: 1px solid rgba(10, 29, 55, 0.07);
}

html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff6b28 0%, var(--orange) 42%, #e8551a 100%);
  border-radius: 999px;
  border: 2px solid var(--scrollbar-track);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  min-height: 56px;
}

html::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--scrollbar-thumb-hover) 0%, var(--orange) 55%, #d64e16 100%);
}

html::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #e8551a 0%, #c94a0f 100%);
}

html::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: "Montserrat", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  background: var(--gradient-surface);
  background-attachment: fixed;
}

body.page-preloader-active {
  overflow: hidden;
}

.page-preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 48%, #ffffff 100%);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-preloader__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.page-preloader__brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(380px, 92vw);
  min-height: 188px;
  padding: 1.5rem 1.25rem;
}

.page-preloader__svg {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  /* Cuadrado: el anillo queda por fuera del logo sin deformarse */
  width: min(348px, calc(100% + 6rem));
  max-width: none;
  height: auto;
  aspect-ratio: 1;
  z-index: 0;
  animation: page-preloader-rotate 2.2s linear infinite;
}

.page-preloader__track {
  fill: none;
  stroke: rgba(10, 29, 55, 0.11);
  stroke-width: 2;
}

.page-preloader__arc {
  fill: none;
  stroke: var(--orange);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 28 72;
  transform-origin: 60px 60px;
  animation: page-preloader-dash 1.9s ease-in-out infinite;
}

.page-preloader__logo {
  position: relative;
  z-index: 1;
  display: block;
  max-height: 88px;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  animation: page-preloader-pulse 1.85s ease-in-out infinite;
}

@keyframes page-preloader-rotate {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes page-preloader-dash {
  0%,
  100% {
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dashoffset: -18;
  }
}

@keyframes page-preloader-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.88;
    transform: scale(1.045);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-preloader__svg,
  .page-preloader__arc,
  .page-preloader__logo {
    animation: none;
  }

  .page-preloader {
    transition-duration: 0.2s;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

.hero-parallax-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: -50%;
  height: 200%;
  z-index: 0;
  background-color: var(--navy);
  background-image: url("foto-hero.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center calc(50% + 400px);
  pointer-events: none;
  will-change: transform;
  backface-visibility: hidden;
}

.hero-line-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 46px,
      rgba(255, 255, 255, 0.055) 46px,
      rgba(255, 255, 255, 0.055) 47px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 46px,
      rgba(255, 255, 255, 0.045) 46px,
      rgba(255, 255, 255, 0.045) 47px
    );
  background-size: 47px 47px;
  animation: hero-line-grid-drift 28s linear infinite;
  opacity: 0.75;
}

.hero-line-overlay::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: repeating-linear-gradient(
    118deg,
    transparent 0,
    transparent 120px,
    rgba(255, 94, 20, 0.06) 120px,
    rgba(255, 94, 20, 0.06) 121px
  );
  animation: hero-line-diagonal-sway 55s ease-in-out infinite alternate;
}

.hero-line-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 48%,
    rgba(255, 255, 255, 0.03) 49.5%,
    rgba(255, 255, 255, 0.03) 50.5%,
    transparent 52%
  );
  background-size: 180% 180%;
  animation: hero-line-shimmer 14s ease-in-out infinite;
}

@keyframes hero-line-grid-drift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 47px 47px, 47px 47px;
  }
}

@keyframes hero-line-diagonal-sway {
  0% {
    transform: translate3d(-2%, 1%, 0) rotate(-0.5deg);
    opacity: 0.55;
  }
  100% {
    transform: translate3d(2%, -1%, 0) rotate(0.5deg);
    opacity: 0.85;
  }
}

@keyframes hero-line-shimmer {
  0%,
  100% {
    background-position: 0% 40%;
    opacity: 0.35;
  }
  50% {
    background-position: 100% 60%;
    opacity: 0.65;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-line-overlay,
  .hero-line-overlay::before,
  .hero-line-overlay::after {
    animation: none;
  }

  .hero-line-overlay {
    opacity: 0.4;
  }
}

.parallax-strip {
  position: relative;
}

.parallax-strip-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: -50%;
  height: 200%;
  z-index: 0;
  background-color: var(--navy);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  pointer-events: none;
  will-change: transform;
  backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .hero-parallax-bg,
  .parallax-strip-bg {
    will-change: auto;
    transform: none !important;
  }
}

#header {
  transition:
    background-color var(--duration-elegant) var(--ease-elegant),
    opacity var(--duration-elegant) var(--ease-elegant),
    box-shadow var(--duration-elegant) var(--ease-elegant),
    border-color var(--duration-elegant) var(--ease-elegant),
    backdrop-filter var(--duration-elegant) var(--ease-elegant);
}

#header.scrolled {
  background-color: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 32px rgba(10, 29, 55, 0.1);
  border-color: rgba(226, 232, 240, 0.85);
}

#header.scrolled .top-toolbar {
  max-height: 0;
  min-height: 0;
  opacity: 0;
  overflow: hidden;
  border-bottom-color: transparent;
  pointer-events: none;
}

.top-toolbar {
  transition:
    max-height var(--duration-elegant-long) var(--ease-elegant),
    opacity var(--duration-elegant) var(--ease-elegant),
    min-height var(--duration-elegant-long) var(--ease-elegant);
  max-height: 200px;
}

#header.scrolled .toolbar-inner {
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.header-main-bar {
  min-height: 5rem;
  transition:
    min-height var(--duration-elegant) var(--ease-elegant),
    height var(--duration-elegant) var(--ease-elegant);
}

#header.scrolled .header-main-bar {
  min-height: 3.5rem;
  height: 3.5rem;
}

#header.scrolled .header-logo {
  max-height: 41px;
  transition: max-height var(--duration-elegant) var(--ease-elegant);
}

.header-logo {
  transition: max-height var(--duration-elegant) var(--ease-elegant);
}

@media (min-width: 1024px) {
  #header.scrolled .main-nav-link {
    font-size: 0.9375rem;
  }
}

.main-nav-link {
  transition: color var(--duration-elegant) var(--ease-elegant), font-size var(--duration-elegant) var(--ease-elegant);
}

#servicios .service-cards-grid {
  perspective: 1100px;
}

#servicios .service-card-tilt {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform var(--duration-elegant-long) var(--ease-elegant), box-shadow var(--duration-elegant) var(--ease-elegant);
}

#servicios .service-card-tilt:hover {
  box-shadow: 0 22px 44px rgba(10, 29, 55, 0.12);
}

.section-accent-gradient {
  background-color: #ffffff;
  background-image: var(--gradient-accent-soft);
}

@media (prefers-reduced-motion: reduce) {
  #servicios .service-card-tilt {
    will-change: auto;
  }
}

.btn-gradient-accent {
  background-image: var(--gradient-cta);
  transition: filter var(--duration-elegant) var(--ease-elegant), box-shadow var(--duration-elegant) var(--ease-elegant);
}

.btn-gradient-accent:hover {
  filter: brightness(1.05);
  box-shadow: 0 14px 36px rgba(255, 94, 20, 0.35);
}

.header-inner {
  width: 80%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search-trigger {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #dce3ef;
  background: #fff;
  color: var(--navy);
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-search-trigger:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-1px);
}

.header-search-panel {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translate(12px, -50%);
  width: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  pointer-events: none;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 28px rgba(10, 29, 55, 0.12);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  transition: width 0.32s ease, opacity 0.25s ease, transform 0.32s ease, padding 0.2s ease, visibility 0.2s ease;
}

.header-search.open .header-search-panel {
  width: min(58vw, 520px);
  padding: 8px;
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
  pointer-events: auto;
}

.header-search-input {
  flex: 1;
  min-width: 180px;
  height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
}

.header-search-input:focus {
  outline: none;
  border-color: #ff9900;
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.2);
}

.header-search-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-search-btn,
.header-filter-btn {
  height: 40px;
  padding: 0 11px;
  border-radius: 10px;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.header-search-btn {
  background: var(--orange);
  color: #fff;
}

.header-filter-btn {
  background: #edf2f7;
  color: var(--navy);
}

.is-open#mobile-menu {
  animation: mobileMenuIn 0.2s ease;
}

@keyframes mobileMenuIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.top-toolbar {
  background: var(--navy);
  color: #e5edf8;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.toolbar-inner {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
}

.toolbar-message {
  font-weight: 600;
  color: #ffffff;
}

.toolbar-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.toolbar-links a,
.toolbar-links span {
  color: #d9e4f3;
  white-space: nowrap;
}

.toolbar-links a:hover {
  color: #ffffff;
}

.body-icon {
  color: var(--orange);
  font-size: 16px;
  margin-right: 6px;
  vertical-align: middle;
}

.menu-icon {
  color: var(--orange);
  font-size: 14px;
  line-height: 1;
}

.main-nav-link,
.footer-link {
  position: relative;
}

.main-nav-link::after,
.footer-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: #ff9900;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s ease;
}

.main-nav-link:hover::after,
.main-nav-link:focus-visible::after,
.footer-link:hover::after,
.footer-link:focus-visible::after {
  transform: scaleX(1);
}

.feature-icon {
  color: var(--orange);
  font-size: 48px;
  line-height: 1;
}

.hero-offset {
  padding-top: 150px;
}

.feature-card {
  transition: transform var(--duration-elegant) var(--ease-elegant),
    box-shadow var(--duration-elegant) var(--ease-elegant);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 34px rgba(10, 29, 55, 0.12);
}

.testimonial-slide {
  display: none;
}

.testimonial-slide.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: #d6dbe6;
  transition: width var(--duration-elegant) var(--ease-elegant),
    background var(--duration-elegant) var(--ease-elegant);
}

.dot.active {
  width: 28px;
  background: var(--orange);
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  transition: all 0.25s ease;
}

.social-link:hover {
  background: var(--orange);
  color: #fff;
}

.social-gadget {
  position: fixed;
  right: 0;
  top: 40%;
  transform: translateY(-50%);
  /* Por encima del bot flotante de WhatsApp para que el trigger y el panel reciban clic */
  z-index: 75;
  display: flex;
  align-items: center;
}

.social-gadget-trigger {
  border: 0;
  background: var(--orange);
  color: #fff;
  width: 48px;
  min-height: 128px;
  padding: 10px 0;
  border-radius: 12px 0 0 12px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transform: scale(1);
  transform-origin: right center;
  box-shadow: 0 10px 24px rgba(255, 94, 20, 0.35);
  transition:
    transform 0.4s cubic-bezier(0.34, 1.35, 0.64, 1),
    box-shadow 0.4s ease,
    filter 0.4s ease;
}

.social-gadget-trigger i {
  transform-origin: center center;
}

.social-gadget-trigger:hover {
  transform: scale(1.05);
  box-shadow:
    0 12px 36px rgba(255, 94, 20, 0.5),
    0 0 28px rgba(255, 140, 60, 0.45);
  filter: brightness(1.08) saturate(1.08);
}

.social-gadget-trigger:focus-visible {
  transform: scale(1.05);
  box-shadow:
    0 12px 36px rgba(255, 94, 20, 0.5),
    0 0 28px rgba(255, 140, 60, 0.45),
    0 0 0 3px rgba(255, 255, 255, 0.45);
  filter: brightness(1.08) saturate(1.08);
  outline: none;
}

@media (hover: hover) {
  .social-gadget-trigger:hover i {
    animation: social-gadget-icon-pulse 1.05s ease-in-out infinite;
  }
}

.social-gadget-trigger:focus-visible i {
  animation: none;
  transform: scale(1.1);
}

@keyframes social-gadget-icon-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.12);
  }
}

.social-gadget-trigger span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 1px;
}

.social-gadget-panel {
  position: absolute;
  right: 100%;
  top: 50%;
  background: #07162b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translate(10px, -50%) scaleX(0.72);
  transform-origin: right center;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.social-gadget.open .social-gadget-panel {
  transform: translate(0, -50%) scaleX(1);
  opacity: 1;
  pointer-events: auto;
}

.social-gadget-panel a {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--orange);
  background: rgba(255, 255, 255, 0.08);
  font-size: 20px;
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.social-gadget-panel a:hover {
  transform: translateY(-3px);
  color: #fff;
  background: var(--orange);
}

.scroll-up-btn {
  position: fixed;
  right: 21px;
  bottom: calc(24px + 58px + 10px);
  z-index: 73;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(10, 29, 55, 0.28);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    visibility 0.28s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.scroll-up-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-up-btn:hover {
  background: var(--orange);
  box-shadow: 0 10px 26px rgba(255, 94, 20, 0.4);
}

.scroll-up-btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.wa-bot {
  position: fixed;
  right: 16px;
  bottom: 24px;
  z-index: 72;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 10px;
  font-size: 14px;
}

.wa-bot-trigger {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 0;
  background: #25d366;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wa-bot-trigger:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.55);
}

.wa-bot-panel {
  width: min(100vw - 32px, 340px);
  max-height: min(82vh, 640px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 46px rgba(10, 29, 55, 0.18);
  border: 1px solid #e8edf5;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.96);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
}

.wa-bot.is-open .wa-bot-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.wa-bot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #075e54;
  color: #fff;
}

.wa-bot-header-text strong {
  display: block;
  font-size: 15px;
}

.wa-bot-header-text span {
  font-size: 12px;
  opacity: 0.9;
}

.wa-bot-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.wa-bot-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.wa-bot-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid #e8edf5;
}

.wa-bot-tab {
  padding: 10px 8px;
  border: 0;
  background: #f5f7fb;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.2s ease;
}

.wa-bot-tab.is-active {
  background: #fff;
  color: var(--orange);
  box-shadow: inset 0 -2px 0 var(--orange);
}

.wa-bot-body {
  padding: 0;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.wa-bot-hint {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 10px;
  line-height: 1.45;
}

.wa-bot-section {
  display: none;
}

.wa-bot-section.is-visible {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.wa-faq-layout {
  gap: 0;
}

.wa-faq-layout .wa-pref-bar,
.wa-faq-layout .wa-quick-wrap,
.wa-faq-layout .wa-chat-composer {
  flex-shrink: 0;
}

#wa-panel-human {
  padding: 12px 14px 14px;
  overflow-y: auto;
  gap: 0;
}

.wa-chat-messages {
  flex: 1 1 auto;
  min-height: 72px;
  max-height: min(200px, 34vh);
  overflow-y: auto;
  padding: 8px 10px 10px;
  background-color: #e5ddd5;
  background-image: linear-gradient(rgba(229, 221, 213, 0.92), rgba(229, 221, 213, 0.92)),
    repeating-linear-gradient(45deg, transparent, transparent 4px, rgba(0, 0, 0, 0.04) 4px, rgba(0, 0, 0, 0.04) 5px);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wa-msg-row {
  display: flex;
  width: 100%;
}

.wa-msg-row--user {
  justify-content: flex-end;
}

.wa-msg-row--bot {
  justify-content: flex-start;
}

.wa-bubble {
  max-width: 88%;
  padding: 7px 10px 5px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  word-wrap: break-word;
  opacity: 0;
  transform: translateY(6px);
  animation: waBubbleIn 0.35s ease forwards;
}

@keyframes waBubbleIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wa-bubble--user {
  background: #dcf8c6;
  color: #111827;
  border-radius: 8px 8px 0 8px;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

.wa-bubble--bot {
  background: #fff;
  color: #111827;
  border-radius: 8px 8px 8px 0;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

.wa-bubble-meta {
  display: block;
  font-size: 10px;
  color: #667781;
  text-align: right;
  margin-top: 4px;
  line-height: 1;
}

.wa-msg-row--bot .wa-bubble-meta {
  color: #8696a0;
}

.wa-typing {
  background: #fff;
  padding: 12px 16px;
  border-radius: 8px 8px 8px 0;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.wa-typing span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #8696a0;
  animation: waDot 1.2s ease-in-out infinite;
}

.wa-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.wa-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes waDot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.wa-pref-bar {
  padding: 5px 10px 6px;
  background: #eceff1;
  border-top: 1px solid #d1d7db;
}

.wa-pref-bar .wa-reply-lengths {
  margin-bottom: 0;
  gap: 6px;
}

.wa-pref-bar .wa-length-btn {
  padding: 5px 6px;
}

.wa-quick-wrap {
  padding: 5px 10px 7px;
  background: #f0f2f5;
  border-top: 1px solid #d1d7db;
}

.wa-quick-label {
  font-size: 11px;
  font-weight: 700;
  color: #54656f;
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.wa-faq-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wa-faq-chips button {
  font-size: 11px;
  line-height: 1.3;
  padding: 6px 10px;
  border-radius: 16px;
  border: 1px solid #d1d7db;
  background: #fff;
  color: #111b21;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.wa-faq-chips button:hover {
  background: #f8f9fa;
  border-color: #25d366;
}

.wa-chat-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 8px;
  background: #f0f2f5;
  border-top: 1px solid #d1d7db;
}

.wa-chat-input {
  flex: 1;
  border: 0;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  box-shadow: inset 0 0 0 1px #d1d7db;
}

.wa-chat-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px #25d366;
}

.wa-chat-send {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.wa-chat-send:hover {
  background: #1eb655;
  transform: scale(1.04);
}

.wa-bot-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 8px;
}

.wa-reply-lengths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.wa-length-btn {
  padding: 8px 6px;
  border: 1px solid #e8edf5;
  border-radius: 10px;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.wa-length-btn.is-active {
  border-color: var(--orange);
  background: #fff5ef;
  color: var(--orange);
}

.wa-human-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e8edf5;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 96px;
  margin-bottom: 12px;
}

.wa-human-textarea:focus {
  outline: 2px solid rgba(255, 94, 20, 0.35);
  outline-offset: 0;
}

.wa-human-send {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.wa-human-send:hover {
  background: #1eb655;
  transform: translateY(-1px);
}

.footer-base {
  font-size: 11px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.footer-base h4.footer-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.footer-base .footer-newsletter-form input[type="email"],
.footer-base .footer-newsletter-form button {
  font-size: 11px;
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  align-items: flex-start;
}

.footer-grid > * {
  min-width: 0;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .footer-grid {
    grid-template-columns: 15fr 15fr 15fr 15fr 20fr 20fr;
  }
}

.footer-title {
  color: #ffd4c0;
}

.footer-logo {
  display: block;
  height: auto;
  max-width: 220px;
  width: 100%;
}

.header-logo {
  display: block;
  height: auto;
  max-height: 53px;
  width: auto;
  max-width: min(336px, 84vw);
}

.footer-menu {
  list-style: disc;
  padding-left: 18px;
}

.footer-menu li::marker {
  color: var(--orange);
}

.footer-link {
  color: #a7b2c7;
}

.footer-base .footer-social li {
  list-style: none;
}

.footer-base .footer-social .social-link {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.footer-base .footer-social .social-link:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.footer-copyright {
  font-size: 10px;
}

.footer-payments {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-tarjetas-img {
  display: block;
  max-width: min(150px, 70vw);
  height: auto;
  opacity: 0.92;
}

.mega-menu-wrapper {
  position: relative;
}

.mega-menu-panel {
  position: absolute;
  left: 50%;
  top: calc(100% + 16px);
  z-index: 60;
  width: 740px;
  max-width: calc(100vw - 32px);
  padding: 24px;
  border-radius: 16px;
  border: 1px solid #e8edf5;
  background: #ffffff;
  box-shadow: 0 25px 45px rgba(10, 29, 55, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.mega-menu-panel--productos {
  width: min(100vw - 24px, 1020px);
  max-height: min(75vh, 580px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px 20px;
}

.mega-menu-grid--productos {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mega-item--product {
  padding: 10px 12px;
}

.mega-item--product h4 {
  font-size: 0.8rem;
  line-height: 1.25;
  margin: 0;
}

.mega-item--product .mega-product-price {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--orange);
  margin-top: 6px;
}

.mega-item--product .mega-product-price span {
  font-size: 0.65rem;
  font-weight: 600;
  color: #64748b;
}

.mega-item--product p:not(.mega-product-price) {
  font-size: 0.7rem !important;
  line-height: 1.35;
  margin-top: 6px !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

@media (max-width: 1100px) {
  .mega-menu-grid--productos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.product-star-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 1.35rem;
  box-shadow: 0 10px 30px rgba(10, 29, 55, 0.06);
  transition: border-color var(--duration-elegant) var(--ease-elegant),
    box-shadow var(--duration-elegant) var(--ease-elegant);
}

.product-star-card:hover {
  border-color: rgba(255, 94, 20, 0.35);
  box-shadow: 0 14px 36px rgba(10, 29, 55, 0.1);
}

.product-star-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0;
}

.product-star-price {
  margin-top: 0.75rem;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1.15;
}

.product-star-price small {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
}

.product-star-plan {
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0 8px 8px 0;
  border-left: 4px solid var(--orange);
  background: linear-gradient(90deg, #fff8f2 0%, #fffdfb 100%);
}

.product-star-plan strong {
  display: block;
  font-size: 0.8rem;
  color: var(--navy);
}

.product-star-plan span {
  font-size: 0.72rem;
  color: #64748b;
}

.product-star-desc {
  margin-top: 0.85rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #475569;
  flex: 1;
}

.product-star-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 400px) {
  .product-star-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .product-star-actions a {
    flex: 1;
    min-width: 8rem;
    justify-content: center;
  }
}

.mega-menu-wrapper:hover .mega-menu-panel,
.mega-menu-wrapper.open .mega-menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.mega-item {
  display: block;
  border: 1px solid #edf1f7;
  border-radius: 12px;
  padding: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.mega-item:hover {
  border-color: rgba(255, 94, 20, 0.4);
  background: #fff8f4;
}

.service-card-icon {
  color: var(--orange);
  font-size: 24px;
  margin-bottom: 10px;
  display: inline-block;
  transition: transform 0.3s ease, color 0.3s ease;
}

.group:hover .service-card-icon {
  transform: translateY(-5px);
  color: #ff7b43;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  /* Stack: redes → scroll-up → WhatsApp (evita solape) */
  .social-gadget {
    top: auto;
    bottom: calc(24px + 58px + 10px + 48px + 14px);
    transform: none;
  }

  .social-gadget-trigger {
    width: 42px;
    min-height: 110px;
    padding: 8px 0;
    font-size: 12px;
  }

  .social-gadget-panel a {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .toolbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 0;
  }

  .toolbar-links {
    gap: 10px;
  }

  .toolbar-links a,
  .toolbar-links span {
    white-space: normal;
  }

  .hero-offset {
    padding-top: 220px;
  }

  button,
  .mobile-link,
  a[role="button"] {
    min-height: 44px;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  #nosotros .grid.lg\:grid-cols-4,
  #servicios .grid.lg\:grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .mega-menu-panel {
    display: none;
  }
}


.contact-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.contact-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.contact-header-logo {
  max-height: 36px;
  width: auto;
}

@media (min-width: 640px) {
  .contact-header-logo {
    max-height: 44px;
  }
}

.contact-main {
  flex: 1;
  background: linear-gradient(180deg, #f8fafc 0%, #f5f7fb 40%, #eef2f7 100%);
}

.contact-intro {
  padding: 0 2px;
}

.contact-card {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 14px 40px rgba(10, 29, 55, 0.08);
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--orange));
}

@media (min-width: 640px) {
  .contact-card {
    padding: 1.75rem 2rem 2rem;
  }
}

@media (min-width: 1024px) {
  .contact-card {
    padding: 2rem 2.5rem 2.25rem;
  }
}

.contact-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
}

@media (min-width: 640px) {
  .contact-card-title {
    font-size: 1.375rem;
  }
}

.contact-card-sub {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.contact-form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .contact-form-grid {
    gap: 1.5rem;
  }
}

.contact-section {
  padding: 1rem 0.75rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e9eef5;
}

@media (min-width: 640px) {
  .contact-section {
    padding: 1.25rem 1.25rem;
  }
}

.contact-section--full {
  background: #fff;
  border-style: dashed;
}

.contact-section-title {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-section-title i {
  color: var(--orange);
  font-size: 0.95rem;
}

.contact-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .contact-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
  }

  .contact-fields--single {
    grid-template-columns: 1fr;
  }
}

.contact-field {
  min-width: 0;
}

.contact-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}

.contact-req {
  color: var(--orange);
  font-weight: 800;
}

.contact-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cfd8e6;
  border-radius: 11px;
  padding: 0 0.875rem;
  font-size: 16px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 768px) {
  .contact-input {
    font-size: 0.9375rem;
  }
}

.contact-textarea {
  height: auto;
  min-height: 140px;
  padding: 0.75rem 0.875rem;
  resize: vertical;
  line-height: 1.5;
}

.contact-select-wrap {
  position: relative;
}

.contact-select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230a1d37' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 11px 7px;
  cursor: pointer;
}

.contact-input:hover {
  border-color: #b8c5d6;
}

.contact-input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 94, 20, 0.18);
}

.contact-input:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

@media (min-width: 480px) {
  .contact-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .contact-submit {
    flex: 1 1 auto;
    min-width: min(100%, 220px);
  }

  .contact-secondary {
    flex: 0 1 auto;
    min-width: min(100%, 180px);
  }
}

.contact-submit {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 11px;
  padding: 0 1rem;
  background: #25d366;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-submit:hover {
  background: #1eb655;
  transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(37, 211, 102, 0.42);
}

.contact-submit:active {
  transform: translateY(0);
}

.contact-secondary {
  width: 100%;
  min-height: 48px;
  border-radius: 11px;
  padding: 0 1rem;
  border: 1px solid #cfd8e6;
  color: var(--navy);
  font-size: 0.9375rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #fff;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.contact-secondary:hover {
  border-color: var(--navy);
  background: #f8fafc;
}

@media (min-width: 480px) {
  .contact-submit,
  .contact-secondary {
    width: auto;
  }
}

.contact-note {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.contact-note-icon {
  color: #25d366;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .contact-note {
    font-size: 0.8125rem;
  }
}

/* AOS: fade-up ligero (20px en lugar del ~100px por defecto) */
[data-aos="fade-up"] {
  transform: translate3d(0, 20px, 0);
}
