
/* ==== GlobalImmigrationLawGroup – responsive base overrides (safe) ==== */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

/* Media scales within its container */
img, svg, video, canvas, audio, iframe, embed, object {
  max-width: 100%;
  height: auto;
  border: 0;
}

/* Logo scales, keep proportions */
.custom-logo { height: auto; width: auto; max-height: 64px; }

/* Avoid horizontal scroll on small screens */
.wrapper, .container, .elementor-container, .elementor-section, .elementor-column {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Tables: allow horizontal scroll if needed */
.table-wrap, .wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; }

/* Mild stack on narrow screens without fighting the theme */
@media (max-width: 768px) {
  .elementor-row, .e-con {
    flex-wrap: wrap;
  }
  .elementor-column { 
    min-width: 0;
  }
  .site-header .custom-logo { max-height: 56px; }
}


/* --- Preserve logo aspect ratio and avoid squishing --- */
.custom-logo,
.custom-logo img,
.site-branding img,
.site-logo img,
.ast-header-break-point .custom-logo,
.ast-site-identity .custom-logo,
a.custom-logo-link img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 64px !important;
  object-fit: contain !important;
}
/* If any header sets a fixed height, contain it */
.site-header img.custom-logo {
  object-fit: contain !important;
}


/* ===== Logo aspect ratio hard override ===== */
.site-logo-img img.custom-logo,
.custom-logo-link img.custom-logo,
a.custom-logo-link img,
.site-branding img.custom-logo,
.site-logo img.custom-logo,
.custom-logo {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 72px !important; /* Ajusta si quieres más grande en desktop */
  object-fit: contain !important;
  display: inline-block;
  vertical-align: middle;
}
@media (max-width: 768px) {
  .site-logo-img img.custom-logo,
  .custom-logo-link img.custom-logo,
  a.custom-logo-link img,
  .site-branding img.custom-logo,
  .site-logo img.custom-logo,
  .custom-logo {
    max-height: 56px !important; /* Un poco más chico en móvil */
  }
}


/* --- Prevent banner/logo distortion anywhere --- */
img[src="/img/logo.png"] {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 72px !important;
  object-fit: contain !important;
}
@media (max-width: 768px) {
  img[src="/img/logo.png"] {
    max-height: 56px !important;
  }
}


/* --- Blog banner safe alignment overrides --- */
.blog .elementor-section[class*="banner"],
.blog .elementor-section[data-settings*="background"],
.blog .ast-archive-description,
.blog .page-header,
.blog .entry-header,
.blog .elementor-section.hero,
.blog .elementor-top-section.hero {
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
}

/* Prevent content overflow in banners */
.blog .elementor-section.hero .elementor-container,
.blog .ast-archive-description {
  max-width: 100%;
  overflow: hidden;
}

/* Keep banner height sane on mobile */
@media (max-width: 768px) {
  .blog .elementor-section.hero,
  .blog .ast-archive-description {
    min-height: 220px;
  }
}

/* Keep any logo inside banners proportional */
.blog img[src="/img/logo.png"] {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
}


/* ===== Language-safe banner centering (English blog) ===== */
body[lang="en"] .elementor-section.hero,
body.lang-en .elementor-section.hero,
body.pll-lang-en .elementor-section.hero,
body.wpml-lang-en .elementor-section.hero,
body[lang="en"] .page-header,
body.lang-en .page-header,
body.pll-lang-en .page-header,
body.wpml-lang-en .page-header,
body[lang="en"] .entry-header,
body.lang-en .entry-header,
body.pll-lang-en .entry-header,
body.wpml-lang-en .entry-header,
body[lang="en"].blog .elementor-section[class*="banner"],
body.lang-en.blog .elementor-section[class*="banner"],
body.pll-lang-en.blog .elementor-section[class*="banner"],
body.wpml-lang-en.blog .elementor-section[class*="banner"],
body[lang="en"].blog .ast-archive-description,
body.lang-en.blog .ast-archive-description,
body.pll-lang-en.blog .ast-archive-description,
body.wpml-lang-en.blog .ast-archive-description,
body[lang="en"].home.blog .ast-archive-description,
body.lang-en.home.blog .ast-archive-description,
body.pll-lang-en.home.blog .ast-archive-description,
body.wpml-lang-en.home.blog .ast-archive-description {
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
}

/* Center internal container and avoid unintended left drift */
body[lang="en"] .elementor-section.hero .elementor-container,
body.lang-en .elementor-section.hero .elementor-container,
body.pll-lang-en .elementor-section.hero .elementor-container,
body.wpml-lang-en .elementor-section.hero .elementor-container,
body[lang="en"].blog .ast-archive-description,
body.lang-en.blog .ast-archive-description,
body.pll-lang-en.blog .ast-archive-description,
body.wpml-lang-en.blog .ast-archive-description {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 100% !important;
  float: none !important;
}

/* Keep banner height sensible on phones */
@media (max-width: 768px) {
  body[lang="en"] .elementor-section.hero,
  body.lang-en .elementor-section.hero,
  body.pll-lang-en .elementor-section.hero,
  body.wpml-lang-en .elementor-section.hero,
  body[lang="en"].blog .ast-archive-description,
  body.lang-en.blog .ast-archive-description,
  body.pll-lang-en.blog .ast-archive-description,
  body.wpml-lang-en.blog .ast-archive-description {
    min-height: 220px;
  }
}
