/* ============================================
   TECARMEX — Rediseño Corporativo
   Paleta: Rojo #D32F2F / Negro #1F2937
   Inspirado en Logzee v3
   ============================================ */

:root {
  --red: #D32F2F;
  --red-hover: #B71C1C;
  --red-light: #EF5350;
  --dark: #1F2937;
  --dark-alt: #374151;
  --gray: #6B7280;
  --gray-light: #D1D5DB;
  --bg-light: #F9FAFB;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 8px 30px rgba(0,0,0,.1);
  --shadow-lg: 0 16px 50px rgba(0,0,0,.14);
  --radius: 0.5rem;
  --radius-lg: 1rem;
  --transition: all .35s cubic-bezier(.4,0,.2,1);
}

/* ---------- RESET & BASE ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--dark);
  overflow-x: hidden;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; }
section { position: relative; }
a { transition: var(--transition); }

/* ---------- PRELOADER ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--dark);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease;
}
#preloader.loaded { opacity: 0; pointer-events: none; }
.loader-spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,255,255,.15);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- TOPBAR ---------- */
.topbar {
  background: var(--dark);
  padding: .5rem 0;
  font-size: .8rem;
  color: rgba(255,255,255,.65);
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1060;
  transition: transform .35s ease;
}
.topbar.hidden { transform: translateY(-100%); }
.topbar a { color: rgba(255,255,255,.75); text-decoration: none; }
.topbar a:hover { color: var(--red-light); }
.topbar i { color: var(--red); margin-right: .4rem; }

/* ---------- NAVBAR ---------- */
.navbar-tecarmex {
  background: transparent;
  transition: var(--transition);
  padding: .75rem 0;
  z-index: 1050;
  top: 36px;
}
.navbar-tecarmex.scrolled {
  background: rgba(31, 41, 55, .85);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  padding: .5rem 0;
  top: 0;
}
.navbar-tecarmex .navbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
}
.navbar-tecarmex .navbar-brand img {
  height: 52px; width: auto;
  transition: var(--transition);
}
.navbar-tecarmex.scrolled .navbar-brand img { height: 40px; }
.navbar-tecarmex .brand-name {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: .06em;
  line-height: 1;
  transition: var(--transition);
}
.navbar-tecarmex.scrolled .brand-name { font-size: 1.45rem; }
.navbar-tecarmex .nav-link {
  color: rgba(255,255,255,.85);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .6rem 1rem;
  transition: var(--transition);
  position: relative;
}
.navbar-tecarmex .nav-link:hover,
.navbar-tecarmex .nav-link.active { color: var(--white); }
.navbar-tecarmex .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  width: 0; height: 3px;
  background: var(--red);
  transition: var(--transition);
  transform: translateX(-50%);
  border-radius: 2px;
}
.navbar-tecarmex .nav-link:hover::after,
.navbar-tecarmex .nav-link.active::after { width: 70%; }
.navbar-tecarmex .btn-cta-nav {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: .5rem 1.5rem;
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 4px;
  transition: var(--transition);
  text-decoration: none;
}
.navbar-tecarmex .btn-cta-nav:hover {
  background: var(--red-hover);
  transform: translateY(-1px);
}

/* ---------- HERO SLIDER ---------- */
.hero-slider {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}
.swiper { width: 100%; height: 100%; }
.swiper-slide { position: relative; overflow: hidden; }
.slide-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 6s ease;
}
.swiper-slide-active .slide-bg { transform: scale(1); }
.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg,
    rgba(31,41,55,.85) 0%,
    rgba(31,41,55,.6) 50%,
    rgba(31,41,55,.8) 100%);
}
.slide-content {
  position: relative; z-index: 2;
  height: 100%;
  display: flex; align-items: center;
}
.slide-content .tag {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  padding: .35rem 1.2rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  border-radius: 3px;
  margin-bottom: 1.25rem;
}
.slide-content h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.slide-content h1 span { color: var(--red-light); }
.slide-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.8);
  max-width: 550px;
  margin-bottom: 2rem;
  font-weight: 300;
}
.btn-red {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: .9rem 2.5rem;
  font-weight: 700;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 4px;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}
