﻿
/* ============================================================
   MatchRadar | SliderContent.css
   Clean, single-source responsive hero slider
   Desktop: 16:9 | Mobile: 4:5

   IMPORTANT: Entire infographic remains visible; never crop it.
   Pagination occupies a separate strip below the image.
   Compatible with existing Default.aspx / slider JavaScript.
============================================================ */

/* 1. Section and container */
.home-hero-section {
    width: 100%;
    padding-block: 28px 34px;
    direction: rtl;
}

    .home-hero-section > .home-container {
        width: 100%;
        max-width: 1280px;
        margin-inline: auto;
        padding-inline: 20px;
        box-sizing: border-box;
    }

.home-hero-heading {
    margin: 0 0 18px;
    text-align: right;
}

    .home-hero-heading h1 {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
        color: #17283c;
        font-size: 23px;
        font-weight: 800;
        line-height: 1.7;
    }

        .home-hero-heading h1::before {
            content: "";
            display: block;
            width: 4px;
            height: 25px;
            flex: 0 0 4px;
            background: #78b900;
            border-radius: 5px;
        }

/* 2. Main slider + promotion columns */
.home-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 285px;
    align-items: start;
    gap: 20px;
    direction: rtl;
}

.home-hero-main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    min-width: 0;
}

/* 3. Slider frame
   Non-grid design: its ::before reserves the exact image height,
   then the ordinary-flow pagination contributes EXTRA height.
   All slides are absolute and fill only the image area.
*/
.home-hero-section .home-slideshow {
    --radar-slide-ratio: 16 / 9;
    --radar-dots-height: 38px;
    position: relative;
    isolation: isolate;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce4eb;
    border-radius: 16px;
    box-shadow: 0 7px 22px rgba(15, 23, 42, .09);
}

    /* The content-box ratio exactly matches the corresponding WebP image. */
    .home-hero-section .home-slideshow::before {
        content: "";
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: var(--radar-slide-ratio);
        pointer-events: none;
    }

    /* All slides share the same full image region, without dots overlap. */
    .home-hero-section .home-slideshow .home-slide {
        position: absolute;
        display: block;
        inset: 0 0 var(--radar-dots-height) 0;
        width: auto;
        height: auto;
        min-width: 0;
        min-height: 0;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        overflow: hidden;
        background: #fff;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 0;
        transition: opacity .35s ease;
    }

        .home-hero-section .home-slideshow .home-slide.is-active {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
            z-index: 1;
        }

/* 4. Full infographic; do not crop the coaches or prediction strip. */
.home-hero-section .home-slide picture,
.home-hero-section .home-slide-placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

    .home-hero-section .home-slide-image,
    .home-hero-section .home-slide picture img {
        display: block;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        margin: 0;
        padding: 0;
        border: 0;
        object-fit: contain;
        object-position: center center;
    }

