/* ==========================================================================
   Anglosino México — Sistema de diseño
   Colores institucionales: azul marino #001B2E · rojo #C8102E · gris #8C8C8C
   ========================================================================== */

:root {
  /* Marca */
  --navy: #001b2e;
  --navy-ink: #000c14;
  --navy-deep: #00131f;
  --coral: #c8102e;
  --coral-deep: #a00d25;
  --gray: #8c8c8c;

  /* Bootstrap overrides */
  --bs-primary: var(--navy);
  --bs-primary-rgb: 0, 27, 46;
  --bs-secondary: var(--coral);
  --bs-secondary-rgb: 200, 16, 46;
  --bs-body-color: var(--navy-ink);
  --bs-body-font-family: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Superficies */
  --surface: #fdfcfa;
  --surface-alt: #f3f1ec;
  --surface-navy: var(--navy);
  --border-soft: rgba(0, 27, 46, .10);

  /* Elevación (sombras con tinte navy, nunca negro puro) */
  --shadow-sm: 0 2px 8px rgba(0, 12, 20, .08), 0 1px 2px rgba(0, 12, 20, .06);
  --shadow-md: 0 10px 30px rgba(0, 12, 20, .12), 0 2px 8px rgba(0, 12, 20, .06);
  --shadow-lg: 0 24px 60px rgba(0, 12, 20, .18), 0 6px 16px rgba(0, 12, 20, .08);
  --shadow-coral: 0 12px 28px rgba(200, 16, 46, .28);

  /* Radios */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 26px;
  --r-pill: 999px;

  /* Movimiento */
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ==========================================================================
   Tipografía
   ========================================================================== */

body {
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--navy-ink);
  background: var(--surface);
}

h1, h2, h3, h4, h5, h6,
.display-5, .display-6 {
  font-family: "Space Grotesk", "Work Sans", sans-serif;
  font-weight: 700;
  letter-spacing: -.02em;
  color: inherit;
}

.lead {
  font-weight: 400;
  color: inherit;
  opacity: .8;
}

.eyebrow {
  display: inline-block;
  color: var(--coral);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .35rem;
  position: relative;
  padding-left: 22px;
}

.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 3px;
  background: var(--coral);
  border-radius: 2px;
}

/* ==========================================================================
   Navbar — fondo claro para que el logo a color se lea correctamente
   ========================================================================== */

.navbar {
  background: rgba(253, 252, 250, .92) !important;
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  box-shadow: 0 1px 0 var(--border-soft);
  transition: box-shadow .35s var(--ease), background-color .35s var(--ease);
  padding-top: .85rem;
  padding-bottom: .85rem;
}

.navbar.is-scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-brand img {
  height: 34px;
  width: auto;
  transition: transform .3s var(--ease);
}

.navbar-brand:hover img {
  transform: translateY(-1px) scale(1.02);
}

.navbar .nav-link {
  color: var(--navy-ink) !important;
  font-weight: 600;
  font-size: .95rem;
  position: relative;
  margin: 0 .35rem;
  padding: .4rem .1rem !important;
}

.navbar .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--coral);
  border-radius: 2px;
  transition: width .3s var(--ease);
}

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

.navbar .nav-link.active {
  color: var(--navy) !important;
}

.navbar-toggler {
  border: none;
  box-shadow: none !important;
}

/* ==========================================================================
   Botones
   ========================================================================== */

.btn {
  font-weight: 600;
  border-radius: var(--r-pill);
  padding: .65rem 1.5rem;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease);
}

.btn:active {
  transform: scale(.97);
}

.btn-primary {
  --bs-btn-bg: var(--coral);
  --bs-btn-border-color: var(--coral);
  --bs-btn-hover-bg: var(--coral-deep);
  --bs-btn-hover-border-color: var(--coral-deep);
  --bs-btn-active-bg: var(--coral-deep);
  --bs-btn-active-border-color: var(--coral-deep);
  box-shadow: var(--shadow-coral);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(200, 16, 46, .36);
}

