/* Public action buttons. Keep navigation, accordions, modal close controls and
   carousel arrows under their existing component styles. */
:is(body, #pageContent, #mainWrapper) :is(
    .btn:not(:where(.btn-link, .arrow-r, .arrow-l, .slick-arrow, .close, .open-close,
        [data-dismiss], [data-bs-dismiss], [data-toggle="collapse"], [data-bs-toggle="collapse"],
        [class*="carousel"], [class*="slider"])),
    a.btn-blue-primary, a.btn-custom-one, a.btn-custom-two, a.btn-custom-three,
    .btn-sbt, .btn-mtk-success, .btn-diagrama, .btn-prod, .consulta_experto_btn,
    a.descargar, a.bloque-footer,
    .brands-catalog-cta, .products-catalog-cta, .product-catalog-cta, .presentacion-btn,
    .product-header-add-to-cart, .add-to-cart, .sheet-submit,
    .home-banner-exp-1__cta, .home-banner-exp-2__cta, .home-banner-exp-3__cta, .home-banner-exp-4__cta,
    [id="banner"] .block-left a, [id="purificador"] a, [id="filtros"] a,
    [id="calltoaction"] a, .call-to-action a,
    [id="block-3"] .buttons a, [id="prop-block-1"] .buttons a,
    [id="btn-modelos"] .buttons a, [id="plantas-block-4"] .buttons a,
    button[type="submit"], input[type="submit"]
) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 44px;
    max-width: 100%;
    padding: 12px 20px !important;
    border: 1px solid var(--water-button) !important;
    border-radius: 5px !important;
    background: var(--water-button) !important;
    color: #fff !important;
    font-family: 'Gotham-Medium', Arial, sans-serif !important;
    font-size: 1rem !important;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: normal;
    text-align: center;
    text-transform: none !important;
    white-space: normal;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: background-color .2s, border-color .2s, color .2s;
}

/* Match the base selector so page-specific button colors cannot win on hover. */
:is(body, #pageContent, #mainWrapper) :is(
    .btn:not(:where(.btn-link, .arrow-r, .arrow-l, .slick-arrow, .close, .open-close,
        [data-dismiss], [data-bs-dismiss], [data-toggle="collapse"], [data-bs-toggle="collapse"],
        [class*="carousel"], [class*="slider"])),
    a.btn-blue-primary, a.btn-custom-one, a.btn-custom-two, a.btn-custom-three,
    .btn-sbt, .btn-mtk-success, .btn-diagrama, .btn-prod, .consulta_experto_btn,
    a.descargar, a.bloque-footer,
    .brands-catalog-cta, .products-catalog-cta, .product-catalog-cta, .presentacion-btn,
    .product-header-add-to-cart, .add-to-cart, .sheet-submit,
    .home-banner-exp-1__cta, .home-banner-exp-2__cta, .home-banner-exp-3__cta, .home-banner-exp-4__cta,
    [id="banner"] .block-left a, [id="purificador"] a, [id="filtros"] a,
    [id="calltoaction"] a, .call-to-action a,
    [id="block-3"] .buttons a, [id="prop-block-1"] .buttons a,
    [id="btn-modelos"] .buttons a, [id="plantas-block-4"] .buttons a,
    button[type="submit"], input[type="submit"]
):not(:where(:disabled, .disabled, [aria-disabled="true"])):is(:hover, :focus-visible, :active) {
    background: var(--water-button-hover) !important;
    border-color: var(--water-button-hover) !important;
    color: #fff !important;
    text-decoration: none !important;
    transform: none;
}

/* Keep selection visible when all category buttons share the same base blue. */
:is(body, #pageContent, #mainWrapper) .btn:is(.active, [aria-current="page"]),
:is(body, #pageContent, #mainWrapper) #nuestros-proyectos-block-1 .btn-dark {
    box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--water-288) !important;
}

/* Consistent download icons, without a separate circle or decorative background. */
:is(body, #pageContent, #mainWrapper) :is(.brands-catalog-cta, .products-catalog-cta, .product-catalog-cta, .presentacion-btn) :is(i, .icon) {
    display: inline-flex;
    flex: 0 0 auto;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    background: transparent;
    color: inherit;
    box-shadow: none;
    font-size: 1rem;
}
:is(body, #pageContent, #mainWrapper) .presentacion-btn .text strong { font: inherit; color: inherit; }
:is(body, #pageContent, #mainWrapper) .presentacion-btn .text small { color: inherit; }

/* The header keeps its white button on the blue scrolled surface. */
:is(body, #pageContent, #mainWrapper) #mtop .consulta_experto_btn { white-space: nowrap; }
:is(body, #pageContent, #mainWrapper) #mtop.bg-color-moved { background: var(--water-288) !important; }
:is(body, #pageContent, #mainWrapper) #mtop.bg-color-moved .consulta_experto_btn {
    background: #fff !important;
    border-color: #fff !important;
    color: var(--water-288) !important;
}
:is(body, #pageContent, #mainWrapper) #mtop.bg-color-moved .consulta_experto_btn img {
    filter: brightness(0) saturate(100%) invert(14%) sepia(52%) saturate(2696%) hue-rotate(200deg) brightness(90%) contrast(110%);
}
:is(body, #pageContent, #mainWrapper) #mtop .consulta_experto_btn:is(:hover, :focus-visible, :active) {
    background: var(--water-button-hover) !important;
    border-color: var(--water-button-hover) !important;
    color: #fff !important;
    transform: none;
}
:is(body, #pageContent, #mainWrapper) #mtop .consulta_experto_btn:is(:hover, :focus-visible, :active) img { filter: none; }

@media (prefers-reduced-motion: reduce) {
    :is(body, #pageContent, #mainWrapper) :is(.btn, .consulta_experto_btn, .presentacion-btn) { transition: none; }
}
