/* First-delivery stability fixes. Kept separate so the existing generated
   Tailwind bundle remains untouched and rollback is straightforward. */

html:not(.aos-ready) [data-aos] {
    opacity: 1 !important;
    transform: none !important;
}

.hero-track:not(.slick-initialized) .hero-slide:not(:first-child) {
    display: none;
}

.hero-track:not(.slick-initialized) .hero-slide:first-child .hero-anim {
    opacity: 1;
}

@media (min-width: 1024px) {
    .app-section {
        height: 640px !important;
        min-height: 640px !important;
    }

    .app-section .app-copy {
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .app-section .app-copy > div {
        max-width: 540px !important;
    }

    .app-section .app-phone {
        width: 300px !important;
        height: 608px !important;
    }

    .app-section .app-phone > img {
        width: 300px !important;
        height: 608px !important;
    }

    .app-section .app-phone-front {
        inset-inline-start: 760px;
        top: 145px;
        z-index: 2;
    }

    .app-section .app-phone-back {
        inset-inline-start: 1010px;
        top: 38px;
        z-index: 1;
    }

    .app-phone-back span img {
        transform: scale(1.16) translateY(-5%);
        transform-origin: center top;
    }
}

@media (min-width: 1024px) {
    body.home .hero-slide[data-index="0"] .hero-scrim,
    body.home .hero-slide[data-index="2"] .hero-scrim {
        background-color: rgba(0, 0, 0, 0.24) !important;
    }

    body.home .hero-slide[data-index="0"] .hero-image,
    body.home .hero-slide[data-index="2"] .hero-image {
        filter: brightness(1.1);
    }

    body.home .hero-slide[data-index="0"] .hero-content,
    body.page-id-28 .hero-content,
    body.page-id-88 .hero-content {
        transform: translateY(52px);
    }
}

/* Keep the About composition balanced between tablet and the custom 1400px
   desktop breakpoint. */
@media (min-width: 768px) and (max-width: 1399px) {
    .about-gallery {
        display: grid !important;
        grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
        grid-template-rows: auto 210px;
        align-items: center;
        gap: 1.5rem 2rem !important;
    }

    .about-gallery-main {
        grid-row: 1 / 3;
        height: 460px;
        max-width: 420px;
        justify-self: end;
    }

    .about-gallery-main img {
        height: 100% !important;
    }

    .about-gallery-text {
        align-self: end;
        max-width: 520px;
    }

    .about-gallery-side {
        height: 210px;
        max-width: 560px;
    }

    .about-gallery-side img {
        height: 100% !important;
    }
}

@media (min-width: 1024px) and (max-width: 1399px) {
    .about-story {
        display: grid !important;
        grid-template-columns: minmax(280px, 0.72fr) minmax(600px, 1.28fr);
        align-items: stretch;
        gap: 3rem !important;
    }

    .about-story-copy {
        height: 100%;
    }

    .about-gallery-main {
        height: 410px;
    }
}

@media (max-width: 767px) {
    .about-gallery-main {
        height: 360px;
    }

    .about-gallery-main img {
        height: 100% !important;
    }
}

/* Larger, labelled sport cards make this section feel like a destination
   instead of a row of tiny thumbnails. */
.sports-track {
    padding: 0.5rem 0.25rem 1rem;
    scrollbar-width: none;
}

.sports-track::-webkit-scrollbar {
    display: none;
}

.sports-card,
.sports-card-link {
    width: 180px;
    height: 220px;
}

.sports-card-link {
    overflow: hidden;
}

.sports-card-image {
    display: block;
    width: 100%;
    height: 100%;
}

.sports-card-link::after {
    content: '';
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(to bottom, transparent, rgba(15, 0, 42, 0.92));
    pointer-events: none;
}

.sports-card-title {
    position: absolute;
    z-index: 1;
    inset-inline: 1rem;
    bottom: 1rem;
    color: #fff;
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 700;
}

@media (max-width: 639px) {
    .sports-card,
    .sports-card-link {
        width: 150px;
        height: 190px;
    }
}

.social-icon-visible {
    filter: brightness(0) saturate(100%) invert(10%) sepia(45%) saturate(2855%) hue-rotate(244deg) brightness(73%) contrast(123%);
}

.facilities {
    scroll-margin-top: 7rem;
}

footer .footer-menu,
footer .footer-menu ul {
    margin: 0;
    padding: 0;
}

.karma-footer {
    padding-top: 3.5rem;
    padding-bottom: 2rem;
}

.karma-footer .kc-footer-desc {
    max-width: 430px;
    line-height: 1.75;
}

@media (min-width: 1280px) {
    .karma-footer-main {
        align-items: stretch;
        gap: 4rem !important;
    }

    .karma-footer-brand {
        width: 42% !important;
        justify-content: flex-start !important;
    }

    .karma-footer-columns {
        flex: 1;
        justify-content: space-between;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

html,
body {
    max-width: 100%;
    overflow-x: clip;
}
