:root {
    --residus-green-950: #143a37;
    --residus-green-900: #075b57;
    --residus-green-700: #08756f;
    --residus-teal: #08756f;
    --residus-yellow: #d8b83f;
    --residus-ink: #203039;
    --residus-muted: #5c6a71;
    --residus-surface: #ffffff;
    --residus-soft: #f4f7f6;
    --residus-radius: 10px;
    --residus-shadow: 0 9px 26px rgba(32, 48, 57, .09);
}

html, body {
    max-width: 100%;
    overflow-x: clip;
}

body {
    color: var(--residus-ink);
    font-family: Montserrat, Arial, sans-serif;
    line-height: 1.6;
}

h1, h2, .elementor-heading-title {
    color: var(--residus-ink);
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
    line-height: 1.12;
}

h1 { font-size: clamp(38px, 5vw, 68px); }
h2 { font-size: clamp(30px, 3.4vw, 48px); }
h3 { font-size: clamp(20px, 2vw, 28px); line-height: 1.25; }
.elementor-widget-text-editor p,
.elementor-widget-text-editor li,
.entry-content p,
.entry-content li { font-size: clamp(16px, 1.15vw, 18px); }

main, #content, .site-main {
    min-width: 0;
}

img, video, iframe {
    max-width: 100%;
}

h1, h2, h3, .elementor-heading-title {
    text-wrap: balance;
}

#masthead {
    background: #fff;
    box-shadow: 0 2px 14px rgba(16, 43, 19, .12);
}

#masthead .elementor-widget-image img {
    width: auto;
    max-height: 92px;
    object-fit: contain;
}

#masthead .eael-simple-menu > li > a {
    color: var(--residus-ink);
    font-family: Montserrat, Arial, sans-serif;
    font-weight: 600;
    letter-spacing: .04em;
}

#masthead .eael-simple-menu {
    align-items: center;
    gap: clamp(2px, .45vw, 9px);
}

#masthead .eael-simple-menu > li > a {
    padding-inline: clamp(7px, .75vw, 14px) !important;
    white-space: nowrap;
}

#masthead .eael-simple-menu > li > a:hover,
#masthead .eael-simple-menu > li > a:focus-visible,
#masthead .eael-simple-menu > li > a.eael-item-active {
    color: var(--residus-teal);
}

.elementor-button,
button:not(.eael-simple-menu-toggle),
input[type="submit"] {
    min-height: 44px;
    border-radius: 8px;
    font-family: Montserrat, Arial, sans-serif;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.elementor-button {
    border: 1px solid var(--residus-teal) !important;
    border-radius: 6px !important;
    background: var(--residus-teal) !important;
    color: #fff !important;
    box-shadow: none;
}

.elementor-button:hover,
.elementor-button:focus-visible {
    border-color: var(--residus-green-900) !important;
    background: var(--residus-green-900) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(7, 91, 87, .18);
}

/*
 * Compatibility layer for legacy global CSS injected after plugin styles.
 * The extra html/body specificity intentionally wins over its !important
 * yellow-button rule without affecting wp-admin.
 */
html body:not(.wp-admin) :is(
    .cta-button,
    .elementor-button,
    .wp-block-button__link,
    .cre-button--primary,
    .cre-home-footer a,
    input[type="submit"],
    button[type="submit"]
) {
    min-height: 46px !important;
    padding: 11px 20px !important;
    border: 1px solid var(--residus-teal) !important;
    border-radius: 6px !important;
    background: var(--residus-teal) !important;
    color: #fff !important;
    font-family: Montserrat, Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    letter-spacing: .01em !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

html body:not(.wp-admin) :is(
    .cta-button,
    .elementor-button,
    .wp-block-button__link,
    .cre-button--primary,
    .cre-home-footer a,
    input[type="submit"],
    button[type="submit"]
):is(:hover, :focus-visible) {
    border-color: var(--residus-green-900) !important;
    background: var(--residus-green-900) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(7, 91, 87, .18) !important;
}

html body:not(.wp-admin) .cre-button:not(.cre-button--primary),
html body:not(.wp-admin) input[type="reset"] {
    min-height: 46px !important;
    padding: 11px 20px !important;
    border: 1px solid var(--residus-teal) !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: var(--residus-green-900) !important;
    font-family: Montserrat, Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

html body:not(.wp-admin) .cre-button:not(.cre-button--primary):is(:hover, :focus-visible),
html body:not(.wp-admin) input[type="reset"]:is(:hover, :focus-visible) {
    background: var(--residus-soft) !important;
    color: var(--residus-green-900) !important;
}

html body:not(.wp-admin) .residus-hero-action {
    border-color: #fff !important;
    background: #fff !important;
    color: var(--residus-green-900) !important;
}

html body:not(.wp-admin) .residus-hero-action--secondary {
    border-color: rgba(255,255,255,.82) !important;
    background: rgba(20,58,55,.32) !important;
    color: #fff !important;
}

html body:not(.wp-admin) .residus-hero-action:is(:hover, :focus-visible) {
    border-color: var(--residus-teal) !important;
    background: var(--residus-teal) !important;
    color: #fff !important;
}

a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
    outline: 3px solid #0b79d0 !important;
    outline-offset: 3px;
}

select, input, textarea {
    max-width: 100%;
}

.elementor-widget-text-editor a:not(.elementor-button),
.entry-content p a:not(.elementor-button) {
    text-decoration-thickness: .1em;
    text-underline-offset: .16em;
}

/* Home hero */
.page-id-28 .elementor-element-5f9c01f {
    position: relative;
    isolation: isolate;
    min-height: clamp(520px, 66vh, 660px);
    padding: clamp(42px, 7vw, 108px) max(6vw, 32px) !important;
    background-position: center center !important;
    background-size: cover !important;
    justify-content: center;
    overflow: hidden;
}

.page-id-28 .elementor-element-5f9c01f::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(12, 37, 15, .82) 0%, rgba(12, 37, 15, .55) 48%, rgba(12, 37, 15, .18) 100%);
}