.home-hero-section .home-slide-placeholder {
    background: linear-gradient(135deg, #12253b, #14554f 52%, #10263c);
}

.home-hero-section .home-slide-overlay,
.home-hero-section .home-slide-content {
    display: none;
}

/* 5. Arrow navigation: vertically centered on the image only. */
.home-hero-section .home-slider-control {
    position: absolute;
    top: calc((100% - var(--radar-dots-height)) / 2);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    color: #fff;
    background: rgba(16, 30, 47, .76);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    transform: translateY(-50%);
    transition: background-color .2s ease;
}

    .home-hero-section .home-slider-control:hover {
        background: #263f55;
    }

.home-hero-section .home-slider-next {
    right: 10px;
    left: auto;
}

.home-hero-section .home-slider-prev {
    left: 10px;
    right: auto;
}

/* 6. Navigation dots: regular flow BELOW the pseudo-element/image. */
.home-hero-section .home-slider-dots {
    position: relative;
    inset: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    height: var(--radar-dots-height);
    box-sizing: border-box;
    margin: 0;
    padding: 0 8px;
    transform: none;
    background: #fff;
    border: 0;
    border-radius: 0;
    backdrop-filter: none;
    z-index: 5;
}

.home-hero-section .home-slider-dot {
    display: block;
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #94a3b8;
    cursor: pointer;
    transition: width .2s ease, background-color .2s ease;
}

    .home-hero-section .home-slider-dot.is-active {
        width: 25px;
        border-radius: 10px;
        background: #a6ed18;
    }

    .home-hero-section .home-slider-control:focus-visible,
    .home-hero-section .home-slider-dot:focus-visible {
        outline: 2px solid #a7f300;
        outline-offset: 3px;
    }

/* 7. Description card */
.home-hero-description {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 14px 18px;
    direction: rtl;
    text-align: right;
    background: #fff;
    border: 1px solid #e5eaf0;
    border-right: 3px solid #81bd13;
    border-radius: 12px;
}

    .home-hero-description p {
        margin: 0;
        color: #425269;
        font-size: 14px;
        font-weight: 400;
        line-height: 2;
        text-align: right;
        overflow-wrap: break-word;
        white-space: pre-line;
    }

/* 8. Promotion sidebar, existing cards unchanged. */
.home-hero-section .home-hero-side {
    display: flex;
    flex-direction: column;
    align-self: start;
    gap: 14px;
    width: 100%;
    min-width: 0;
    height: auto;
}

.home-hero-section .home-promo-card {
    width: 100%;
    box-sizing: border-box;
}

.home-hero-section .home-promo-main {
    flex: 0 1 auto;
}

.home-hero-section .home-promo-secondary {
    flex: 0 0 auto;
}

/* 9. Tablet */
@media (min-width: 701px) and (max-width: 1024px) {
    .home-hero-section > .home-container {
        padding-inline: 16px;
    }

    .home-hero-layout {
        grid-template-columns: minmax(0, 1fr) 245px;
        gap: 14px;
    }

    .home-hero-heading h1 {
        font-size: 21px;
    }

    .home-hero-section .home-slideshow {
        border-radius: 14px;
    }

    .home-hero-description {
        padding: 12px 14px;
    }

        .home-hero-description p {
            line-height: 1.9;
        }

    .home-hero-section .home-slider-control {
        width: 34px;
        height: 34px;
    }
}

/* 10. Mobile: portrait WebP files are 4:5. */
@media (max-width: 700px) {
    .home-hero-section {
        padding-block: 20px 26px;
    }

        .home-hero-section > .home-container {
            padding-inline: 15px;
        }

    .home-hero-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .home-hero-heading {
        margin-bottom: 12px;
    }

        .home-hero-heading h1 {
            font-size: 19px;
            line-height: 1.6;
        }

    .home-hero-main {
        gap: 12px;
    }

    .home-hero-section .home-slideshow {
        --radar-slide-ratio: 4 / 5;
        border-radius: 12px;
    }

    .home-hero-section .home-slider-control {
        width: 34px;
        height: 34px;
        font-size: 23px;
    }

    .home-hero-description {
        padding: 13px 15px;
        border-radius: 10px;
    }

    .home-hero-section .home-hero-side {
        gap: 12px;
    }
}

/* 11. Small mobile (<=420px) */
@media (max-width: 420px) {
    .home-hero-section {
        padding-block: 16px 22px;
    }

        .home-hero-section > .home-container {
            padding-inline: 10px;
        }

    .home-hero-layout {
        gap: 18px;
    }

    .home-hero-heading h1 {
        font-size: 17px;
        line-height: 1.7;
        gap: 8px;
    }

        .home-hero-heading h1::before {
            width: 3px;
            height: 21px;
            flex-basis: 3px;
        }

    .home-hero-main {
        gap: 10px;
    }

    .home-hero-section .home-slideshow {
        border-radius: 10px;
    }

    .home-hero-section .home-slider-control {
        width: 32px;
        height: 32px;
        font-size: 22px;
    }

    .home-hero-section .home-slider-next {
        right: 5px;
    }

    .home-hero-section .home-slider-prev {
        left: 5px;
    }

    .home-hero-description {
        padding: 12px;
        border-radius: 9px;
    }

        .home-hero-description p {
            line-height: 1.9;
        }
}

/* 12. Motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .home-hero-section .home-slide,
    .home-hero-section .home-slider-dot,
    .home-hero-section .home-slider-control {
        transition: none;
    }
}
