/* =====================================
   Base reset and HTML tags
   ===================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #fff;
    color: var(--text-default);
    line-height: 1.6;
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    font-size: 16px;
}

/* Design tokens */
:root {
    --text-default: #3b4148;
    --blue-main: #0e48b8;
    --radius-default: 20px;
}

/* Custom fonts: local Roboto (woff2/woff) */
@font-face {
    font-family: "Roboto";
    src: url("../fonts/Roboto-Regular.woff2") format("woff2"),
         url("../fonts/Roboto-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Roboto";
    src: url("../fonts/Roboto-Black.woff2") format("woff2"),
         url("../fonts/Roboto-Black.woff") format("woff");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: "Roboto", sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--blue-main);
    line-height: 1.2;
}
h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.17rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1.2rem; }

@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.6rem; }
    h3 { font-size: 2.2rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.4rem; }
    h6 { font-size: 1.2rem; }
}

@media (min-width: 1024px) {
    h1 { font-size: 5.875rem; }
    h2 { font-size: 3.125rem; }
    h3 { font-size: 1.75rem; }
    h4 { font-size: 1.5rem; }
    h5 { font-size: 1.25rem; }
    h6 { font-size: 1rem; }
}

p { 
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.2;
}
.p-large { 
    font-size: 1.25rem;
}
@media (min-width: 768px) {
    .p-large {
        font-size: 1.5rem;
    }
}
@media (min-width: 1024px) {
    .p-large {
        font-size: 1.75rem;
    }
}

/* Base tags */
section {
    padding: 30px 0;
}

@media (min-width: 768px) {
    section {
        padding: 60px 0;
    }
}
small {
    font-size: 0.85em;
}

/* =====================================
   Helper utilities
   ===================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.container--wide {
    max-width: 1600px;
}
.narrow-container {
    max-width: 800px;
    margin: 0 auto;
}
.pt-small {
    padding-top: 15px;
}
.pb-small {
    padding-bottom: 15px;
}
@media (min-width: 768px) {
    .pt-small {
        padding-top: 30px;
    }
    .pb-small {
        padding-bottom: 30px;
    }
}
.pt-none {
    padding-top: 0;
}
.pb-none {
    padding-bottom: 0;
}

.header {
    padding: 12px 0;
    background: #ffffff;
    z-index: 1000;
    border-bottom: 1px solid #e5e5e5;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Hashtag rail under header */
