/* ===== Horizont Atlantic – fixes responsive (no destructivo) =====
   Cargado al final del <head> para sobrescribir el tema base ConstructZilla.
   Generado 2026-05-21 tras auditoría mobile/tablet con Puppeteer.
*/

/* ---- 1. Overflow horizontal global (cinturón + tirantes) ---- */
html, body { overflow-x: hidden; max-width: 100vw; }

/* Las animaciones slide-in dejan elementos translateX fuera del viewport
   si el IntersectionObserver no llega a dispararse. Forzamos visible. */
.animate-slide-in-right,
.animate-slide-in-left { transform: none !important; opacity: 1 !important; }

/* Owl carousel: su .owl-stage calcula widths gigantes en JS. Cap al padre. */
.owl-carousel { overflow: hidden; max-width: 100%; }

/* ---- 2. Contact Form 7 (formularios embebidos en contenido WPBakery) ----
   Las tablas legacy del WP no se adaptan a móvil. */
.wpcf7 table,
.wpcf7 tbody,
.wpcf7 tr,
.wpcf7 td       { display: block; width: 100% !important; max-width: 100%; box-sizing: border-box; }
.wpcf7 input,
.wpcf7 textarea,
.wpcf7 select   { max-width: 100%; box-sizing: border-box; }

/* Imágenes del contenido siempre fluidas */
.dez-post-text img,
.content-inner-1 img,
.section-full img.img-responsive,
.qode-info-card img { max-width: 100% !important; height: auto !important; }

/* Tablas del contenido scroll horizontal en lugar de romper el layout */
.dez-post-text table,
.content-inner-1 table { display: block; overflow-x: auto; max-width: 100%; }

/* ---- 3. Tap targets accesibles (WCAG 2.5.5 — mínimo 44×44) ----
   Especificidad alta para vencer al CSS del tema. */
.navbar-toggler,
.header .navbar-toggler {
  min-width: 44px !important; min-height: 44px !important;
  padding: 10px 12px !important;
}
.extra-cell .site-button-custom,
.extra-nav .site-button.site-button-custom {
  min-width: 44px !important; min-height: 44px !important;
  display: inline-flex; align-items: center; justify-content: center;
}
/* Items del menú principal y submenú (móvil/tablet) */
@media (max-width: 991px) {
  .header .nav.navbar-nav > li > a,
  .header-nav .nav.navbar-nav > li > a {
    padding: 14px 16px !important;
    min-height: 44px !important;
    line-height: 1.4 !important;
    display: flex; align-items: center;
  }
  .header .nav.navbar-nav .sub-menu > li > a,
  .header-nav .nav.navbar-nav .sub-menu > li > a {
    padding: 12px 16px !important;
    min-height: 44px !important;
    line-height: 1.4 !important;
    display: flex; align-items: center;
  }
}
/* Submenús del nav en desktop también muy comprimidos; les damos aire */
.header .nav.navbar-nav .sub-menu > li > a,
.header-nav .nav.navbar-nav .sub-menu > li > a {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  min-height: 36px;
  line-height: 1.4;
}

/* ---- 4. Texto legible en sidebar y widgets (alta especificidad) ---- */
.side-bar .widget a,
.side-bar .widget li,
.side-bar .widget_categories ul li a,
.side-bar .widget-post-bx .post-title a,
.side-bar .widget_recent_entries a,
aside.side-bar .widget * a       { font-size: 14px !important; line-height: 1.5 !important; }
.side-bar .widget .widget-title  { font-size: 18px !important; }

/* ---- 5. Banner interior responsive (no monstruoso en móvil) ---- */
@media (max-width: 575px) {
  .dez-bnr-inr             { height: 280px !important; }
  .dez-bnr-inr h1,
  .dez-bnr-inr h2          { font-size: 1.6rem !important; line-height: 1.3; }
  .media-container         { height: 320px !important; }
  h1                       { font-size: 1.7rem !important; }
  h2                       { font-size: 1.4rem !important; }
}

/* ---- 6. Espaciado del nav mobile + bottom safe area ---- */
@media (max-width: 991px) {
  .header-nav .navbar-nav  { padding: 10px 0 20px; }
  .header-nav              { max-height: calc(100vh - 90px); overflow-y: auto; }
}

/* ---- 7. Containers del tema que se salen ---- */
.dez-box,
.qode-info-card,
.qode-info-card-text-holder { max-width: 100%; }

/* ---- 8. Footer y formularios subscribe ---- */
.dzSubscribe input,
.dzSubscribe button         { max-width: 100%; box-sizing: border-box; }
.dez-newsletter .skew-subscribe { transform: none !important; padding: 10px !important; }

/* ---- 9. Hide demo skin-switcher si quedara colgado del tema ---- */
.styleswitcher, #styleswitcher,
.theme-toggle, [class*="switcher-trigger"] { display: none !important; }

/* ---- 10. Footer y enlaces secundarios (tap targets + texto legible) ---- */
.site-footer a,
.site-footer .widget a,
.footer-bottom a,
.footer-top a,
.dez-post-info a,
.dez-post-meta a {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  line-height: 1.6 !important;
  display: inline-block;
}
.site-footer p,
.footer-top p,
.recent-posts-entry p,
.dez-post-text p,
.dez-post-info p,
.widget-post .post-title,
.recent-posts-entry .post-title { font-size: 13px !important; line-height: 1.5 !important; }
.widget .post-title { font-size: 14px !important; }

