/* =========================================================
   APF Halloween 2026 theme
========================================================= */

body.apf-halloween-active {
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 140, 0, 0.08), transparent 38%),
        #09090b;
}

body.apf-halloween-active #beams-container {
    opacity: 0.65;
}

/* =========================================================
   Header seasonality
========================================================= */

body.apf-halloween-active .apf-header {
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

/* Keep the topbar overflow visible: the APF network app menu
   is absolutely positioned below it on desktop. */
body.apf-halloween-active .apf-topbar {
    position: relative;
    overflow: visible;
}

body.apf-halloween-active .main-nav {
    position: relative;
    overflow: hidden;
}

body.apf-halloween-active .apf-topbar {
    background:
        radial-gradient(circle at 9% 20%, rgba(255, 137, 25, 0.12), transparent 18%),
        radial-gradient(circle at 90% 10%, rgba(212, 175, 55, 0.1), transparent 16%),
        linear-gradient(180deg, #101014 0%, #09090b 100%);
}

body.apf-halloween-active .apf-topbar::before,
body.apf-halloween-active .main-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

body.apf-halloween-active .apf-topbar::before {
    background:
        radial-gradient(circle at 0 0, rgba(255, 149, 0, 0.08), transparent 22%),
        radial-gradient(circle at 100% 0, rgba(255, 149, 0, 0.06), transparent 18%);
}

body.apf-halloween-active .main-nav {
    border-top: 1px solid rgba(255, 168, 61, 0.16);
    border-bottom: 1px solid rgba(255, 168, 61, 0.16);
    background:
        linear-gradient(180deg, rgba(10, 10, 14, 0.95), rgba(6, 6, 10, 0.98));
}

body.apf-halloween-active .main-nav::before {
    background:
        linear-gradient(90deg, transparent, rgba(255, 173, 72, 0.18), transparent);
    opacity: 0.5;
}

body.apf-halloween-active .apf-topbar::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 173, 72, 0.68), transparent);
    box-shadow: 0 0 22px rgba(255, 143, 25, 0.3);
    pointer-events: none;
}

body.apf-halloween-active .apf-market-tab.is-active,
body.apf-halloween-active .nav-links a:hover,
body.apf-halloween-active .nav-links a.active {
    box-shadow: 0 0 18px rgba(255, 143, 25, 0.18);
}

/* =========================================================
   Homepage hero banner
========================================================= */

.apf-halloween-hero {
    margin: 0 auto 26px;
}

.apf-halloween-hero__visual {
    position: relative;
    min-height: 290px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.36);
    border-radius: 32px;
    background:
        linear-gradient(90deg, rgba(11, 11, 14, 0.96) 0%, rgba(11, 11, 14, 0.86) 30%, rgba(11, 11, 14, 0.45) 58%, rgba(11, 11, 14, 0.06) 100%),
        linear-gradient(180deg, rgba(255, 180, 84, 0.06), rgba(0, 0, 0, 0.14)),
        url('/img/halloween/apf-halloween-hero-en-2026.webp') center center / cover no-repeat;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 28px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.02);
}

.apf-halloween-hero__visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 23% 38%, rgba(255, 162, 66, 0.12), transparent 20%),
        linear-gradient(0deg, rgba(7, 7, 10, 0.48), rgba(7, 7, 10, 0.08));
    pointer-events: none;
}

.apf-halloween-hero__visual::after {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    pointer-events: none;
}

.apf-halloween-hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 290px;
    width: min(100%, 620px);
    margin-inline-start: 0;
    margin-inline-end: auto;
    padding: 38px 42px 34px;
    text-align: left;
}

.apf-halloween-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #ffbf63;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 3px;
}

.apf-halloween-hero__eyebrow::before,
.apf-halloween-hero__eyebrow::after {
    content: "✦";
    color: #d4af37;
    font-size: 11px;
}

.apf-halloween-hero__content h2 {
    margin: 0;
    color: #fff4df;
    font-size: clamp(32px, 3vw, 46px);
    line-height: 1.18;
    font-weight: 900;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.35);
}

.apf-halloween-hero__content p {
    max-width: 520px;
    margin: 14px 0 0;
    color: #f3e4cd;
    font-size: 15px;
    line-height: 1.75;
    font-weight: 700;
}

.apf-halloween-hero__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 24px;
}

.apf-halloween-hero__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 0 28px;
    color: #120d05;
    border: 1px solid rgba(255, 206, 138, 0.5);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffbf63 0%, #f0a329 100%);
    box-shadow:
        0 12px 32px rgba(238, 147, 25, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
    text-decoration: none;
    font-size: 16px;
    font-weight: 900;
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.apf-halloween-hero__actions a:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 16px 34px rgba(238, 147, 25, 0.28);
}

