/* ==========================================================
   global.css — ON Solutions S.A.S.
   Sistema de diseño global y reutilizable.
   Centraliza la identidad visual corporativa de ON Solutions:
   - Variables CSS
   - Reset & Base
   - Tipografía & Contenedores
   - Header & Navegación principal
   - Botones globales
   - Footer corporativo
   - Botones flotantes (WhatsApp & Redes Sociales)
   - Componentes reutilizables (Page Hero, Section Header, Badges)
   - Responsive global
   ========================================================== */

/* ==========================================================
   1. VARIABLES CSS (PALETA CORPORATIVA)
   ========================================================== */
:root {
  --cyan: #02f2fb;
  --cyan-dark: #00d4dc;
  --blue: #073b63;
  --blue-dark: #052c4b;
  --text: #17324d;
  --gray: #64748b;
  --light: #f5fafc;
  --border: #e3edf2;
  --white: #ffffff;
  --shadow-sm: 0 4px 15px rgba(5, 61, 82, 0.05);
  --shadow-md: 0 12px 30px rgba(5, 61, 82, 0.07);
  --shadow-lg: 0 15px 40px rgba(5, 61, 82, 0.1);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 5px;
  --radius-md: 7px;
  --radius-lg: 12px;
}

/* ==========================================================
   2. RESET & BASE
   ========================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

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

.container {
  width: min(1180px, 90%);
  margin: 0 auto;
}

/* ==========================================================
   3. HEADER & NAVBAR
   ========================================================== */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #073b63;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 20px rgba(5, 44, 75, 0.28);
}

.navbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.brand-text strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #ffffff;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

nav.main-nav a {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  position: relative;
  transition: var(--transition);
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: #d9edf9;
}

nav.main-nav a:focus-visible {
  outline: 2px solid #02f2fb;
  outline-offset: 4px;
  border-radius: 2px;
}

nav.main-nav a.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #02f2fb;
  border-radius: 2px;
}

.nav-button {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 700 !important;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  transition: var(--transition);
}

.nav-button:hover {
  background: #0d4f7b;
  color: #ffffff !important;
  border-color: #d9edf9;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(5, 44, 75, 0.3);
}

.nav-button.active::after {
  display: none;
}

/* Botón de Menú Móvil (Hamburguesa con SVG) */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  cursor: pointer;
  padding: 8px;
  color: #ffffff;
  transition: var(--transition);
}

.mobile-menu-toggle:hover {
  background: #0d4f7b;
  color: #ffffff;
}

.mobile-menu-toggle:focus-visible {
  outline: 2px solid #02f2fb;
  outline-offset: 3px;
}

.mobile-menu-toggle .close-icon {
  display: none;
}

.mobile-menu-toggle.is-open .hamburger-icon {
  display: none;
}

.mobile-menu-toggle.is-open .close-icon {
  display: block;
}

/* ==========================================================
   4. BOTONES GENERALES & UTILIDADES VISUALES
   ========================================================== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.button-primary {
  background: var(--cyan);
  color: var(--white);
}

.button-primary:hover {
  background: var(--cyan-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 242, 251, 0.35);
}

.button-outline {
  border: 1px solid var(--cyan);
  color: var(--cyan-dark);
  background: var(--white);
}

.button-outline:hover {
  background: #e0feff;
  transform: translateY(-1px);
}

.button-dark {
  background: var(--blue);
  color: var(--white);
}

.button-dark:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
}

.section-small {
  color: var(--cyan-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 45px;
}

.section-header h2 {
  color: var(--blue);
  font-size: 36px;
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-header p {
  color: var(--gray);
  font-size: 14px;
}

/* ==========================================================
   5. PAGE HERO GENERAL (Páginas internas)
   ========================================================== */
.page-hero {
  position: relative;
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 54%, #f2fafc 100%);
  padding: 60px 0 50px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  width: 450px;
  height: 450px;
  right: -150px;
  top: -120px;
  border-radius: 50%;
  border: 1px solid rgba(2, 242, 251, 0.15);
  pointer-events: none;
}

.page-hero-content {
  max-width: 760px;
}

.page-hero h1 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -1.2px;
  color: var(--blue);
  margin-bottom: 16px;
}

.page-hero h1 span {
  color: var(--cyan-dark);
}

.page-hero-description {
  color: var(--gray);
  font-size: 16px;
  line-height: 1.6;
}

/* Breadcrumbs opcional */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 12px;
  font-weight: 500;
}

.breadcrumb a {
  color: var(--cyan-dark);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ==========================================================
   6. FOOTER
   ========================================================== */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 35px 0 20px;
  background: var(--white);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand img {
  width: 43px;
  height: 43px;
  object-fit: contain;
}

.footer-brand strong {
  color: var(--blue);
  font-size: 16px;
  font-weight: 800;
}

.footer-nav {
  display: flex;
  gap: 25px;
}

.footer-nav a {
  color: var(--gray);
  font-size: 12px;
  font-weight: 500;
}

.footer-nav a:hover {
  color: var(--cyan-dark);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 18px;
  color: #8797a5;
  font-size: 11px;
}

/* ==========================================================
   7. BOTONES FLOTANTES SOCIALES (WhatsApp & Redes)
   ========================================================== */
.floating-social-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.floating-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  position: relative;
  text-decoration: none;
}

.whatsapp-btn {
  width: 56px;
  height: 56px;
  background: #25d366;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  animation: pulse-green 2s infinite;
}

.whatsapp-btn:hover {
  transform: scale(1.12);
  background: #20ba5a;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.social-sub-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.facebook-btn {
  width: 42px;
  height: 42px;
  background: #1877f2;
}

