/* Lambda Logistics - Modern CSS */

/* CSS Variables */
:root {
  /* Colors */
  --primary: #F29200;
  --primary-dark: #D17D00;
  --primary-light: #FFB34A;
  --secondary: #1A365D; /* Navy logístico */
  --secondary-dark: #0F2746;
  --accent: #FFB34A; /* Acento cálido derivado del primario */
  --dark: #0A0E27;
  --light: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --white: #FFFFFF;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  
  /* Typography */
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-secondary: 'Poppins', sans-serif;
  
  /* Spacing */
  --section-padding: 100px 0;
  --container-max-width: 1200px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Borders */
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bootstrap color overrides for brand cohesion */
:root {
  --bs-primary: var(--primary);
  --bs-primary-rgb: 242, 146, 0;
  --bs-link-color: var(--primary);
  --bs-link-hover-color: var(--primary-dark);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-color: var(--primary-dark);
}

.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }

/* Adjust gradients to use logistical palette */
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-badge {
  background: linear-gradient(135deg, rgba(242, 146, 0, 0.12) 0%, rgba(26, 54, 93, 0.12) 100%);
  border: 1px solid rgba(242, 146, 0, 0.25);
}

.hero-background {
  background: linear-gradient(135deg, var(--dark) 0%, var(--secondary-dark) 60%, var(--secondary) 100%);
}

.hero-particles {
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(242, 146, 0, 0.10) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(26, 54, 93, 0.10) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(242, 146, 0, 0.06) 0%, transparent 50%);
}

.feature-icon, .service-icon {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.process-step:hover .step-icon {
  background: var(--primary);
  color: var(--white);
}

.dropdown-item:hover,
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  background: rgba(242, 146, 0, 0.2);
}

.play-button {
  background: rgba(242, 146, 0, 0.9);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(242, 146, 0, 0.15);
}

.footer-links a:hover,
.footer-social a:hover {
  color: var(--white);
  background: var(--primary);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden; /* prevención global de overflow horizontal */
}

body {
  font-family: var(--font-primary);
  font-weight: 400;
  line-height: 1.6;
  color: var(--gray-700);
  background-color: var(--white);
  overflow-x: hidden;
}

/* Medios responsivos por defecto */
img, video { max-width: 100%; height: auto; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

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

a:hover {
  color: var(--primary-dark);
}

/* Utility Classes */
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-padding {
  padding: var(--section-padding);
}

.section-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  background: linear-gradient(135deg, rgba(242, 146, 0, 0.1) 0%, rgba(0, 180, 216, 0.1) 100%);
  border: 1px solid rgba(242, 146, 0, 0.2);
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
}

.section-description {
  font-size: 1.25rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Button Styles */
.btn {
  font-family: var(--font-secondary);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  border: none;
  text-transform: none;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.btn-outline-light {
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* Minimal button (ghost) */
.btn-minimal {
  background: transparent;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  box-shadow: none;
}
.btn-minimal:hover,
.btn-minimal:focus {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(242, 146, 0, 0.08);
}
.btn-minimal i { margin-right: 0.4rem; }

/* Navigation */
#mainNav {
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(20px);
  transition: var(--transition);
  padding: 1rem 0;
  overflow-x: hidden; /* evita desbordes horizontales por elementos internos */
  z-index: 1050; /* asegura dropdown por encima del contenido */
}

#mainNav.scrolled {
  background: rgba(10, 14, 39, 0.98);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0;
}

.navbar-brand img {
  transition: var(--transition);
}

/* Evita que el logo cause overflow en móviles */
.navbar-brand img { max-width: 180px; height: auto; }

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--white) !important;
  background: rgba(242, 146, 0, 0.2);
}

.dropdown-menu {
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  padding: 0.5rem;
  margin-top: 0.5rem;
}

/* Limita ancho del navbar y contenido al viewport */
#mainNav, #mainNav .container, #mainNav .navbar-collapse {
  max-width: 100vw;
  overflow-x: hidden;
}

