let RepsolHero2025={init:function(){RepsolHero2025.adjustPadding()},getElementsAndHeights:function(e){return Object.entries(e).reduce((e,[t,o])=>{o=document.querySelector(o);return e.elements[t]=o,e.heights[t]=o?.offsetHeight||0,e},{elements:{},heights:{}})},setSafeMarginBottom:function(e,t){e.style.marginBottom=Math.max(t,0)+"px"},adjustPadding:function(){var e,t,{elements:o,heights:r}=RepsolHero2025.getElementsAndHeights({hero:".hero-conf-component",widgetEyG:".widget-hero-eyg",widgetEnergy:".widget-hero-component .energy-widget",widgetGas:".widget-hero-gas",boxText:".hero-conf__box-text .hero-conf__content",textOverImage:".hero-conf__text-over-image .hero-conf__content",cardImage:".hero-conf__card-image",noImage:".hero-conf__no-image",shortcuts:".hero-conf .shortcuts-card"});let n=0;for([e,t]of Object.entries({".hero-conf__s":67,".hero-conf__m":106}))if(document.querySelector(e)){n=t;break}var i,{hero:o,widgetEnergy:g,widgetGas:a,cardImage:s,boxText:d,textOverImage:m,shortcuts:h,noImage:c,widgetEyG:f}=o;window.innerWidth<1024&&o?!g||s&&!m?s&&d&&!g&&!a?(i=r.boxText-n,h?(h.style.marginTop=Math.max(i,0)+"px",RepsolHero2025.setSafeMarginBottom(o,0)):RepsolHero2025.setSafeMarginBottom(o,i)):s&&d&&g?(h=r.widgetEnergy+r.boxText-n,RepsolHero2025.setSafeMarginBottom(o,h)):s&&d&&a?(i=r.widgetGas+r.boxText-n,RepsolHero2025.setSafeMarginBottom(o,i)):m&&a&&(h=r.widgetGas-(r.hero-r.textOverImage),RepsolHero2025.setSafeMarginBottom(o,h)):(s=r.widgetEnergy-(d?0:24),RepsolHero2025.setSafeMarginBottom(o,s)):1024<=window.innerWidth&&o&&c&&(g?(i=r.widgetEnergy-r.hero+32,RepsolHero2025.setSafeMarginBottom(o,i)):a?(m=r.widgetGas-r.hero,RepsolHero2025.setSafeMarginBottom(o,m)):f&&(h=r.widgetEyG-r.hero,RepsolHero2025.setSafeMarginBottom(o,h)))}};$(document).ready(function(){RepsolHero2025.init()}),window.addEventListener("resize",RepsolHero2025.adjustPadding);