:root {
  /* Corporate Palette */
  --kme-gold: #FFD700;
  --kme-navy: #0A192F;
  --kme-blue: #101faf;
  --kme-gray: #f4f6f8;
  --text-dark: #1a1a1a;
  --text-muted: #333333;

  --font-heading: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-size-body: 14px;
}

body {
  font-family: var(--font-body);
  background-color: var(--kme-gray);
  color: var(--text-dark);
  padding-top: 80px;
  line-height: 1.6;
  font-size: var(--font-size-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--kme-navy);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Títulos de sección (Nuestros Servicios, etc.) alineados al estilo del sitio */
.section-title {
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

/* Encabezado de sección con texto y líneas a los lados */
.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.section-header-side {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 220px;
  gap: 0.75rem;
}

.section-header-side--right {
  flex-direction: row-reverse;
}

.section-header-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--kme-navy);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.85;
}

.section-header-line {
  flex: 1;
  min-width: 40px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--kme-blue) 20%, var(--kme-blue) 80%, transparent);
  opacity: 0.5;
}

.section-header-side--right .section-header-line {
  background: linear-gradient(90deg, var(--kme-blue) 20%, var(--kme-blue) 80%, transparent);
}

.section-header .section-title {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Encabezado estilo: --------- Cobertura Global   Nuestros Servicios   Logística Integral --------- */
.section-header-dashes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
}

.section-header-dashes .section-header-line--left,
.section-header-dashes .section-header-line--right {
  flex: 1;
  min-width: 60px;
  max-width: 180px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--kme-blue) 10%, var(--kme-blue) 90%, transparent);
  opacity: 0.6;
}

.section-header-dashes .section-header-line--right {
  background: linear-gradient(90deg, var(--kme-blue) 10%, var(--kme-blue) 90%, transparent);
}

.section-header-dashes .section-header-tag {
  flex-shrink: 0;
}

.section-header-sep {
  font-size: 1rem;
  font-weight: 600;
  color: var(--kme-navy);
  letter-spacing: 0.03em;
  white-space: nowrap;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-heading);
}

/* Menos espacio entre banderas y Nuestros Servicios */
.section-services-wrap {
  margin-top: 1rem;
  margin-bottom: 2.5rem;
}

/* Sección "Más de Kme": fondo blanco como el resto de la página */
.more-info-section {
  background-color: #fff;
}

.more-info-desc {
  font-size: var(--font-size-body);
  color: var(--text-muted);
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
  max-width: 100%;
}

.btn-contactanos {
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

/* Navbar Overrides */
.bg-light {
  background-color: #ffffff !important;
}

.h-hover-blue:hover {
  color: var(--kme-blue) !important;
}

.nav-link {
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--kme-blue) !important;
}

.nav-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  transition: color 0.2s;
}

/* Menús desplegables verticales: Envíos, Rastreo, Soporte */
.dropdown-menu-vertical {
  min-width: 220px;
  max-width: 250px;
  padding: 0.5rem 0;
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.dropdown-menu-vertical .dropdown-item {
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--kme-navy);
  transition: background 0.2s, color 0.2s;
}

.dropdown-menu-vertical .dropdown-item:hover {
  background: rgba(16, 31, 175, 0.08);
  color: var(--kme-blue);
}

.dropdown-menu-vertical .dropdown-item-icon .dropdown-icon {
  width: 1.1rem;
  text-align: center;
  color: var(--kme-navy);
  opacity: 0.75;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.dropdown-menu-vertical .dropdown-item:hover .dropdown-icon {
  color: var(--kme-blue);
  opacity: 1;
}

.dropdown-menu-vertical .dropdown-divider {
  border-top: 1px solid rgba(10, 25, 47, 0.12);
  margin: 0.25rem 0;
}

.nav-item.dropdown .nav-link.dropdown-toggle:hover {
  color: var(--kme-blue) !important;
}

.hover-gold:hover {
  color: var(--kme-gold) !important;
  transition: color 0.2s;
}

.btn-outline-primary {
  color: var(--kme-blue);
  border-color: var(--kme-blue);
}

.btn-outline-primary:hover {
  background-color: var(--kme-blue);
  color: #fff;
  border-color: var(--kme-blue);
}

/* Banner zona (entre header y contenido) */
.banner-zona {
  width: 100%;
  overflow: hidden;
  background: #f5f5f5;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.banner-zona-img {
  width: 100%;
  height: auto;
  max-height: 38vh;
  object-fit: cover;
  display: block;
}

/* Banner con texto y widget DENTRO de la imagen */
.banner-zona--contenido {
  position: relative;
  min-height: 380px;
  margin-bottom: 0;
}

.banner-zona--contenido .banner-zona-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  /* Centramos mejor el buque en el banner y aclaramos la imagen */
  object-position: 50% 45%;
  filter: brightness(1.18) contrast(1.02);
}

