/**
 * Flatsome Auto Slider - CSS Styles
 * Version: 1.0.0
 */

/* ===================================
   Main Container
   =================================== */
.fas-auto-slider {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* ===================================
   Header Section
   =================================== */
.fas-header {
    text-align: center;
    margin-bottom: 30px;
}

.fas-subtitle {
    font-size: 14px;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 500;
}

.fas-title {
    font-size: 32px;
    font-weight: bold;
    margin: 10px 0;
    color: #333;
    line-height: 1.3;
}

.fas-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    max-width: 800px;
    margin: 15px auto 0;
}

/* ===================================
   Main Banner Area
   =================================== */
.fas-main-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 70px;
    /*background: #f5f5f5;*/
}

.banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 1;
}

.banner-item.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    z-index: 2;
}

.banner-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
	object-position:right;
}

/* Desktop/Mobile image visibility */
.banner-img-mobile {
    display: none;
}

.banner-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #999;
    font-size: 14px;
}

/* ===================================
   Thumbnails Grid
   =================================== */
.fas-thumbnails {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0px;
}

.fas-thumb-item {
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    position: relative;
}

/*.fas-thumb-item:hover {
    border-color: #2196F3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.1);
}*/

.fas-thumb-item.active {
    /*border-color: #2196F3;
background: #f0f8ff;*/
}

/* ===================================
   Progress Bar
   =================================== */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #fff;
    border-radius: 0;
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #D4AF37;
    transition: width 0.1s linear;
    position: absolute;
    top: 0;
    left: 0;
}

/* Progress animation when active */
.fas-thumb-item.active .progress-fill {
    animation: progressAnimation var(--timing, 5000ms) linear;
}

@keyframes progressAnimation {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

/* Reset animation when stopped */
.fas-thumb-item:not(.active) .progress-fill {
    animation: none;
    width: 0%;
}

/* ===================================
   Thumbnail Content
   =================================== */
.thumb-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
    line-height: 1.4;
}

.thumb-content {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.fas-thumb-item.active .thumb-title {
    color: #2196F3;
}

/* ===================================
   Vertical Layout
   =================================== */
.fas-auto-slider.fas-vertical .fas-vertical-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    align-items: center;
	
}

.fas-thumbnails-vertical {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.fas-auto-slider.fas-vertical .fas-thumb-item {
    cursor: pointer;
    /*padding: 15px;
border: 2px solid #e0e0e0;
border-radius: 8px;
background: #fff;*/
    transition: all 0.3s ease;
    position: relative;
}

/*.fas-auto-slider.fas-vertical .fas-thumb-item:hover {
    border-color: #2196F3;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.1);
}*/

.fas-auto-slider.fas-vertical .fas-thumb-item.active {
    /* border-color: #2196F3;
 background: #f0f8ff;*/
}

.fas-auto-slider.fas-vertical .fas-main-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0;

}

/* ===================================
   Responsive Design
   =================================== */

