/* ========================================
   Pure CSS Fade Slider - Image Tag Implementation
   Automatically adjusts height based on image content.
======================================== */

/* Parent Container Overrides */
/* Force auto height to let the content expand the container */
body #index_header_content,
body #index_slider_wrap,
body #css-fade-slider-wrap {
    height: auto !important;
    min-height: 0 !important;
    padding: 1px 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

#css-fade-slider {
    width: 100%;
    position: relative;
    /* Use Grid to stack slides on top of each other */
    display: grid;
    grid-template-areas: "stack";
    overflow: hidden;
}

/* Slides */
#css-fade-slider .slide {
    /* All slides occupy the same grid cell */
    grid-area: stack;
    position: relative;
    /* Default position for grid contents */
    width: 100%;
    height: auto;
    /* Let content define height */

    opacity: 0;
    z-index: 1;
    will-change: opacity;
}

/* The actual image */
#css-fade-slider .slide .slider-image {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: bottom;
    /* Removes unwanted bottom space */
}


/* 
   Animation Logic for 3 Slides
   Fade In 0.5s, Keep 5s, Fade Out 0.5s.
   Total Cycle = 16.5s.
*/
@keyframes cssFadeSlider3 {
    0% {
        opacity: 0;
    }

    3.03% {
        opacity: 1;
    }

    33.33% {
        opacity: 1;
    }

    36.36% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

#css-fade-slider.slides-3 .slide {
    animation-name: cssFadeSlider3;
    animation-duration: 16.5s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

#css-fade-slider.slides-3 .slide:nth-child(1) {
    animation-delay: -0.5s;
}

#css-fade-slider.slides-3 .slide:nth-child(2) {
    animation-delay: 5.0s;
}

#css-fade-slider.slides-3 .slide:nth-child(3) {
    animation-delay: 10.5s;
}


/* 
   Animation Logic for 2 Slides
   Total Cycle = 11.0s.
*/
@keyframes cssFadeSlider2 {
    0% {
        opacity: 0;
    }

    4.54% {
        opacity: 1;
    }

    50.00% {
        opacity: 1;
    }

    54.54% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

#css-fade-slider.slides-2 .slide {
    animation-name: cssFadeSlider2;
    animation-duration: 11.0s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

#css-fade-slider.slides-2 .slide:nth-child(1) {
    animation-delay: -0.5s;
}

#css-fade-slider.slides-2 .slide:nth-child(2) {
    animation-delay: 5.0s;
}


/* Single Slide Case */
#css-fade-slider.slides-1 .slide {
    opacity: 1;
    animation: none;
}


/* ========================================
   Styles ported/adapted from #index_slider
======================================== */

#css-fade-slider .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: rgba(0, 0, 0, 0.3);
}

#css-fade-slider .caption {
    padding: 0;
    width: 800px;
    max-width: 90%;
    margin: auto;
    position: absolute;
    text-align: center;
    z-index: 4;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    box-sizing: border-box;
}

#css-fade-slider .caption_inner {
    display: block;
}

#css-fade-slider .caption .catch {
    line-height: 1.3;
    word-wrap: break-word;
    position: relative;
    font-weight: 500;
    margin: 0;
    color: #fff;
    font-size: 32px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

#css-fade-slider .caption .desc {
    font-size: 16px;
    line-height: 2.3;
    margin: 15px 0 0 0;
    position: relative;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

#css-fade-slider .caption .button {
    font-size: 16px;
    min-width: 260px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    position: relative;
    padding: 0 60px;
    margin-top: 25px;
    display: inline-block;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    text-decoration: none;
    transition: opacity 0.3s;
}

#css-fade-slider .caption .button:hover {
    opacity: 0.8;
}

/* Direction Classes */
#css-fade-slider .direction_type1 .caption_inner {
    text-align: left;
}

#css-fade-slider .direction_type2 .caption_inner {
    text-align: center;
}

#css-fade-slider .direction_type3 .caption_inner {
    text-align: right;
}

/* Responsive Visibility Logic */
@media screen and (min-width: 768px) {
    #css-fade-slider .caption.mobile {
        display: none !important;
    }
}

@media screen and (max-width: 767px) {
    #css-fade-slider .caption.pc {
        display: none !important;
    }

    #css-fade-slider .caption {
        width: 90%;
    }

    #css-fade-slider .caption .catch {
        font-size: 24px;
    }

    #css-fade-slider .caption .desc {
        font-size: 14px;
    }
}