.banner-zona-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.10) 40%,
    rgba(0, 0, 0, 0.30) 100%
  );
  z-index: 1;
}

.banner-zona-contenido {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.banner-zona-contenido .container {
  max-width: 900px;
  text-align: center;
}

.banner-zona-titulo {
  color: #ffffff !important;
  font-size: 1.75rem;
  font-weight: 700;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.95);
  margin-bottom: 0.5rem;
}

.banner-zona-desc {
  color: #ffffff;
  font-size: 0.95rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  margin-bottom: 1.5rem;
}

.banner-zona--contenido .hero-widget-bar-wrap {
  margin-top: 0.5rem;
}

/* Hero Section */
.banne_1 {
  width: 100%;
  min-height: 520px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.96)),
    url('../styles/img/hero_home.jpg');
  background-position: center;
  background-size: cover;
  position: relative;
  padding: 40px 0 20px;
}

/* Hero solo imagen (sin texto ni widget) */
.banne_1--clean {
  min-height: 42vh;
  background-image: url('../styles/img/hero_home.jpg');
  padding: 2rem 0;
}

.display-3 {
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  color: var(--kme-navy);
}

/* Título del hero más compacto */
.banne_1 .display-3 {
  font-size: 1.75rem !important;
}

/* Hero subtext más claro y sin sombra pesada */
.banne_1 .lead {
  color: #4b5563 !important;
  text-shadow: none !important;
  font-weight: 500;
}

/* Barra Rastrear/Tarifas: centrada y un poco más arriba en el hero */
.hero-widget-bar-wrap {
  padding-bottom: 0.5rem;
}

/* Widget horizontal flotante sobre la imagen del hero */
.tu-widget-horizontal {
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 80%;
  max-width: 1000px;
}

.hero-widget-bar {
  padding: 0.25rem 0;
}

.hero-widget-bar .btn-link.active-tab {
  text-decoration: none;
  border-bottom: 2px solid var(--kme-blue) !important;
}

.hero-widget-bar .btn-link:not(.active-tab) {
  text-decoration: none;
  color: #6c757d !important;
}

.hero-bar-input-group {
  max-width: 320px;
}

.hero-bar-input-group .form-control,
.hero-bar-input-group .btn {
  height: 36px;
  font-size: 0.875rem;
}

.hero-bar-input-group .form-control {
  padding: 0.35rem 0.75rem;
}

.hero-bar-input-group .btn {
  padding: 0.35rem 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-widget-bar #tarifa-form-hero .form-control,
.hero-widget-bar #tarifa-form-hero .btn {
  height: 36px;
  font-size: 0.875rem;
}

/* Hero: contenido (texto + barra) centrado vertical y horizontal */
.banne_1 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.banne_1 > .container {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

/* Hero debajo del banner: menos altura, contenido centrado */
.banne_1--bajo-banner {
  min-height: auto;
  padding: 2rem 0 3rem;
  background-image: linear-gradient(rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.98));
}

.banne_1--bajo-banner .lead {
  font-size: 1.25rem;
}

