/* =========================================================
   Future Young Leaders Automatic Post Slider
   Slider + Home-page layout styles
   ========================================================= */

.fyl-slider {
    --fyl-ink: #151515;
    --fyl-accent: #6f1731;
    --fyl-border: #deded7;
    width: 100%;
    max-width: 1160px;
    margin: 28px auto;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--fyl-ink);
}

.fyl-slider * {
    box-sizing: border-box;
}

.fyl-stage {
    position: relative;
    padding: 0 46px;
}

.fyl-track {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--fyl-border);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, .5);
}

.fyl-slide {
    display: none;
    min-height: 330px;
    grid-template-columns: 58% 42%;
    background: #fff;
}

.fyl-slide.is-active {
    display: grid;
    animation: fylFade .45s ease;
}

@keyframes fylFade {
    from { opacity: .2; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
}

.fyl-slide-image {
    position: relative;
    min-height: 330px;
    overflow: hidden;
    background: #ddd;
}

.fyl-slide-image:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0) 52%, rgba(255,255,255,.94) 100%);
    pointer-events: none;
}

.fyl-slide-image img {
    width: 100%;
    height: 100%;
    min-height: 330px;
    object-fit: cover;
    display: block;
}

.fyl-slide-copy {
    position: relative;
    z-index: 2;
    margin-left: -1px;
    padding: 42px 40px 34px 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(90deg, rgba(255,255,255,.88), #fff 15%);
}

.fyl-date {
    margin-bottom: 16px;
    color: var(--fyl-accent);
    font-size: 14px;
    line-height: 1.35;
    text-transform: uppercase;
}

.fyl-slide-copy h2 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.05;
    font-weight: 400;
}

.fyl-slide-copy h2 a {
    color: #0d0d0d;
    text-decoration: none;
}

.fyl-slide-copy h2 a:hover {
    text-decoration: underline;
}

.fyl-description {
    color: #555;
    font-size: 18px;
    line-height: 1.48;
}

.fyl-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 102px;
    border: 1px solid var(--fyl-border);
    background: rgba(255,255,255,.96);
    color: #222;
    cursor: pointer;
    font-size: 24px;
}

.fyl-arrow:hover {
    color: var(--fyl-accent);
    background: #f5f5f1;
}

.fyl-prev { left: 0; }
.fyl-next { right: 0; }

.fyl-thumbbar {
    min-height: 88px;
    margin-top: 10px;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid #d7d7d0;
    border-radius: 8px;
    background: linear-gradient(#f5f5f0,#e8e8e1);
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.fyl-thumb-title {
    flex: 0 0 auto;
    font-size: 27px;
    line-height: 1;
    font-style: italic;
    color: #fff;
    text-shadow: 0 1px 1px rgba(0,0,0,.22);
    white-space: nowrap;
}

.fyl-thumb-title span {
    font-style: normal;
    font-size: 34px;
}

.fyl-thumbs {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    overflow-x: auto;
}

.fyl-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    padding: 3px;
    border: 1px solid #bbb;
    background: #fff;
    cursor: pointer;
}

.fyl-thumb.is-active {
    border: 3px solid #888;
    padding: 1px;
}

.fyl-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.fyl-empty {
    padding: 25px;
    border: 1px dashed #aaa;
    background: #fafafa;
}

/* =========================================================
   HOME PAGE LAYOUT

   The wrapper is full width of the theme's available container.
   It intentionally uses 100%, never 100vw.
   ========================================================= */

body.home #home-featured-slider-wrapper {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto 30px;
    padding: 0;
    box-sizing: border-box;
    min-width: 0;
}

body.home #home-featured-slider-wrapper .fyl-slider {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    min-width: 0;
}

/* Keep the wrapper from affecting theme flex/grid sizing. */
body.home #home-featured-slider-wrapper.fyl-layout-ready {
    display: block;
    flex: 0 0 auto;
}

@media (max-width: 1200px) {
    body.home #home-featured-slider-wrapper {
        max-width: 100%;
    }
}

@media (max-width: 800px) {
    .fyl-stage {
        padding: 0 32px;
    }

    .fyl-slide,
    .fyl-slide.is-active {
        grid-template-columns: 1fr;
    }

    .fyl-slide-image,
    .fyl-slide-image img {
        min-height: 250px;
        height: 250px;
    }

    .fyl-slide-image:after {
        background: linear-gradient(0deg, rgba(255,255,255,.92), rgba(255,255,255,0) 55%);
    }

    .fyl-slide-copy {
        margin-top: -52px;
        margin-left: 0;
        padding: 26px 24px 30px;
        background: linear-gradient(0deg, #fff 78%, rgba(255,255,255,.7));
    }

    .fyl-date {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .fyl-slide-copy h2 {
        font-size: 31px;
    }

    .fyl-description {
        font-size: 16px;
    }

    .fyl-thumbbar {
        padding: 10px 12px;
        gap: 10px;
    }

    .fyl-thumb-title {
        font-size: 20px;
    }

    .fyl-thumb {
        flex-basis: 54px;
        width: 54px;
        height: 54px;
    }

    .fyl-arrow {
        width: 30px;
        height: 72px;
        font-size: 18px;
    }

    body.home #home-featured-slider-wrapper {
        width: 100%;
        max-width: 100%;
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .fyl-stage {
        padding: 0 26px;
    }

    .fyl-slide-copy h2 {
        font-size: 27px;
    }

    .fyl-description {
        font-size: 15px;
    }

    .fyl-thumb-title {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fyl-slide.is-active {
        animation: none;
    }
}

/* Prevent accidental horizontal overflow from the slider itself. */
body.home #home-featured-slider-wrapper,
body.home #home-featured-slider-wrapper * {
    min-width: 0;
}
