/* Logan's Martial Arts - Kids Class Dynamic Carousel
   Converts the static Kids Class Photos grid into a dynamic, polished carousel
   that follows the same lightweight pattern as the Header and Homepage carousels. */

.legacy-kids-carousel-card {
    align-self: stretch;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.legacy-kids-carousel-heading {
    margin-bottom: .9rem;
}

.legacy-kids-carousel-heading h2 {
    margin-bottom: .35rem;
}

.legacy-kids-carousel-heading p {
    margin: 0;
    color: var(--muted);
    font-size: .94rem;
    line-height: 1.45;
}

.kids-class-carousel {
    position: relative;
    margin: .25rem -1.35rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(202, 162, 75, .24);
    border-bottom: 1px solid rgba(202, 162, 75, .24);
    background:
        radial-gradient(circle at 22% 18%, rgba(202, 162, 75, .12), transparent 38%),
        linear-gradient(180deg, rgba(0,0,0,.36), rgba(0,0,0,.62));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.kids-class-carousel__viewport {
    position: relative;
    width: 100%;
    min-height: 285px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.kids-class-carousel__slide {
    position: absolute;
    inset: 0;
    display: block;
    margin: 0;
    opacity: 0;
    transform: scale(1.015);
    z-index: 1;
    pointer-events: none;
    transition:
        opacity .85s ease-in-out,
        transform 1.2s ease;
}

.kids-class-carousel:not(.is-enhanced) .kids-class-carousel__slide:first-child,
.kids-class-carousel__slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
    pointer-events: auto;
}

.kids-class-carousel__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    image-rendering: auto;
}

.kids-class-carousel::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0,0,0,.35), transparent 18%, transparent 82%, rgba(0,0,0,.35)),
        linear-gradient(180deg, transparent 55%, rgba(0,0,0,.48));
}

.kids-class-carousel__control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 999px;
    border: 1px solid rgba(202, 162, 75, .55);
    background: rgba(0, 0, 0, .45);
    color: var(--gold-soft);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition:
        background .22s ease,
        color .22s ease,
        border-color .22s ease,
        transform .22s ease;
}

.kids-class-carousel__control:hover,
.kids-class-carousel__control:focus-visible {
    background: rgba(202, 162, 75, .88);
    border-color: rgba(202, 162, 75, .98);
    color: #120f08;
    outline: none;
    transform: translateY(-50%) scale(1.04);
}

.kids-class-carousel__control--prev {
    left: .75rem;
}

.kids-class-carousel__control--next {
    right: .75rem;
}

.kids-class-carousel__status {
    position: absolute;
    right: .85rem;
    bottom: .75rem;
    z-index: 4;
    padding: .25rem .6rem;
    border-radius: 999px;
    border: 1px solid rgba(202, 162, 75, .42);
    background: rgba(0, 0, 0, .56);
    color: var(--gold-soft);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
}

.legacy-kids-carousel-card .legacy-actions {
    margin-top: 1rem;
    margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
    .kids-class-carousel__slide {
        transition: none;
        transform: none;
    }
}