/* Barra del widget centrada (en flujo, no flotante) */
.hero-widget-bar--centrada {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Widget más compacto en el hero (legacy) */
.hero-widget {
  max-width: 420px;
  margin-left: auto;
  border-radius: 18px !important;
}

.hero-widget .d-flex > button {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  font-size: 0.8rem;
}

.hero-widget .input-group-lg .form-control {
  font-size: 0.9rem;
  padding: 0.6rem 0.75rem;
}

.tariff-calculator-panel {
  background: linear-gradient(135deg, #02b3a4, #00c4b0);
  border-radius: 18px;
  padding: 1.5rem 1.75rem;
}

.tariff-calculator-panel .tariff-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
}

.tariff-calculator-panel .tariff-input,
.tariff-calculator-panel .tariff-input-suffix {
  border-radius: 10px;
  border: none;
  font-size: 0.85rem;
}

.tariff-calculator-panel .tariff-input:focus,
.tariff-calculator-panel .tariff-input-suffix:focus {
  box-shadow: 0 0 0 2px rgba(16, 31, 175, 0.25);
}

.tariff-calculator-panel .tariff-input-suffix {
  background-color: #f5f7fb;
  color: #344767;
}

.tariff-calculator-panel .tariff-icon {
  font-size: 0.85rem;
}

.tariff-calculator-panel .tariff-btn {
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.tariff-result {
  background-color: #ffffff;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
}

.tariff-result h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.tariff-result .tariff-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--kme-blue);
}

.hero-widget .btn-warning {
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
}

/* Widget Styles */
.nav-pills .nav-link.active,
.nav-pills .show>.nav-link {
  background-color: var(--kme-blue);
}

.active-tab {
  border-bottom: 3px solid var(--kme-blue) !important;
  background-color: white !important;
  color: var(--kme-navy) !important;
}

.btn-white {
  background-color: white;
  border: none;
  border-radius: 0;
}

.btn-light {
  background-color: #f8f9fa;
  border: none;
  border-radius: 0;
}

/* Color Overrides */
.text-primary {
  color: var(--kme-blue) !important;
}

.btn-warning {
  background-color: var(--kme-gold);
  color: var(--kme-navy);
  border: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 1px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 12px 30px;
}

