/* ==========================================================================
   PALETA DE COLORES Y VARIABLES GLOBALES
   Paleta: #0081a7, #00afb9, #fdfcdc, #fed9b7, #f07167, Destacado: #641220
   ========================================================================== */
:root {
  --color-primario: #0081a7;
  --color-secundario: #00afb9;
  --color-fondo-claro: #fdfcdc;
  --color-acento-suave: #fed9b7;
  --color-acento-calido: #f07167;
  --color-destacado: #641220;
  --color-texto-oscuro: #1a202c;
  --color-texto-mutado: #64748b;
  --color-blanco: #ffffff;
  --color-borde: rgba(0, 129, 167, 0.15);

  /* Tipografías Fluidas con clamp() */
  --font-bebas: 'Bebas Neue', sans-serif;
  --font-barlow: 'Barlow Condensed', sans-serif;
  --font-inter: 'Inter', sans-serif;
  --font-rajdhani: 'Rajdhani', sans-serif;

  --fs-hero: clamp(2.5rem, 6vw + 1rem, 5.2rem);
  --fs-section-title: clamp(2rem, 4vw + 0.5rem, 3.5rem);
  --fs-card-title: clamp(1.25rem, 2vw + 0.2rem, 1.75rem);
  --fs-body: clamp(0.95rem, 1vw + 0.1rem, 1.05rem);

  /* Sombras y Radios */
  --shadow-sm: 0 4px 12px rgba(0, 129, 167, 0.08);
  --shadow-hover: 0 16px 32px rgba(0, 129, 167, 0.16);
  --border-radius-card: 16px;
  --border-radius-btn: 30px;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-inter);
  font-size: var(--fs-body);
  color: var(--color-texto-oscuro);
  background-color: var(--color-fondo-claro);
  overflow-x: hidden;
  padding-bottom: 70px; /* Safe space para Mobile Bottom Nav */
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

/* Tipografías y Utilidades */
.font-bebas { font-family: var(--font-bebas); }
.font-barlow { font-family: var(--font-barlow); }
.font-inter { font-family: var(--font-inter); }
.font-rajdhani { font-family: var(--font-rajdhani); }

.text-destacado {
  color: var(--color-destacado) !important;
}

.bg-surface-alt {
  background-color: #f7f6cf;
}

.max-w-700 {
  max-width: 700px;
}

/* Barra de Progreso de Scroll */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-secundario), var(--color-acento-calido));
  z-index: 1099;
  transition: width 0.1s linear;
}

/* ==========================================================================
   PRELOADER / SPLASH SCREEN
   ========================================================================== */
.preloader {
  position: fixed;
  inset: 0;
  background-color: var(--color-primario);
  color: var(--color-fondo-claro);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-logo-wrap {
  position: relative;
  font-size: 3.5rem;
  color: var(--color-fondo-claro);
  display: inline-block;
  margin-bottom: 10px;
}

.icon-spinner-deco {
  font-size: 1.5rem;
  color: var(--color-acento-calido);
  animation: spinSlow 4s linear infinite;
  display: inline-block;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.preloader-title {
  font-family: var(--font-bebas);
  font-size: 2.5rem;
  letter-spacing: 4px;
  margin-bottom: 0;
}

.preloader-subtitle {
  font-family: var(--font-barlow);
  font-size: 1rem;
  letter-spacing: 2px;
  color: var(--color-acento-suave);
}

.preloader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(253, 252, 220, 0.2);
  border-top-color: var(--color-acento-calido);
  border-radius: 50%;
  margin: 15px auto 0;
  animation: spinSlow 0.8s linear infinite;
}

/* ==========================================================================
   HEADER SUPERIOR
   ========================================================================== */
.header-main {
  padding: 14px 0;
  transition: var(--transition-smooth);
  background-color: rgba(0, 129, 167, 0.85);
  backdrop-filter: blur(10px);
}

.header-main.scrolled {
  padding: 8px 0;
  background-color: rgba(0, 129, 167, 0.98);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.brand-symbol {
  width: 38px;
  height: 38px;
  background: var(--color-acento-calido);
  color: var(--color-blanco);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.brand-name {
  font-family: var(--font-bebas);
  font-size: 1.6rem;
  letter-spacing: 2px;
  color: var(--color-fondo-claro);
  line-height: 1;
  display: block;
}

.brand-tag {
  font-family: var(--font-barlow);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  color: var(--color-acento-suave);
  display: block;
}

.nav-link-custom {
  font-family: var(--font-barlow);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-fondo-claro);
  text-decoration: none;
  letter-spacing: 1px;
  position: relative;
  transition: var(--transition-smooth);
}

.nav-link-custom:hover,
.nav-link-custom.active {
  color: var(--color-acento-suave);
}

.nav-link-custom::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-acento-calido);
  transition: width 0.3s ease;
}

