/* ================================================================
   JLS FIXES — correcciones visuales post-revision
   Se carga el último: tiene prioridad sobre jls-main y jls-hf
   ================================================================ */

/* ----------------------------------------------------------------
   1. ADMIN BAR DE WORDPRESS — ocultar siempre en el front
   ---------------------------------------------------------------- */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }
html.wp-toolbar { padding-top: 0 !important; }

/* ----------------------------------------------------------------
   2. SCROLL-TO-TOP DE ASTRA — eliminar la flecha azul
   ---------------------------------------------------------------- */
#ast-scroll-top,
.ast-scroll-top,
.ast-scroll-top-icon,
a#scroll-top,
.scroll-to-top {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ----------------------------------------------------------------
   3. CONTRASTE: tarjetas preview del hero (texto oscuro sobre
      fondo oscuro era invisible)
   ---------------------------------------------------------------- */
.jls-hero__card .jls-rating {
  color: rgba(255,255,255,0.65) !important;
}

.jls-hero__card .jls-rating__num {
  color: #fff !important;
}

.jls-hero__card .jls-stars {
  color: #FBBF24 !important; /* ambar mas claro para fondo oscuro */
}

/* ----------------------------------------------------------------
   4. CONTRASTE: footer bottom casi invisible
   ---------------------------------------------------------------- */
.jls-footer__bottom p {
  color: rgba(255,255,255,0.45) !important;
}

/* ----------------------------------------------------------------
   5. RESIDUOS DE ASTRA: breadcrumb, page-header, title meta
      que aparecian con colores del tema base sin contraste
   ---------------------------------------------------------------- */
.ast-breadcrumbs-container,
.ast-archive-description,
.page-header,
.entry-header,
.ast-single-post-header,
.ast-author-meta,
.page .entry-meta,
.site-content > .ast-container > .page-header {
  display: none !important;
}

/* ----------------------------------------------------------------
   6. TEXTO CORTADO: header — evitar overflow/clip
   ---------------------------------------------------------------- */
.jls-header__inner {
  flex-wrap: nowrap;
  min-width: 0;
}

.jls-header__logo {
  min-width: 0;
}

.jls-header__logo-text {
  overflow: visible;
  text-overflow: unset;
}

.jls-nav {
  min-width: 0;
  flex-wrap: nowrap;
}

.jls-nav__link {
  overflow: visible;
}

/* Boton CTA del header no se corta */
.jls-header__actions .jls-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ----------------------------------------------------------------
   7. TEXTO CORTADO: tarjetas de servicio y empresa — permitir
      que el texto haga wrap correctamente, sin clip
   ---------------------------------------------------------------- */
.jls-servicio__name,
.jls-card__name,
.jls-hero__card-name {
  overflow: visible;
  white-space: normal;
  word-break: break-word;
}

.jls-servicio {
  min-width: 0;
}

.jls-servicio > div {
  min-width: 0;
}

/* ----------------------------------------------------------------
   8. HUECOS DE AIRE — unificar espaciados, quitar dobles paddings
   ---------------------------------------------------------------- */

/* Quitar margenes por defecto de parrafos/listas que generaban
   huecos extra dentro de entry-content */
.entry-content > *:first-child { margin-top: 0 !important; }
.entry-content > *:last-child  { margin-bottom: 0 !important; }

/* Evitar doble padding entry-content + jls-section */
.page-id-9 .entry-content .jls-section:first-child,
.page-id-9 .entry-content .jls-hero {
  margin-top: 0 !important;
}

/* Reducir espacio excesivo entre header del bloque de servicios y el grid */
.jls-servicios { margin-top: 32px; }

/* Quitar aire extra heredado del tema en listas de enlaces del footer */
.jls-footer__col ul { margin-top: 0; margin-bottom: 0; }

/* Evitar huecos verticales duplicados entre secciones consecutivas con
   mismo fondo (cuando Astra inyecta un wrapper con padding propio) */
.site-content,
.ast-container,
#primary,
.entry-content {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* ----------------------------------------------------------------
   9. FOOTER — reducir tamaño general, estaba demasiado alto
   ---------------------------------------------------------------- */
.jls-footer {
  padding: 48px 0 0;
}

.jls-footer__grid {
  gap: 40px;
  padding-bottom: 32px;
}

.jls-footer__brand p {
  max-width: 260px;
}

.jls-footer__col h4 {
  margin-bottom: 10px;
}

.jls-footer__col ul {
  gap: 7px;
}

.jls-footer__bottom {
  padding: 16px 0;
}

/* ----------------------------------------------------------------
   10. Asegurar que ningún texto hereda el color de fondo en
       bloques con fondo oscuro (ink / accent-dark)
   ---------------------------------------------------------------- */
.jls-section-dark,
.jls-hero,
.jls-cta-banner,
.jls-statsbar {
  color: rgba(255,255,255,0.85);
}

.jls-section-dark p,
.jls-cta-banner p {
  color: rgba(255,255,255,0.7);
}

/* ----------------------------------------------------------------
   11. Header: asegurar fondo solido sin transparencias raras
       heredadas del tema (algunos temas aplican opacity al sticky)
   ---------------------------------------------------------------- */
.jls-header {
  background-color: #1A4A1A !important;
  opacity: 1 !important;
}

/* ----------------------------------------------------------------
   12. Responsive: evitar que el dropdown de servicios se corte
       en el borde derecho de la pantalla en tablets
   ---------------------------------------------------------------- */
@media (max-width: 1100px) and (min-width: 861px) {
  .jls-nav__submenu {
    right: 0;
    left: auto;
  }
}


/* ----------------------------------------------------------------
   13. BUSCADOR HERO: texto cortado en los selects (Qué necesitas?)
       faltaba min-width:0 en flex items + el texto no cabía
   ---------------------------------------------------------------- */
.jls-searchbar {
  max-width: 640px;
}

.jls-searchbar select,
.jls-searchbar input {
  min-width: 0;
  flex: 1 1 0;
  font-size: 14px;
  padding: 14px 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-appearance: menulist;
  appearance: menulist;
}

/* El boton Buscar no se encoge nunca */
.jls-searchbar__btn {
  flex: 0 0 auto;
  padding: 0 26px;
}

@media (max-width: 600px) {
  .jls-searchbar select,
  .jls-searchbar input {
    font-size: 15px;
    padding: 14px 16px;
  }
}
