/**
 * Tiện Ích - Frontend Styles
 */

/* ==================== Container ==================== */
.hdev-htic-fullscreen-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Needs full height */
    min-height: 100vh;
    overflow: hidden;
    z-index: 1;
}

.hdev-htic-container {
    width: 100%;
    height: 100%;
}

.hdev-htic-container .swiper-wrapper {
    height: 100%;
}

.hdev-htic-container .swiper-slide {
    height: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background-color: #fff;
    /* Prevent transparency bleed-through */
    z-index: 1;
}

.hdev-htic-container .swiper-slide-active {
    z-index: 2;
}

.hdev-htic-container .slide-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Default: Show Desktop, Hide Mobile */
.hdev-htic-container .slide-bg-mobile {
    display: none !important;
}

.hdev-htic-container .slide-bg-desktop {
    display: block !important;
    opacity: 1 !important;
}

/* ==================== Overlay Top Full Width ==================== */
.hdev-htic-overlay-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: none;
    background: linear-gradient(to right, rgba(0, 128, 96, 0) 0%, rgba(0, 128, 96, 1) 100%);
    /* Green gradient opacity left to right */
    padding: 20px 0;
    z-index: 10;
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hdev-htic-overlay-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* Center horizontally in row */
    justify-content: flex-end;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== Title ==================== */

/* ==================== Title ==================== */
.hdev-htic-title {
    font-family: var(--hdev-font-heading);
    /* Use theme font if available */
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: left !important;
    /* Force left alignment */
    display: block;
    /* Ensure it behaves as a block for text-align */
    line-height: 1.2;
    color: #fff;
    flex: 0 0 auto;
    /* Don't grow/shrink unexpectedly */
    /* Handle newlines from textarea/nl2br */
}

/* ==================== Description ==================== */
.hdev-htic-desc {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: #f0fdf4;
    max-width: 320px;
    flex: 1;
    padding-left: 40px;
    text-align: justify;
}

/* ==================== Mobile Responsive ==================== */
@media screen and (max-width: 768px) {
    .hdev-htic-fullscreen-wrapper {
        height: auto;
        min-height: 60vh;
    }

    .hdev-htic-overlay-box {
        position: absolute;
        width: 100%;
        top: 0;
        bottom: auto;
        left: 0;
        padding: 20px;
        background: rgba(0, 128, 96, 0.95);
        /* More solid on mobile */
    }

    .hdev-htic-overlay-content {
        flex-direction: column;
        /* Stack vertically on mobile */
        gap: 15px;
        align-items: flex-start;
    }

    .hdev-htic-title {
        text-align: left;
        font-size: 24px;
        width: 100%;
    }

    .hdev-htic-desc {
        border-left: none;
        padding-left: 0;
        max-width: 100%;
    }

    /* Only hide desktop image IF it has the specific class */
    .hdev-htic-container .hdev-hide-on-mobile {
        display: none !important;
    }

    .hdev-htic-container .slide-bg-desktop {
        height: 100% !important;
        /* Ensure desktop image fills height on mobile */
        object-fit: cover;
    }

    .hdev-htic-container .slide-bg-mobile {
        display: block !important;
        opacity: 1 !important;
        position: relative !important;
        height: 100% !important;
        object-fit: cover;
    }
}

/* ==================== Pagination Dots ==================== */
.hdev-htic-container .swiper-pagination {
    bottom: 30px !important;
}

/* Mobile responsive pagination position */
@media screen and (max-width: 768px) {
    .hdev-htic-container .swiper-pagination {
        bottom: 15px !important;
        /* Move up slightly to avoid overlapping text if very long */
        display: none;
        /* Often on mobile dots overlaying text is bad, but user didn't ask to hide. keeping it but careful */
    }

    /* Actually, let's keep it visible but maybe ensure z-index */
    .hdev-htic-container .swiper-pagination {
        display: flex;
        z-index: 20;
    }
}

.hdev-htic-container .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #fff;
    opacity: 0.5;
    margin: 0 6px !important;
    transition: all 0.3s ease;
}

.hdev-htic-container .swiper-pagination-bullet-active {
    opacity: 1;
    width: 30px;
    border-radius: 5px;
    background: #fff;
}