.nav-link-custom.active::after,
.nav-link-custom:hover::after {
  width: 100%;
}

.btn-action-header {
  font-family: var(--font-barlow);
  font-weight: 700;
  font-size: 0.95rem;
  background-color: var(--color-acento-calido);
  color: var(--color-blanco);
  border-radius: var(--border-radius-btn);
  padding: 6px 18px;
  transition: var(--transition-smooth);
  border: none;
}

.btn-action-header:hover {
  background-color: #d85c52;
  color: var(--color-blanco);
  transform: translateY(-2px);
}

.btn-contact-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(253, 252, 220, 0.15);
  color: var(--color-fondo-claro);
  border: 1px solid rgba(253, 252, 220, 0.3);
  transition: var(--transition-smooth);
}

.btn-contact-icon:hover {
  background: var(--color-acento-calido);
  color: var(--color-blanco);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  padding-top: 100px;
  padding-bottom: 60px;
  overflow: hidden;
}

.hero-bg-parallax {
  position: absolute;
  inset: -10%;
  background-image: url('https://images.unsplash.com/photo-1581578731548-c64695cc6952?q=80&w=1600&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  transform: translateY(0);
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 129, 167, 0.92) 0%, rgba(0, 175, 185, 0.8) 50%, rgba(100, 18, 32, 0.75) 100%);
}

.hero-badge {
  background: rgba(253, 252, 220, 0.15);
  border: 1px solid rgba(253, 252, 220, 0.3);
  padding: 6px 14px;
  border-radius: 30px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-acento-calido);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-acento-calido);
}

.badge-text {
  font-family: var(--font-barlow);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: var(--color-fondo-claro);
}

.hero-title {
  font-family: var(--font-bebas);
  font-size: var(--fs-hero);
  color: var(--color-fondo-claro);
  line-height: 1.05;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.2vw + 0.3rem, 1.3rem);
  color: rgba(253, 252, 220, 0.9);
  max-width: 620px;
  line-height: 1.5;
}

/* Botones con Ripple y Brillo */
.btn-cta-primary {
  font-family: var(--font-barlow);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--color-acento-calido), #d85c52);
  color: var(--color-blanco);
  padding: 12px 28px;
  border-radius: var(--border-radius-btn);
  border: none;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(240, 113, 103, 0.35);
}

/* Efecto de brillo que recorre el botón */
.btn-cta-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  animation: shineRun 3.5s infinite;
}

@keyframes shineRun {
  0% { left: -75%; }
  25% { left: 125%; }
  100% { left: 125%; }
}

.btn-cta-primary:hover {
  transform: translateY(-3px) scale(1.02);
  color: var(--color-blanco);
  box-shadow: 0 12px 26px rgba(240, 113, 103, 0.5);
}

.btn-cta-secondary {
  font-family: var(--font-barlow);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
  background: rgba(253, 252, 220, 0.15);
  color: var(--color-fondo-claro);
  border: 2px solid var(--color-fondo-claro);
  padding: 10px 26px;
  border-radius: var(--border-radius-btn);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-cta-secondary:hover {
  background: var(--color-fondo-claro);
  color: var(--color-primario);
  transform: translateY(-3px) scale(1.02);
}

/* Ripple Click Effect */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.ripple-circle {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}

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

/* Estadísticas Hero */
.hero-stats-row {
  border-top: 1px solid rgba(253, 252, 220, 0.2);
  padding-top: 25px;
}

.stat-number-wrap {
  font-family: var(--font-rajdhani);
  font-weight: 700;
  font-size: clamp(2rem, 3vw, 3rem);
  color: var(--color-fondo-claro);
  line-height: 1;
}

.stat-plus {
  color: var(--color-acento-calido);
}

.stat-label {
  font-family: var(--font-barlow);
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: var(--color-acento-suave);
  display: block;
  margin-top: 4px;
}

/* ==========================================================================
   SECCIONES GENERALES & ENCABEZADOS
   ========================================================================== */
.section-padding {
  padding: 80px 0;
}

.section-tag {
  font-family: var(--font-barlow);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 2px;
  color: var(--color-primario);
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-bebas);
  font-size: var(--fs-section-title);
  color: var(--color-primario);
  letter-spacing: 2px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--color-texto-mutado);
}

