/* ============================================================
   Reciclo Theme — Main Stylesheet
   Ported from index.html design
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
    font-family: 'Raleway', sans-serif;
    background: #f4f9f5;
    overflow-x: hidden;
}

/* ── Pain card hover icon ── */
.pain-card:hover .pain-icon { transform: translateY(-10px) !important; }
.pain-icon { transition: transform 0.3s ease-out !important; }

/* ── Materiales marquee ── */
.mat-ticker-outer {
    position: relative;
    width: 100%;
}
.mat-ticker-wrap {
    overflow: hidden;
    width: 100%;
}
.mat-ticker-shift {
    --mat-nudge: 0px;
    transform: translateX(var(--mat-nudge));
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    width: max-content;
}
.mat-ticker {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: mat-left 70s linear infinite;
}
.mat-ticker-reverse {
    animation: mat-right 70s linear infinite;
}
.mat-ticker-outer:hover .mat-ticker,
.mat-ticker-outer:hover .mat-ticker-reverse {
    animation-play-state: paused;
}
.mat-ticker-outer .mat-nav {
    position: absolute;
    top: 50%;
    z-index: 6;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #0f8863;
    background: rgba(5, 47, 35, 0.88);
    color: #cef17b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}
.mat-ticker-outer .mat-nav:hover {
    background: #0f8863;
    border-color: #3de9b5;
    color: #fff;
}
.mat-ticker-outer .mat-nav:active {
    transform: translateY(-50%) scale(0.96);
}
.mat-ticker-outer .mat-nav--prev {
    left: clamp(8px, 2vw, 20px);
}
.mat-ticker-outer .mat-nav--next {
    right: clamp(8px, 2vw, 20px);
}
@media (max-width: 640px) {
    .mat-ticker-outer .mat-nav {
        width: 36px;
        height: 36px;
    }
    .mat-ticker-outer .mat-nav--prev {
        left: 4px;
    }
    .mat-ticker-outer .mat-nav--next {
        right: 4px;
    }
}
@keyframes mat-left {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes mat-right {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
    .mat-ticker, .mat-ticker-reverse { animation: none; }
    .mat-ticker-outer .mat-nav { display: none; }
    .mat-ticker-shift { transition: none; }
}
.mat-img-card {
    transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
    cursor: default;
}
.mat-img-card:hover { transform: scale(1.03); z-index: 2; }

/* ── Entry animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(36px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-48px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(48px); }
    to   { opacity: 1; transform: translateX(0); }
}

[data-anim] { opacity: 0; }
[data-anim].in {
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.22,1,0.36,1);
    animation-duration: 0.8s;
    opacity: 1;
}
[data-anim="up"].in    { animation-name: fadeInUp; }
[data-anim="left"].in  { animation-name: slideInLeft; }
[data-anim="right"].in { animation-name: slideInRight; }
[data-delay="1"].in { animation-delay: 0.1s; }
[data-delay="2"].in { animation-delay: 0.2s; }
[data-delay="3"].in { animation-delay: 0.3s; }
[data-delay="4"].in { animation-delay: 0.4s; }
[data-delay="5"].in { animation-delay: 0.5s; }

/* ── Floating nav ── */
#site-nav-wrap {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    display: flex;
    justify-content: center;
    padding-top: 36px;
    pointer-events: none;
}
#site-nav {
    pointer-events: all;
    width: 100%;
    max-width: 1172px;
    height: 103px;
    background: #052f23bf;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px;
    border-radius: 0;
    box-shadow: 0 0 0 1px #052f23;
    margin: 0 134px;
}