/* Iconos sociales: bump a 32x32 (en lugar de 24) */
.dez-social-icon li a,
.footer-social a,
.share-details-btn a {
  min-width: 32px !important;
  min-height: 32px !important;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---- 11. Botones secundarios y links cortos del contenido ---- */
.dez-post-meta li,
.dez-post-meta a,
.post-comment a,
.dez-info a,
.dez-title a {
  min-height: 28px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

/* Form de login: link "olvidaste" más cómodo */
#mi-cuenta-login + * a,
.text-muted[href*="password-reset"] { padding: 8px 4px !important; display: inline-block; }

/* Búsqueda del sidebar */
.search-bx button { min-width: 44px !important; min-height: 38px !important; }

/* ---- 12. Headings clickables (Quiénes somos / Qué hacemos / Cómo trabajamos del home) ---- */
h2 a, h3 a, h4 a, h5 a {
  display: inline-block;
  padding: 6px 4px !important;
  min-height: 36px;
  line-height: 1.4;
}
.ow-entry-title a,
.dez-title a,
.post-title a {
  display: inline-block;
  padding: 8px 4px !important;
  min-height: 36px;
  line-height: 1.4;
}

/* ---- 13. Breadcrumb y widget de categorías legibles ---- */
.breadcrumb a,
.breadcrumb li a,
ol.breadcrumb a,
ul.breadcrumb a,
.breadcrumb-row a,
nav[aria-label*="breadcrumb"] a {
  font-size: 14px !important;
  padding: 6px 8px !important;
  display: inline-block;
}
.widget_categories ul li a,
.widget.widget_categories ul li a,
.widget_categories li a,
aside .widget_categories a {
  font-size: 14px !important;
  padding: 8px 0 !important;
  display: inline-block;
  line-height: 1.4 !important;
}

/* ---- 14. "Posts recientes" del sidebar (categoría debajo) ---- */
.widget-post-bx .post-meta a,
.widget-post .dez-post-meta a,
.recent-posts-entry a { font-size: 13px !important; padding: 4px 0; display: inline-block; }

/* ---- 15. Footer súper específico: vencer cualquier !important del tema ---- */
footer a,
footer * a,
.site-footer a,
.site-footer * a,
body .site-footer .widget a,
body .site-footer .widget ul li a,
body footer.site-footer ul li a {
  min-height: 32px !important;
  padding: 6px 8px !important;
  display: inline-block !important;
  line-height: 1.5 !important;
  font-size: 13px !important;
}

/* ---- 16. Cualquier <p> demasiado pequeño en el contenido del home/secciones ---- */
.dez-newsletter p,
.dez-info p,
.ow-entry-text p,
.section-content p,
body .container p,
body .container small {
  font-size: 13px !important;
  line-height: 1.6 !important;
}

/* ---- 17. Lista de "Categorias" del blog – máxima especificidad ---- */
body aside.side-bar .widget.widget_categories ul li a,
body .widget.widget_categories ul li a,
body .widget_categories a {
  font-size: 14px !important;
  padding: 8px 4px !important;
  display: inline-block !important;
  line-height: 1.5 !important;
}

/* ---- 18. Cajas decorativas vacías heredadas del tema (testimonial-11) ----
   .quote-right en testimonial-11 espera un icono que el theme nunca llegó
   a definir (::after content vacío). Mantiene una caja 50x75 fantasma. */
.testimonial-11 .quote-right:empty,
.testimonial-11 .quote-left:empty { display: none !important; }

/* El layout space-between dejaba un hueco grande entre el nombre y el comentario.
   Agrupamos el contenido arriba y centramos el texto del testimonio. */
.testimonial-11 { justify-content: flex-start !important; min-height: 240px !important; }
.testimonial-11 .testimonial-text { padding-top: 15px !important; text-align: center; }
.testimonial-11 .testimonial-text p { text-align: center !important; }

/* ---- 19. Headings vacíos heredados del contenido migrado (residuos WP) ---- */
.dez-post-text h1:empty,
.dez-post-text h2:empty,
.dez-post-text h3:empty,
.dez-post-text h4:empty,
.dez-post-text h5:empty,
.dez-post-text h6:empty,
.dez-post-text p:empty { display: none !important; }

/* ---- 21. Acordeón Qode migrado del WP (llega sin su JS, todos abiertos) ----
   Lo cerramos por defecto y el JS del layout añade .qode-open al hacer click.
   No depende del wrapper .qode-accordion-holder porque algunas páginas migradas
   lo perdieron (ej. /mudanzas-de-sevilla-a-lanzarote). */
.qode-accordion-content { display: none; }
.qode-accordion-content.qode-open { display: block; }
.qode-title-holder { cursor: pointer; }
.qode-title-holder .icon_minus-06 { display: none; }
.qode-title-holder.qode-open .icon_plus { display: none; }
.qode-title-holder.qode-open .icon_minus-06 { display: inline-block; }

/* ---- 20. Estilo por defecto de los botones (.site-button) ----
   Hover gris con texto blanco + leve desplazamiento hacia arriba.
   Aplica a TODOS los botones del sitio (incluye el <label> de subir archivo
   del formulario de presupuesto, que reusa .site-button). */
.site-button {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
/* Selectores reforzados: algunos botones llevan además .btn .btn-primary de Bootstrap,
   cuyo :hover empata en especificidad. Doblamos la clase para ganar siempre. */
.site-button.site-button:hover,
.site-button.site-button:focus,
.site-button.btn-primary:hover,
.site-button.btn-primary:focus {
  background-color: #6c757d !important;
  border-color: #6c757d !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