.btn-red:hover {
  background: var(--red-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(211,47,47,.4);
}
.btn-outline-white {
  border: 2px solid rgba(255,255,255,.4);
  color: var(--white);
  padding: .85rem 2.5rem;
  font-weight: 700;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 4px;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  background: transparent;
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--dark);
  border-color: var(--white);
}
.swiper-pagination-bullet {
  width: 12px; height: 12px;
  background: rgba(255,255,255,.4);
  opacity: 1;
  transition: var(--transition);
}
.swiper-pagination-bullet-active {
  background: var(--red);
  width: 36px;
  border-radius: 6px;
}
.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev,
.hero-slider .hero-btn-next,
.hero-slider .hero-btn-prev {
  color: var(--white);
  width: 50px; height: 50px;
  background: rgba(211,47,47,.6);
  border-radius: 50%;
  transition: var(--transition);
}
.hero-slider .swiper-button-next:hover,
.hero-slider .swiper-button-prev:hover,
.hero-slider .hero-btn-next:hover,
.hero-slider .hero-btn-prev:hover { background: var(--red); }
.hero-slider .swiper-button-next::after,
.hero-slider .swiper-button-prev::after,
.hero-slider .hero-btn-next::after,
.hero-slider .hero-btn-prev::after { font-size: 1rem; }

/* ---------- COUNTER BAR ---------- */
.counter-bar {
  background: var(--red);
  padding: 2rem 0;
  position: relative;
  z-index: 10;
  margin-top: -1px;
}
.counter-item {
  text-align: center;
  color: var(--white);
  padding: 1rem;
}
.counter-item i {
  font-size: 2rem;
  margin-bottom: .5rem;
  display: block;
  opacity: .85;
}
.counter-item .count {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
}
.counter-item .count-label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .85;
  margin-top: .3rem;
}
.counter-item + .counter-item {
  border-left: 1px solid rgba(255,255,255,.2);
}

/* ---------- SECTION COMMON ---------- */
.section-heading { margin-bottom: 3.5rem; }
.section-heading .tag-line {
  display: inline-block;
  color: var(--red);
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: .5rem;
}
.section-heading h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
}
.section-heading h2 span { color: var(--red); }
.section-heading p {
  color: var(--gray);
  font-size: 1.05rem;
  max-width: 650px;
  margin-top: .75rem;
}
.section-heading.text-center p { margin-left: auto; margin-right: auto; }
.heading-line {
  width: 50px; height: 3px;
  background: var(--red);
  display: block;
  margin-top: .75rem;
}
.text-center .heading-line { margin-left: auto; margin-right: auto; }

/* ---------- WIDE SPACING ---------- */
.wide-tb-100 { padding: 100px 0; }
.wide-tb-80 { padding: 80px 0; }

/* ---------- NOSOTROS ---------- */
#nosotros { background: var(--white); }
.about-text {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--dark-alt);
}
.about-img-wrap { position: relative; }
.about-img-wrap img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.about-img-wrap .experience-badge {
  position: absolute;
  bottom: -20px; right: -20px;
  background: var(--red);
  color: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.experience-badge .years {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}
.experience-badge .years-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .9;
}
.icon-box {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg-light);
  border-radius: var(--radius);
  transition: var(--transition);
  border: 1px solid transparent;
}
.icon-box:hover {
  border-color: var(--red);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}
.icon-box .ib-icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  background: var(--red);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1.3rem;
}
.icon-box h5 {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: .15rem;
  font-size: 1rem;
}
.icon-box p {
  color: var(--gray);
  font-size: .88rem;
  margin: 0;
  line-height: 1.5;
}

/* ---------- TERMINALES / MAPA SVG ---------- */
.terminal-section {
  background: var(--dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.terminal-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url('../img/bg-texture.webp') center/cover no-repeat;
  opacity: .06;
}

/* Contenedor del mapa */
.map-wrap {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}
.map-wrap svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 30px rgba(0,0,0,.5));
}