.btn-warning:hover {
  background-color: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Services Strip */
.h-hover-transform {
  transition: transform 0.3s ease;
}

.h-hover-transform:hover {
  transform: translateY(-5px);
}

/* Iconos de transporte: Aéreo, Marítimo, Terrestre, Montacargas, Paleta/Cajas */
.transport-strip .transport-icon-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 30%, #f0f4fc, #e8eef7);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(10, 25, 47, 0.08), inset 0 1px 0 rgba(255,255,255,0.9);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.transport-strip .transport-svg {
  width: 44px;
  height: 44px;
  display: block;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.transport-strip .transport-item:hover .transport-icon-wrap {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(16, 31, 175, 0.2), inset 0 1px 0 rgba(255,255,255,0.95);
}

.transport-strip .transport-item:hover .transport-svg {
  transform: scale(1.05);
}

.transport-strip .transport-item {
  transition: transform 0.25s ease;
}

.transport-strip .transport-item:hover {
  transform: translateY(-4px);
}

.cursor-pointer {
  cursor: pointer;
}

/* Cards & Images */
.card_3,
.card_3_1 {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
  padding: 30px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.card_3:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-image-2 {
  width: 60%;
  max-width: 300px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 auto 20px auto;
  object-fit: cover;
}

.card-image-3 {
  width: 60%;
  max-width: 400px;
  height: 200px;
  border-radius: 6px;
  margin-bottom: 25px;
  object-fit: cover;
  display: block;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.details-button {
  background: transparent;
  border: 2px solid var(--kme-navy);
  color: var(--kme-navy);
  padding: 10px 24px;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s;
  margin-top: 15px;
}

.details-button:hover {
  background: var(--kme-navy);
  color: white;
}

/* Páginas de contenido (Realizar Envío, Guía de Empaque, etc.) */
.step-num {
  width: 2rem;
  height: 2rem;
  font-size: 0.9rem;
}

/* Footer */
footer {
  background-color: var(--kme-navy);
  color: white;
  margin-top: 0;
}

.footer-cols .footer-logo {
  height: 42px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.footer-cols .footer-logo-text {
  display: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.footer-cols .footer-desc {
  font-size: var(--font-size-body);
  line-height: 1.5;
}

.footer-cols .footer-title {
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.footer-cols .footer-contact li {
  color: rgba(255, 255, 255, 0.85);
}

.footer-cols .footer-contact a {
  color: rgba(255, 255, 255, 0.95) !important;
}

.footer-cols .footer-links a,
.footer-cols .footer-contact a:hover {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.2s;
  font-size: 0.8rem;
  line-height: 1.3;
}

.footer-cols .footer-links a:hover,
.footer-cols .footer-contact a:hover {
  color: var(--kme-gold);
}

.footer-cols .footer-links li + li,
.footer-cols .footer-contact li + li {
  margin-top: 0.25rem;
}

.footer-bottom p {
  font-size: 0.75rem;
}

.footer-bottom .footer-legal:hover {
  color: var(--kme-gold) !important;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer-social .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-left: 0;
  transition: transform 0.18s ease-out, filter 0.18s ease-out;
}

.footer-social .social-icon.instagram {
  color: #e4405f;
  background: rgba(255, 255, 255, 0.1);
}

.footer-social .social-icon.whatsapp {
  color: #25d366;
  background: rgba(255, 255, 255, 0.1);
}

.footer-social .social-icon.x {
  color: #f9fafb;
  background: rgba(255, 255, 255, 0.1);
}

.footer-social .social-icon.linkedin {
  color: #0a66c2;
  background: rgba(255, 255, 255, 0.1);
}

.footer-social .social-icon.facebook {
  color: #1877f2;
  background: rgba(255, 255, 255, 0.1);
}

.footer-social .social-icon.youtube {
  color: #ff0000;
  background: rgba(255, 255, 255, 0.1);
}

.footer-social .social-icon:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
}

.botones_navegacion {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 15px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.botones_navegacion:hover {
  color: var(--kme-gold);
}

/* =========================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================= */

@media (max-width: 991px) {
  body {
    padding-top: 70px;
  }

  .banne_1 {
    min-height: auto;
    padding: 60px 0;
    background-attachment: scroll;
    text-align: center;
  }

  .display-3 {
    font-size: 2.5rem;
  }

  .card-image-2,
  .card-image-3 {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .card-image-3 {
    height: auto;
    aspect-ratio: 16/9;
  }

  .nav_prin_2 {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .nav_prin_2 nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .banne_1 .col-lg-5 {
    margin-top: 40px;
  }

  /* Banner con contenido: menos altura en tablet/móvil */
  .banner-zona--contenido {
    min-height: 320px;
  }

  .banner-zona-titulo {
    font-size: 1.35rem;
  }

  .banner-zona-desc {
    font-size: 0.85rem;
  }

  .banner-zona-contenido {
    padding: 1rem 0.75rem;
  }

  /* Section header: ocultar texto lateral en tablet para evitar apretar */
  .section-header-side {
    max-width: 120px;
  }

  .section-header-tag {
    font-size: 0.7rem;
  }
}

@media (max-width: 576px) {
  .display-3 {
    font-size: 2rem;
  }

  .banne_1 {
    padding: 40px 0;
  }

  .card_container {
    padding: 0 15px 30px 15px;
  }

  .card_3,
  .card_3_1 {
    padding: 20px;
  }

  /* Banner: más bajo en móvil, texto más pequeño */
  .banner-zona--contenido {
    min-height: 280px;
  }

  .banner-zona-titulo {
    font-size: 1.15rem;
  }

  .banner-zona-desc {
    font-size: 0.8rem;
  }

  .banner-zona-contenido {
    padding: 0.75rem 0.5rem;
  }

  /* Section header móvil: solo título y líneas, sin texto lateral */
  .section-header-tag {
    display: none;
  }

  .section-header-line {
    max-width: 60px;
  }

  .section-header .section-title {
    font-size: 1.2rem;
  }

  /* Transport strip: un icono por fila en móvil */
  .transport-strip .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Widget bar: campos apilados en móvil */
  .hero-widget-bar .d-flex.flex-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-widget-bar .border-end {
    border-end: none !important;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
  }

  .hero-bar-input-group {
    max-width: 100%;
  }

  .hero-widget-bar #tarifa-form-hero input[type="text"] {
    max-width: 100% !important;
  }

  #services .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}