.hashtag-rail {
    background: linear-gradient(0deg, var(--blue-main) 0%, #3162c2 100%);
    color: #fff;
}
.hashtag-rail .container {
    padding: 10px 20px;
}
.hashtag-text {
    margin: 0;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.06em;
}

@media (min-width: 768px) {
    .header {
        position: sticky;
        top: 0;
    }
    .hashtag-rail {
        position: sticky;
        top: 50px;
        z-index: 1000;
    }
}

/* =====================================
   Header
   ===================================== */
.header .asus-section {
    display: flex;
    align-items: center;
}
.header .asus-logo {
    width: 90px;
    height: auto;
}
.header .hamburger-icon {
    width: 24px;
    height: 24px;
    filter: invert(1);
}

.desktop-nav ul {
    list-style: none;
    display: none;
    gap: 28px;
}

.desktop-nav {
    margin-left: auto;
}

@media (min-width: 768px) {
    .desktop-nav ul {
        display: flex;
    }
}

@media (max-width: 767px) {
    .desktop-nav { display: none; }
    .mobile-menu-toggle { 
        display: inline-flex; 
        align-items: center;
        justify-content: center;
        margin-left: 0;
    }
}

/* Back to Top button (desktop-only) */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    border: 0;
    background: linear-gradient(180deg, #1963c9 0%, #0d49c8 100%);
    color: #fff;
    line-height: 0;
    display: none; /* hidden by default; shown on desktop via media query */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
@media (min-width: 1024px) {
    .back-to-top { display: inline-flex; }
    .back-to-top[hidden] { display: none; }
}

.back-to-top img {
    width: 22px;
    height: 22px;
    display: block;
    filter: invert(1);
}

/* Hide carousel arrows on mobile and tablet */
@media (max-width: 1023px) {
    .carousel .carousel-control {
        display: none;
    }
}

@media (min-width: 768px) {
    .mobile-menu-toggle { display: none; }
}

.desktop-nav a {
    color: #111111;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
}

.mobile-menu-toggle {
    background: none;
    border: 0;
    width: 32px;
    height: 32px;
}

/* removed unused: .rog-logo */

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 999;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: #ffffff;
    transform: translateX(-100%);
    transition: transform 0.3s;
    padding: 20px;
    display: flex;
    gap: 30px;
    flex-direction: column;
    border-right: 1px solid #e5e5e5;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mobile-menu-close {
    background: none;
    border: 0;
    width: 32px;
    height: 32px;
}
.close-icon {
    width: 24px;
    height: 24px;
    filter: invert(1);
}

.mobile-nav-overlay.active .mobile-nav {
    transform: translateX(0);
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-nav-links a {
    color: #111111;
    text-decoration: none;
    text-transform: uppercase;
}

.mobile-nav-footer {
    max-width: 100px;
}

/* =====================================
   Hero
   ===================================== */
.hero {
    /* height: 100vh; */
    padding: 40px 0 60px;
    background-color: #f5f8ff;
    /* Multiple backgrounds: bottom white fade + hero image */
    background-image: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%), url("../images/bg-hero.jpg");
    background-repeat: no-repeat, no-repeat;
    background-position: bottom, center center;
    background-size: 100% 51%, cover;
}

/* HERO (mobile-first) */
.hero-headings {
    text-align: center;
    display: grid;
    gap: 12px;
}
.hero-overline {
    font-size: 1.2rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #222931;
}
.hero-title {
    line-height: 1;
    text-transform: uppercase;
    color: #fff;
    text-align: center;
}
.hero-title span {
    font-size: 60%;
    display: block;
    color: #222931;
}
.button {
    display: inline-block;
    padding: 12px 15px;
    background: linear-gradient(180deg, #1963c9 0%, #0d49c8 100%);
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    border-radius: 6px;
    border: 1px solid #0d49c8;
}
.button:hover,
.product-card .button:hover {
    background: linear-gradient(180deg, #1658b3 0%, #0c42b4 100%); /* ~10% darker */
    border-color: #0c42b4;
}
.button--white {
    background: #ffffff;
    color: #0a3cff;
    border-color: #fff;
}
.button--white:hover,
.product-card .button--white:hover {
    background: #e6e6e6; /* ~10% darker than white */
    border-color: #e6e6e6;
}
.button--small {
    font-size: 0.85rem;
    padding: 10px 14px;
}
/* Hero deadline pill */
.hero-deadline {
    display: inline-block;
    padding: 14px 22px;
    border-radius: var(--radius-default);
    background: linear-gradient(180deg, #86c1f3 0%, #69aee9 100%);
    color: #1b1f24;
    font-weight: 900;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.25;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.hero-deadline span {
    display: block;
}
.hero-deadline .count-digit {
    display: inline-block;
    min-width: 0.6ch;
}
.hero-deadline .count-sep {
    display: inline-block;
    padding: 0 2px;
}
.hero-deadline .count-group {
    display: inline-block;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 400ms ease, transform 400ms ease;
}
.hero-deadline .count-group.in {
    opacity: 1;
    transform: none;
}

.hero-visual {
    margin: 0;
    display: grid;
    place-items: center;
    opacity: 0;
}
.hero-visual img {
    width: 100%;

    height: auto;
    filter: none;
}

.hero-side {
    display: none;
}

.hero-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.badge-caption {
    margin: 0;
    font-size: 0.85rem;
    color: #223;
}
.wifi7-logo { 
    width: 100px; 
    height: auto; 
    display: block; 
}

@media (max-width: 767px) {
    .hero-side {
        display: block;
    }

    .badge-tile {
        display: flex;
        gap: 1rem;
        background: white;
        background: linear-gradient(180deg, white 0%, rgba(255,255,255,0) 100%);
        border-radius: 20px;
        overflow: hidden;
        margin-top: 2rem;
        align-items: center;
        padding: 1rem;
    }
    .badge-tile img {
        width: 20%;
        border-radius: 15px;
    }
    .badge-tile p {
        font-family: "Roboto", sans-serif;
        text-transform: uppercase;
        line-height: 1.2;
        font-size: 1.2rem;
        margin: 0;
    }
    .badge-tile p span {
        display: block;
        font-weight: 900;
    }
}

@media (min-width: 768px) {
    .hero {
        padding: 60px 0 80px;
    }
    .hero .container {
        position: relative;
    }
    .hero-side {
        display: block;
        position: absolute;
        top: 40px;
    }
    .hero-headings {
        width: 65%;
        margin: auto;
    }
    .hero-side--left {
        left: 0;
    }
    .hero-side--right {
        right: 20px;
    }
    .wifi7-logo { 
        width: 160px;
    }
    .badge-tile {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        justify-items: center;
        text-align: center;
        background: #fff;
        border: 2px solid #fff;
        border-radius: var(--radius-default);
        max-width: 214px;
    }
    .badge-avatar {
        width: 210px;
        height: auto;
        border-radius: var(--radius-default) var(--radius-default) 0 0;
        object-fit: cover;
    }
    .badge-caption {
        padding: 6px 6px 2px;
        font-size: 1.2rem;
        text-transform: uppercase;
    }
    .badge-caption span {
        display: inline-block;
        padding: 0 10px;
        font-weight: 900;
    }
    .hero-meta {
        max-width: 1300px;
        margin: auto;
        margin-top: -180px;
    }
}

@media (min-width: 1500px) {
    .hero-side--right {
        right: 140px;
    }
}

/* Sections layout */
.section-title {
    margin-bottom: 20px;
    text-transform: uppercase;
}
/* removed unused: .illustration */
.prize-card {
    position: relative;
    background: transparent;
    border: 0;
    padding: 0;
    text-align: center;
}

.prize-card .content {
    max-width: 80%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
@media (min-width: 767px) {
    .prize-card {
        padding-top: 150px;
        /* Bottom hard-stop band + decorative circle */
        background-image: linear-gradient(0deg, #fff 0%, #fff 100%), url("../images/bg-prize-circle.png");
        background-repeat: no-repeat, no-repeat;
        background-position: bottom, center top;
        background-size: 100% 45%, 95% auto;
    }
    .prize-card::before {
        position: absolute;
        content: "";
        display: block;
        width: 200%;
        height: 200px;
        background-color: #fff;
        z-index: 1;
        top: 55%;
        left: -100%;
    }
    .prize-card--last::before {
        left: auto;
        right: -100%;
    }
}
.footer {
    background: #000000;
    color: rgba(255,255,255,0.85);
    padding: 24px 0 12px;
}
.footer a { 
    color: rgba(255,255,255,0.85); 
    text-decoration: none;
    font-size: 14px;
}
.footer a:hover { 
    text-decoration: underline; 
}
.footer-content {
    display: flex;
    gap: 24px;
    justify-content: end;
    align-items: center;
    flex-wrap: wrap;
}
.footer-links { 
    display: flex; 
    gap: 28px; 
    text-transform: uppercase; 
    letter-spacing: 0.04em; 
}
.footer-copy {
    margin: 0;
    text-transform: uppercase;
    font-size: 14px;
}
.footer-legal { 
    display: flex; 
    justify-content: space-between; 
    gap: 24px; 
    padding-top: 8px; 
    padding-bottom: 12px; 
    color: rgba(255,255,255,0.7); 
    font-size: 0.9rem; 
}
.footer-note { max-width: 60ch; }
.footer-note--right { text-align: right; }

@media (max-width: 767px) {
    .footer-content {
        justify-content: start;
    }
    .footer-legal { flex-direction: column; }
    .footer-note--right { text-align: left; }
    .footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

.text-align-centre {
    text-align: center;
}

/* =====================================
   Enter
   ===================================== */
.enter {
    margin-top: -1px;
    overflow: hidden;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%), linear-gradient(180deg, rgba(33, 72, 193, 0) 0%, rgb(255 255 255 / 25%) 100%), linear-gradient(0deg, rgba(255, 255, 255, 0) 10%, rgba(255, 255, 255, 1) 0%), 
        url(../images/bg-grid-repeat.png);
    background-repeat: no-repeat, no-repeat, no-repeat, repeat;
    background-position: top, top, bottom, top left;
    background-size: 100% 100%, 100% 100%, 100% 310%, 10%;
}
.enter-group {
    display: grid;
    gap: 40px;
}
.enter-subtitle {
    color: #334;
    opacity: 0.9;
}
.enter-divider {
    display: block;
    width: 32px;
    margin: 20px auto 0;
}

@media (min-width: 767px) {
    .enter {
        background-image:
            linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%),
            linear-gradient(180deg, rgba(33,72,193,0) 0%, rgba(33,72,193,0.25) 100%),
            linear-gradient(0deg, #ffffff 100%, #ffffff 100%),
            url("../images/bg-grid-repeat.png");
        background-repeat: no-repeat, no-repeat, no-repeat, repeat;
        background-position: top, top, bottom, top left;
        background-size: 100% 50%, 100% 70%, 100% 450px, auto;
    }
}

/* Reusable section intro */
.section-intro {
    margin: 0 auto 30px;
    text-align: center;
}
.section-intro .section-title {
    margin-bottom: 0;
}
.section-intro h3 {
    color: var(--text-default);
}

@media (min-width: 767px) {
    .section-intro {
        max-width: 80%;
        margin-bottom: 40px;
    }
}

.section-intro--light,
.section-intro--light h2,
.section-intro--light h3,
.section-intro--light p {
    color: #fff;
}

/* prizes */
.prizes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.prize-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

/* steps */
.how-to-enter {
    /* Top white fade (50%), bottom white fade (~20px), + bottom-anchored image */
    background-image:
        linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%),
        linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%),
        url("../images/bg-how-to-enter.jpg");
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: top, bottom, bottom center;
    background-size: 100% 50%, 100% 40px, cover;
}
.enter-steps {
    display: grid;
    gap: 10px;
}
.enter-step {
    list-style: none;
    gap: 20px;
    display: grid;
    grid-template-columns: 1fr; /* mobile: stack logo above text */
    gap: 20px;
    align-items: start;
    background: #fff;
    padding: 24px;
    border-radius: var(--radius-default);
}
.enter-step-divider {
    display: grid;
    place-items: center;
}
.enter-step-divider img {
    width: 40px;
    height: 40px;
}
.enter-step img {
    width: 140px;
    height: auto;
    object-fit: contain;
    justify-self: center; /* center logo above text on mobile */
}
.enter-step-text p {
    margin-bottom: 0;
}
.enter-step-title {
    color: var(--text-default);
    text-transform: uppercase;
}
.enter-step-title span {
    color: var(--blue-main);
    display: block;
}

.enter-steps-form {
    padding-bottom: 0;
}
.enter-steps-col {
    margin-bottom: 3rem;
}
.enter-form-col {
    padding-bottom: 0;
}

/* form: removed legacy styles; Gleam embed uses its own */

@media (max-width: 359px) {
    .enter-form {
        width: calc(100% + 40px);
        margin-left: -20px;
    }
}

@media (min-width: 768px) {
    .prizes {
        position: relative;
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }
    .enter-step {
        grid-template-columns: 140px 1fr; /* desktop: logo left, text right */
        align-items: center;
        gap: 20px;
    }
    .enter-steps {
        display: grid;
        gap: 20px;
    }
    .enter-step img {
        justify-self: auto;
    }
    /* 50/50 layout for steps and Gleam embed */
    .enter-steps-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
        column-gap: 64px;
        row-gap: 64px;
    }
    .enter-steps-col {
        grid-column: 1;
        margin-bottom: 0;
    }
    .enter-form-col {
        grid-column: 2;
        margin-bottom: 0;
    }
}

/* =====================================
   Carousel base
   ===================================== */
.carousel {
    position: relative;
}
.carousel-viewport {
    overflow: hidden;
    padding: 0 45px;
    position: relative;
    z-index: 1;
    scroll-snap-type: x mandatory;
    display: flex;
    align-items: stretch;
}
.carousel-track {
    list-style: none;
    display: flex;
    gap: 45px;
    padding: 0;
    margin: 0;
    scroll-behavior: smooth;
    align-items: stretch;
    width: 100%;
}
.carousel--products .carousel-track {
    scroll-padding: 0 45px;
}
.carousel--products .carousel-track::after {
    content: "";
    flex: 0 0 45px; /* spacer so last slide can fully expose */
}
.carousel-item {
    flex: 0 0 auto;
    scroll-snap-align: center;
}
.carousel-control {
    position: absolute;
    top: 50%;
    background: transparent;
    border: 0;
    width: 60px;
    height: 40px;
    z-index: 3; /* above container fades */
    display: grid;
    place-items: center;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    font-size: 0; /* hide fallback glyph */
}
.carousel-control.prev,
.carousel-control.next {
    opacity: 0.8;
    transition: opacity 200ms ease, transform 200ms ease;
}
.carousel-control.prev:hover,
.carousel-control.next:hover {
    opacity: 1;
}
.carousel-control[disabled] {
    opacity: 0;
    pointer-events: none;
}
.carousel-control.prev { left: 0; }
.carousel-control.next { right: 0; }

/* Expert card: wider text-based card */
.expert-card {
    width: 100%;
    height: 100%;
}
.expert-card img {
    width: 100%;
    height: 100%;
    display: block;
}

/* Expert carousel sizing and peeking */
.carousel--expert .carousel-track { 
    scroll-padding: 0 24px;
}
.carousel--expert .carousel-item {
    width: 100%;
    display: flex;
    align-items: stretch;
    height: auto; /* grow to tallest content; children use height:100% to match */
}

@media (min-width: 768px) {
    .carousel--expert .carousel-item {
        width: 85%;
    }
}

@media (min-width: 1024px) {
    .carousel--expert .carousel-item {
        width: 66.6667%;
    }
}
/* Expert fades */
.carousel--expert::before,
.carousel--expert::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 140px;
    pointer-events: none;
    z-index: 2; /* above slides, below controls */
}
.carousel--expert::before {
    left: 0;
    background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}
.carousel--expert::after {
    right: 0;
    background: linear-gradient(270deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}
/* Expert carousel arrows */
.carousel--expert .carousel-control.prev {
    background-image: url("../images/chevron-blue-left.svg");
}
.carousel--expert .carousel-control.next {
    background-image: url("../images/chevron-blue-right.svg");
}
/* Expert dot navigation */
.carousel--expert .carousel-dots {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
    position: relative;
    z-index: 3;
}
.carousel--expert .carousel-dot {
    width: 90px;
    height: 12px;
    border-radius: 9999px;
    background: rgba(33, 72, 193, 0.28);
    border: 0;
    padding: 0;
    cursor: pointer;
}
.carousel--expert .carousel-dot[aria-current="true"] {
    background: var(--blue-main);
}
/* Ensure expert cards fill the slide height */
.carousel--expert .carousel-item > .expert-card {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
}

/* Expert card variants */
.expert-card--split {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "image"
        "text";
    gap: 0;
    border-radius: var(--radius-default);
    overflow: hidden;
    background: var(--blue-main);
    color: #ffffff;
}
.expert-card__image {
    display: none;
    grid-area: image;
    min-height: 240px;
    height: 100%;
    place-items: stretch;
    position: relative; /* anchor gradient overlay */
}
.expert-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right;
    display: block;
}
/* Gradient overlay: bottom on mobile, left on desktop */
.expert-card__image::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: none; /* no gradient by default (mobile) */
}
.expert-card__text {
    grid-area: text;
    padding: 20px;
}
.expert-card__text h4 { 
    color: #ffffff;
    font-size: 1.6rem; 
    margin-bottom: 12px; 
    text-transform: uppercase;
}
.expert-card__text p { 
    line-height: 1.5;
}

@media (min-width: 768px) {
    .carousel--expert .carousel-viewport { 
        padding: 0 24px;
    }
    .carousel--expert article {
        min-height: 450px;
    }
    .expert-card--split {
        display: flex;
        align-items: stretch;
        height: 100%;
    }
    .expert-card__text {
        flex: 0 0 55%;
        padding: 30px 36px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .expert-card__image {
        flex: 1 1 auto;
    }
    .expert-card__image::after {
        display: block;
        background: linear-gradient(90deg, rgba(13,73,200,1) 0%, rgba(13,73,200,0.65) 22%, rgba(13,73,200,0.0) 55%);
    }
}

/* Mobile: show one card per view; stack image above text */
@media (max-width: 767px) {
    .expert-card--split {
        display: flex;
        flex-direction: column;
    }
    .expert-card__image {
        order: 1;
        min-height: 240px;
    }
    .expert-card__text {
        order: 2;
        width: auto;
        padding: 20px;
    }
}

@media (min-width: 767px) {
    .expert-card__image {
        display: grid;
    }
}

.expert-card--video { 
    position: relative; 
    height: auto; 
    flex: 1 1 auto; 
    display: flex; 
    align-items: stretch;
    border-radius: var(--radius-default);
    overflow: hidden;
}
.expert-video {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    display: block;
}
.expert-video__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.expert-video__overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 73, 200, 0.5);
    display: grid;
    place-items: center;
}
.expert-video__play {
    height: 50px;
    width: auto;
    max-height: 50px;
    filter: brightness(0) invert(1);
}

/* Simple video modal */
.video-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: grid;
    place-items: center;
    z-index: 1000;
}
.video-modal {
    background: #000; 
    padding: 10px; 
    border-radius: 8px; 
    position: relative;
}
.video-modal p,
.video-modal a {
    margin: 0;
    color: #fff;
}
.video-modal__close { 
    position: absolute; 
    top: -14px; 
    right: -14px; 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    border: 0; 
    background: #fff; 
    cursor: pointer; 
}
.video-modal__content iframe { 
    display: block; 
    max-width: 90vw; 
    max-height: 80vh; 
}