/* Países */
.map-ocean { fill: #0b1622; }
.map-us    { fill: #1a2940; stroke: #2d4060; stroke-width: .5; }
.map-mx    { fill: #243351; stroke: #3a5070; stroke-width: .5; }
.map-baja  { fill: #243351; stroke: #3a5070; stroke-width: .5; }
.map-border {
  stroke: rgba(255,255,255,.12);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  fill: none;
}

/* Pines */
.map-pin { cursor: pointer; }
.map-pin .pin-dot {
  transition: r .2s ease;
}
.map-pin:hover .pin-dot { r: 7; }

/* Anillo de pulso */
.map-pin .pin-pulse {
  animation: mapPulse 2.4s ease-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes mapPulse {
  0%   { r: 6; opacity: .8; }
  100% { r: 18; opacity: 0; }
}

/* Etiqueta de pin */
.map-pin .pin-label {
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  fill: rgba(255,255,255,.9);
  pointer-events: none;
  letter-spacing: .02em;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
  opacity: 1;
  transition: opacity .2s;
}
.map-pin .pin-label-bg {
  fill: rgba(0,0,0,.55);
  rx: 3;
  ry: 3;
  opacity: 1;
}
.map-pin:hover .pin-label { fill: #ffffff; }

/* Contenedor imagen mapa terminales */
.terminals-map-wrap {
  max-width: 1000px;
  margin: 0 auto;
}
.terminals-map-wrap img {
  border-radius: var(--radius);
  display: block;
  filter: drop-shadow(0 12px 40px rgba(0,0,0,.6));
}

/* Leyenda */
.map-legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.map-legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.map-legend-dot.mx { background: #D32F2F; box-shadow: 0 0 6px rgba(211,47,47,.6); }
.map-legend-dot.us { background: #4a7fa5; box-shadow: 0 0 6px rgba(74,127,165,.6); }

/* ---------- SERVICIOS ---------- */
#servicios { background: var(--bg-light); }
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  height: 100%;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,.04);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.service-card .s-icon {
  width: 60px; height: 60px;
  background: var(--red);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  transition: var(--transition);
}
.service-card:hover .s-icon {
  background: var(--dark);
  border-radius: 50%;
}
.service-card h4 {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: .75rem;
  font-size: 1.1rem;
}
.service-card p,
.service-card li {
  color: var(--gray);
  font-size: .9rem;
  line-height: 1.7;
}
.service-card ul { padding-left: 1.1rem; }
.service-card ul li::marker { color: var(--red); }

/* ---------- SEGURIDAD ---------- */
#seguridad { background: var(--white); }
.security-feature {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  transition: var(--transition);
}
.security-feature:hover { background: var(--bg-light); }
.security-feature .f-icon {
  flex-shrink: 0;
  width: 50px; height: 50px;
  background: var(--red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1.2rem;
}
.security-feature h5 {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: .25rem;
  font-size: 1.05rem;
}
.security-feature p {
  color: var(--gray);
  font-size: .9rem;
  margin: 0;
  line-height: 1.6;
}
.img-framed {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 4px solid var(--white);
  outline: 1px solid var(--gray-light);
}

/* ---------- CERTIFICACIONES ---------- */
#certificaciones { background: var(--bg-light); }
.cert-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,.04);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.cert-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--red);
}
.cert-card img {
  max-height: 130px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: grayscale(30%);
  transition: var(--transition);
}
.cert-card:hover img { filter: grayscale(0); }
.cert-card .cert-label {
  font-weight: 700;
  color: var(--dark);
  font-size: .9rem;
}
.cert-card .cert-detail {
  font-size: .78rem;
  color: var(--gray);
  margin-top: .15rem;
}
.policy-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  border-left: 4px solid var(--red);
  box-shadow: var(--shadow-sm);
  height: 100%;
  transition: var(--transition);
}
.policy-card:hover { box-shadow: var(--shadow-md); }
.policy-card h5 {
  color: var(--dark);
  font-weight: 700;
  margin-bottom: 1rem;
}
.policy-card h5 i { color: var(--red); }
.policy-card p {
  color: var(--dark-alt);
  font-size: .95rem;
  line-height: 1.85;
  margin: 0;
}

/* ---------- FLOTILLA ---------- */
#flotilla { background: var(--white); }
.fleet-swiper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.fleet-swiper .swiper { width: 100%; }
.fleet-slide-img {
  height: 500px;
  overflow: hidden;
  position: relative;
  background-color: var(--dark);
  background-size: cover;
  background-position: center;
}
/* Capa desenfocada como fondo (se hereda el background-image puesto via JS) */
.fleet-slide-img::after {
  content: '';
  position: absolute;
  inset: -28px;
  background: inherit;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.35) saturate(1.4);
  z-index: 0;
}
.fleet-slide-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  position: relative;
  z-index: 1;
  transition: transform .9s ease;
}
.fleet-swiper .swiper-slide-active .fleet-slide-img img {
  transform: scale(1.03);
}
.fleet-pagination {
  bottom: 1.25rem !important;
}
.fleet-btn-next,
.fleet-btn-prev {
  color: var(--white);
  width: 50px; height: 50px;
  background: rgba(211,47,47,.7);
  border-radius: 50%;
  transition: var(--transition);
}
.fleet-btn-next:hover,
.fleet-btn-prev:hover { background: var(--red); }
.fleet-btn-next::after,
.fleet-btn-prev::after { font-size: 1rem; }
@media (max-width: 767.98px) {
  .fleet-slide-img { height: 260px; }
}

/* ---------- CTA BAND ---------- */
.cta-band {
  background: var(--dark);
  padding: 3.5rem 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 500px; height: 500px;
  background: var(--red);
  border-radius: 50%;
  opacity: .08;
}
.cta-band h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--white);
}
.cta-band p {
  color: rgba(255,255,255,.65);
  font-size: 1rem;
}

