/* Anclados layout fixes — scroll, centering, hide broken Wix chrome */

/* --- Scroll --- */
html {
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  height: auto !important;
  width: 100% !important;
  max-width: 100% !important;
}
body,
body.prewarmup,
body.device-mobile-optimized,
body.device-mobile-non-optimized {
  overflow-x: hidden !important;
  overflow-y: visible !important;
  height: auto !important;
  min-height: 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  position: relative !important;
}

/* Wix hides chrome until JS warm-up — never finishes offline */
body.prewarmup .hidden-during-prewarmup,
.warmup .hidden-on-warmup,
body:not([data-js-loaded]) [data-hide-prejs],
[data-hide-prejs] {
  visibility: visible !important;
}
body.prewarmup #SITE_ROOT {
  overflow: visible !important;
}

/* Native Wix header → replaced by #romli-nav */
#SITE_HEADER,
#SITE_HEADER-placeholder,
header#SITE_HEADER {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/*
 * Do NOT turn masterPage into flex — flex min-width:auto expands past the
 * viewport when mesh children use large width+left, which then inflates
 * margin-left: calc((100% - 980px) * 0.5) and shoves content to the right.
 */
#masterPage.mesh-layout[data-mesh-layout="grid"],
#masterPage.mesh-layout {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

#SITE_CONTAINER,
#SITE_ROOT,
#PAGES_CONTAINER,
#SITE_PAGES,
main#PAGES_CONTAINER,
#PAGES_CONTAINERinlineContent,
#PAGES_CONTAINERcenteredContent,
#soapBeforePagesContainer,
#soapAfterPagesContainer,
#BACKGROUND_GROUP,
#main_MF,
#masterPage {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  box-sizing: border-box !important;
}

#SITE_CONTAINER,
#SITE_ROOT,
#masterPage,
#PAGES_CONTAINER,
#SITE_PAGES {
  left: 0 !important;
  margin-left: 0 !important;
  position: relative !important;
}

/* Background must not lock the viewport */
#SITE_BACKGROUND,
.siteBackground,
[id^="SITE_BACKGROUND"] {
  position: absolute !important;
  height: 100% !important;
  min-height: 100% !important;
  width: 100% !important;
  pointer-events: none !important;
}

/* Page mesh root stays viewport-width so centering calc stays correct */
#fgu06,
#fgu06inlineContent,
#fgu06inlineContent-gridWrapper,
#fgu06inlineContent-gridContainer,
[data-is-mesh="true"],
[data-is-mesh-layout="true"] {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

/* Wix mesh wrappers are often `display:flex` with min-width:auto — that
   expands past the viewport and breaks margin-left centering calc */
#fgu06inlineContent-gridWrapper,
[id$="inlineContent-gridWrapper"] {
  display: block !important;
  min-width: 0 !important;
}
#fgu06inlineContent-gridContainer,
[id$="inlineContent-gridContainer"],
[data-mesh-id$="inlineContent-gridContainer"] {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: clip !important;
  box-sizing: border-box !important;
}

[data-mesh-id$="inlineContent-gridWrapper"] {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: clip !important;
}

section[data-is-screen-width="true"] {
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  margin-left: 0 !important;
  box-sizing: border-box !important;
}

wix-image,
wix-image img,
img {
  max-width: 100%;
  height: auto;
}

/* wix-image polyfill: injected <img> must fill the component box */
wix-image img {
  display: block !important;
  object-fit: cover !important;
  width: 100% !important;
  height: 100% !important;
}

/* Blog card thumbnails */
._1r8-t {
  background-size: cover !important;
  background-position: center !important;
  min-height: 180px;
}

#SCROLL_TO_TOP,
#SCROLL_TO_BOTTOM {
  height: 0 !important;
  overflow: hidden !important;
}

/* --- Site-wide: section/blog headings + 980px mesh blocks --- */

/* Section pages: ÚLTIMAS ENTRADAS, TEMÁTICAS, etc. */
#PAGES_CONTAINER [id$="inlineContent-gridContainer"] > .s_BIwzIGroupSkin,
#SITE_PAGES [id$="inlineContent-gridContainer"] > .s_BIwzIGroupSkin,
[data-mesh-id$="inlineContent-gridContainer"] > .s_BIwzIGroupSkin {
  margin-left: auto !important;
  margin-right: auto !important;
  left: 0 !important;
  max-width: 980px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.s_BIwzIGroupSkininlineContent,
[id$="GroupSkininlineContent"] {
  width: 100% !important;
  max-width: 980px !important;
  box-sizing: border-box !important;
}

.s_BIwzIGroupSkininlineContent [id$="inlineContent-gridContainer"] {
  width: 100% !important;
  max-width: 980px !important;
}

.s_BIwzIGroupSkininlineContent .txtNew[style*="741px"],
.s_BIwzIGroupSkininlineContent .txtNew[style*="888px"] {
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  padding-left: 35px !important;
  box-sizing: border-box !important;
}

/* Blog category/listing pages: REVISA TODAS LAS PUBLICACIONES */
#comp-k84tnd08,
[id^="TPASection_"],
.TPASection_k7zhbm8o {
  margin-left: auto !important;
  margin-right: auto !important;
  left: 0 !important;
  max-width: 980px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#comp-k84tnd08 {
  max-width: min(888px, 100%) !important;
}

[class*="style-k7zd"],
[class*="style-k7zhe"] {
  margin-left: auto !important;
  margin-right: auto !important;
  left: 0 !important;
  max-width: 980px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Page titles centered in 980px column */
#PAGES_CONTAINER [id$="inlineContent-gridContainer"] > .txtNew,
#SITE_PAGES [id$="inlineContent-gridContainer"] > .txtNew {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 980px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Fixed-width inline blocks (981px heroes, blog widgets) */
[style*="width:981px"],
[style*="width: 981px"],
[style*="width:995px"],
[style*="width: 995px"] {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Blog feed widgets inside groups */
.s_BIwzIGroupSkininlineContent .post-list,
.s_BIwzIGroupSkininlineContent ._3RKAW {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* --- Homepage: ÚLTIMAS ENTRADAS (was drifting right) --- */
#comp-kf4cq8ps {
  margin: 0 auto 37px !important;
  left: 0 !important;
  right: auto !important;
  max-width: 980px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
#comp-kf4cq8psinlineContent,
#comp-kf4cq8psinlineContent-gridWrapper,
#comp-kf4cq8psinlineContent-gridContainer {
  width: 100% !important;
  max-width: 980px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}
#comp-keyg1q5j,
#comp-keyg1q6e {
  left: 0 !important;
  padding-left: 35px !important;
  box-sizing: border-box !important;
}
#comp-k80bthfn {
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  overflow-x: auto !important;
}
#comp-kb85w0g8 {
  left: auto !important;
  margin-left: auto !important;
  margin-right: 35px !important;
}
#comp-k80bthfn .post-list {
  max-width: 100% !important;
  box-sizing: border-box !important;
}
#comp-k80bthfn ._3RKAW {
  max-width: 100% !important;
}
#comp-k80bthfn ._3RKAW img {
  width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
}
