/* theme-level additions (not in original build) */
[data-wr-menu][hidden]{display:none!important}
.wr-lang a{line-height:1}
video{object-fit:cover}
.wr-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}

/* QA 2026-11-04 */
@media (min-width:1024px){.lg\:mb-4{margin-bottom:1rem}}
:lang(es) .text-\[50px\].whitespace-nowrap{white-space:normal}
.text-\[\#027EEA\]{color:#027eea}

/* WateRecoup – text-over-image fixes (2026-11-04). Scoped to ES (html[lang^="es"]) so EN stays 1:1 with the original site. */

/* 1. Home "Grandes pérdidas de agua / ¡una enorme oportunidad!" (#every-drop-counts).
   The heading column is max-w-[450px]. EN fits in 2 lines; ES wraps to 4 lines and runs onto the glass photo
   (absolute img, lg:top-16). Widen the column on desktop so ES also sets in 2 lines, the same height as EN.
   No collision is possible: the heading sits above the 58/42 grid, and the glass starts below 2 lines. */
@media (min-width: 1024px) {
  html[lang^="es"] #every-drop-counts .max-w-\[450px\] { max-width: 680px; }
}

/* 2. Home stats "Más de 1 millón" (lg: 4 columns of 182px, 50px font). It now wraps to 3 lines: "Más de / 1 / millón".
   Keep the 50px size, but avoid the lone "1". Balanced wrapping gives "Más de / 1 millón" only if it fits,
   so step the size down slightly for ES on lg screens. */
@media (min-width: 1024px) {
  html[lang^="es"] .text-\[50px\].whitespace-nowrap { white-space: normal; text-wrap: balance; font-size: 44px; }
}

/* 3. Home hero H1 on mobile: "abastecimiento" (48px) is wider than a 328px column at 360px and is clipped at the right edge.
   Use a fluid size only below lg. EN does not reach this size, so it is unchanged at 390 and 360. */
@media (max-width: 1023px) {
  html[lang^="es"] h1.text-5xl { font-size: clamp(2.25rem, 11vw, 3rem); overflow-wrap: anywhere; hyphens: auto; }
}

/* ===== Language switcher — variant B "Droplet Ripple" (Dana) ===== */
/* Desktop: absolutely positioned left of the CTA, so it takes no flow width and nav x-positions match the original. */
.wr-ls-slot{position:absolute;right:100%;top:50%;margin-top:-23px;margin-right:16px;width:96px;height:40px}
@media (min-width:1280px){.wr-ls-slot{margin-right:24px}}
.wr-ls{--ls-fg:#fff;--ls-focus:#fff;--ls-drop:#e3f3ff;--ls-ink:#04284d;--ls-rip:#7cc8ff;--ls-x:52px;position:relative;width:96px;height:40px;display:flex;align-items:center;justify-content:space-between;font:600 14px/1 Montserrat,sans-serif;letter-spacing:.06em}
[data-wr-header][data-light="1"] .wr-ls-slot .wr-ls{--ls-fg:#002951;--ls-focus:#0157AA;--ls-drop:#0157AA;--ls-ink:#fff;--ls-rip:#0157AA}
.wr-ls a{position:relative;z-index:2;width:44px;height:40px;display:grid;place-items:center;padding-top:6px;border-radius:20px;color:var(--ls-fg);text-decoration:none;transition:opacity .15s,color .3s}
.wr-ls a:not([aria-current]):hover{opacity:.7}
.wr-ls a[aria-current]{color:var(--ls-ink)}
.wr-ls a:focus-visible{outline:2px solid var(--ls-focus);outline-offset:2px}
.wr-ls__drop{position:absolute;z-index:1;top:-2px;left:2px;width:40px;height:44px;transition:transform .55s cubic-bezier(.5,0,.2,1);pointer-events:none}
.wr-ls__drop svg{width:100%;height:100%;display:block;transform-origin:50% 100%}
.wr-ls__drop path{fill:var(--ls-drop)}.wr-ls__drop ellipse{fill:#fff}
[data-wr-header][data-light="1"] .wr-ls-slot .wr-ls__drop ellipse{opacity:.2}
.wr-ls[data-l=es] .wr-ls__drop{transform:translateX(var(--ls-x))}
.wr-ls.go .wr-ls__drop svg{animation:wr-squash .55s ease}
@keyframes wr-squash{0%{transform:scale(1)}35%{transform:translateY(-6px) scale(.8,1.15)}70%{transform:scale(1.18,.82)}100%{transform:scale(1)}}
.wr-ls__rip{position:absolute;left:0;top:50%;width:44px;height:44px;margin-top:-22px;border-radius:50%;border:1.5px solid var(--ls-rip);opacity:0;pointer-events:none}
.wr-ls__rip.on{animation:wr-rip .9s ease-out .38s}.wr-ls__rip.on.wr-ls__rip--2{animation-delay:.52s}
@keyframes wr-rip{0%{opacity:.9;transform:scale(.5)}100%{opacity:0;transform:scale(1.9)}}
/* Mobile menu: larger targets, matches text-2xl menu rhythm */
.wr-ls--m{--ls-x:68px;margin-left:-14px;width:120px;height:48px;font-size:18px}
.wr-ls--m a{width:52px;height:48px}
.wr-ls--m .wr-ls__drop{width:48px;height:52px;top:-3px;left:2px}
.wr-ls--m .wr-ls__rip{width:52px;height:52px;margin-top:-26px}
@media (prefers-reduced-motion:reduce){.wr-ls *{animation:none!important;transition-duration:.01s!important;transition-delay:0s!important}}
/* lg..xl (1024–1279): the gap between nav and CTA is only ~96px, so the switcher is scaled down to stay clear of the nav. */
@media (min-width:1024px) and (max-width:1279.98px){.wr-ls-slot{margin-right:6px;margin-top:-20.8px;transform:scale(.82);transform-origin:100% 50%}}

/* QA 2026-11-04 (Dana) */
.wr-ls a:not([aria-current]){text-shadow:0 1px 2px rgba(0,0,0,.35)}
[data-wr-header][data-light="1"] .wr-ls-slot .wr-ls a{text-shadow:none}
[data-wr-cta],[data-wr-cta] .p-button-label{font-family:Montserrat,sans-serif!important;font-size:14px!important}[data-wr-cta]{font-weight:600!important}[data-wr-cta] .p-button-label{font-weight:500!important}
@keyframes wr-rip-s{0%{opacity:.9;transform:scale(.5)}100%{opacity:0;transform:scale(1.4)}}
@media (min-width:1024px) and (max-width:1279.98px){.wr-ls-slot .wr-ls__rip.on{animation-name:wr-rip-s}}

/* 1.0.6 (Dana, variant B): pill behind the switcher only on the dark transparent header over hero photo/video. Pseudo-element = no layout change. */
.wr-ls-slot::before{content:"";position:absolute;inset:0;z-index:0;border-radius:20px;background:rgba(4,40,77,.45);opacity:0;pointer-events:none;transition:opacity .3s}
[data-wr-header][data-light="0"].bg-transparent .wr-ls-slot::before{opacity:1}
[data-wr-header][data-light="0"].bg-transparent .wr-ls-slot .wr-ls a:not([aria-current]){color:#fff}

/* ===== 1.0.7 — Jessie/Carmel ES edits (11.11.2026). All rules scoped to ES (html[lang^="es"]); EN stays 1:1. ===== */
/* Edit 4. /es/enfoque/ "Ventajas clave de nuestro enfoque": the 2x2 cards get equal row heights (bottom pair was shorter). */
@media (min-width: 640px) {
  html[lang^="es"] .grid.sm\:grid-cols-2:has(> article.rounded-2xl.bg-white\/5) { grid-auto-rows: 1fr; }
}
/* Edit 8. /es/economia/ three comparison columns: the lists fill the column height, so the short left list
   ("Nuevas fuentes de abastecimiento tradicionales") is spaced like the two others instead of bunching at the top. */
@media (min-width: 1024px) {
  html[lang^="es"] .lg\:grid-cols-3 > article.rounded-xl.lg\:px-8 > ul.flex-col { flex: 1 1 auto; justify-content: space-between; }
}
/* Edit 9. /es/economia/ challenge cards 01–07: equal heights on every row; the lone 07 stays centred and matches the others. */
@media (min-width: 1024px) {
  html[lang^="es"] .mt-12.flex.flex-wrap.justify-center:has(> article[tabindex]) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; }
  html[lang^="es"] .mt-12.flex.flex-wrap.justify-center:has(> article[tabindex]) > article { width: auto; }
  html[lang^="es"] .mt-12.flex.flex-wrap.justify-center:has(> article[tabindex]) > article:last-child:nth-child(3n+1) { grid-column: 2; }
}


/* 17.11.2026 — Technology closing quote: full white on the dark block (was text-white/80 = grey).
   Scoped to the unique Technology/Tecnología closer (bg-[#1B2027] + !mb-0). */
section.bg-\[\#1B2027\].\!mb-0 h2 {
  color: #ffffff !important;
}

/* 19.11.2026 (Carmel EN↔ES jump): the site ships its own language switcher.
   Chrome with a non-ES UI language (e.g. he-IL) offers to translate /es/ and
   can inject a top banner (classic html{margin-top:40px} / body{top:40px})
   or a language-picker bubble over the header. Reset the banner if it appears.
   Opt-out attributes live on <html> / the google notranslate meta. */
html{margin-top:0!important}
body{top:0!important}
iframe.skiptranslate,
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame,
body>.skiptranslate{
  display:none!important;
  visibility:hidden!important;
  height:0!important;
}

/* 19.11.2026 (Slava): EN↔ES jump on the language click itself, not only Chrome Translate.
   Measured at 1440×900, ru-RU, 6/6 cold+warm runs:
   - header/logo y,h match (0,102 / logo 92.5,24 147×54).
   - [data-wr-cta] width follows the label: "Contact Us" ≈119.7px vs "Contáctenos" 131.6px.
     .wr-ls-slot is position:absolute; right:100% of that CTA wrapper (margin-right:24px at ≥1280),
     so the switcher shifts left by 11.9px (EN x=1092.8 → ES x=1080.9). During EN→ES, FOUT
     first paints the ES pill at ~122.7px (switcher 1089.8) then Montserrat loads and it
     settles at 131.6 / 1080.9 (layout-shift on the button + .wr-ls).
   - html/body background was transparent, so the full navigation (~800ms after click)
     flashes the default white canvas.
   - 390: a 15px horizontal twitch of the burger when the classic scrollbar appears or
     the mobile menu toggles overflow (sbW=15). */
html,body{background-color:#002951}
html{scrollbar-gutter:stable;overflow-y:scroll}
@media (min-width:1024px){
  /* Pin the CTA wrapper (the containing block of .wr-ls-slot {right:100%}) so
     "Contact Us" vs "Contáctenos" cannot move the switcher. flex-end keeps the
     shorter EN label on the right edge, same as ES. EN's contact button has no
     data-wr-cta, so the wrapper rule is what actually aligns EN. */
  header [data-wr-cta-wrap],
  header div.hidden.lg\:flex.items-center.relative{
    min-width:136px;
    justify-content:flex-end;
  }
  [data-wr-cta]{min-width:136px;box-sizing:border-box;justify-content:center}
  [data-wr-cta] .p-button-label{text-align:center}
}
@media (min-width:1024px){
  /* Home hero H1: EN is 2 lines / 128px at 64px; ES at the same size is 4 lines / 256px,
     so the lead paragraph jumps down 128px. 48px / line-height 1 + text-wrap:balance
     fits the Spanish title in 3 lines (~144px) without shrinking the EN page. */
  html[lang^="es"] h1.font-poppins.text-5xl{
    font-size:48px!important;
    line-height:1!important;
    text-wrap:balance;
  }
}
