/* PHM Stats Slider — front end */

.phm-stats {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 4rem 1rem;
    min-height: 420px;
    display: flex;
    align-items: center;
}

/* Fixed-background parallax: the image is pinned to the viewport and the page
   scrolls over it. (Most mobile browsers ignore `fixed` and fall back to a
   normal scrolling background — see the touch override below.) */
.phm-stats--has-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.phm-stats__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.phm-stats__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
}

/* Heading + gold accent line */
.phm-stats__heading-wrap {
    text-align: center;
    margin-bottom: 2.5rem;
}

.phm-stats__accent {
    display: block;
    width: 120px;
    height: 4px;
    background: var(--phm-secondary, #decd63);
    margin: 0 auto 1.25rem;
}

.phm-stats__heading {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: #fff;
}

/* Slider */
.phm-stats__slider {
    position: relative;
    padding: 0 3rem;
}

.phm-stats__viewport {
    overflow: hidden;
}

.phm-stats__track {
    display: flex;
    transition: transform 0.5s ease;
}

.phm-stats__slide {
    flex: 0 0 100%;
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.phm-stats__item {
    flex: 1 1 0;
    text-align: center;
    padding: 0.5rem;
}

/* Light-blue line icons (matches the reference). */
.phm-stats__icon {
    display: block;
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 1rem;
    color: #bfe7f7;
}

.phm-stats__number {
    display: block;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
}

.phm-stats__label {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.3;
}

/* Arrows */
.phm-stats__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 3;
}

.phm-stats__arrow:hover,
.phm-stats__arrow:focus-visible {
    opacity: 1;
}

.phm-stats__arrow--prev { left: 0; }
.phm-stats__arrow--next { right: 0; }

/* Dots */
.phm-stats__dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.phm-stats__dot {
    width: 34px;
    height: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.phm-stats__dot.is-active {
    background: var(--phm-secondary, #decd63);
}

.phm-stats__dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Responsive: 2-up on tablet, 1-up on phone */
@media (max-width: 782px) {
    .phm-stats__slide {
        flex-wrap: wrap;
    }
    .phm-stats__item {
        flex: 0 0 45%;
    }
}

@media (max-width: 480px) {
    .phm-stats__item {
        flex: 0 0 100%;
    }
    .phm-stats__slider {
        padding: 0 2rem;
    }
}

/* Respect reduced-motion: disable slide transition jumps */
@media (prefers-reduced-motion: reduce) {
    .phm-stats__track {
        transition: none;
    }
}

/* Touch devices ignore background-attachment: fixed (and can render it broken),
   so fall back to a normal scrolling background there. */
@media (hover: none) and (pointer: coarse) {
    .phm-stats--has-bg {
        background-attachment: scroll;
    }
}
