:root {
  --brand-blue: #14528f;
  --brand-blue-dark: #0e3d6b;
  --brand-green: #8cc63f;
  --brand-green-dark: #6fa72c;
  --brand-navy: #0a2540;
  --brand-gradient: linear-gradient(135deg, var(--brand-blue), var(--brand-green-dark));
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* compensa la navbar fija al usar anclas */
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: #2b2b2b;
}

/* ===== Navbar con efecto scroll ===== */
#mainNav {
  transition: background-color .35s ease, box-shadow .35s ease, padding .35s ease;
  background-color: transparent;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

#mainNav .navbar-logo {
  height: 42px;
  width: auto;
  transition: height .35s ease;
  /* logo blanco sobre el hero transparente */
  filter: brightness(0) invert(1);
}

#mainNav .nav-link {
  color: #fff;
  font-weight: 600;
  margin: 0 .35rem;
  position: relative;
  transition: color .25s ease;
}

#mainNav .nav-link::after {
  content: "";
  position: absolute;
  left: .8rem;
  right: .8rem;
  bottom: .15rem;
  height: 2px;
  background: var(--brand-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

#mainNav .nav-link:hover::after,
#mainNav .nav-link.active::after {
  transform: scaleX(1);
}

#mainNav .nav-link.active {
  color: #fff;
}

/* Estado "scrolled": fondo blanco y texto azul */
#mainNav.navbar-scrolled {
  background-color: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
  padding-top: .6rem;
  padding-bottom: .6rem;
}

#mainNav.navbar-scrolled .navbar-logo {
  height: 36px;
  filter: none;
}

#mainNav.navbar-scrolled .nav-link {
  color: var(--brand-blue-dark);
}

#mainNav.navbar-scrolled .nav-link.active {
  color: var(--brand-blue);
}

/* Botón hamburguesa: icono blanco sobre el hero, oscuro al hacer scroll */
#mainNav .navbar-toggler {
  border: none;
  padding: .25rem .25rem;
}

#mainNav .navbar-toggler:focus {
  box-shadow: none;
}

#mainNav .navbar-toggler-icon {
  filter: brightness(0) invert(1);
  transition: filter .3s ease;
}

#mainNav.navbar-scrolled .navbar-toggler-icon {
  filter: none;
}

/* ===== Menú móvil: panel offcanvas ===== */
@media (max-width: 991.98px) {
  .nav-offcanvas {
    width: 82% !important;
    max-width: 360px;
    background: var(--brand-navy);
    color: #fff;
  }

  .nav-offcanvas .offcanvas-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }

  .nav-offcanvas .offcanvas-logo {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
  }

  .nav-offcanvas .offcanvas-body {
    padding: 1rem 1.5rem 2rem;
  }

  .nav-offcanvas .nav-link {
    color: rgba(255, 255, 255, .85);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .nav-offcanvas .nav-link::after { display: none; }

  .nav-offcanvas .nav-link.active,
  .nav-offcanvas .nav-link:hover {
    color: var(--brand-green);
    padding-left: .35rem;
    transition: color .25s ease, padding-left .25s ease;
  }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--brand-blue-dark); /* respaldo mientras carga el video */
}

/* Video de fondo */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Capa de color sobre el video para que el texto sea legible */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(14, 61, 107, .82), rgba(20, 82, 143, .6));
}

/* El contenido del hero debe ir por encima del overlay */
.hero .container {
  z-index: 2;
}

.hero-title {
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 720px;
  opacity: .95;
}

/* ===== Secciones ===== */
.py-section {
  padding: 6rem 0;
}

.section-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .8rem;
  font-weight: 700;
  color: var(--brand-green-dark);
  margin-bottom: .5rem;
}

.section-title {
  font-weight: 800;
  color: var(--brand-blue-dark);
  margin-bottom: 1rem;
  text-align: center;
}

.section-lead {
  color: #6c757d;
  max-width: 640px;
}

/* ===== Marcas ===== */
/* Carrusel continuo (marquee) */
.brands-marquee {
  position: relative;
  overflow: hidden;
}

.brands-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: brands-scroll 28s linear infinite;
}

