/* =====================================================
   FONT FALLBACK CON MÉTRICAS AJUSTADAS — FIX CLS FUENTE
   Syne tiene métricas distintas a system-ui. Sin esto,
   cuando Syne carga tarde el texto del hero "salta".
   ascent/descent/size-adjust calibrados para Syne 700.
====================================================== */
@font-face {
  font-family: 'SyneFallback';
  src: local('system-ui');
  ascent-override: 96%;
  descent-override: 20%;
  line-gap-override: 0%;
  size-adjust: 104%;
}

/* =====================================================
   BOOTSTRAP ICONS — RESERVA DE ESPACIO — FIX CLS 0.529
   bi-whatsapp y bi-search están en el hero above-the-fold.
   bootstrap-icons.woff2 (128 KiB) llega tarde. Sin reserva,
   el ícono pasa de 0px a su tamaño real empujando todo el hero.
   Forzar dimensiones fijas reserva el espacio desde el primer paint.
====================================================== */
.bi::before {
  display: inline-block;
  width: 1em;
  height: 1em;
  font-size: inherit;
  line-height: 1;
  vertical-align: -0.125em;
}

.whatsapp-float .bi::before {
  width: 1.7rem;
  height: 1.7rem;
  font-size: 1.7rem;
}

@media (max-width: 767.98px) {
  .whatsapp-float .bi::before {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1.5rem;
  }
}

.hero-search-box .bi-search::before {
  width: 1.1rem;
  height: 1.1rem;
  font-size: 1.1rem;
}

/* =====================================================
   CONTENEDORES DINÁMICOS — ALTURA RESERVADA — FIX CLS
   reviews-track y blog-track se llenan por JS tras el paint.
   Sin altura mínima, el contenido que llega empuja el footer
   causando CLS. :empty aplica solo cuando el JS no ha llenado
   el contenedor todavía (estado inicial del HTML).
====================================================== */
.reviews-track:empty {
  min-height: 340px;
}

.blog-track:empty {
  min-height: 320px;
}

 body {
      font-family: 'Syne', 'SyneFallback', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      background-color: #181a1f;
      color: #fff;
    }
/* BOTÓN FLOTANTE WHATSAPP */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1200;

  width: 56px;
  height: 56px;
  border-radius: 999px;

  background: #25d366;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  text-decoration: none;

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease,
    opacity 0.15s ease;
}

.whatsapp-float i {
  font-size: 1.7rem;
  line-height: 1;
}

/* Hover desktop */
.whatsapp-float:hover {
  background-color: #1ebe5a;
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
  color: #ffffff;
  text-decoration: none;
}

/* MOBILE: un poco más pequeño y más arriba */
@media (max-width: 767.98px) {
  
  .whatsapp-float {
    width: 52px;
    height: 52px;
    right: 1rem;
    bottom: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  }

  .whatsapp-float i {
    font-size: 1.5rem;
  }
}

    .navbar {
      background-color: #181a1f;
      padding-top: 0.5rem;
      padding-bottom:0.5rem;
    
    }

    .navbar-brand img {
      height:70px;
    }

    .navbar-nav .nav-link {
      color: #c9c9c9;
      font-weight: 500;
      position: relative;
      padding-bottom: 0.25rem;
      margin: 0 0.75rem;
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
      color: #ffffff;
    }

    /* Línea inferior tipo “active” */
    .navbar-nav .nav-link.active::after,
    .navbar-nav .nav-link:hover::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -4px;
      width: 100%;
      height: 2px;
      background-color: #0f4250; /* puedes ajustar el color */
    }

    .btn-contactar {
      font-weight: 600;
      border-radius: 999px;
      padding: 0.5rem 1.5rem;
       
    }
    .btn.btn-primary.btn-contactar {
  background-color: #11595d;
  border-color: #0c3339;
}

.btn.btn-primary.btn-contactar:hover,
.btn.btn-primary.btn-contactar:focus {
  background-color: #0f4250;  /* tono para hover, opcional */
  border-color: #0f4250;
}

    /* Dropdown dentro del navbar oscuro */
    .dropdown-menu {
      background-color: #22242a;
      border: 1px solid #333842;
    }
    .dropdown-item {
      color: #f1f1f1;
    }
    .dropdown-item:hover {
      background-color: #333842;
      color: #ffffff;
    }
/* ===========================
   HERO GENERAL
   =========================== */

.hero-section {
  padding: 3rem 0;
  background-color: #181a1f;
}

.hero-inner {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  padding: 3rem 3rem;

  background-size: cover;
  background-position: center;
}
.hero-bg-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero-overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-content{
  position: relative;
  z-index: 2;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35),
    rgba(0, 0, 0, 0.8)
  );
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-weight: 700;
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
}

.hero-subtitle {
  font-size: 1rem;
  max-width: 480px;
}


/* ===========================
   BUSCADOR (DESKTOP / GENERAL)
   =========================== */

