/* ── Affiliate Hero Block ── */

.affiliate-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0;
    background:
        linear-gradient(172.6deg, rgba(245,56,56,.1) 4.33%, rgba(253,183,89,.1) 36.56%, rgba(255,212,96,.1) 43.83%, rgba(250,244,231,.1) 99.14%),
        #faf4e7;
    box-shadow: inset 0 39px 63px -4px rgba(250,244,231,.5);
}

/* Warm glow at the bottom */
.affiliate-hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 86%;
    height: 270px;
    background: radial-gradient(ellipse 60% 100% at 50% 100%, rgba(247,118,31,.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Diagonal light sweep */
.affiliate-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(63.79deg, rgba(255,212,96,.35) 2.77%, rgba(253,162,47,.35) 84.31%, rgba(245,56,56,.35) 94.45%);
    mask-image: linear-gradient(135deg, transparent 20%, rgba(0,0,0,.25) 45%, transparent 63%);
    pointer-events: none;
    z-index: 0;
}

/* ── Layout ── */

.affiliate-hero .container {
    position: relative;
    z-index: 1;
}

.affiliate-hero__content {
    max-width: 716px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ── Mascot (absolute, desktop only) ── */

.affiliate-hero__mascot {
    position: absolute;
    right: max(0px, calc((100% - 1640px) / 2));
    bottom: 0;
    /* width: clamp(280px, 25vw, 362px); */
    width: clamp(280px, 25vw, 500px);
    z-index: 1;
    pointer-events: none;
    display: none;
    height: auto;
    width: 500px;
}

.affiliate-hero__mascot img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: bottom right;
}

@media (min-width: 1200px) {
    .affiliate-hero__mascot {
        display: block;
    }
}

/* ── Badge ── */

.affiliate-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 16px;
    border: 1px solid #ff8181;
    border-radius: 58px;
    background: linear-gradient(183.45deg, rgba(255,129,129,.2) 0%, rgba(253,176,87,.2) 100%);
    margin-bottom: 32px;
    flex-shrink: 0;
}

.affiliate-hero__badge-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: block;
}

.affiliate-hero__badge span {
    font-family: Nunito, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.1;
    color: #f7761f;
    white-space: nowrap;
}

.affiliate-hero__badge span strong,
.affiliate-hero__badge span b {
    font-weight: 800;
}

/* ── Title ── */

.affiliate-hero__title {
    font-family: "GT Flexa", sans-serif;
    font-size: 48px;
    font-weight: 700;
    font-style: normal;
    line-height: 53px;
    letter-spacing: 0;
    text-transform: capitalize;
    text-align: center;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.affiliate-hero__title-dark {
    color: #2d4059;
    display: block;
}

.affiliate-hero__title-orange {
    color: #f7761f;
    display: block;
}

/* ── Subtitle ── */

.affiliate-hero__subtitle {
    font-family: Figtree, sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 32px;
    color: #505869;
    text-align: center;
    margin: 0 0 16px;
    max-width: 598px;
}

.affiliate-hero__subtitle strong,
.affiliate-hero__subtitle b {
    font-weight: 700;
    color: #f7761f;
}

/* ── Note ── */

.affiliate-hero__note {
    font-family: Figtree, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
    color: #2d4059;
    text-align: center;
    margin: 0 0 32px;
}

/* ── Counter box ── */

.affiliate-hero__counter {
    position: relative;
    width: 100%;
    margin-bottom: 32px;
}

.affiliate-hero__counter-box {
    position: relative;
    width: 100%;
    height: 200px;
    border: 1px solid #f7761f;
    border-radius: 8px;
    background: linear-gradient(0.15deg, rgba(255,129,129,.15) 67.29%, rgba(253,176,87,.15) 125.44%);
    box-shadow:
        0 8px 9.4px 0 rgba(255,125,34,.04),
        0 33px 26.1px 0 rgba(255,142,63,.03),
        0 -8px 9.4px 0 rgba(255,125,34,.04),
        0 -33px 26.1px 0 rgba(255,142,63,.03);
    overflow: hidden;
}

.affiliate-hero__counter-corners {
    position: absolute;
    inset: 16px;
    width: calc(100% - 32px);
    height: calc(100% - 32px);
    display: block;
    pointer-events: none;
}

.affiliate-hero__counter-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px;
    text-align: center;
}

.affiliate-hero__counter-pre {
    font-family: Figtree, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.1;
    color: #2d4059;
    margin: 0;
    white-space: nowrap;
}

/* Counter number — hidden until JS fires animation */
.affiliate-hero__counter-number {
    font-family: "GT Flexa", sans-serif;
    font-size: 64px;
    font-weight: 700;
    font-style: normal;
    line-height: 53px;
    text-transform: capitalize;
    color: #2d4059;
    white-space: nowrap;
    opacity: 0;
    transform: scale(0.85);
    font-variant-numeric: tabular-nums;
}

/* "and counting!" — hidden until animation fires */
.affiliate-hero__counter-post {
    font-family: Figtree, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.1;
    color: #f7761f;
    margin: 0;
    opacity: 0;
    transform: translateY(8px);
}

/* Animate when JS adds .is-animated to parent */
.affiliate-hero__counter-content.is-animated .affiliate-hero__counter-number {
    animation: affHeroCountIn 0.5s ease forwards;
}

