/* ==============================================================================
   MXLOGISTIC — main.css (Industrial Precision + Operational Velocity)
   ============================================================================== */

:root {
  /* Paleta Base: Negro, Grafito, Acero y Verde de Marca */
  --bg-primary: #0a0b0e;
  --bg-surface: #12141a;
  --bg-surface-raised: #181b24;
  --bg-surface-active: #212531;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.28);

  /* Textos y Metálicos */
  --text-primary: #f3f5f8;
  --text-secondary: #a1a7b5;
  --text-muted: #6b7280;
  --text-steel: #cbd1dc;

  /* Verde MXLOGISTIC (Marca y Acción Funcional) */
  --accent-green: #4c9102;
  --accent-green-bright: #5cb302;
  --accent-green-glow: rgba(76, 145, 2, 0.2);
  --accent-green-border: rgba(76, 145, 2, 0.45);
  --whatsapp-color: #25d366;

  /* Tipografía */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  /* Espaciado y Layout */
  --container-max: 1200px;
  --container-pad: clamp(16px, 4vw, 32px);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;

  /* Transiciones */
  --transition-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset y Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(76, 145, 2, 0.05) 0%, transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
}

/* Accesibilidad WCAG 2.2 AA */
:focus-visible {
  outline: 2px solid var(--accent-green-bright);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
  .brand-logo img { transition: none !important; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Contenedor */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* Tipografía y Jerarquía */
h1, h2, h3, h4, h5, h6 {
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  margin-bottom: 0.75rem;
}

h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

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

/* Microetiquetas Industriales y Números Monospace */
.tech-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-green);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tech-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent-green-glow);
}

.mono-stat {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ffffff;
}

/* Botones y CTAs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  white-space: nowrap;
  min-height: 48px; /* Touch target móvil WCAG */
}

.btn-primary {
  background-color: var(--accent-green);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(76, 145, 2, 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-green-bright);
  box-shadow: 0 4px 18px rgba(76, 145, 2, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface-raised);
  color: var(--text-steel);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-active);
  color: #ffffff;
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  min-height: 38px;
}

.btn-whatsapp {
  background-color: #128c7e;
  color: #ffffff;
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-color);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}

/* Tarjetas y Superficies Industriales */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color var(--transition-normal), transform var(--transition-normal);
  position: relative;
}

.card:hover {
  border-color: var(--border-medium);
}

/* Header de Navegación */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 11, 14, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: 72px;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  min-height: 72px;
}

.brand-logo img {
  height: 68px;
  width: auto;
  object-fit: contain;
  transition: height 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.site-header.is-scrolled .brand-logo img {
  height: 48px;
}

.main-nav {
  display: none;
}

@media (min-width: 1180px) {
  .main-nav {
    display: block;
  }
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
}

.nav-list a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-steel);
  position: relative;
  padding: 6px 0;
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: #ffffff;
}

.nav-list a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent-green);
}

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

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

@media (min-width: 1180px) {
  .menu-toggle {
    display: none;
  }
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  height: calc(100vh - 72px);
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 24px var(--container-pad);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  z-index: 999;
}

.mobile-drawer.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav-list a {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-steel);
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav-list a[aria-current="page"] {
  color: var(--accent-green-bright);
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  content: '/';
  margin-left: 8px;
  color: var(--border-strong);
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: #ffffff;
}

.breadcrumbs [aria-current="page"] {
  color: var(--accent-green);
  font-weight: 500;
}

/* Load Path Elementos Visuales */
.load-path-line {
  height: 2px;
  background: linear-gradient(90deg, var(--accent-green), rgba(76, 145, 2, 0.2) 80%, transparent);
  margin: 16px 0;
  position: relative;
}

.load-path-line::after {
  content: '';
  position: absolute;
  left: 0;
  top: -3px;
  width: 8px;
  height: 8px;
  background: var(--accent-green-bright);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green-glow);
}

@media (min-width: 1180px) {
  .site-header {
    height: 84px;
  }

  .brand-logo {
    min-height: 80px;
  }

  .brand-logo img {
    height: 76px;
  }

  .site-header.is-scrolled .brand-logo img {
    height: 56px;
  }

  .mobile-drawer {
    top: 84px;
    height: calc(100vh - 84px);
  }
}

/* Corrección selectiva 30-09-2026: MXLogistic */
.btn{white-space:normal;overflow-wrap:anywhere;max-width:100%;min-width:0}
.hero-grid>*{min-width:0}
.hero-actions>*{max-width:100%}
.hero-media-overlay-tag{max-width:calc(100% - 28px);flex-wrap:wrap}
.ps-footer-credito{min-height:44px;max-width:100%;display:inline-flex;align-items:center;flex-wrap:wrap;gap:.5rem;color:#ffffff;white-space:normal;overflow-wrap:anywhere;transform:none}
.ps-footer-credito:hover,.ps-footer-credito:focus-visible{color:#ffffff;transform:none}
.ps-footer-credito:focus-visible{outline:3px solid #ffffff;outline-offset:4px}
.ps-footer-credito .ps-footer-credito-label,.ps-footer-credito .ps-footer-credito-accent,.ps-footer-credito svg{color:#fff}