.btn-outline-primary {
  --bs-btn-color: var(--navy);
  --bs-btn-border-color: var(--navy);
  --bs-btn-hover-bg: var(--navy);
  --bs-btn-hover-border-color: var(--navy);
}

.btn-outline-primary:hover,
.btn-outline-light:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: .85rem 2rem;
}

/* ==========================================================================
   Superficies: cards, imágenes, tablas, acordeón
   ========================================================================== */

.bg-light {
  background-color: var(--surface-alt) !important;
}

.card {
  border: none;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.rounded, .rounded-3 {
  border-radius: var(--r-md) !important;
}

img.rounded, img.img-fluid.rounded {
  border-radius: var(--r-md) !important;
  transition: transform .5s var(--ease);
}

.card img.img-fluid,
.pdetail img,
a.sector img {
  border-radius: var(--r-md);
}

/* zoom suave en imágenes dentro de contenedores con overflow oculto */
.img-hover-zoom {
  overflow: hidden;
  border-radius: var(--r-md);
}

.img-hover-zoom img {
  transition: transform .6s var(--ease);
}

.img-hover-zoom:hover img {
  transform: scale(1.06);
}

.table-responsive {
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background: var(--navy);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  border: none;
  letter-spacing: .02em;
}

.table td, .table th {
  vertical-align: middle;
}

.accordion-item {
  border: none;
  border-radius: var(--r-md) !important;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: .75rem;
}

.accordion-button {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  border-radius: var(--r-md) !important;
}

.accordion-button:not(.collapsed) {
  background-color: rgba(0, 27, 46, .06);
  color: var(--navy);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: 0 0 0 .2rem rgba(0, 27, 46, .15);
}

.accordion-body {
  color: #4a5a72;
}

.badge {
  border-radius: var(--r-pill);
  font-weight: 600;
  letter-spacing: .02em;
  padding: .5em 1em;
}

/* ==========================================================================
   Formularios
   ========================================================================== */

.form-control, .form-select {
  border-radius: var(--r-sm);
  border-color: rgba(0, 27, 46, .18);
  padding: .7rem 1rem;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.form-control:focus, .form-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 .2rem rgba(0, 27, 46, .14);
}

.form-label {
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy-ink);
}

.alert {
  border: none;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Hero / Subhero
   ========================================================================== */

.hero-bg, .subhero-bg {
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0, 19, 31, .94), rgba(0, 27, 46, .82) 55%, rgba(200, 16, 46, .25));
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px);
  background-size: 22px 22px;
  mix-blend-mode: overlay;
}

.subhero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0, 19, 31, .90), rgba(0, 27, 46, .80));
}

.hero-bg .container, .subhero-bg .container {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer.site-footer {
  position: relative;
  background: var(--navy-deep) !important;
}

footer.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--coral), var(--navy) 60%);
}

footer.site-footer a {
  transition: color .2s var(--ease), padding-left .2s var(--ease);
}

footer.site-footer a:hover {
  color: #fff !important;
  padding-left: 4px;
}

/* ==========================================================================
   Animaciones — reveal on scroll + stagger
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.stagger.in > * {
  opacity: 1;
  transform: translateY(0);
}

.stagger.in > *:nth-child(1) { transition-delay: .05s; }
.stagger.in > *:nth-child(2) { transition-delay: .12s; }
.stagger.in > *:nth-child(3) { transition-delay: .19s; }
.stagger.in > *:nth-child(4) { transition-delay: .26s; }
.stagger.in > *:nth-child(5) { transition-delay: .33s; }
.stagger.in > *:nth-child(6) { transition-delay: .40s; }
.stagger.in > *:nth-child(7) { transition-delay: .47s; }
.stagger.in > *:nth-child(8) { transition-delay: .54s; }
.stagger.in > *:nth-child(9) { transition-delay: .61s; }

.hero-fade-1, .hero-fade-2, .hero-fade-3, .hero-fade-4 {
  opacity: 0;
  transform: translateY(18px);
  animation: heroFade .8s var(--ease) forwards;
}

.hero-fade-1 { animation-delay: .05s; }
.hero-fade-2 { animation-delay: .18s; }
.hero-fade-3 { animation-delay: .32s; }
.hero-fade-4 { animation-delay: .48s; }

@keyframes heroFade {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger > *, .hero-fade-1, .hero-fade-2, .hero-fade-3, .hero-fade-4 {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   Componentes específicos del sitio
   ========================================================================== */