/* Product card: compact, image-forward */
.product-card {
    width: 240px;
    text-align: center;
    border-radius: var(--radius-default);
    padding: 10px;
    border: 2px solid #fff;
}
.product-card .image {
    width: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #92cbf6 0%, #6baedf 100%);
    border-radius: 10px 10px 0 0;
}
.product-card .image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.product-card .product-desc {
    list-style: none;
    color: #334;
    opacity: 0.9;
    margin: 8px 0 12px;
}
.product-card .product-desc li {
    line-height: 1.2;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-size: 0.8rem;
}
.product-card h3 {
    font-size: 1rem;
    color: var(--text-default);
}
.product-card .button {
    width: 100%;
    border-radius: 0 0 10px 10px;
    font-weight: 900;
}
.product-card .button,
.product-card .btn-primary {
    margin-top: auto;
    align-self: center;
}
.product-card-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 10px 10px 0;
    background-color: #fff;
}

.product-showcase {
    background-color: var(--blue-main);
}
/* Showcase fades moved to container for better page blending */
.product-showcase > .container {
    position: relative;
    /* Top and bottom fades + background image */
    background-image:
        linear-gradient(180deg, var(--blue-main) 0%, rgba(33,72,193,0) 120px),
        linear-gradient(0deg, var(--blue-main) 0%, rgba(33,72,193,0) 120px),
        url("../images/bg-showcase.jpg");
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: top, bottom, center center;
    background-size: 100% 120px, 100% 120px, cover;
}
.product-showcase > .container::before,
.product-showcase > .container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 72px;
    pointer-events: none;
    z-index: 1; /* below arrows and slides */
}
.product-showcase > .container::before {
    left: 0;
    background: linear-gradient(90deg, var(--blue-main) 0%, var(--blue-main) 50%, rgba(33,72,193,0) 100%);
}
.product-showcase > .container::after {
    right: 0;
    background: linear-gradient(270deg, var(--blue-main) 0%, var(--blue-main) 50%, rgba(33,72,193,0) 100%);
}
/* Showcase carousel arrows */
.carousel--products .carousel-control.prev {
    background-image: url("../images/chevron-white-left.svg");
}
.carousel--products .carousel-control.next {
    background-image: url("../images/chevron-white-right.svg");
}