.facebook-btn:hover {
  transform: scale(1.1);
  background: #0d65d9;
  box-shadow: 0 6px 18px rgba(24, 119, 242, 0.4);
}

.instagram-btn {
  width: 42px;
  height: 42px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.instagram-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(220, 39, 67, 0.4);
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  right: 64px;
  background: var(--blue);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  white-space: nowrap;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.floating-btn:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* ==========================================================
   8. RESPONSIVE GLOBAL
   ========================================================== */
@media (max-width: 950px) {
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  nav.main-nav {
    display: none;
    position: absolute;
    top: 82px;
    left: 0;
    width: 100%;
    background: #073b63;
    flex-direction: column;
    padding: 24px 5%;
    gap: 18px;
    align-items: flex-start;
    border-bottom: 2px solid #02f2fb;
    box-shadow: 0 10px 30px rgba(5, 44, 75, 0.3);
  }

  nav.main-nav.open {
    display: flex;
  }

  nav.main-nav a {
    width: 100%;
    font-size: 15px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  nav.main-nav a:last-child {
    border-bottom: none;
  }

  nav.main-nav a.active::after {
    display: none;
  }

  .nav-button {
    width: 100%;
    text-align: center;
    margin-top: 6px;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .navbar {
    height: 70px;
  }

  nav.main-nav {
    top: 70px;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: 15px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }

  .floating-social-container {
    bottom: 16px;
    right: 16px;
  }

  .whatsapp-btn {
    width: 48px;
    height: 48px;
  }

  .facebook-btn,
  .instagram-btn {
    width: 38px;
    height: 38px;
  }
}

/* ==========================================================
   MARQUEE CONTINUO DE LOGOS DE CLIENTES
   ========================================================== */
.clients-marquee {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 15px 0;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 1) 12%,
    rgba(0, 0, 0, 1) 88%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 1) 12%,
    rgba(0, 0, 0, 1) 88%,
    transparent 100%
  );
}

.clients-marquee-track {
  display: flex;
  align-items: center;
  gap: 25px;
  width: max-content;
  animation: marquee-scroll 28s linear infinite;
}

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

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

.client-marquee-item {
  width: 210px;
  height: 125px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.client-marquee-item:hover {
  transform: translateY(-4px);
  border-color: #02f2fb;
  box-shadow: var(--shadow-md);
}

.client-marquee-item img {
  max-height: 65px;
  max-width: 145px;
  object-fit: contain;
  margin-bottom: 6px;
  transition: transform 0.3s ease;
}

.client-marquee-item:hover img {
  transform: scale(1.05);
}

.client-marquee-item .client-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue);
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .client-marquee-item {
    width: 160px;
    height: 105px;
    padding: 12px;
  }

  .client-marquee-item img {
    max-height: 50px;
    max-width: 110px;
  }

  .client-marquee-item .client-name {
    font-size: 10px;
  }
}

/* ==========================================================
   9. SISTEMA REUTILIZABLE DE ANIMACIONES DE ENTRADA (REVEAL)
   ========================================================== */
.reveal,
.reveal-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right {
  opacity: 0;
  transform: translateX(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Delays para efecto escalonado (stagger) */
.delay-0 { transition-delay: 0ms; }
.delay-1 { transition-delay: 100ms; }
.delay-2 { transition-delay: 200ms; }
.delay-3 { transition-delay: 300ms; }
.delay-4 { transition-delay: 400ms; }
.delay-5 { transition-delay: 500ms; }

.reveal.is-visible,
.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Accesibilidad: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ==========================================================
   10. BANNER Y MODAL DE CONSENTIMIENTO DE COOKIES & PRIVACIDAD
   ========================================================== */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  background: rgba(5, 44, 75, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(2, 242, 251, 0.35);
  box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.3);
  padding: 16px 0;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.cookie-consent-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-banner-text {
  max-width: 680px;
}

.cookie-banner-text strong {
  display: block;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.cookie-banner-text p {
  color: #d0e4f2;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 6px;
}

.cookie-banner-links {
  display: flex;
  gap: 14px;
}

.cookie-banner-links a {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.cookie-banner-links a:hover {
  color: #ffffff;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.btn-cookie {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-cookie-accept {
  background: var(--cyan);
  color: #052c4b;
  border: none;
  box-shadow: 0 4px 12px rgba(2, 242, 251, 0.25);
}

.btn-cookie-accept:hover {
  background: #26f4fc;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 242, 251, 0.4);
}

.btn-cookie-reject {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-cookie-reject:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
}

.btn-cookie-config {
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(2, 242, 251, 0.5);
}

.btn-cookie-config:hover {
  background: rgba(2, 242, 251, 0.12);
  border-color: var(--cyan);
}

/* Modal de Configuración */
.cookie-config-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cookie-config-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cookie-config-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 44, 75, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.cookie-config-card {
  position: relative;
  z-index: 2;
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 30px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transform: translateY(15px);
  transition: transform 0.3s ease;
}

.cookie-config-modal.is-open .cookie-config-card {
  transform: translateY(0);
}

.cookie-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.cookie-config-header h3 {
  color: var(--blue);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.btn-close-modal {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--gray);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.btn-close-modal:hover {
  color: var(--blue);
}

.cookie-category {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cookie-category-header strong {
  color: var(--blue);
  font-size: 14px;
}

.badge-required {
  font-size: 10px;
  font-weight: 800;
  color: var(--cyan-dark);
  background: #d0feff;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}

.cookie-category p {
  color: var(--gray);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--cyan-dark);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.cookie-config-footer {
  margin-top: 24px;
  text-align: right;
}

@media (max-width: 768px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cookie-banner-actions {
    width: 100%;
    flex-direction: column;
  }

  .btn-cookie {
    width: 100%;
    text-align: center;
  }
}