.step-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--navy), var(--navy-deep));
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.step-col:hover .step-badge {
  transform: translateY(-4px) scale(1.06);
  box-shadow: var(--shadow-md);
}

.sector-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  height: 100%;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

.sector-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.sector-card .sector-num {
  color: var(--coral);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: .85rem;
}

.corridor-panel {
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.corridor-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 20px 20px;
}

.corridor-panel > * {
  position: relative;
  z-index: 1;
}

.stat-num {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--navy);
  transition: transform .3s var(--ease);
}

.stat-block:hover .stat-num {
  transform: scale(1.08);
}

.value-num {
  color: var(--coral);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: .95rem;
  opacity: .85;
}

/* Cursor discreto en enlaces internos */
a {
  color: var(--navy);
}

a:hover {
  color: var(--coral-deep);
}

/* Compensar navbar sticky al saltar a anclas (#maquinaria, #lineas, etc.) */
[id] {
  scroll-margin-top: 96px;
}

html {
  scroll-behavior: smooth;
}

/* Alinear títulos de pasos de altura variable (Cómo trabajamos) */
.step-title {
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .4rem;
}

/* Logos de clientes: siempre a color, sin escala de grises ni zoom en hover
   (el tamaño/proporción de cada logo se controla en el <style> de index.php) */
.client-logos img {
  filter: none;
  opacity: 1;
  transition: none;
}

/* ==========================================================================
   Botón flotante de WhatsApp
   ========================================================================== */

.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1090;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  animation: whatsappPulse 2.4s ease-in-out infinite;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .34);
}

@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(0, 0, 0, .28), 0 0 0 0 rgba(37, 211, 102, .45); }
  50% { box-shadow: 0 8px 24px rgba(0, 0, 0, .28), 0 0 0 10px rgba(37, 211, 102, 0); }
}

@media (max-width: 575.98px) {
  .whatsapp-float {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }
}

/* ==========================================================================
   Banda CTA con imagen de fondo (altura definida por el contenido, no por la imagen)
   ========================================================================== */

.band-cta {
  min-height: 260px;
}

.band-cta__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.band-cta__overlay {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 100%;
}


/* ==========================================================================
   Ajustes móviles solicitados
   ========================================================================== */

.recaptcha-wrap {
  max-width: 100%;
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .hero-stats > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 1rem;
  }

  .hero-stats > [class*="col-"]:last-child {
    margin-bottom: 0;
  }

  .client-logos img {
    max-width: 140px;
    max-height: 52px;
  }

  .table-responsive .table {
    min-width: 560px;
  }
}

@media (max-width: 360px) {
  .recaptcha-wrap .g-recaptcha {
    width: 304px;
    transform: scale(.82);
    transform-origin: left top;
    margin-bottom: -14px;
  }
}
/* ==========================================================================
   Selector de idioma (banderas)
   ========================================================================== */

.lang-switch {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  text-decoration: none;
  opacity: .45;
  filter: grayscale(60%);
  transition: opacity .25s var(--ease), filter .25s var(--ease), transform .25s var(--ease), background-color .25s var(--ease);
}

.lang-flag:hover {
  opacity: .85;
  filter: grayscale(0%);
  transform: translateY(-1px);
}

.lang-flag.active {
  opacity: 1;
  filter: grayscale(0%);
  background: rgba(0, 27, 46, .08);
  box-shadow: inset 0 0 0 1.5px rgba(0, 27, 46, .25);
}

@media (max-width: 991.98px) {
  .lang-switch {
    margin: .75rem 0;
  }
}