/* ---------- CONTACTO ---------- */
#contacto { background: var(--white); }
.contact-card {
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: var(--transition);
  height: 100%;
  border: 1px solid transparent;
}
.contact-card:hover {
  border-color: var(--red);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.contact-card .c-icon {
  width: 56px; height: 56px;
  background: var(--red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  color: var(--white);
  font-size: 1.3rem;
  transition: var(--transition);
}
.contact-card:hover .c-icon { background: var(--dark); }
.contact-card h5 {
  font-weight: 700;
  color: var(--dark);
  margin-bottom: .5rem;
  font-size: .95rem;
}
.contact-card a {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.05rem;
}
.contact-card a:hover { color: var(--red-hover); }
.contact-card p {
  color: var(--gray);
  font-size: .9rem;
  margin: 0;
  line-height: 1.6;
}
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.map-container iframe {
  width: 100%;
  height: 380px;
  border: none;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,.6);
  padding: 4rem 0 0;
}
.footer h5 {
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: .75rem;
}
.footer h5::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 30px; height: 3px;
  background: var(--red);
  border-radius: 2px;
}
.footer a {
  color: rgba(255,255,255,.55);
  text-decoration: none;
  font-size: .88rem;
}
.footer a:hover {
  color: var(--red-light);
  padding-left: 4px;
}
.footer-links li {
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.footer-links li::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  flex-shrink: 0;
}
.footer-contact li {
  margin-bottom: .8rem;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .88rem;
}
.footer-contact li i {
  color: var(--red);
  margin-top: 3px;
  flex-shrink: 0;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.25rem 0;
  margin-top: 3rem;
  text-align: center;
  font-size: .82rem;
}
.footer-bottom a { color: var(--red-light); }

/* ---------- SCROLL TO TOP ---------- */
.scroll-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 46px; height: 46px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
  box-shadow: var(--shadow-md);
  font-size: 1.1rem;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover {
  background: var(--dark);
  transform: translateY(-3px);
}

/* ---------- ANIMATIONS ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity .7s ease, transform .7s ease;
}
.fade-left.visible { opacity: 1; transform: translateX(0); }
.fade-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity .7s ease, transform .7s ease;
}
.fade-right.visible { opacity: 1; transform: translateX(0); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991.98px) {
  .navbar-tecarmex .navbar-collapse {
    background: var(--dark);
    padding: 1.5rem;
    border-radius: 0 0 var(--radius) var(--radius);
    margin-top: .5rem;
    box-shadow: var(--shadow-lg);
  }
  .topbar { display: none; }
  .counter-item + .counter-item { border-left: none; }
  .counter-item .count { font-size: 2rem; }
  .wide-tb-100 { padding: 60px 0; }
  .section-heading h2 { font-size: 2rem; }
  .about-img-wrap .experience-badge {
    bottom: -10px; right: 10px;
    padding: 1rem;
  }
  .experience-badge .years { font-size: 1.8rem; }
}
@media (max-width: 767.98px) {
  .hero-slider { height: 80vh; min-height: 500px; }
  .slide-content h1 { font-size: 2rem; }
  .section-heading h2 { font-size: 1.65rem; }
  .wide-tb-100 { padding: 50px 0; }
  .counter-item .count { font-size: 1.6rem; }
  .counter-item .count-label { font-size: .7rem; }
  .hero-slider .swiper-button-next,
  .hero-slider .swiper-button-prev { display: none; }
}