.affiliate-hero__counter-content.is-animated .affiliate-hero__counter-post {
    animation: affHeroFadeUp 0.5s ease 0.25s forwards;
}

@keyframes affHeroCountIn {
    to { opacity: 1; transform: scale(1); }
}

@keyframes affHeroFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Fallback: show statically if JS is disabled */
.no-js .affiliate-hero__counter-number,
.no-js .affiliate-hero__counter-post {
    opacity: 1;
    transform: none;
}

/* ── Buttons ── */

.affiliate-hero .affiliate-hero__btns {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

/* Base — stronger selectors with tag + parent */
.affiliate-hero .affiliate-hero__btns a.affiliate-hero__btn,
section.affiliate-hero a.affiliate-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    border-radius: 6px;
    font-family: Figtree, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: .032px;
    text-decoration: none;
    white-space: nowrap;
    transition: box-shadow .25s, background-color .25s, color .25s, border-color .25s;
    cursor: pointer;
}

/* Primary */
.affiliate-hero .affiliate-hero__btns a.affiliate-hero__btn--primary,
section.affiliate-hero a.affiliate-hero__btn--primary,
.affiliate-hero .affiliate-hero__btns a.affiliate-hero__btn--primary:link,
.affiliate-hero .affiliate-hero__btns a.affiliate-hero__btn--primary:visited {
    background-color: #3978f2;
    color: #fff;
    border: none;
}

.affiliate-hero .affiliate-hero__btns a.affiliate-hero__btn--primary:hover,
.affiliate-hero .affiliate-hero__btns a.affiliate-hero__btn--primary:focus {
    background-color: #2a69e8;
    box-shadow: 0 0 12px 0 rgba(57,120,242,.5);
    color: #fff;
}

.affiliate-hero__btn-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Outline / Secondary */
.affiliate-hero .affiliate-hero__btns a.affiliate-hero__btn--outline,
section.affiliate-hero a.affiliate-hero__btn--outline,
.affiliate-hero .affiliate-hero__btns a.affiliate-hero__btn--outline:link,
.affiliate-hero .affiliate-hero__btns a.affiliate-hero__btn--outline:visited {
    background-color: transparent;
    color: #3978f2;
    border: 1px solid #3978f2;
}

.affiliate-hero .affiliate-hero__btns a.affiliate-hero__btn--outline:hover,
.affiliate-hero .affiliate-hero__btns a.affiliate-hero__btn--outline:focus {
    background-color: #3978f2;
    color: #fff;
    box-shadow: 0 0 12px 0 rgba(57,120,242,.5);
}

/* ── Dashboard link ── */

.affiliate-hero .affiliate-hero__dashboard-link {
    font-family: Figtree, sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 32px;
    color: #f7761f;
    text-align: center;
    margin: 0;
}

.affiliate-hero .affiliate-hero__dashboard-link a,
.affiliate-hero .affiliate-hero__dashboard-link a:link,
.affiliate-hero .affiliate-hero__dashboard-link a:visited {
    color: #f7761f;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity .2s;
}

.affiliate-hero .affiliate-hero__dashboard-link a:hover {
    opacity: .75;
    text-decoration: underline;
}

@media (max-width: 1540px) {
    .affiliate-hero__mascot {
        right: -100px;
    }
}
@media (max-width: 1400px) {
    .affiliate-hero__mascot { 
        width: 450px;
    }
}
/* ── Tablet ── */

@media (max-width: 991px) {
    .affiliate-hero {
        padding: 56px 0;
    }

    .affiliate-hero__title {
        font-size: 40px;
        line-height: 46px;
    }

    .affiliate-hero__subtitle {
        font-size: 20px;
        line-height: 28px;
    }

    .affiliate-hero__counter-number {
        font-size: 52px;
        line-height: 1;
    }

    .affiliate-hero__counter-pre {
        white-space: normal;
    }
}

/* ── Mobile ── */

@media (max-width: 767px) {
    .affiliate-hero {
        padding: 60px 0 48px;
    }

    .affiliate-hero__title {
        font-size: 32px;
        line-height: 36px;
        margin-bottom: 16px;
    }

    .affiliate-hero__subtitle {
        font-size: 17px;
        font-weight: 500;
        line-height: 26px;
        max-width: 100%;
        margin-bottom: 12px;
    }

    .affiliate-hero__subtitle strong,
    .affiliate-hero__subtitle b {
        font-weight: 800;
    }

    .affiliate-hero__note {
        margin-bottom: 32px;
    }

    .affiliate-hero__counter-number {
        font-size: 48px;
        line-height: 53px;
    }

    .affiliate-hero__counter-pre {
        white-space: normal;
        font-weight: 400;
    }

    .affiliate-hero .affiliate-hero__btns {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .affiliate-hero .affiliate-hero__btns a.affiliate-hero__btn,
    section.affiliate-hero a.affiliate-hero__btn {
        width: 100%;
        justify-content: center;
    }

    .affiliate-hero .affiliate-hero__dashboard-link {
        font-size: 16px;
        font-weight: 500;
    }
}

@media (max-width: 480px) {
    .affiliate-hero__counter-content {
        gap: 16px;
    }

    .affiliate-hero__counter-number {
        font-size: 40px;
        line-height: 1.1;
    }
}
