/* ==========================================================================
   TurnoCloud — Estilos Comerciales de Alto Impacto y Glassmorphism
   Paleta Oficial:
   1. Turquesa / Cian medio:   #1DB7B7  (rgb: 29, 183, 183)
   2. Verde azulado / Teal:     #0E7C8E  (rgb: 14, 124, 142)
   3. Azul petróleo / Teal osc: #075971  (rgb: 7, 89, 113)
   4. Azul noche profundo:      #054457  (rgb: 5, 68, 87)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* Paleta Corporativa Oficial */
  --color-turquesa: #1DB7B7;
  --color-turquesa-rgb: 29, 183, 183;
  --color-turquesa-glow: rgba(29, 183, 183, 0.45);

  --color-verde-azulado: #0E7C8E;
  --color-verde-azulado-rgb: 14, 124, 142;
  --color-verde-azulado-glow: rgba(14, 124, 142, 0.35);

  --color-azul-petroleo: #075971;
  --color-azul-petroleo-rgb: 7, 89, 113;

  --color-azul-noche: #054457;
  --color-azul-noche-rgb: 5, 68, 87;
  --color-noche-profundo: #03232e;

  /* Aliases del Sistema UI */
  --color-primary: #1DB7B7;
  --color-primary-glow: rgba(29, 183, 183, 0.45);
  --color-accent: #0E7C8E;
  --color-accent-glow: rgba(14, 124, 142, 0.35);
  --color-bg-dark: #03212b;
  --color-bg-card: rgba(7, 89, 113, 0.28);
  --color-border-card: rgba(14, 124, 142, 0.22);
  --color-border-hover: rgba(29, 183, 183, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color-scheme: dark;
}

h1, h2, h3, h4, .font-heading {
  font-family: 'Outfit', sans-serif;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #03212b;
}
::-webkit-scrollbar-thumb {
  background: #075971;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #1DB7B7;
}

/* ==========================================================================
   STICKY PROMO BANNER (Top)
   ========================================================================== */
