
/* ==========================================
   EPHRAIM MOGALE MUNICIPALITY
   HOMEPAGE SLIDER - UPDATED CSS
========================================== */

/* Main slider */
.em-design1-final .em-hero.em-slider {
    position: relative !important;
    width: 100% !important;
    height: clamp(400px, 42vw, 650px) !important;
    margin-top: 8px !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #123b2b;
}

/* Slider container */
.em-slider .em-slides {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Individual slides */
.em-slider .em-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;

    opacity: 0;
    visibility: hidden;
    z-index: 0;

    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;

    transition:
        opacity 0.65s ease,
        visibility 0.65s;
}

/* Active slide */
.em-slider .em-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Slider images - fill the entire screen width */
.em-design1-final .em-hero.em-slider .em-slide > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;

    object-fit: cover !important;
    object-position: center center !important;
}

/* Slide 2 image */
.em-slider .em-slide:nth-child(2) > img {
    object-position: center center !important;
}

/* Slide 3 image */
.em-slider .em-slide:nth-child(3) > img {
    object-position: center 32% !important;
}

/* Dark overlay on pictures */
.em-slider .em-slide::after {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.42),
        rgba(0, 0, 0, 0.12) 65%,
        transparent
    );

    pointer-events: none;
}

/* ==========================================
   WELCOME MESSAGE BOX
========================================== */

.em-slider .em-slide-message {
    position: absolute;
    z-index: 2;

    left: max(6%, calc((100% - 1380px) / 2));
    top: 42%;

    transform: translateY(-35%);

    max-width: 710px;
    padding: 18px 22px;

    background: rgba(0, 0, 0, 0.53);
    color: #ffffff;

    border-radius: 0;
    backdrop-filter: none;
}

/* Welcome small heading */
.em-slider .em-slide-kicker {
    font-size: clamp(22px, 2.15vw, 35px);
    font-weight: 800;
    color: #ffdf24;
    line-height: 1.18;
    letter-spacing: 0.01em;
}

/* Main welcome heading */
.em-slider .em-slide-message h1 {
    font-family: Arial, sans-serif;
    font-size: clamp(30px, 2.7vw, 47px);
    font-weight: 800;
    line-height: 1.15;

    margin: 12px 0;
    color: #ffdf24;
}

/* Welcome paragraph */
.em-slider .em-slide-message p {
    font-size: clamp(16px, 1.3vw, 20px);
    line-height: 1.65;
    color: #ffffff;
    margin: 0 0 22px;
}

/* ==========================================
   SLIDER BUTTONS
========================================== */

.em-slider .em-slide-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.em-slider .em-slide-links a {
    padding: 14px 28px;
    border-radius: 3px;

    background: #086c20;
    color: #ffffff;

    text-decoration: none;
    font-weight: 700;
}

/* Second outlined button */
.em-slider .em-slide-links a + a {
    background: rgba(0, 0, 0, 0.38);
    border: 1px solid #ffffff;
}

/* ==========================================
   SLIDER ARROWS
========================================== */

.em-slider .em-slider-arrow {
    position: absolute;
    z-index: 5;

    top: 50%;
    transform: translateY(-50%);

    border: 0;
    border-radius: 3px;

    width: 46px;
    height: 58px;

    color: #ffffff;
    background: rgba(0, 0, 0, 0.42);

    font-size: 28px;
    cursor: pointer;
}

/* Previous arrow */
.em-slider .em-slider-prev {
    left: 0;
}

/* Next arrow */
.em-slider .em-slider-next {
    right: 0;
}

/* ==========================================
   SLIDER DOTS
========================================== */

.em-slider .em-slider-dots {
    position: absolute;
    z-index: 5;

    bottom: 19px;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    gap: 11px;
}

.em-slider .em-slider-dot {
    width: 14px;
    height: 14px;

    border-radius: 50%;
    border: 0;

    background: rgba(255, 255, 255, 0.55);

    cursor: pointer;
    padding: 0;
}

/* Active slider dot */
.em-slider .em-slider-dot.is-active {
    background: #111111;
}

/* ==========================================
   MOBILE RESPONSIVE DESIGN
========================================== */

@media (max-width: 650px) {

    .em-design1-final .em-hero.em-slider {
        width: 100% !important;
        height: 590px !important;
    }

    .em-slider .em-slide > img {
        width: 100% !important;
        height: 100% !important;

        object-fit: cover !important;
        object-position: center !important;
    }

    .em-slider .em-slide-message {
        left: 26px;
        right: 26px;
        top: 43%;
        padding: 18px;
    }

    .em-slider .em-slide-message h1 {
        font-size: 29px;
    }

    .em-slider .em-slide-kicker {
        font-size: 23px;
    }

    .em-slider .em-slider-arrow {
        width: 26px;
        height: 42px;
        font-size: 19px;
    }
}

/* ==========================================
   ACCESSIBILITY
========================================== */

@media (prefers-reduced-motion: reduce) {
    .em-slider .em-slide {
        transition: none;
    }
}