.page-id-28 .residus-hero-copy {
    width: min(650px, 100%);
    margin-right: auto;
    color: #fff;
}

.page-id-28 .residus-hero-copy h1 {
    width: auto !important;
    margin: 0 0 18px;
    color: #fff !important;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(46px, 5.2vw, 72px) !important;
    font-weight: 800;
    line-height: 1.05 !important;
    letter-spacing: -.02em;
    text-shadow: 0 3px 16px rgba(0, 0, 0, .4);
}

.residus-hero-lead {
    max-width: 590px;
    margin: 0 0 28px;
    color: #fff;
    font-size: clamp(18px, 1.55vw, 23px);
    line-height: 1.55;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}

.residus-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.residus-hero-action {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border: 2px solid #fff;
    border-radius: 6px;
    background: #fff;
    color: var(--residus-green-900) !important;
    font-weight: 750;
    text-decoration: none !important;
}

.residus-hero-action--secondary {
    border-color: rgba(255,255,255,.82);
    background: rgba(20, 58, 55, .32);
    color: #fff !important;
}

.residus-hero-action:hover,
.residus-hero-action:focus-visible {
    transform: translateY(-1px);
    background: var(--residus-teal);
    border-color: var(--residus-teal);
    color: #fff !important;
}

/* Improve the low-contrast Residuos hero without relying on the photograph. */
.page-template-elementor_header_footer .elementor-element[style*="background"] h1,
.page-template-elementor_header_footer .elementor-element[style*="background"] h2 {
    text-shadow: 0 2px 12px rgba(0, 0, 0, .28);
}

/* Statistics dashboard */
.cre-dashboard-shell {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.page-id-1328 .elementor-element:has(.cre-public-dashboard),
.page-id-1328 .elementor-widget-shortcode,
.page-id-1328 .elementor-widget-shortcode > .elementor-widget-container {
    background: #fff !important;
}

.cre-dashboard-tabs,
.cre-tabs,
[role="tablist"] {
    scrollbar-width: thin;
}

/* News cards */
.elementor-posts-container {
    align-items: stretch;
}

.elementor-posts-container .elementor-post {
    height: 100%;
    overflow: hidden;
    border-radius: var(--residus-radius);
    background: #fff;
    box-shadow: var(--residus-shadow);
}

.elementor-posts-container .elementor-post__title {
    font-size: clamp(24px, 2vw, 31px) !important;
    line-height: 1.22 !important;
}

.elementor-posts-container .elementor-post__read-more {
    color: var(--residus-green-700) !important;
    font-weight: 700;
}

#residus-contacto {
    scroll-margin-top: 130px;
}

@media (max-width: 1024px) {
    #masthead .eael-simple-menu-toggle {
        display: flex !important;
        width: 54px;
        height: 54px;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        border: 0;
        border-radius: 8px;
        background: var(--residus-green-950);
        color: #fff;
    }

    #masthead .eael-simple-menu-toggle svg {
        width: 26px;
        fill: currentColor;
    }

    #masthead .eael-simple-menu-container > ul.eael-simple-menu {
        display: none !important;
    }

    #masthead .eael-simple-menu-container.residus-menu-open > ul.eael-simple-menu {
        position: absolute;
        z-index: 9999;
        top: calc(100% + 10px);
        right: 0;
        display: flex !important;
        width: min(360px, calc(100vw - 24px));
        max-height: calc(100vh - 150px);
        flex-direction: column;
        overflow-y: auto;
        padding: 12px;
        border-radius: 10px;
        background: #fff;
        box-shadow: var(--residus-shadow);
    }

    #masthead .eael-simple-menu-container {
        position: relative;
    }

    #masthead .eael-simple-menu-container.residus-menu-open li,
    #masthead .eael-simple-menu-container.residus-menu-open a {
        width: 100%;
    }

    #masthead .sub-menu {
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
    }

    .cre-dashboard-tabs,
    .cre-tabs,
    [role="tablist"] {
        display: flex !important;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        padding-bottom: 6px;
        white-space: nowrap;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    #masthead .eael-simple-menu > li > a {
        font-size: 13px !important;
        letter-spacing: .01em;
    }
}

@media (max-width: 767px) {
    #masthead {
        min-height: 104px;
    }

    #masthead .elementor-widget-image img {
        max-height: 78px;
    }

    .page-id-28 .elementor-element-5f9c01f {
        min-height: 480px;
        padding: 54px 24px !important;
        background-position: 58% center !important;
    }

    .page-id-28 .elementor-element-5f9c01f::before {
        background: linear-gradient(90deg, rgba(12, 37, 15, .86), rgba(12, 37, 15, .5));
    }

    .page-id-28 .residus-hero-copy h1 {
        font-size: 38px !important;
        line-height: 1.08 !important;
    }

    .residus-hero-lead {
        font-size: 17px;
    }

    .residus-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .residus-hero-action {
        width: 100%;
    }

    .elementor-heading-title {
        overflow-wrap: anywhere;
    }
}

@media (min-width: 1025px) {
    #masthead .eael-simple-menu-toggle {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