@media (max-width: 920px) {
    .kids-class-carousel__viewport {
        min-height: 245px;
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 700px) {
    .kids-class-carousel {
        margin-left: -1.1rem;
        margin-right: -1.1rem;
    }

    .kids-class-carousel__viewport {
        min-height: 220px;
    }

    .kids-class-carousel__control {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1.1rem;
    }
}

/* Kids page-only layout refinement
   Makes the Student of the Month card match the Raising the Bar card's
   desktop footprint and keeps the two-column page grid evenly aligned. */
@media (min-width: 921px) {
    .legacy-info-section .legacy-info-layout--two-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .legacy-info-section .legacy-info-layout--two-col > .legacy-info-card {
        min-width: 0;
        height: 100%;
    }

    .legacy-student-card {
        display: flex;
        align-self: stretch;
    }

    .legacy-student-card .legacy-student-spotlight {
        width: 100%;
        min-height: 100%;
        align-items: center;
    }

    .legacy-student-card .legacy-student-spotlight > div {
        align-self: center;
    }
}

/* Kids page-only Student of the Month refinement
   Makes the spotlight title behave like the neighboring card heading,
   moves it to the upper-left of the card, and gives the student photo
   more visual prominence. */
.legacy-student-card {
    display: flex;
    flex-direction: column;
}

.legacy-student-card .legacy-student-title {
    margin: 0 0 1.05rem;
    color: var(--gold-soft);
}

.legacy-student-card .legacy-student-spotlight {
    flex: 1;
    align-items: start;
    grid-template-columns: minmax(250px, 44%) minmax(0, 1fr);
    gap: 1.35rem;
}

.legacy-student-card .legacy-student-image {
    width: 100%;
    max-height: 420px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center top;
}

.legacy-student-card .legacy-student-copy {
    align-self: start;
    padding-top: .15rem;
}

.legacy-student-card .legacy-student-copy h3 {
    margin: 0 0 .9rem;
    color: var(--gold-soft);
    font-size: clamp(1.25rem, 2.2vw, 1.85rem);
    line-height: 1.12;
}

.legacy-student-card .legacy-student-copy p {
    margin-bottom: 0;
}

@media (min-width: 921px) {
    .legacy-student-card .legacy-student-spotlight {
        align-items: stretch;
    }

    .legacy-student-card .legacy-student-image {
        height: 100%;
        min-height: 340px;
    }
}

@media (max-width: 1100px) and (min-width: 921px) {
    .legacy-student-card .legacy-student-spotlight {
        grid-template-columns: minmax(220px, 42%) minmax(0, 1fr);
        gap: 1.1rem;
    }
}

@media (max-width: 700px) {
    .legacy-student-card .legacy-student-title {
        margin-bottom: .8rem;
    }

    .legacy-student-card .legacy-student-spotlight {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .legacy-student-card .legacy-student-image {
        max-height: none;
        aspect-ratio: 4 / 5;
    }
}

/* Kids Classes page-only text alignment refinement
   Justifies body text in the Kids page cards while keeping headings,
   buttons, carousel controls, and action rows naturally aligned. */
.legacy-info-section .legacy-info-layout--two-col > .legacy-info-card p:not(.legacy-actions),
.legacy-info-section .legacy-info-layout--two-col > .legacy-info-card li,
.legacy-kids-carousel-heading p,
.legacy-student-card .legacy-student-copy p {
    text-align: justify;
    text-align-last: left;
    text-justify: inter-word;
    hyphens: auto;
}

/* Keeps the Student of the Month copy aligned with the top edge of the photo.
   This intentionally overrides the prior equal-height centering rule for the
   text column only. */
.legacy-student-card .legacy-student-spotlight > .legacy-student-copy {
    align-self: start !important;
    padding-top: 0 !important;
}

.legacy-student-card .legacy-student-copy h3 {
    margin-top: 0;
}

@media (min-width: 921px) {
    .legacy-student-card .legacy-student-spotlight {
        align-items: stretch;
    }

    .legacy-student-card .legacy-student-spotlight > .legacy-student-copy {
        align-self: start !important;
        justify-self: stretch;
    }
}

@media (max-width: 700px) {
    .legacy-info-section .legacy-info-layout--two-col > .legacy-info-card p:not(.legacy-actions),
    .legacy-info-section .legacy-info-layout--two-col > .legacy-info-card li,
    .legacy-kids-carousel-heading p,
    .legacy-student-card .legacy-student-copy p {
        text-align: left;
        text-align-last: left;
    }
}

/* Kids Classes page-only Student of the Month photo spacing refinement
   Prevents the student photo from stretching into the bottom border of the card
   while preserving the larger desktop image treatment. */
.legacy-student-card {
    --student-photo-bottom-gap: 1.05rem;
}

@media (min-width: 921px) {
    .legacy-student-card .legacy-student-spotlight {
        align-items: start;
        padding-bottom: var(--student-photo-bottom-gap);
        box-sizing: border-box;
    }

    .legacy-student-card .legacy-student-image {
        align-self: start;
        height: clamp(340px, 29vw, 420px);
        min-height: 0;
        max-height: 420px;
    }
}

@media (max-width: 700px) {
    .legacy-student-card {
        --student-photo-bottom-gap: 0;
    }

    .legacy-student-card .legacy-student-spotlight {
        padding-bottom: 0;
    }
}