.hero-search-box {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 999px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.hero-search-box .form-control,
.hero-search-box .form-select {
  border: 0;
  box-shadow: none !important;
  background-color: #ffffff;
}

.hero-search-box .form-control:focus,
.hero-search-box .form-select:focus {
  outline: none;
  box-shadow: none !important;
}

.hero-search-box .bi-search {
  font-size: 1.1rem;
}

/* separar un poco las secciones internas en desktop */
.hero-search-box > div {
  min-width: 0;
}


/* ===========================
   RESULTADOS DE BÚSQUEDA (GENERAL)
   =========================== */

.hero-results {
  max-height: 320px;
  overflow-y: auto;
  max-width: 900px;
  margin: 0.75rem auto 0;
  border-radius: 1rem;
}

/* Cada resultado como card clicable */
.result-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  text-decoration: none;
  color: #222;
  transition: background-color 0.15s ease, transform 0.15s ease;
  align-items: flex-start;
}

/* quitar subrayado por defecto de enlaces */
.hero-results a,
.result-item {
  text-decoration: none;
}

.hero-results a:hover,
.result-item:hover {
  text-decoration: none;
}

.result-item + .result-item {
  border-top: 1px solid #eee;
}

.result-item:hover {
  background-color: #f4f7fb;
  transform: translateY(-1px);
}

/* Miniatura siempre controlada */
.result-thumb {
  width: 80px;
  height: 60px;
  flex: 0 0 80px;
  border-radius: 0.75rem;
  object-fit: cover;
}

/* Título y descripción */
.result-title {
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.result-desc {
  font-size: 0.875rem;
  color: #666;
}

.hero-search-box .bi-search {
  color: #11595d;  /* un verde oscuro de tu paleta, por ejemplo */
}
/* ===========================
   MOBILE
   =========================== */

@media (max-width: 767.98px) {
  /* ----- Layout general del hero ----- */
  .hero-section {
    padding: 2rem 0 3rem;
  }

    .hero-inner{
    background-image: none !important;
  }

  .hero-title {
    font-size: 1.8rem;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    max-width: 100%;
  }

  /* ----- Caja de búsqueda ----- */
  .hero-search-box {
    text-align: left;
    max-width: 100%;
    margin-top: 1.8rem;
    border-radius: 18px;
    padding: 1.25rem 1.1rem;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);

    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  /* Sobrescribir rounded-pill de Bootstrap en mobile */
  .hero-search-box.rounded-pill {
    border-radius: 18px !important;
  }

  /* Ocultar separador vertical */
  .hero-search-box .vr {
    display: none !important;
  }

  /* Contenedores de input + select a ancho completo */
  .hero-search-box .flex-grow-1,
  .hero-search-box .d-flex.align-items-center.py-1 {
    width: 100%;
  }

  /* Lupa con ancho fijo, alineada al centro */
  .hero-search-box .flex-grow-1 > span.me-2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
  }

  /* ----- Campos: input + select ----- */
  .hero-search-box .form-control,
  .hero-search-box .form-select {
    display: block;
    width: 100%;
    box-sizing: border-box;

    background-color: #f5f7fb;
    border-radius: 999px;
    border: 1px solid #e0e4f2;
    padding: 0.6rem 0.9rem;
    font-size: 0.95rem;

    text-align: left;
    text-align-last: left; /* para algunos selects */
  }

  /* Input: texto después de la lupa */
  .hero-search-box .form-control {
    padding-left: 0.9rem;
  }

  /* Select: simulamos el espacio de la lupa para alinear textos */
  .hero-search-box .form-select {
    padding-left: 2.5rem; /* ajusta 2.3 / 2.7 si quieres afinar */
  }

  .hero-search-box .form-control::placeholder {
    color: #8a8fa3;
  }

  .hero-search-box .form-control:focus,
  .hero-search-box .form-select:focus {
    border-color: #0c3339;
    box-shadow: 0 0 0 1px rgba(12, 51, 57, 0.12);
    outline: none;
  }

  /* Botón: mismo ancho que los campos */
  .hero-search-box .btn-contactar,
  #btnSearch {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    margin-top: 0.25rem;
  }

  /* ----- Resultados de búsqueda ----- */
  #searchResults,
  .hero-results {
    max-width: 100%;
    margin-top: 0 !important;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    border-top: 1px solid #eee;
  }

  .result-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.6rem;
    border-radius: 0.75rem;
    align-items: flex-start;
    text-decoration: none;
    color: #222;
  }

  .result-item + .result-item {
    border-top: 1px solid #eee;
  }

  .result-thumb {
    width: 72px;
    height: 54px;
    flex: 0 0 72px;
    border-radius: 0.75rem;
    object-fit: cover;
  }

  .result-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
  }

  .result-desc {
    font-size: 0.8rem;
    color: #666;
  }

  .hero-results a,
  .result-item {
    text-decoration: none;
  }
   .hero-inner {
    background-image: url("../img/hero-mobile.webp");
  }
}