/* Tablet */
@media (max-width: 1024px) {
    .fas-title {
        font-size: 28px;
    }

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

    .fas-thumbnails {
        gap: 15px;
    }

    .thumb-title {
        font-size: 16px;
    }

    .thumb-content {
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .fas-auto-slider {
        padding: 15px;
        display: flex;
        flex-direction: column;
    }

    .fas-header {
        margin-bottom: 20px;
        order: 1;
    }

    .fas-subtitle {
        font-size: 12px;
    }

    .fas-title {
        font-size: 24px;
    }

    .fas-description {
        font-size: 14px;
    }

    /* Banner ở trên cùng */
    .fas-main-banner {
        height: 250px !important;
        margin-bottom: 20px;
        order: 2;
        border-radius: 12px;
    }

    /* Show mobile image, hide desktop image */
    .banner-img-desktop {
        display: none !important;
    }

    .banner-img-mobile {
        display: block !important;
        object-fit: cover !important;
        object-position: left;
		border-radius:8px;
    }

    /* 3 items xếp dọc phía dưới */
    .fas-thumbnails {
        grid-template-columns: 1fr;
        gap: 15px;
        order: 3;
    }

    .fas-thumb-item {
        padding: 15px;
        width: 100%;
    }

    .thumb-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .thumb-content {
        font-size: 13px;
        line-height: 1.7;
    }

    .thumb-content p {
        margin: 0;
    }

    /* Vertical layout on mobile */
    .fas-auto-slider.fas-vertical .fas-vertical-layout {
        display: flex;
        flex-direction: column;
        order: 2;
    }

    .fas-auto-slider.fas-vertical .fas-main-banner {
        order: 2;
        margin-bottom: 20px;
    }

    .fas-auto-slider.fas-vertical .fas-thumbnails-vertical {
        order: 1;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .fas-auto-slider {
        padding: 0px;
    }

    .fas-title {
        font-size: 20px;
    }

    .fas-description {
        font-size: 13px;
    }

    .fas-main-banner {
        height: 100% !important;
        border-radius: 8px;
        margin-bottom: 15px;
    }

    .fas-thumbnails {
        gap: 12px;
    }

    .fas-thumb-item {
        padding: 12px;
    }

    .progress-bar {
        height: 3px;
        margin-bottom: 10px;
    }

    .thumb-title {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .thumb-content {
        font-size: 12px;
    }
}

/* ===================================
   Loading States
   =================================== */
.fas-auto-slider.loading .fas-main-banner {
    opacity: 0.7;
}

.fas-auto-slider.loading .fas-thumb-item {
    pointer-events: none;
    opacity: 0.5;
}

/* ===================================
   UX Builder Preview Styles
   =================================== */
.fas-auto-slider-builder {
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.fas-thumb-item-builder {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.fas-thumb-item-builder:hover {
    border-color: #2196F3;
}

/* ===================================
   Accessibility
   =================================== */
.fas-thumb-item:focus {
    outline: 2px solid #2196F3;
    outline-offset: 2px;
}

.fas-thumb-item:focus:not(:focus-visible) {
    outline: none;
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .fas-auto-slider {
        break-inside: avoid;
    }

    .fas-thumbnails {
        display: none;
    }

    .banner-item {
        position: static !important;
        opacity: 1 !important;
        page-break-inside: avoid;
    }

    .banner-item:not(.active) {
        display: none;
    }
}

/* ===================================
   Dark Mode Support (Optional)
   =================================== */
@media (prefers-color-scheme: dark) {
    .fas-auto-slider {
        color: #e0e0e0;
    }

    .fas-title {
        color: #fff;
    }

    .fas-description,
    .thumb-content {
        color: #b0b0b0;
    }

    .fas-thumb-item {
        /* background: #2a2a2a;
 border-color: #444;*/
    }

    .fas-thumb-item.active {
        /*background: #1a3a5a;
        border-color: #2196F3;*/
    }

    .thumb-title {
        color: #e0e0e0;
    }

    .fas-thumb-item.active .thumb-title {
        color: #64B5F6;
    }

    .progress-bar {
        background: #fff;
    }

    .progress-fill {
        background: #D4AF37;
    }
}

.content-pd {
    text-align: center;
    padding-top: 24px;
    padding-left: 16px;
    padding-right: 16px;
}

.content-pd .thumb-title {
    color: var(--Status-Active, #FFD9BE);
    text-align: center;

    /* Text lg/Semibold */
    font-family: Inter;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 28px;
    /* 155.556% */
}

.content-pd .thumb-content p {
    color: var(--Status-common, #FDFBF7);
    text-align: center;

    /* Text md/Regular */
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    /* 150% */
}

.fas-thumb-item.active .thumb-title {
    color: var(--Secondary-lighter, #D4AF37);
}

.fas-auto-slider.fas-vertical .fas-header {
    text-align: left;
}

.fas-auto-slider.fas-vertical .fas-subtitle {
    color: var(--Secondary-lighter, #D4AF37);

    /* Text md/Semibold */
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
    /* 150% */
}

.fas-auto-slider.fas-vertical .fas-title {
    color: var(--Status-Active, #FFD9BE);

    /* Display md/Semibold */
    font-family: Inter;
    font-size: 36px;
    font-style: normal;
    font-weight: 600;
    line-height: 44px;
    /* 122.222% */
    letter-spacing: -0.72px;
}

.fas-auto-slider.fas-vertical .fas-description {
    color: var(--Status-common, #FDFBF7);

    /* Text xl/Regular */
    font-family: Inter;
    font-size: 20px;
    font-style: normal;
    font-weight: 400;
    line-height: 30px;
    margin-left: 0;
    /* 150% */
}

.fas-vertical-layout .progress-bar {
    width: 4px;
    height: 100%;
    /*background: #fff;*/
    border-radius: 0;
    margin-bottom: 0;
    overflow: hidden;
    position: absolute;
}

.content-pd-vertical {
    padding-top: 24px;
    padding-bottom: 24px;
    padding-left: 24px;
}

.content-pd-vertical .thumb-title {
    color: var(--Status-Active, #FFD9BE);

    /* Display sm/Semibold */
    font-family: Inter;
    font-size: 30px;
    font-style: normal;
    font-weight: 600;
    line-height: 38px;
    /* 126.667% */
}

.content-pd-vertical .thumb-content p {
    color: var(--Status-common, #FDFBF7);

    /* Text lg/Regular */
    font-family: Inter;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: 28px;
    /* 155.556% */
}

.fas-thumb-item.active .content-pd-vertical .thumb-title {
    color: var(--Secondary-lighter, #D4AF37);
}

@media (max-width: 768px) {
    .fas-auto-slider.fas-vertical .fas-main-banner {
        height: 218px !important;
    }

    .fas-thumbnails-vertical .banner-img-mobile {}

    .fas-auto-slider.fas-vertical .fas-title {
        font-size: 30px;
        line-height: 38px;
    }

    .fas-auto-slider.fas-vertical .fas-subtitle {
        font-size: 14px;
        line-height: 20px;
    }

    .fas-auto-slider.fas-vertical .fas-description {
        font-size: 18px;
        line-height: 28px;
    }

    .fas-auto-slider.fas-vertical .fas-thumb-item {
        padding-left: 0;
    }

    .content-pd-vertical .thumb-title {
        font-size: 18px;
        line-height: 28px;
    }

    .content-pd-vertical .thumb-content p {
        font-size: 16px;
        line-height: 24px;
    }
}