/* ==========================================================================
   SERVICIOS & CARROUSEL SCROLL-SNAP MOBILE
   ========================================================================== */
.card-servicio {
  background: var(--color-blanco);
  border-radius: var(--border-radius-card);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-borde);
  transition: var(--transition-smooth);
}

.card-servicio:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-secundario);
}

.card-icon-wrap {
  width: 58px;
  height: 58px;
  background: rgba(0, 175, 185, 0.12);
  color: var(--color-secundario);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
  transition: var(--transition-smooth);
}

.card-servicio:hover .card-icon-wrap {
  background: var(--color-secundario);
  color: var(--color-blanco);
}

.card-title {
  font-family: var(--font-barlow);
  font-weight: 700;
  font-size: var(--fs-card-title);
  color: var(--color-primario);
  letter-spacing: 1px;
}

.card-features li {
  font-size: 0.95rem;
  color: var(--color-texto-mutado);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-features li i {
  color: var(--color-secundario);
}

/* Scroll-snap horizontal en mobile */
@media (max-width: 767px) {
  .services-carousel-snap {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
  }
  .service-col-item {
    flex: 0 0 85%;
    scroll-snap-align: center;
  }
}

/* ==========================================================================
   COTIZADOR WIZARD
   ========================================================================== */
.wizard-card {
  background: var(--color-blanco);
  border-radius: var(--border-radius-card);
  padding: 35px;
  border: 1px solid var(--color-borde);
}

.wizard-progress-track {
  height: 6px;
  background: rgba(0, 129, 167, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.wizard-progress-bar {
  height: 100%;
  background: var(--color-primario);
  transition: width 0.4s ease;
}

.step-label {
  font-family: var(--font-barlow);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-texto-mutado);
}

.step-label.active {
  color: var(--color-primario);
  font-weight: 700;
}

.wizard-step-pane {
  display: none;
}

.wizard-step-pane.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.touchable-card-option input[type="radio"] {
  display: none;
}

.touchable-card-inner {
  border: 2px solid var(--color-borde);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: #fafaf5;
}

.touchable-card-inner i {
  font-size: 2rem;
  color: var(--color-primario);
  display: block;
  margin-bottom: 8px;
}

.touchable-card-inner h5 {
  font-family: var(--font-barlow);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.touchable-card-option input[type="radio"]:checked + .touchable-card-inner {
  border-color: var(--color-primario);
  background-color: rgba(0, 129, 167, 0.08);
  box-shadow: 0 4px 14px rgba(0, 129, 167, 0.15);
}

.form-label-custom {
  font-family: var(--font-barlow);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-primario);
  margin-bottom: 6px;
}

.form-input-lg {
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--color-borde);
  padding: 10px 14px;
}

.form-input-lg:focus {
  border-color: var(--color-secundario);
  box-shadow: 0 0 0 3px rgba(0, 175, 185, 0.2);
}

.btn-wizard-next {
  font-family: var(--font-barlow);
  font-weight: 700;
  background: var(--color-primario);
  color: var(--color-blanco);
  border: none;
  border-radius: var(--border-radius-btn);
  padding: 10px 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-wizard-back {
  font-family: var(--font-barlow);
  font-weight: 600;
  background: transparent;
  color: var(--color-texto-mutado);
  border: 1px solid var(--color-borde);
  border-radius: var(--border-radius-btn);
  padding: 10px 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.price-quote-box {
  background: linear-gradient(135deg, var(--color-primario), #015e7a);
  color: var(--color-fondo-claro);
  border-radius: var(--border-radius-card);
}

.quote-header {
  font-family: var(--font-barlow);
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 0.9rem;
  color: var(--color-acento-suave);
}

.quote-currency {
  font-family: var(--font-barlow);
  font-size: 1.4rem;
  vertical-align: top;
}

.quote-price {
  font-family: var(--font-rajdhani);
  font-weight: 700;
  font-size: 4rem;
  line-height: 1;
}

/* ==========================================================================
   AGENDA & SEGUIMIENTO
   ========================================================================== */
.agenda-form-card,
.tracking-search-box,
.tracking-result-card,
.reminder-card {
  background: var(--color-blanco);
  border-radius: var(--border-radius-card);
  border: 1px solid var(--color-borde);
}

.input-group-text {
  background-color: #f6f5d6;
  border-color: var(--color-borde);
  color: var(--color-primario);
}

/* Stepper de Seguimiento */
.tracking-timeline {
  margin: 30px 0;
}

.tracking-timeline::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 5%;
  right: 5%;
  height: 4px;
  background: #e2e8f0;
  z-index: 1;
}

.timeline-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-weight: 700;
}

.timeline-step.completed .step-circle {
  background: var(--color-secundario);
  color: var(--color-blanco);
}

.timeline-step.active .step-circle {
  background: var(--color-acento-calido);
  color: var(--color-blanco);
  box-shadow: 0 0 10px rgba(240, 113, 103, 0.5);
}

.step-text {
  font-family: var(--font-barlow);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-texto-oscuro);
}

.bg-status {
  background-color: var(--color-acento-calido);
  font-family: var(--font-barlow);
  letter-spacing: 1px;
}

.tracking-details-box {
  background-color: #f7f6cf;
}

/* ==========================================================================
   ACORDEÓN Y FOOTER
   ========================================================================== */
.custom-accordion .accordion-item {
  border: 1px solid var(--color-borde);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.custom-accordion .accordion-button {
  font-family: var(--font-barlow);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-primario);
  background: var(--color-blanco);
}

.custom-accordion .accordion-button:not(.collapsed) {
  background: rgba(0, 129, 167, 0.06);
  color: var(--color-primario);
}

.footer-main {
  background: #004d65;
  color: var(--color-fondo-claro);
  padding: 60px 0 20px;
}

.footer-title {
  font-family: var(--font-barlow);
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--color-acento-suave);
  margin-bottom: 16px;
}