/* ── Hero ── */
#hero-section {
    position: relative;
    width: 100%;
    height: calc(100vh - 120px);
    min-height: 540px;
    background: #052f23;
    overflow: hidden;
}
.hero-video-wrap { position: absolute; inset: 0; }
.hero-video-wrap video { width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
#hero-video-pause {
    position: absolute; bottom: 20px; right: 20px; z-index: 10;
    background: rgba(5,47,35,.55); border: 1px solid rgba(255,255,255,.25);
    color: #fff; border-radius: 50%; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .2s; backdrop-filter: blur(4px);
}
#hero-video-pause:hover { background: rgba(5,47,35,.85); }
@media (prefers-reduced-motion: reduce) { #hero-video-pause { display: none; } }
.hero-gradient-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(112deg, #bfed5266 0%, #bfed5200 54%);
    pointer-events: none; z-index: 1;
}

/* Hero copy stack (desktop defaults; tablet overrides below) */
#hero-content.hero-content,
.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    /* Never sit under fixed nav: wrap padding (36) + bar (103) + air */
    padding-top: max(323px, calc(36px + 103px + clamp(2.75rem, 8vh, 6rem)));
    padding-bottom: 0;
    z-index: 2;
    box-sizing: border-box;
}
.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding-left: 134px;
    padding-right: 60px;
    max-width: 1440px;
    width: 100%;
    box-sizing: border-box;
}

/* Ecospots: Google Maps + Waze side by side */
.ecospot-nav-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 16px 20px;
    padding: 0 clamp(20px, 6vw, 100px);
    box-sizing: border-box;
}
.ecospot-nav-buttons > a {
    flex: 1 1 calc((100% - 20px) / 2);
    min-width: 0;
    box-sizing: border-box;
}
@media (max-width: 520px) {
    .ecospot-nav-buttons {
        flex-direction: column;
        padding-inline: 0;
    }
    .ecospot-nav-buttons > a {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
    }
}

/* Desktop ancho + poca altura (p. ej. 1334×627): más aire bajo el nav fijo */
@media (min-width: 1181px) and (max-height: 700px) {
    #hero-content.hero-content {
        padding-top: clamp(300px, 48vh + 52px, 420px) !important;
        padding-bottom: clamp(24px, 5vh, 56px) !important;
    }
    #hero-section {
        min-height: max(560px, calc(100svh - 96px));
    }
    #hero-inner.hero-inner {
        gap: 20px !important;
    }
    #hero-inner h1 {
        font-size: clamp(30px, 3.6vw, 48px) !important;
        line-height: 1.14 !important;
    }
}

/* Wide 13" laptops (≥1181px) with limited vertical chrome: default 323px top padding clips hero under overflow:hidden */
@media (min-width: 1181px) and (max-height: 840px) {
    #hero-content.hero-content,
    .hero-content {
        padding-top: clamp(148px, 15vh + 92px, 268px) !important;
        padding-bottom: clamp(10px, 3vh, 32px) !important;
    }
    #hero-section {
        min-height: max(480px, calc(100svh - 108px));
    }
    #hero-inner.hero-inner {
        gap: clamp(12px, 2.2vh, 20px) !important;
    }
    #hero-inner h1 {
        font-size: clamp(26px, 3.2vw, 48px) !important;
        line-height: 1.12 !important;
    }
}

/* Tablet / small laptop — nav density + hero vertical fit (e.g. 1144×682) */
@media (max-width: 1180px) and (min-width: 810px) {
    #site-nav-wrap {
        padding-top: 24px;
    }
    #site-nav {
        margin: 0 28px;
        max-width: calc(100% - 56px);
        height: 88px;
        padding: 0 22px;
        gap: 10px;
    }
    #site-nav > div:first-child img {
        height: 48px !important;
    }
    #site-nav > div:nth-child(2) {
        display: flex;
        align-items: center;
        gap: clamp(10px, 1.4vw, 22px);
        flex-shrink: 1;
        min-width: 0;
    }
    #site-nav > div:nth-child(2) a {
        font-size: 13px !important;
        font-weight: 500 !important;
        line-height: 1.25 !important;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        min-height: 1.25em;
    }
    #site-nav > button:first-of-type {
        padding: 8px 14px !important;
        font-size: 12px !important;
        line-height: 1.25 !important;
        border-radius: 32px !important;
        flex-shrink: 0;
    }
    /* Clear fixed nav: #site-nav-wrap padding-top (24) + #site-nav height (88) + comfortable gap */
    .hero-content {
        padding-top: max(172px, clamp(150px, 22vh, 260px)) !important;
        padding-bottom: 40px !important;
    }
    .hero-inner {
        padding-left: clamp(28px, 6vw, 72px) !important;
        padding-right: clamp(28px, 5vw, 48px) !important;
        gap: 18px !important;
    }
    #hero-inner p[data-anim] {
        max-width: min(620px, 92vw) !important;
    }
    #hero-inner div[data-delay="3"] {
        gap: 12px !important;
    }
    #hero-inner div[data-delay="3"] button {
        padding: 12px 20px !important;
    }
}