.apf-halloween-hero__actions small {
    color: rgba(255, 239, 214, 0.78);
    font-size: 12px;
    font-weight: 800;
}

/* =========================================================
   Homepage offer cards seasonal styling
========================================================= */

body.apf-halloween-active .apf-home-offers {
    border-color: rgba(255, 170, 70, 0.24);
    background:
        radial-gradient(circle at 88% 4%, rgba(255, 149, 0, 0.18), transparent 30%),
        radial-gradient(circle at 14% 100%, rgba(212, 175, 55, 0.08), transparent 22%),
        linear-gradient(145deg, #181318, #0f0d12 70%);
}

body.apf-halloween-active .apf-home-offers-head span {
    color: #ffbf63;
}

body.apf-halloween-active .apf-home-offer-card {
    position: relative;
    min-height: 102px;
    padding: 11px;
    overflow: hidden;
    border-color: rgba(255, 174, 78, 0.2);
    border-radius: 18px;
    background:
        linear-gradient(155deg, rgba(255, 142, 0, 0.12), rgba(255, 142, 0, 0.02) 34%, transparent 35%),
        linear-gradient(145deg, #1a1211, #0e0c10 72%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 10px 24px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

body.apf-halloween-active .apf-home-offer-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 100% 0, rgba(255, 187, 94, 0.12), transparent 24%),
        radial-gradient(circle at 0 100%, rgba(212, 175, 55, 0.05), transparent 18%);
    pointer-events: none;
}

body.apf-halloween-active .apf-home-offer-card::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 20px;
    bottom: 20px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 164, 58, 0), rgba(255, 164, 58, 0.95), rgba(212, 175, 55, 0));
    opacity: 0.8;
}

body.apf-halloween-active .apf-home-offer-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 182, 89, 0.4);
    box-shadow:
        0 16px 32px rgba(0, 0, 0, 0.32),
        0 0 24px rgba(255, 149, 0, 0.08);
}

body.apf-halloween-active .apf-home-offer-card--halloween {
    padding-top: 32px;
}

.apf-home-offer-badge {
    position: absolute;
    inset-inline-start: 10px;
    top: 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
    padding: 0 9px;
    color: #120d05;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffc975, #f0a329);
    box-shadow: 0 8px 16px rgba(240, 163, 41, 0.16);
    font-size: 8px;
    font-weight: 900;
    z-index: 1;
}

body.apf-halloween-active .apf-home-offer-company > div > small {
    color: #c4b39e;
}

body.apf-halloween-active .apf-home-offer-company > div > span {
    color: #f0e5d2;
}

body.apf-halloween-active .apf-home-offer-logo {
    background: linear-gradient(145deg, #0b0a0d, #151016);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 12px 26px rgba(0, 0, 0, 0.25);
}

body.apf-halloween-active .apf-home-offer-deal > strong {
    color: #ffbf63;
}

body.apf-halloween-active .apf-home-offer-deal > button,
body.apf-halloween-active .apf-home-offer-deal > small {
    color: #fff3de;
    border-color: rgba(255, 183, 88, 0.28);
    background: rgba(255, 153, 30, 0.08);
}

body.apf-halloween-active .apf-home-offer-deal > button:hover {
    color: #120d05;
    background: linear-gradient(180deg, #ffc975, #f0a329);
}

body.apf-halloween-active .apf-home-offer-claim {
    color: #120d05;
    border-color: rgba(255, 206, 138, 0.44);
    background: linear-gradient(180deg, #ffc975, #f0a329);
    box-shadow: 0 10px 18px rgba(240, 163, 41, 0.16);
}

body.apf-halloween-active .apf-home-offer-claim:hover {
    filter: brightness(1.06);
}

/* =========================================================
   Promos page heading and filters
========================================================= */

body.apf-halloween-active .promos-page-heading {
    position: relative;
    width: min(1460px, calc(100% - 34px));
    margin: 18px auto 18px;
    padding: 38px 36px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.32);
    border-radius: 30px;
    background:
        linear-gradient(90deg, rgba(12, 12, 16, 0.98), rgba(12, 12, 16, 0.92) 26%, rgba(12, 12, 16, 0.58) 54%, rgba(12, 12, 16, 0.2) 100%),
        url('/img/halloween/apf-halloween-hero-en-2026.webp') center center / cover no-repeat;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 28px 60px rgba(0, 0, 0, 0.26);
}

body.apf-halloween-active .promos-page-heading::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(11, 11, 14, 0.3), rgba(11, 11, 14, 0.05));
    pointer-events: none;
}