.footer-links a {
  color: rgba(253, 252, 220, 0.8);
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--color-acento-calido);
  transform: translateX(4px);
}

.footer-contact li {
  margin-bottom: 10px;
  color: rgba(253, 252, 220, 0.85);
}

/* ==========================================================================
   ELEMENTOS FLOTANTES & MOBILE APP EXPERIENCE
   ========================================================================== */
.floating-whatsapp {
  position: fixed;
  right: 20px;
  bottom: 85px; /* Por encima de la bottom nav en mobile */
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25d366;
  color: var(--color-blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  z-index: 1040;
  transition: var(--transition-smooth);
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  color: var(--color-blanco);
}

@media (min-width: 768px) {
  .floating-whatsapp {
    bottom: 30px;
  }
}

/* Bottom Navigation Bar (< 768px) */
.bottom-nav-mobile {
  background: var(--color-blanco);
  border-top: 1px solid var(--color-borde);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  z-index: 1050;
}

.bottom-nav-item {
  color: var(--color-texto-mutado);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  font-family: var(--font-barlow);
  font-weight: 600;
  min-width: 60px;
  min-height: 44px;
  justify-content: center;
  transition: var(--transition-smooth);
}

.bottom-nav-item i {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.bottom-nav-item.active {
  color: var(--color-primario);
  transform: translateY(-2px);
}

.bottom-nav-item:active {
  transform: scale(0.92);
}

/* Bottom Sheet Modal */
.custom-bottom-sheet {
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  max-height: 80vh;
  padding-bottom: env(safe-area-inset-bottom);
}

.drag-handle {
  width: 44px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 10px;
}

.success-icon-wrap {
  width: 64px;
  height: 64px;
  background: rgba(0, 175, 185, 0.15);
  color: var(--color-secundario);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}

.appointment-summary-box {
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

/* ==========================================================================
   ANIMACIONES Y RESPONSIVE ACCESSIBILITY
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}