.promo-banner {
  background: linear-gradient(90deg, #054457 0%, #075971 30%, #0E7C8E 60%, #1DB7B7 100%);
  background-size: 200% 100%;
  animation: gradient-shift 8s ease-in-out infinite;
  position: relative;
  overflow: hidden;
  z-index: 60;
}

.promo-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: shimmer 4s infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.promo-banner .promo-close {
  transition: all 0.2s ease;
}
.promo-banner .promo-close:hover {
  transform: scale(1.2);
  color: white;
}

/* Adjust header top when banner visible */
body.promo-visible .glass-header {
  top: 44px !important;
}
body.promo-visible .whb-sticky-prepared {
  padding-top: calc(var(--wd-header-h) + 44px);
}

/* ==========================================================================
   Background Gradients & Glows con la nueva paleta
   ========================================================================== */
.hero-glow {
  background: radial-gradient(circle 700px at 50% 20%, rgba(29, 183, 183, 0.16), rgba(14, 124, 142, 0.08) 50%, transparent 75%);
}

.ambient-glow-teal {
  background: radial-gradient(circle at center, rgba(14, 124, 142, 0.22) 0%, rgba(7, 89, 113, 0.1) 45%, transparent 70%);
}

.ambient-glow-cyan {
  background: radial-gradient(circle at center, rgba(29, 183, 183, 0.18) 0%, rgba(5, 68, 87, 0.12) 45%, transparent 70%);
}

/* ==========================================================================
   Glassmorphism Panels
   ========================================================================== */
.glass-panel {
  background: rgba(7, 89, 113, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(14, 124, 142, 0.25);
  box-shadow: 0 20px 40px -15px rgba(3, 33, 43, 0.8);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: rgba(29, 183, 183, 0.5);
  box-shadow: 0 25px 50px -12px rgba(29, 183, 183, 0.2);
}

.glass-header {
  background: rgba(5, 68, 87, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(29, 183, 183, 0.18);
}

/* ==========================================================================
   Gradient Text
   ========================================================================== */
.text-gradient {
  background: linear-gradient(135deg, #ffffff 25%, #1DB7B7 70%, #0E7C8E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #1DB7B7 0%, #0E7C8E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Animated CTA Buttons
   ========================================================================== */
.glow-button {
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.glow-button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: rotate(45deg) translateY(-100%);
  transition: all 0.7s ease;
}

.glow-button:hover::after {
  transform: rotate(45deg) translateY(100%);
}

.glow-button:hover {
  box-shadow: 0 0 28px rgba(29, 183, 183, 0.55);
  transform: translateY(-2px);
}

/* ==========================================================================
   Floating Animation
   ========================================================================== */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.animate-float-slow {
  animation: float 5s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 6s ease-in-out infinite 2s;
}

/* ==========================================================================
   Pulse Badge
   ========================================================================== */
@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(29, 183, 183, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(29, 183, 183, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(29, 183, 183, 0);
  }
}

.pulse-indicator {
  animation: pulse-ring 2s infinite cubic-bezier(0.45, 0, 0.55, 1);
}

/* ==========================================================================
   Module Tabs Active State
   ========================================================================== */
.module-tab.active {
  background: linear-gradient(135deg, rgba(29, 183, 183, 0.2), rgba(14, 124, 142, 0.25));
  border-color: rgba(29, 183, 183, 0.6);
  color: #ffffff;
}

.module-tab.active .tab-icon {
  background: linear-gradient(135deg, #1DB7B7, #0E7C8E);
  color: #03212b;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, padding 0.3s ease;
}

.faq-item.active .faq-content {
  max-height: 250px;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: #1DB7B7;
}

/* ==========================================================================
   Browser Mockup Frame
   ========================================================================== */
.browser-window {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(2, 24, 31, 0.95), 0 0 0 1px rgba(29, 183, 183, 0.2);
  background: #042733;
}

.browser-bar {
  background: #054457;
  border-bottom: 1px solid rgba(29, 183, 183, 0.15);
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* ==========================================================================
   Range Input Slider
   ========================================================================== */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range]:focus {
  outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  cursor: pointer;
  background: #075971;
  border-radius: 6px;
  border: 1px solid rgba(29, 183, 183, 0.25);
}

input[type=range]::-webkit-slider-thumb {
  height: 22px;
  width: 22px;
  border-radius: 50%;
  background: #1DB7B7;
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -7px;
  box-shadow: 0 0 14px rgba(29, 183, 183, 0.85);
  border: 2px solid #ffffff;
}

/* ==========================================================================
   ENHANCED WHATSAPP WIDGET (Chaty-Style)
   ========================================================================== */
.whatsapp-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* Tooltip Bubble */
.wa-tooltip {
  background: #ffffff;
  color: #1a1a2e;
  padding: 12px 16px;
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  font-size: 13px;
  font-weight: 600;
  max-width: 250px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  position: relative;
}

.wa-tooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.wa-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 16px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  transform: rotate(45deg);
}

.wa-tooltip .wa-close-tip {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 14px;
  cursor: pointer;
  color: #999;
  line-height: 1;
}
.wa-tooltip .wa-close-tip:hover {
  color: #333;
}

/* Main WhatsApp Button */
.wa-main-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  border: none;
}

.wa-main-btn:hover {
  transform: scale(1.12) translateY(-4px);
  box-shadow: 0 10px 36px rgba(37, 211, 102, 0.6);
}

/* Online status dot */
.wa-main-btn .wa-status {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #25D366;
  border: 2.5px solid #03232e;
  animation: pulse-ring 2s infinite;
}

/* Pulse ring animation on button */
.wa-main-btn::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.4);
  animation: wa-pulse 2.5s ease-out infinite;
}

@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* WhatsApp SVG Icon */
.wa-main-btn svg {
  width: 30px;
  height: 30px;
  fill: white;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   SCROLL-REVEAL ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.reveal {
  opacity: 0;
  transition: none;
}

.reveal.revealed {
  animation-duration: 0.7s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  animation-fill-mode: forwards;
}

.reveal.revealed.fade-up { animation-name: fadeInUp; }
.reveal.revealed.fade-left { animation-name: fadeInLeft; }
.reveal.revealed.fade-right { animation-name: fadeInRight; }
.reveal.revealed.scale-in { animation-name: scaleIn; }

/* Staggered children delays */
.reveal-stagger > .reveal:nth-child(1) { animation-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { animation-delay: 0.1s; }
.reveal-stagger > .reveal:nth-child(3) { animation-delay: 0.2s; }
.reveal-stagger > .reveal:nth-child(4) { animation-delay: 0.3s; }
.reveal-stagger > .reveal:nth-child(5) { animation-delay: 0.4s; }
.reveal-stagger > .reveal:nth-child(6) { animation-delay: 0.5s; }

/* ==========================================================================
   TRUST BADGES & GUARANTEE SHIELDS
   ========================================================================== */
.trust-badge {
  background: linear-gradient(135deg, rgba(29, 183, 183, 0.08), rgba(14, 124, 142, 0.12));
  border: 1px solid rgba(29, 183, 183, 0.2);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.trust-badge:hover {
  border-color: rgba(29, 183, 183, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(29, 183, 183, 0.12);
}

.trust-badge .badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* ==========================================================================
   ANIMATED NUMBER COUNTER
   ========================================================================== */
.counter-value {
  display: inline-block;
  transition: transform 0.3s ease;
}

/* ==========================================================================
   LOGO MARQUEE (Infinite scroll carousel)
   ========================================================================== */
.marquee-container {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
  display: flex;
  gap: 48px;
  animation: marquee 25s linear infinite;
  width: max-content;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-track:hover {
  animation-play-state: paused;
}

/* ==========================================================================
   TESTIMONIAL CARDS
   ========================================================================== */
.testimonial-card {
  background: rgba(7, 89, 113, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(14, 124, 142, 0.2);
  border-radius: 20px;
  padding: 28px;
  position: relative;
  transition: all 0.3s ease;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -8px;
  left: 20px;
  font-size: 72px;
  font-family: 'Georgia', serif;
  color: rgba(29, 183, 183, 0.15);
  line-height: 1;
}

.testimonial-card:hover {
  border-color: rgba(29, 183, 183, 0.4);
  box-shadow: 0 20px 40px -10px rgba(29, 183, 183, 0.12);
  transform: translateY(-4px);
}

/* ==========================================================================
   PARTICLE DOTS AMBIENT
   ========================================================================== */
@keyframes particle-float {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-20px) translateX(10px);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-10px) translateX(-10px);
    opacity: 0.5;
  }
  75% {
    transform: translateY(-30px) translateX(5px);
    opacity: 0.4;
  }
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(29, 183, 183, 0.3);
  pointer-events: none;
}

.particle:nth-child(1) { animation: particle-float 8s ease-in-out infinite; top: 20%; left: 10%; }
.particle:nth-child(2) { animation: particle-float 10s ease-in-out infinite 1s; top: 60%; left: 85%; }
.particle:nth-child(3) { animation: particle-float 12s ease-in-out infinite 2s; top: 40%; left: 50%; }
.particle:nth-child(4) { animation: particle-float 9s ease-in-out infinite 0.5s; top: 80%; left: 30%; }
.particle:nth-child(5) { animation: particle-float 11s ease-in-out infinite 3s; top: 15%; left: 70%; }
.particle:nth-child(6) { animation: particle-float 7s ease-in-out infinite 1.5s; top: 55%; left: 20%; }

/* ==========================================================================
   TYPING CURSOR ANIMATION
   ========================================================================== */
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typing-cursor::after {
  content: '|';
  animation: blink-cursor 0.8s step-end infinite;
  color: #1DB7B7;
  font-weight: 300;
}

/* ==========================================================================
   SECTION DIVIDER / WAVE
   ========================================================================== */
.section-divider {
  position: relative;
  height: 60px;
  overflow: hidden;
}

.section-divider svg {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px;
}

/* ==========================================================================
   Custom Background Images
   ========================================================================== */
.bg-img-hero {
  background-image: linear-gradient(to bottom, rgba(3, 35, 46, 0.8), rgba(3, 35, 46, 0.95)), url('../img/bg_hero.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.bg-img-sectores {
  background-image: linear-gradient(to bottom, rgba(3, 35, 46, 0.9), rgba(3, 35, 46, 0.95)), url('../img/bg_sectores.jpg');
  background-size: cover;
  background-position: center;
}

.bg-img-flujo {
  background-image: linear-gradient(to bottom, rgba(3, 35, 46, 0.85), rgba(3, 35, 46, 0.98)), url('../img/bg_flujo.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* ==========================================================================
   SMOOTH PAGE LOAD FADE
   ========================================================================== */
@keyframes page-load {
  from { opacity: 0; }
  to { opacity: 1; }
}

body {
  animation: page-load 0.6s ease-out;
}

/* ==========================================================================
   ANCHOR HIGHLIGHT FOR SMOOTH SCROLL
   ========================================================================== */
:target {
  scroll-margin-top: 100px;
}

/* ==========================================================================
   RESPONSIVE TWEAKS
   ========================================================================== */
@media (max-width: 640px) {
  .promo-banner {
    font-size: 11px;
  }
  .wa-tooltip {
    max-width: 200px;
    font-size: 12px;
  }
  .wa-main-btn {
    width: 54px;
    height: 54px;
  }
  .wa-main-btn svg {
    width: 26px;
    height: 26px;
  }
}