body.apf-halloween-active .promos-page-heading > * {
    position: relative;
    z-index: 1;
}

body.apf-halloween-active .promos-page-heading > span {
    color: #ffbf63;
    font-size: 13px;
    letter-spacing: 3px;
}

body.apf-halloween-active .promos-page-heading h1 {
    color: #fff4df;
}

body.apf-halloween-active .promos-page-heading p {
    color: #ead8c0;
}

body.apf-halloween-active .promos-directory-toolbar {
    border-color: rgba(255, 179, 81, 0.18);
    background:
        radial-gradient(circle at 90% -10%, rgba(255, 149, 0, 0.12), transparent 28%),
        linear-gradient(145deg, #181318, #0f0d12 72%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.apf-halloween-active .promos-search-control,
body.apf-halloween-active .promos-select-control {
    border-color: rgba(255, 182, 89, 0.12);
    background: rgba(10, 8, 10, 0.82);
}

body.apf-halloween-active .promos-results-count {
    background: rgba(255, 149, 0, 0.06);
}

/* =========================================================
   Promotions cards seasonal styling
========================================================= */

body.apf-halloween-active .promos-v2 .promo-firm-group {
    border-color: rgba(255, 179, 81, 0.2);
    background:
        radial-gradient(circle at 95% -8%, rgba(255, 149, 0, 0.12), transparent 32%),
        linear-gradient(145deg, #181318, #0f0d12 72%);
}

body.apf-halloween-active .promos-v2 .promo-card {
    position: relative;
    padding-top: 14px;
}

body.apf-halloween-active .promos-v2 .promo-card--halloween {
    padding-top: 42px;
}

body.apf-halloween-active .promos-v2 .promo-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 100% 0, rgba(255, 187, 94, 0.1), transparent 24%),
        radial-gradient(circle at 0 100%, rgba(212, 175, 55, 0.05), transparent 18%);
    pointer-events: none;
}

.promo-halloween-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 10px;
    color: #120d05;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffc975, #f0a329);
    box-shadow: 0 10px 20px rgba(240, 163, 41, 0.16);
    font-size: 9px;
    font-weight: 900;
    z-index: 2;
}

body.apf-halloween-active .promos-v2 .promo-logo-link,
body.apf-halloween-active .promos-v2 .promo-logo {
    border-radius: 18px;
}

body.apf-halloween-active .promos-v2 .promo-company h3 a,
body.apf-halloween-active .promos-v2 .promo-company h3 a:visited {
    color: #fff;
}

body.apf-halloween-active .promos-v2 .promo-company p,
body.apf-halloween-active .promos-v2 .promo-extra-kicker,
body.apf-halloween-active .promos-v2 .promo-countdown {
    color: #dac9b1;
}

body.apf-halloween-active .promos-v2 .promo-discount-title {
    color: #ffbf63;
    text-shadow: 0 0 18px rgba(255, 149, 0, 0.12);
}

body.apf-halloween-active .promos-v2 .promo-discount-badge {
    color: #fff0d8;
    border-color: rgba(255, 183, 88, 0.2);
    background: rgba(255, 153, 30, 0.08);
}

body.apf-halloween-active .promos-v2 .promo-copy-btn {
    color: #fff0d8;
    border-color: rgba(255, 183, 88, 0.2);
    background: rgba(255, 153, 30, 0.08);
}