@media (max-width: 1180px) and (min-width: 810px) and (max-height: 760px) {
    #hero-section {
        min-height: max(600px, calc(100svh - 88px));
    }
    .hero-content {
        padding-top: max(172px, clamp(155px, 22vh, 240px)) !important;
        padding-bottom: 28px !important;
    }
    .hero-inner {
        gap: 14px !important;
    }
    #hero-inner h1 {
        font-size: clamp(28px, 3.2vw, 44px) !important;
        line-height: 1.12 !important;
    }
    #hero-inner p[data-anim] {
        font-size: 14px !important;
        line-height: 1.55 !important;
    }
    #hero-inner div[data-delay="3"] button {
        padding: 10px 18px !important;
        font-size: 13px !important;
    }
}

/* ── Stats bar ── */
#stats-bar {
    min-height: 120px;
    height: auto;
    padding-block: 14px 16px;
    box-sizing: border-box;
    background: #cef17b;
    border-top: 1px solid #0a3d30;
    border-bottom: 1px solid #0a3d30;
}
#stats-bar .section-inner {
    height: auto !important;
    align-items: center;
    row-gap: 10px;
}

/* ── B2B Desktop Carousel ── */
#b2b-section { background: #fff; }
#b2b-carousel {
    position: relative;
    width: 100%;
    height: 596px;
    overflow: hidden;
}
#b2b-carousel .carousel-slide {
    position: absolute; inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}
