/* NBF Hero Slider
   Uses theme color tokens when available, with green/gold fallbacks. */
.gdnb-hero {
    --gdnb-hero-brand: var(--rpf-brand, #2e5a36);
    --gdnb-hero-brand-dark: var(--rpf-brand-blue-dark, #1a241e);
    --gdnb-hero-gold: var(--rpf-gold, #b58c58);
    position: relative;
    margin: 0 0 10px;
    background: var(--gdnb-hero-brand-dark);
}

.gdnb-hero__viewport {
    position: relative;
    overflow: hidden;
}

.gdnb-hero__track {
    position: relative;
    width: 100%;
    /* Responsive hero height */
    height: clamp(440px, 62vh, 680px);
}

.gdnb-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.04);
    transition: opacity .7s ease, transform 7s ease;
    z-index: 1;
}

.gdnb-hero__slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 2;
}

/* Slide layers */
.gdnb-hero-slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.gdnb-hero-slide__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.gdnb-hero-slide__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(20, 30, 22, .92) 0%, rgba(20, 30, 22, .72) 42%, rgba(20, 30, 22, .15) 78%, rgba(20, 30, 22, 0) 100%),
        linear-gradient(0deg, rgba(20, 30, 22, .78) 0%, rgba(20, 30, 22, 0) 45%);
}

.gdnb-hero-slide__inner {
    position: relative;
    z-index: 3;
    height: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 64px);
    display: flex;
    align-items: center;
}

.gdnb-hero-slide__content {
    max-width: 620px;
    color: #fff;
    transform: translateY(14px);
    opacity: 0;
    transition: transform .7s ease .15s, opacity .7s ease .15s;
}

.gdnb-hero__slide.is-active .gdnb-hero-slide__content {
    transform: translateY(0);
    opacity: 1;
}

.gdnb-hero-slide__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.gdnb-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .02em;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    backdrop-filter: blur(4px);
}

.gdnb-hero-badge--urgent {
    background: linear-gradient(135deg, #c0392b, #e05a45);
    box-shadow: 0 6px 18px rgba(192, 57, 43, .4);
}

.gdnb-hero-slide__title {
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(28px, 4.4vw, 52px);
    line-height: 1.08;
    font-weight: 800;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}

.gdnb-hero-slide__text {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, .9);
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.6;
    max-width: 540px;
}

/* Progress bar */
.gdnb-hero-progress {
    margin: 0 0 22px;
    max-width: 460px;
}

.gdnb-hero-progress__bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    overflow: hidden;
}

.gdnb-hero-progress__bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gdnb-hero-gold), #e0c088);
    transition: width 1s ease;
}

.gdnb-hero-progress__meta {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .88);
}

.gdnb-hero-progress__meta strong {
    color: #fff;
}

/* Buttons */
.gdnb-hero-slide__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.gdnb-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 26px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
    line-height: 1;
}

.gdnb-hero-btn--primary {
    background: linear-gradient(135deg, var(--gdnb-hero-gold), #a2793f);
    color: #fff;
    box-shadow: 0 10px 26px rgba(181, 140, 88, .42);
}

.gdnb-hero-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(181, 140, 88, .55);
    color: #fff;
}

.gdnb-hero-btn--ghost {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border-color: rgba(255, 255, 255, .55);
    backdrop-filter: blur(4px);
}

.gdnb-hero-btn--ghost:hover {
    background: #fff;
    color: var(--gdnb-hero-brand-dark);
    border-color: #fff;
    transform: translateY(-2px);
}

/* Arrows */
.gdnb-hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    transition: background .18s ease, transform .18s ease;
}

.gdnb-hero__arrow:hover {
    background: var(--gdnb-hero-gold);
}

.gdnb-hero__arrow--prev { left: 18px; }
.gdnb-hero__arrow--next { right: 18px; }

/* Dots */
.gdnb-hero__dots {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 9px;
}

.gdnb-hero__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, .45);
    transition: background .2s ease, width .2s ease;
}

.gdnb-hero__dot.is-active {
    width: 28px;
    background: var(--gdnb-hero-gold);
}

/* Muted background video slide */
.gdnb-hero-video__stage {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.gdnb-hero-slide--video-bg .gdnb-hero-slide__bg {
    z-index: 0;
}

.gdnb-hero-slide--video-bg .gdnb-hero-slide__scrim {
    z-index: 2;
}

.gdnb-hero-video__el,
.gdnb-hero-video__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    background: #000;
}

/* Scale embeds slightly so letterboxing is less visible. */
.gdnb-hero-slide--video-bg .gdnb-hero-video__frame {
    transform: scale(1.18);
    transform-origin: center center;
}

.gdnb-hero-slide__inner--video {
    align-items: flex-end;
    padding-bottom: 54px;
    pointer-events: none;
    z-index: 3;
}

.gdnb-hero-slide__inner--video .gdnb-hero-slide__actions,
.gdnb-hero-slide__inner--video a,
.gdnb-hero-slide__inner--video button {
    pointer-events: auto;
}

/* Only play the active slide's background media. */
.gdnb-hero__slide:not(.is-active) .gdnb-hero-video__el,
.gdnb-hero__slide:not(.is-active) .gdnb-hero-video__frame {
    visibility: hidden;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .gdnb-hero__slide,
    .gdnb-hero-slide__content {
        transition: none;
        animation: none;
    }
}

/* Mobile */
@media (max-width: 782px) {
    .gdnb-hero__track { height: clamp(420px, 78vh, 560px); }
    .gdnb-hero-slide__scrim {
        background: linear-gradient(0deg, rgba(20, 30, 22, .92) 8%, rgba(20, 30, 22, .35) 60%, rgba(20, 30, 22, .2) 100%);
    }
    .gdnb-hero-slide__inner { align-items: flex-end; padding-bottom: 46px; }
    .gdnb-hero-slide__content { max-width: 100%; }
    .gdnb-hero__arrow { display: none; }
    .gdnb-hero-slide__actions { width: 100%; }
    .gdnb-hero-btn { flex: 1 1 auto; justify-content: center; }
}