.brands-marquee:hover .brands-track {
  animation-play-state: paused;
}

@keyframes brands-scroll {
  from { transform: translateX(0); }
  /* Se desplaza la mitad: la otra mitad es el duplicado → loop perfecto */
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .brands-track { animation: none; }
}

.brand-card {
  flex: 0 0 auto;
  width: 240px;
  border: none;
  border-radius: 1.25rem;
  min-height: 160px;
  padding: 1.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(16, 42, 67, .10);
  transition: transform .3s ease, box-shadow .3s ease;
}

.brand-card img {
  max-width: 100%;
  width: auto;
  object-fit: contain;
  transition: transform .3s ease;
}

/* Fondo de cada tarjeta = fondo del propio logo, para fusionarlos
   en un solo tile limpio (sin recuadro dentro de recuadro) */
.card-bohemia { background: #002c49; }   /* azul marino del logo */
.card-wilma   { background: #000000; }   /* negro del logo */
.card-lugano  { background: #ffffff; }   /* logo transparente */
.card-natgeo  { background: #ffffff; }   /* logo transparente */

/* Tamaño individual para equilibrar ópticamente cada logo */
.brand-bohemia { max-height: 64px; }   /* placa azul, ancho */
.brand-lugano  { max-height: 52px; }   /* transparente, ancho */
.brand-natgeo  { max-height: 50px; }   /* transparente, muy ancho */
.brand-wilma   { max-height: 96px; }   /* casi cuadrado */

.brand-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(16, 42, 67, .18);
}

.brand-card:hover img {
  transform: scale(1.05);
}

/* ===== Quiénes Somos ===== */
.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--brand-blue);
  line-height: 1;
}

.stat-label {
  color: #6c757d;
  font-size: .95rem;
}

/* ===== Sección "Quiénes Somos" estilo Stripe (oscura + gradiente) ===== */
.about-section {
  position: relative;
  background: #0a2540;            /* navy profundo */
  color: #fff;
  overflow: hidden;
  /* Bordes superior e inferior inclinados (sobre Marcas y Contacto, ambas claras) */
  clip-path: polygon(0 3.5vw, 100% 0, 100% calc(100% - 3.5vw), 0 100%);
  padding-top: calc(6rem + 3.5vw);
  padding-bottom: calc(6rem + 3.5vw);
}

/* Manchas de color difuminadas (mesh gradient) */
.about-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(42% 45% at 12% 18%, rgba(77, 182, 229, .40), transparent 70%),
    radial-gradient(38% 40% at 88% 22%, rgba(140, 198, 63, .32), transparent 70%),
    radial-gradient(45% 55% at 75% 95%, rgba(20, 82, 143, .55), transparent 70%),
    radial-gradient(40% 45% at 25% 100%, rgba(140, 198, 63, .18), transparent 70%);
  pointer-events: none;
}

.about-section .container { z-index: 1; }

/* Eyebrow, título y lead en versión clara */
.eyebrow-light { color: var(--brand-green); }

.title-gradient {
  background: linear-gradient(90deg, #ffffff 0%, #9fe0ff 45%, var(--brand-green) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}

.lead-light { color: rgba(255, 255, 255, .75); }

/* Pilares: icono circular glass + glifo en degradado */
.value-item {
  text-align: center;
  padding: 0 .5rem;
}

.value-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 2.3rem;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}

/* Glifo del icono con degradado de marca */
.value-icon i {
  background: linear-gradient(135deg, #9fe0ff, var(--brand-green));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}

.value-item:hover .value-icon {
  transform: translateY(-8px);
  border-color: rgba(140, 198, 63, .6);
  box-shadow: 0 16px 40px rgba(77, 182, 229, .25);
}

.value-item h5 {
  font-weight: 700;
  color: #fff;
  margin-bottom: .5rem;
}

.value-item p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, .68);
  font-size: .95rem;
}

/* ===== Contacto ===== */
.contact-list li {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.75rem;
}

/* Insignia de icono con degradado de marca (mismo lenguaje del sitio) */
.contact-list i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: .9rem;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 8px 18px rgba(20, 82, 143, .22);
}