body.apf-halloween-active .promos-v2 .promo-copy-btn:hover {
    color: #120d05;
    background: linear-gradient(180deg, #ffc975, #f0a329);
}

body.apf-halloween-active .promos-v2 .promo-claim-btn {
    color: #120d05;
    border-color: rgba(255, 206, 138, 0.44);
    background: linear-gradient(180deg, #ffc975, #f0a329);
    box-shadow: 0 10px 18px rgba(240, 163, 41, 0.16);
}

body.apf-halloween-active .promos-v2 .promo-claim-btn:hover {
    filter: brightness(1.06);
}

body.apf-halloween-active .promos-v2 .promos-firm-more-btn {
    border-color: rgba(255, 183, 88, 0.2);
    background: rgba(255, 153, 30, 0.08);
}

body.apf-halloween-active .promos-v2 .extra-offers-heading {
    border-top-color: rgba(255, 183, 88, 0.12);
    background: linear-gradient(180deg, rgba(255, 149, 0, 0.05), transparent);
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 900px) {
    .apf-halloween-hero__visual,
    .apf-halloween-hero__content {
        min-height: 250px;
    }

    .apf-halloween-hero__content {
        width: min(100%, 560px);
        padding: 26px 24px 28px;
    }

    .apf-halloween-hero__content h2 {
        font-size: clamp(28px, 5vw, 40px);
    }

    .apf-halloween-hero__content p {
        font-size: 15px;
        line-height: 1.8;
    }
}

@media (max-width: 720px) {
    body.apf-halloween-active .promos-page-heading {
        width: min(100% - 22px, 1460px);
        padding: 26px 20px;
        border-radius: 24px;
    }

    .apf-halloween-hero__visual {
        min-height: 220px;
        border-radius: 24px;
        background-position: 32% center;
    }

    .apf-halloween-hero__visual::after {
        inset: 12px;
        border-radius: 16px;
    }

    .apf-halloween-hero__content {
        min-height: 220px;
        width: 100%;
        padding: 18px 18px 20px;
    }

    .apf-halloween-hero__eyebrow {
        margin-bottom: 8px;
        font-size: 10px;
        letter-spacing: 2px;
    }

    .apf-halloween-hero__content h2 {
        font-size: 26px;
        line-height: 1.35;
    }

    .apf-halloween-hero__content p {
        max-width: 92%;
        margin-top: 10px;
        font-size: 13px;
        line-height: 1.8;
    }

    .apf-halloween-hero__actions {
        margin-top: 18px;
        gap: 9px;
    }

    .apf-halloween-hero__actions a {
        min-height: 48px;
        padding-inline: 18px;
        font-size: 14px;
        border-radius: 14px;
    }

    .apf-halloween-hero__actions small {
        font-size: 10px;
    }

    body.apf-halloween-active .apf-home-offer-card {
        min-height: 96px;
    }

    body.apf-halloween-active .apf-home-offer-card--halloween {
        padding-top: 28px;
    }

    .apf-home-offer-badge,
    .promo-halloween-badge {
        font-size: 7.5px;
    }
}

/* English (LTR) desktop: copy on the left, artwork on the right. */
@media (min-width: 901px) {
    body.apf-halloween-active .apf-halloween-hero__content {
        width: min(100%, 670px);
        margin-inline-start: 0;
        margin-inline-end: auto;
    }
    body.apf-halloween-active .apf-halloween-hero__content h2 {
        font-size: clamp(34px, 2.8vw, 46px);
        line-height: 1.25;
    }
}

/* Mobile/tablet: keep the approved single-column layout,
   but let more of the Halloween artwork show behind the copy. */
@media (max-width: 900px) {
    .apf-halloween-hero__visual {
        background-image:
            linear-gradient(180deg, rgba(10, 9, 12, 0.46), rgba(10, 9, 12, 0.68)),
            url('/img/halloween/apf-halloween-hero-en-2026.webp');
        background-position: 64% center;
        background-size: cover;
    }

    .apf-halloween-hero__visual::before {
        background:
            radial-gradient(circle at 22% 34%, rgba(255, 162, 66, 0.10), transparent 22%),
            linear-gradient(0deg, rgba(7, 7, 10, 0.28), rgba(7, 7, 10, 0.05));
    }

    .apf-halloween-hero__content {
        margin-inline-start: 0;
    }
}

/* English promotional cards have longer labels; protect layout on phones. */
@media (max-width: 520px) {
    body.apf-halloween-active .apf-home-offer-card {
        grid-template-columns: minmax(0, 1fr) auto 56px;
        gap: 6px;
    }
    body.apf-halloween-active .apf-home-offer-deal > strong {
        font-size: 9px;
    }
    body.apf-halloween-active .promos-v2 .promo-card--halloween {
        padding-top: 38px;
    }
}
@media (prefers-reduced-motion: reduce) {
    body.apf-halloween-active .apf-home-offer-card,
    body.apf-halloween-active .apf-halloween-hero__actions a {
        transition: none;
    }
}

@media (max-width: 520px) {
    /* Promo directory has no favorites controls; reclaim that reserved space. */
    body.apf-halloween-active .promos-v2 .promo-card--primary .promo-company {
        padding-right: 0;
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 7px;
    }

    body.apf-halloween-active .promos-v2 .promo-card--extra .promo-company {
        padding-right: 0;
    }

    body.apf-halloween-active .promos-v2 .promo-logo-link,
    body.apf-halloween-active .promos-v2 .promo-logo {
        width: 54px;
        height: 54px;
    }
}