.dropdown-item {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.dropdown-item:hover {
  background: rgba(242, 146, 0, 0.2);
  color: var(--white);
}

/* Hero Section */
.hero-section {
  min-height: 92vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--dark) 0%, var(--secondary-dark) 50%, var(--secondary) 100%);
}

.hero-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(242, 146, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 180, 216, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(242, 146, 0, 0.05) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

.hero-gradient {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(242, 146, 0, 0.1) 0%,
    transparent 50%,
    rgba(0, 180, 216, 0.1) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-actions { margin-bottom: 2.5rem; }

.hero-stats { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  z-index: 2;
}

/* Simplified floating icons (plane/ship/truck) already defined as .element */

.floating-card {
  position: relative;
  z-index: 3;
  animation: float 6s ease-in-out infinite;
}

.floating-card .card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-lg);
  color: var(--white);
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.element {
  position: absolute;
  width: 60px;
  height: 60px;
  background: rgba(242, 146, 0, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(242, 146, 0, 0.3);
}

.element-1 {
  top: 20%;
  right: 10%;
  animation: float 8s ease-in-out infinite;
}

.element-2 {
  bottom: 30%;
  left: 10%;
  animation: float 10s ease-in-out infinite reverse;
}

.element-3 {
  top: 60%;
  right: 30%;
  animation: float 12s ease-in-out infinite;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

.scroll-down {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

/* About Section */
.features-list {
  margin-top: 2rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.feature-content h5 {
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.feature-content p {
  color: var(--gray-600);
  margin: 0;
}

/* About values cards */
.about-values .value-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.about-values .value-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.about-values .value-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
  font-size: 1.75rem;
}

.about-values .value-title {
  margin-bottom: 0.75rem;
}

.about-visual {
  position: relative;
}

.video-container {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.video-container img {
  width: 100%;
  height: auto;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(242, 146, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  transition: var(--transition);
}

.play-button:hover {
  background: var(--primary);
  transform: translate(-50%, -50%) scale(1.1);
}

.experience-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xl);
}

.badge-content {
  text-align: center;
}

.badge-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.badge-text {
  font-size: 0.75rem;
  color: var(--gray-600);
  font-weight: 600;
}

/* Service Cards */
.service-card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
  border: 1px solid var(--gray-200);
  position: relative;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

/* Number badge for service cards */
.mode-num {
  position: absolute;
  top: -14px;
  left: -14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--primary);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: var(--shadow-md);
}

.service-card .service-icon {
  margin-top: 0.25rem;
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.service-content h4 {
  margin-bottom: 1rem;
  color: var(--gray-900);
}

.service-content p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}

.service-features {
  list-style: none;
  padding: 0;
}

.service-features li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--gray-600);
}

.service-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Process Steps */
.process-step {
  text-align: center;
  position: relative;
  padding: 2rem 1rem;
}

/* Asegura que la sección proceso no se superponga visualmente en móviles */
#process { position: relative; background: var(--white); overflow: visible; z-index: 0; }
#process .container { position: static !important; transform: none !important; }

.step-number {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.step-icon {
  width: 80px;
  height: 80px;
  background: var(--gray-100);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 2rem;
  margin: 2rem auto 1.5rem;
  transition: var(--transition);
}

.process-step:hover .step-icon {
  background: var(--primary);
  color: var(--white);
  transform: scale(1.1);
}

.process-step h4 {
  margin-bottom: 1rem;
}

.process-step p {
  color: var(--gray-600);
  margin: 0;
}

/* Contact Section */
.contact-info {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--primary);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  margin-right: 1rem;
  flex-shrink: 0;
}

.contact-content h5 {
  color: var(--white);
  margin-bottom: 0.5rem;
}

.contact-content p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-links a {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.25rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

/* Contact Form */
.contact-form {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--white);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--border-radius);
  color: var(--white);
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(242, 146, 0, 0.1);
}

/* Loading dots for submit button */
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.85;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-widget {
  margin-bottom: 2rem;
}

.footer-widget h5 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-widget p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-contact {
  list-style: none;
  padding: 0;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-contact i {
  color: var(--primary);
  margin-right: 0.75rem;
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  margin-top: 2rem;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  padding: 0; /* evita que el botón crezca horizontalmente por padding del UA */
  line-height: 1; /* asegura tamaño del ícono sin estirar */
  overflow: hidden; /* previene desbordes del contenido interno */
}

.back-to-top i {
  display: inline-block;
  width: 1em; /* mantiene proporción del ícono */
  height: 1em;
  line-height: 1;
  pointer-events: none; /* evita capturar clics dentro del ícono */
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* WhatsApp Chat Widget */
.whatsapp-widget {
  position: fixed;
  bottom: 90px; /* se ajusta dinámicamente desde JS para pegarse al botón */
  right: 20px;
  width: 320px;
  max-width: calc(100vw - 40px);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
  overflow: hidden;
  transform: translateY(8px);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

.whatsapp-widget.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.whatsapp-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: var(--white);
  position: relative;
}
.whatsapp-header::after {
  content: '';
  position: absolute;
  right: 16px;
  bottom: -8px;
  width: 16px;
  height: 16px;
  background: inherit;
  transform: rotate(45deg);
}

.whatsapp-header .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.whatsapp-body { padding: 0.75rem 1rem; background: var(--white); }
.whatsapp-greeting { font-size: 0.925rem; color: var(--gray-700); margin-bottom: 0.5rem; }

.quick-replies { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  color: var(--gray-800);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.quick-chip:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

.whatsapp-footer { padding: 0.75rem 1rem; display: flex; gap: 0.5rem; border-top: 1px solid var(--gray-200); }
.whatsapp-footer .btn { padding: 0.5rem 0.75rem; font-size: 0.9rem; }

@media (max-width: 575.98px) {
  .whatsapp-widget { bottom: 76px; right: 12px; width: calc(100vw - 24px); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Responsive Design */
@media (max-width: 1199.98px) {
  .hero-stats {
    justify-content: center;
  }
  
  .stat-item {
    min-width: 120px;
  }
}

@media (max-width: 991.98px) {
  .hero-section {
    text-align: center;
  }
  
  .hero-visual {
    margin-top: 3rem;
  }
  
  .about-visual {
    margin-top: 3rem;
  }
  
  .experience-badge {
    position: relative;
    bottom: auto;
    right: auto;
    margin: 2rem auto 0;
  }
  
  .contact-info {
    text-align: center;
  }
  
  .footer-bottom .col-md-6 {
    text-align: center !important;
    margin-bottom: 1rem;
  }

  /* Nav colapsado: evita overflow y ocupa ancho completo */
  #mainNav .navbar-collapse { width: 100%; }
  #mainNav .navbar-nav .nav-link { width: 100%; margin: 0 !important; }
  #mainNav .navbar-nav .nav-link.btn { width: 100%; margin-left: 0 !important; }
  #mainNav .dropdown-menu { position: static; left: 0; right: auto; max-width: calc(100vw - 2rem); width: 100%; transform: none !important; box-shadow: none; }
}

/* En desktop, permitir overflow visible para que el dropdown se vea fuera del navbar */
@media (min-width: 992px) {
  #mainNav { overflow: visible; }
  #mainNav .container { overflow: visible; }
  #mainNav .navbar-collapse { overflow: visible; }
  #mainNav .dropdown-menu { position: absolute; z-index: 2000; }
  /* Dejar apertura controlada por click (Bootstrap) */
  #mainNav .dropdown-menu { margin-top: 0.5rem; }
  #mainNav .dropdown.show .dropdown-menu { display: block; }
}

/* Desactiva animaciones AOS en móviles para evitar solapamientos visuales */
@media (max-width: 991.98px) {
  #process [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 767.98px) {
  :root {
    --section-padding: 60px 0;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 1.25rem; /* separa un poco más los botones */
    margin-top: 0.5rem; /* leve respiro desde el texto superior */
  }
  
  .hero-actions .btn {
    width: 100%;
    margin: 0 !important;
  }
  
  .hero-stats {
    gap: 1rem;
  }
  
  .floating-elements .element {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .service-card {
    padding: 1.5rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
  
  .section-description {
    font-size: 1.1rem;
  }
  
  /* Ajusta insignia numerada para no desbordar la tarjeta */
  .mode-num {
    top: 8px;
    left: 8px;
  }
  
  /* Reduce superposición del número del paso en móviles */
  .step-number { display: none; }
  .process-step { padding-top: 1rem; }
  
  /* Evita que filas amplíen el viewport por gutters */
  .container {
    max-width: 100%;
    overflow-x: hidden;
  }
}

@media (max-width: 575.98px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .navbar-brand img { max-width: 150px; }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  /* Back to top más compacto en móviles y con mayor separación del borde */
  .back-to-top {
    bottom: 1rem;
    left: 1rem;
    width: 44px;
    height: 44px;
    font-size: 1.125rem;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .back-to-top,
  .floating-elements {
    display: none !important;
  }
  
  .hero-section {
    min-height: auto;
    padding: 2rem 0;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
}

/* Eco / Sustainability styles */
.eco-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(135deg, var(--success) 0%, #0A9E6C 100%);
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.eco-card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.eco-card-header {
  background: linear-gradient(135deg, var(--success) 0%, #0A9E6C 100%);
  color: var(--white);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.eco-card-body { padding: 1.5rem; }

.eco-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.eco-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--gray-700);
}

.eco-list i { color: var(--success); }

.eco-stamp {
  display: inline-block;
  background: rgba(16, 185, 129, 0.12);
  color: #0A9E6C;
  border: 1px dashed #0A9E6C;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
}

.badge-soft-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 999px;
}

/* Fixed navbar compensation */
:root { --nav-height: 72px; }

body.has-fixed-nav { padding-top: var(--nav-height); }

/* Evita que las secciones queden ocultas al navegar por anclas */
section[id],
.hero-section,
.hero-page { scroll-margin-top: calc(var(--nav-height) + 16px); }

/* Eco trees animation */
.eco-trees {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.eco-tree {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(10, 158, 108, 0.35);
  color: #0A9E6C;
  opacity: 0;
  transform: translateY(8px) scale(0.9);
}

.eco-trees.is-visible .eco-tree { animation: ecoTreeIn 600ms var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) forwards; }

.eco-tree i { font-size: 0.95rem; }

@keyframes ecoTreeIn {
  0% { opacity: 0; transform: translateY(8px) scale(0.9); }
  60% { opacity: 1; transform: translateY(-2px) scale(1.05); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Triple Impact section */
.triple-impact .impact-card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  height: 100%;
  transition: var(--transition);
}

/* Incoterms matrix */
.incoterms-matrix {
  font-size: 0.95rem;
}
.incoterms-matrix th,
.incoterms-matrix td {
  vertical-align: middle;
  text-align: center;
  white-space: nowrap;
}
.incoterms-matrix .stage { min-width: 120px; }
.resp-seller { background: #1A365D; color: #fff; }
.resp-buyer { background: #F29200; color: #0F172A; }
.resp-ins { background: linear-gradient(90deg, #1A365D 50%, #F29200 50%); color: #fff; }
.matrix-legend { display: flex; gap: 1rem; align-items: center; font-size: .9rem; }
.matrix-legend span { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: .35rem; }
.triple-impact .impact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.triple-impact .impact-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.triple-impact .impact-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background: rgba(242,146,0,0.12);
  border: 1px solid rgba(242,146,0,0.35);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Spacing for sustainability and triple impact sections */
#sostenibilidad,
#triple-impacto { margin-top: 0; }

@media (max-width: 767.98px) {
  #sostenibilidad,
  #triple-impacto { margin-top: 0; }
}

/* Hero video styles */
.hero-background { position: absolute; inset: 0; overflow: hidden; }
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: brightness(0.5);
}