/* Equal-height product cards */
.carousel--products .carousel-item {
    display: flex;
    align-items: stretch;
}
.carousel--products .carousel-item > .product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* =====================================
   Viewport animations (utilities)
   ===================================== */
.anim-base {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 500ms ease, transform 600ms ease;
    will-change: opacity, transform;
}
.anim-prep .anim-base {
    transition: none !important;
}
.hero .anim-base { opacity: 0; }

/* Ensure visible state overrides any more specific hidden rules */
.anim-base.is-in {
    opacity: 1;
    transform: none;
}
.anim-fade {
    transform: none;
}
.anim-slide-up {
    transform: translateY(16px);
}
.anim-slide-left {
    transform: translateX(-16px);
}
.anim-slide-right {
    transform: translateX(16px);
}
.is-in {
    opacity: 1;
    transform: none;
}
[data-anim-stagger] > .will-animate {
    transition-delay: var(--anim-delay, 0ms);
}
/* Also honour explicit per-element delays */
.will-animate {
    transition-delay: var(--anim-delay, 0ms);
}

/* Disable fade/slide-in for carousel on mobile (keep horizontal scroll) */
@media (max-width: 767px) {
    /* Prevent horizontal scroll on mobile */
    html, body {
        overflow-x: clip;
    }
    .carousel .anim-base,
    .carousel .will-animate {
        opacity: 1;
        transform: none;
        transition: none !important;
    }
    /* Disable horizontal slide-in animations on mobile */
    .anim-slide-left,
    .anim-slide-right {
        transform: none !important;
        transition: none !important;
    }
    /* Hide side fades on mobile */
    .carousel--expert::before,
    .carousel--expert::after,
    .product-showcase > .container::before,
    .product-showcase > .container::after {
        display: none;
        content: none;
    }
    /* Make each product slide equal width on mobile */
    .carousel--products .carousel-item {
        flex: 0 0 82%; /* consistent slide width with slight peek */
        width: auto; /* prevent content from altering slide width */
    }
    /* Remove inner padding; respect container gutters to avoid oversizing */
    .carousel-viewport {
        padding: 0;
        margin-left: 0;
        margin-right: 0;
    }
    .carousel-track {
        gap: 20px;
    }
    .carousel--products .carousel-track { scroll-padding: 0 20px; }
    .carousel--products .carousel-track::after { flex-basis: 20px; }
    .product-card { width: 100%; }
}

@media (min-width: 767px) {
    .carousel--products .product-card {
        width: 280px;
    }
}

/* Fine-tune expert image sizing on very small screens */
@media (max-width: 430px) {
    .expert-card__image { min-height: 200px; }
    .expert-card__img { width: 100%; height: 100%; object-fit: cover; }
}