#b2b-carousel .carousel-slide.active { opacity: 1; }
#b2b-carousel .carousel-slide .slide-bg {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    transition: transform 0.6s ease;
}
#b2b-carousel .carousel-slide:hover .slide-bg { transform: scale(1.04); }
#b2b-carousel .carousel-slide .slide-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, #052f23 0%, rgba(5,47,35,0) 73%);
    pointer-events: none;
}
#b2b-carousel .slide-content {
    position: absolute;
    top: 0; left: 101px;
    width: 545px; height: 509px;
    display: flex; flex-direction: column;
    justify-content: center; gap: 16px;
    background: #def2ad;
    border: 1px solid #000;
    padding: 0 40px;
    box-sizing: border-box;
}
.carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 56px; height: 56px;
    border-radius: 50%; background: #fff;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 10; font-size: 28px; color: #052f23;
    transition: box-shadow .2s; font-family: 'Raleway', sans-serif;
}
.carousel-arrow:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.22); }
.carousel-arrow.prev { left: 32px; }
.carousel-arrow.next { right: 32px; }
.carousel-dots {
    position: absolute; bottom: 48px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 16px;
    background: rgba(217,217,217,0.25);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    border: 1px solid #6e6e6e;
    border-radius: 20px; padding: 0 14px; height: 40px;
    z-index: 10; box-shadow: 0 4px 4px rgba(0,0,0,0.25);
}
.carousel-dot {
    width: 14px; height: 14px; border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none; cursor: pointer; transition: background .3s;
}
.carousel-dot.active { background: #cef17b; }

/* ── Mobile carousel cards (hidden desktop) ── */
#b2b-cards-mobile { display: none; }

/* ── Sticky Stacking Cards ── */
.stacked-cards { position: relative; }
.s-card {
    position: sticky;
    border-radius: 36px;
    border: 1px solid #84b413;
    margin: 0 100px;
    overflow: hidden;
    transform-origin: top center;
    transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s ease;
}
.s-card:nth-child(1) { top: 96px; z-index: 10; background: #e2f7b0; }
.s-card:nth-child(2) { top: 108px; z-index: 20; background: #def2ad; margin-bottom: 0; }
.s-card:nth-child(3) { top: 120px; z-index: 30; background: #def2ad; }
.s-card+.s-card { margin-top: 24px; }
.stacked-cards-spacer { height: 60vh; }
.s-card-inner { display: flex; align-items: center; gap: 24px; padding: 72px 56px; min-height: 420px; }
.s-card-text { flex: 1; display: flex; flex-direction: column; gap: 16px; }
.s-card-img {
    flex-shrink: 0;
    width: clamp(300px,36%,500px);
    aspect-ratio: 3/2;
    border-radius: 24px;
    background-size: cover; background-position: center;
    opacity: 0; transform: translateX(32px) scale(0.97);
    transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1) 0.18s, transform 0.7s cubic-bezier(0.22,1,0.36,1) 0.18s;
}
.s-card-text > * {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.55s cubic-bezier(0.22,1,0.36,1), transform 0.55s cubic-bezier(0.22,1,0.36,1);
}
.s-card-text > *:nth-child(1) { transition-delay: 0.05s; }
.s-card-text > *:nth-child(2) { transition-delay: 0.15s; }
.s-card-text > *:nth-child(3) { transition-delay: 0.25s; }
.s-card-text > *:nth-child(4) { transition-delay: 0.35s; }
.s-card.card-visible .s-card-text > * { opacity: 1; transform: translateY(0); }
.s-card.card-visible .s-card-img { opacity: 1; transform: none; }

/* ── About section ── */
#about-section { background: #f5fce5; position: relative; }
.about-bg-wrap { position: relative; width: 100%; height: 690px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.about-bg-img { position: absolute; inset: 0; background: url('../images/aboutImg.webp') center/cover no-repeat; }
.about-bg-overlay { position: absolute; inset: 0; background: #052f2380; }
.about-card {
    position: relative; z-index: 2;
    background: #e6ecd6; border: 1px solid #000;
    padding: 48px 40px;
    width: calc(100% - 364px); max-width: 1104px;
}
.about-card-inner { display: flex; align-items: center; gap: 24px; }
.about-card-text { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.about-h2 { color: #000; font-size: clamp(28px,2.9vw,42px); font-weight: 800; line-height: 1.2; }
.about-p { color: #1b1b1b; font-size: 16px; line-height: 1.8; }
.about-card-illus { flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.about-values-bar {
    background: #0f8863; height: 120px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 100px;
    border-top: 1px solid #0a3d30; border-bottom: 1px solid #0a3d30;
}
.about-value-item { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; flex: 1; }
.about-value-title { color: #cef17b; font-size: 22px; font-weight: 700; font-family: 'Raleway', sans-serif; }
.about-value-desc { color: #fff; font-size: 12px; line-height: 1.5; font-family: 'Raleway', sans-serif; max-width: 200px; }

/* ── Newsletter/Contact ── */
#newsletter-section { background: #cef17b; padding: 80px 100px; }
.newsletter-inner { display: flex; flex-direction: column; gap: 24px; }
.newsletter-cols {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 24px;
    min-height: 360px;
    width: 100%;
}
.newsletter-left { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.news-form { display: flex; flex-direction: column; gap: 12px; width: 694px; max-width: 100%; align-self: flex-start; }
.newsletter-right {
    flex-shrink: 0;
    margin-left: auto;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    align-self: flex-start;
}
.news-illus-desktop { display: block; }
.news-illus-mobile  { display: none !important; }
.news-form .row2 { display: flex; gap: 12px; }
.news-input {
    background: #fff; border: 2px solid #0f8863;
    border-radius: 40px; padding: 0 24px; height: 52px;
    font-family: 'Raleway', sans-serif; font-size: 15px; color: #0f8863;
    outline: none; width: 100%;
}
.news-textarea {
    background: #fff; border: 2px solid #0f8863;
    border-radius: 24px; padding: 16px 24px; height: 120px;
    font-family: 'Raleway', sans-serif; font-size: 15px; color: #0f8863;
    outline: none; width: 100%; resize: none;
}
.news-btn-wrap { display: flex; align-items: center; width: 100%; padding-top: 12px; }
.news-btn {
    background: #084734; border: none; border-radius: 40px;
    padding: 0 48px; height: 52px; cursor: pointer;
    font-family: 'Raleway', sans-serif; font-size: 15px; font-weight: 700; color: #cef17b;
    transition: transform .15s; width: 100%;
}
.news-btn:hover { transform: scale(1.02); }
.news-input.is-invalid,
.news-textarea.is-invalid {
    border-color: #c62828 !important;
    background: #fff6f6;
}
.news-alert {
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid transparent;
    font-weight: 600;
    border-radius: 10px;
}
.news-alert--ok {
    background: #d8f7bf;
    border-color: #84b413;
    color: #084734;
}
.news-alert--error {
    background: #ffe9e9;
    border-color: #ff8f8f;
    color: #8c1f1f;
}
.news-btn[disabled] {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none !important;
}

/* ── Blur word animation ── */
.blur-word {
    display: inline-block; margin-right: 0.28em;
    transition: filter 0.3s ease-out, opacity 0.3s ease-out;
}

/* ── Pain card icon desktop ── */
.pain-icon { display: block; }

/* ── Material cards ── */
.mat-card { transition: transform 0.2s ease, box-shadow 0.2s ease; cursor: default; }
.mat-card:hover { transform: translateY(-8px); box-shadow: 0 12px 28px rgba(14,135,99,0.18); }

/* ── Blog cards ── */
.blog-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.blog-card:hover { transform: translateY(-5px); box-shadow: 0 10px 28px rgba(0,0,0,0.12); }

/* ── Layout ── */
.page-wrap { width: 100%; }
.section-inner { max-width: 1440px; margin: 0 auto; }

/* ── Hamburger ── */
#hamburger-btn {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 4px; z-index: 1001;
}
#hamburger-btn span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: all 0.3s ease; }
#hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#hamburger-btn.open span:nth-child(2) { opacity: 0; }
#hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Menu Overlay ── */
#mobile-menu {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5,47,35,0.97); backdrop-filter: blur(8px);
    z-index: 999; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 36px;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
#mobile-menu.open { opacity: 1; pointer-events: all; }
#mobile-menu a { color: #fff; font-size: 24px; font-weight: 600; text-decoration: none; font-family: 'Raleway', sans-serif; transition: color 0.2s; }
#mobile-menu a:hover { color: #cef17b; }
#mobile-menu .menu-cta { background: #cef17b; padding: 16px 40px; border-radius: 40px; border: none; cursor: pointer; font-family: 'Raleway', sans-serif; font-size: 16px; font-weight: 700; color: #084734; margin-top: 12px; }
#mobile-menu-close {
    position: absolute; top: 24px; right: 24px;
    background: none; border: none; cursor: pointer;
    padding: 8px; line-height: 0; opacity: .8; transition: opacity .2s;
}
#mobile-menu-close:hover { opacity: 1; }

/* ── WhatsApp float ── */
.whatsapp-float {
    position: fixed; width: 60px; height: 60px;
    bottom: 40px; right: 40px;
    background-color: #25d366; color: #FFF;
    border-radius: 50px; text-align: center; font-size: 30px;
    box-shadow: 0 0 20px rgba(37,211,102,0.4); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    animation: pulse-whatsapp 2s infinite;
}
.whatsapp-float::before {
    content: "Contactar en WhatsApp";
    position: absolute; right: 75px;
    background: #fff; color: #052f23;
    padding: 10px 16px; border-radius: 20px;
    font-size: 14px; font-family: 'Raleway', sans-serif; font-weight: 700;
    white-space: nowrap; opacity: 0; pointer-events: none;
    transform: translateX(10px);
    transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.whatsapp-float:hover::before { opacity: 1; transform: translateX(0); }
.whatsapp-float:hover { background-color: #1ebe57; }
@keyframes pulse-whatsapp {
    0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(37,211,102,0.6); }
    50%  { transform: scale(1.02); box-shadow: 0 0 0 20px rgba(37,211,102,0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ═══════════════════════════════════
   MOBILE — ≤ 809px
   ═══════════════════════════════════ */
@media (max-width: 809px) {
    #site-nav-wrap { padding-top: 32px !important; }
    #site-nav { margin: 0 22px !important; max-width: calc(100% - 44px) !important; height: 80px !important; padding: 0 20px !important; }
    #site-nav > div:nth-child(2), #site-nav > button:nth-of-type(1) { display: none !important; }
    #hamburger-btn { display: flex !important; }
    #hero-section { height: 703px !important; min-height: 703px !important; }
    .hero-gradient-overlay { background: linear-gradient(6deg, #bfed5266 0%, #bfed5200 84%) !important; }
    #hero-content { align-items: flex-start !important; justify-content: flex-start !important; padding-top: 172px !important; padding-bottom: 0 !important; }
    #hero-inner { align-items: flex-start !important; padding-left: 22px !important; padding-right: 22px !important; text-align: left !important; }
    #hero-inner > div:first-child { align-items: flex-start !important; }
    #hero-inner h1 { text-align: left !important; }
    #hero-inner p[data-anim] { font-size: 16px !important; max-width: 100% !important; text-align: left !important; }
    #hero-inner div[data-delay="3"] { flex-direction: column !important; width: 100% !important; }
    #hero-inner div[data-delay="3"] button { width: 100% !important; }
    #stats-bar {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding-block: 20px !important;
    }
    #stats-bar .section-inner {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        padding: 0 22px !important;
        gap: 20px !important;
        align-items: stretch !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        animation: none !important;
    }
}

@media (max-width: 1440px) and (min-width: 1181px) {
    /* Remove max-width so inner container fills viewport — enables vw scaling */
    #propuesta-valor-section > div:last-child { max-width: 100% !important; }
    /* Scale ALL horizontal positions proportionally: value/1440*100 vw */
    #propuesta-valor-section > div:first-child { left: -27.99vw !important; width: 62.15vw !important; } /* blob */
    #b2b-headline { left: 8.33vw !important; width: 47.01vw !important; }
    #b2b-stat-pct { left: 86.53vw !important; } /* 1246/1440 */
    #b2b-stat-desc { left: 64.72vw !important; width: 29.51vw !important; } /* 932/1440, 425/1440 */
    /* Photo is now nth-child(4) since stat split into 2 divs */
    #propuesta-valor-section > div:last-child > div:nth-child(4) { left: 4.79vw !important; width: 38.96vw !important; } /* photo */
    #service-cards-grid { left: 37.01vw !important; width: 59.03vw !important; }
    #service-cards-grid > div:first-child > div:first-child { width: 22.08vw !important; } /* card 1 fixed width: 318/1440 */
    #propuesta-valor-section > div:last-child > div:nth-child(6) { left: 14.44vw !important; width: 19.72vw !important; } /* stat card */
    #propuesta-valor-section > div:last-child > div:nth-child(7) { left: 8.33vw !important; width: 31.88vw !important; } /* CTA */
}

@media (max-width: 1180px) {
    /* Propuesta valor: stacked mobile layout */
    #propuesta-valor-section { min-height: unset !important; overflow: visible !important; }
    #propuesta-valor-section > div:first-child { display: none !important; }
    #propuesta-valor-section > div:last-child {
        height: auto !important; overflow: visible !important;
        display: flex !important; flex-direction: column !important;
        align-items: stretch !important; padding: 0 !important;
        gap: 0 !important; box-sizing: border-box !important;
    }
    #propuesta-valor-section > div:last-child > div {
        position: relative !important; left: auto !important; top: auto !important;
        right: auto !important; bottom: auto !important; width: 100% !important;
        box-sizing: border-box !important;
    }
    /* 1. Employee photo — first and full-width */
    #propuesta-valor-section > div:last-child > div:nth-child(4) {
        order: 1; height: 340px !important;
    }
    /* 2. Stat card NACIONAL — right below photo */
    #propuesta-valor-section > div:last-child > div:nth-child(6) {
        order: 2; height: auto !important; padding: 18px 20px !important;
        box-shadow: none !important; border-radius: 0 !important;
    }
    /* 3. CTA button */
    #propuesta-valor-section > div:last-child > div:nth-child(7) {
        order: 3; padding: 16px 20px 0 !important;
    }
    #propuesta-valor-section > div:last-child > div:nth-child(7) button { width: 100% !important; }
    /* 4. Headline — shown below with padding */
    #b2b-headline { order: 4; padding: 28px 20px 20px !important; overflow: visible !important; }
    #b2b-headline > div:first-child { position: relative !important; top: auto !important; margin-bottom: 8px !important; }
    #b2b-headline h2 { font-size: 22px !important; }
    #b2b-headline p { font-size: 15px !important; }
    /* Hide 98% stats on mobile — redundant with service cards */
    #b2b-stat-pct { display: none !important; }
    #b2b-stat-desc { display: none !important; }
    /* Hide service cards on mobile — too complex, shown in other sections */
    #service-cards-grid { display: none !important; }
    /* B2B CTA banner responsive — text top, truck bottom-right */
    #b2b-cta-banner {
        height: auto !important; min-height: 520px !important;
        border-top: none !important; clip-path: none !important;
        overflow: hidden !important; padding-bottom: 200px !important;
        box-sizing: border-box !important;
    }
    #b2b-cta-banner .banner-container {
        max-width: 100% !important; height: auto !important;
        box-sizing: border-box !important; position: relative !important;
    }
    #b2b-cta-banner .truck-wrapper {
        position: absolute !important;
        bottom: -200px !important; top: auto !important;
        right: -60px !important; left: auto !important;
        width: 500px !important; height: 266px !important;
        z-index: 0 !important;
    }
    #b2b-cta-banner .banner-gradient-mask { display: none !important; }
    #b2b-cta-banner .section-inner {
        position: relative !important; top: auto !important; left: auto !important;
        transform: none !important; padding: 40px 20px 0 !important;
        width: 100% !important; max-width: 100% !important;
        box-sizing: border-box !important; display: flex !important;
        flex-direction: column !important; align-items: flex-start !important;
    }
    #b2b-cta-banner .section-inner > div { display: flex !important; flex-direction: column !important; align-items: flex-start !important; width: 100% !important; box-sizing: border-box !important; }
    #b2b-cta-banner .section-inner h2:first-child { font-size: 24px !important; }
    #b2b-cta-banner .section-inner h2:nth-child(2) { font-size: 30px !important; }
    #b2b-cta-banner .section-inner p { font-size: 15px !important; margin-top: 10px !important; max-width: 100% !important; }
    #b2b-cta-banner .section-inner a { width: 100% !important; justify-content: center !important; margin-top: 12px !important; box-sizing: border-box !important; padding: 14px 20px !important; }
    /* Método de trabajo: stack cards */
    #metodo-section { padding: 40px 20px 40px !important; }
    #metodo-section > div:first-child { flex-direction: column !important; gap: 16px !important; padding: 40px 0 32px !important; }
    #metodo-section > div:last-child { flex-direction: column !important; height: auto !important; }
    #metodo-section > div:last-child > div { height: 460px !important; }
}

@media (max-width: 860px) {
    #b2b-cta-banner .truck-wrapper { width: 400px !important; height: 213px !important; right: -40px !important; bottom: -200px !important; top: auto !important; }
}
@media (max-width: 480px) {
    #b2b-cta-banner { padding-bottom: 180px !important; }
    #b2b-cta-banner .truck-wrapper { width: 340px !important; height: 181px !important; right: -20px !important; bottom: -180px !important; }
}

@media (max-width: 469px) {
    #pain-cards-col > div { flex: 0 0 calc(100vw - 40px) !important; max-width: none !important; }
}


@media (max-width: 768px) {
    /* Ecospots */
    #ecospots { padding: 40px 16px !important; border-radius: 0 !important; }
    #ecospots > div { padding: 0 !important; flex-direction: column !important; }
    #ecospots .ecospot-photo img { max-height: 240px !important; }
    #ecospots > div > div[style*="height:267px"] { height: 180px !important; }
    #ecospots .ecospot-nav-buttons { padding-inline: 0 !important; }
    #materiales .section-inner { padding: 40px 16px !important; }
    #materiales h2 { font-size: 32px !important; }
    #materiales > div > div:last-child { grid-template-columns: repeat(2,1fr) !important; gap: 16px !important; }
    #about-section { background: #f5fce5 !important; }
    .about-bg-wrap { height: auto !important; min-height: unset !important; background: #f5fce5 !important; }
    .about-bg-img, .about-bg-overlay { display: none !important; }
    .about-card { position: static !important; width: calc(100% - 32px) !important; margin: 20px 16px !important; padding: 16px !important; border-radius: 0 !important; }
    .about-card-inner { flex-direction: column !important; gap: 16px !important; }
    .about-card-illus { width: 100% !important; justify-content: center !important; }
    .about-card-illus img { width: 100% !important; max-width: 360px !important; }
    .about-h2 { font-size: 28px !important; }
    .about-values-bar { padding: 20px 16px !important; height: auto !important; flex-direction: column !important; gap: 20px !important; justify-content: center !important; }
    .about-value-title { font-size: 16px !important; }
    #newsletter-section { padding: 60px 20px !important; }
    .newsletter-cols { flex-direction: column !important; align-items: stretch !important; gap: 0 !important; }
    .news-illus-desktop { display: none !important; }
    .news-illus-mobile  { display: block !important; width: 100% !important; max-width: 344px !important; }
    .newsletter-right { display: flex !important; justify-content: center !important; align-items: center !important; align-self: auto !important; margin-top: 24px !important; overflow: visible !important; }
    .news-form { width: 100% !important; align-self: auto !important; }
    .news-form .row2 { flex-direction: column !important; }
    #recursos .section-inner { padding: 40px 16px !important; }
    #recursos > div > div:first-child { flex-direction: column !important; gap: 20px !important; }
    #recursos > div > div:last-child { flex-direction: column !important; }
    .blog-card { min-width: auto !important; width: 100% !important; }
    #footer { padding: 40px 16px !important; }
    #footer > div > div:first-child { flex-direction: column !important; gap: 40px !important; }
    #footer > div > div:last-child { flex-direction: column !important; gap: 16px !important; }
}

/* ── Accessibility: focus-visible ──────────────────────────── */
:focus-visible {
    outline: 3px solid #3de9b5;
    outline-offset: 2px;
}

/* ── Scroll margin for anchored sections ────────────────────── */
section[id] {
    scroll-margin-top: 120px;
}

/* ── Prefers-reduced-motion: hide autoplay video ────────────── */
@media (prefers-reduced-motion: reduce) {
    .hero-video-wrap video {
        display: none;
    }
    #hero-section {
        background-image: url('../images/poster.jpg');
        background-size: cover;
        background-position: center;
    }
}