.contact-list a {
  color: #495057;
  text-decoration: none;
  transition: color .25s ease;
}

.contact-list a:hover {
  color: var(--brand-blue);
}

/* Mapa de Google */
.contact-map {
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(16, 42, 67, .14);
  line-height: 0;
}

/* Formulario en tarjeta */
.contact-form {
  background: #fff;
  border: 1px solid #eef1f4;
  border-radius: 1.5rem;
  padding: 2.25rem;
  box-shadow: 0 18px 45px rgba(16, 42, 67, .10);
}

.contact-form .form-control,
.contact-form .form-select {
  border-radius: .7rem;
  padding: .8rem 1rem;
  border: 1px solid #dde2e8;
  background-color: #f8fafc;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
  border-color: var(--brand-blue);
  background-color: #fff;
  box-shadow: 0 0 0 .2rem rgba(20, 82, 143, .15);
}

/* Campo de celular con bandera (intl-tel-input) integrado al diseño */
.contact-form .iti {
  width: 100%;
}

/* Quita el recuadro gris por defecto de la bandera/indicativo */
.contact-form .iti--separate-dial-code .iti__selected-flag {
  background-color: transparent;
  border-radius: .7rem 0 0 .7rem;
  padding-left: 1rem;
}

.contact-form .iti--allow-dropdown .iti__selected-flag:hover,
.contact-form .iti--allow-dropdown .iti__selected-flag:focus {
  background-color: rgba(20, 82, 143, .06);
}

.contact-form .iti--separate-dial-code .iti__selected-dial-code {
  color: #495057;
  font-weight: 500;
  margin-left: .4rem;
}

/* Lista de países a juego con los demás campos */
.contact-form .iti__country-list {
  border: 1px solid #dde2e8;
  border-radius: .7rem;
  box-shadow: 0 12px 30px rgba(16, 42, 67, .14);
  padding: .25rem;
}

.contact-form .iti__country {
  border-radius: .45rem;
  padding: .45rem .6rem;
}

.contact-form .iti__country.iti__highlight {
  background-color: rgba(20, 82, 143, .08);
}

.btn-primary-brand {
  background: var(--brand-gradient);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(20, 82, 143, .28);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

.btn-primary-brand:hover {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 14px 30px rgba(20, 82, 143, .35);
}

/* ===== Footer ===== */
.footer {
  position: relative;
  background: var(--brand-navy);
  color: rgba(255, 255, 255, .68);
  overflow: hidden;
  /* Diagonal de entrada desde Contacto (blanca), mismo lenguaje del sitio */
  clip-path: polygon(0 3.5vw, 100% 0, 100% 100%, 0 100%);
  padding-top: calc(4.5rem + 3.5vw);
  padding-bottom: 1.75rem;
}

/* Mesh gradient sutil, coherente con "Quiénes Somos" */
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(40% 60% at 12% 0%, rgba(77, 182, 229, .22), transparent 70%),
    radial-gradient(40% 60% at 90% 10%, rgba(140, 198, 63, .16), transparent 70%);
  pointer-events: none;
}

.footer .container { z-index: 1; }

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

.footer-about {
  font-size: .95rem;
  max-width: 320px;
}

.footer-title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.footer-links a {
  display: inline-block;
  color: rgba(255, 255, 255, .68);
  text-decoration: none;
  padding: .3rem 0;
  transition: color .25s ease, padding-left .25s ease;
}

.footer-links a:hover {
  color: var(--brand-green);
  padding-left: .35rem;
}

.footer-contact li {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  font-size: .95rem;
}

.footer-contact i {
  color: var(--brand-green);
  margin-top: .2rem;
  flex-shrink: 0;
}

.footer-contact a {
  color: rgba(255, 255, 255, .68);
  text-decoration: none;
  transition: color .25s ease;
}

.footer-contact a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  text-align: center;
  font-size: .9rem;
}

/* ===== Botón volver arriba ===== */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease, background .3s ease;
  z-index: 1030;
}

.back-to-top:hover {
  background: var(--brand-blue-dark);
  color: #fff;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
