/* Additional CSS for the WooCommerce Categories Slider */

/* Service card styling */
.service-categories-slider {
    margin: 0 -10px; /* Negative margin để bù đắp padding của slide */
    visibility: hidden; /* Ẩn ban đầu để tránh nhấp nháy */
    position: relative; /* Cần thiết cho các nút điều hướng */
}

/* Hiển thị sau khi slick đã khởi tạo */
.service-categories-slider.slick-initialized {
    visibility: visible;
}

.service-slide {
    padding: 0 10px;
    height: auto;
}

.service-card {
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 15px;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-radius: 5px 5px 0 0;
    overflow: hidden;
}

.service-image img {
    max-height: 100%;
    max-width: 100%;
    padding: 15px;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-footer {
    background-color: var(--secondary-color, #dc3545);
    padding: 15px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-footer h5 {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Slider navigation buttons */
.service-slider-prev,
.service-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid var(--primary-color, #0066b3);
    color: var(--primary-color, #0066b3);
    font-size: 16px;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.service-slider-prev {
    left: -20px;
}

.service-slider-next {
    right: -20px;
}

.service-slider-prev:hover,
.service-slider-next:hover {
    background-color: var(--primary-color, #0066b3);
    border-color: var(--primary-color, #0066b3);
    color: white;
}

/* Styling for Slick dots */
.slick-dots {
    bottom: -30px;
}

.slick-dots li button:before {
    font-size: 12px;
    color: var(--primary-color, #0066b3);
    opacity: 0.5;
}

.slick-dots li.slick-active button:before {
    color: var(--secondary-color, #dc3545);
    opacity: 1;
}

/* Trạng thái loading - khi chưa được khởi tạo */
.service-categories-slider:not(.slick-initialized) {
    display: flex;
    flex-wrap: wrap;
}

/* Responsive không sử dụng slick */
.service-categories-slider:not(.slick-initialized) .service-slide {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 10px;
}

/* Ẩn nút trong footer */
.text-center > .service-slider-prev,
.text-center > .service-slider-next {
    display: none !important;
}

@media (max-width: 1024px) {
    .service-categories-slider:not(.slick-initialized) .service-slide {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

@media (max-width: 768px) {
    .service-categories-slider:not(.slick-initialized) .service-slide {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Điều chỉnh vị trí nút cho màn hình nhỏ */
    .service-slider-prev {
        left: -15px;
    }
    
    .service-slider-next {
        right: -15px;
    }
}

@media (max-width: 576px) {
    .service-categories-slider:not(.slick-initialized) .service-slide {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* News Slider Specific Styles */
.news-slider:not(.slick-initialized) {
    display: flex;
    overflow-x: hidden;
}

.news-slider:not(.slick-initialized) .news-slide {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 10px;
}

.news-slider .slick-track {
    display: flex;
}

.news-slider .slick-slide {
    height: auto;
    margin: 0 10px;
}

.news-slider .slick-slide > div {
    height: 100%;
}

.news-slider a:hover .news-title {
    color: var(--primary-color);
}

.news-slider a:hover .news-card {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-slider a {
    transition: all 0.3s ease;
}
/* Định vị nút điều hướng cho slider tin tức */
.news-section {
    position: relative;
}

.news-section .news-slider-prev,
.news-section .news-slider-next {
    position: absolute;
    top: 55%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--primary-color, #0066b3);
    color: var(--primary-color, #0066b3);
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.news-section .news-slider-prev:hover,
.news-section .news-slider-next:hover{
    background-color: var(--primary-color, #0066b3);
    color: #fff;
}
/* Điều chỉnh vị trí nút để chúng nằm gần nội dung hơn */
.news-section .news-slider-prev {
    left: 15%;
}

.news-section .news-slider-next {
    right: 15%;
}

/* News Slider Responsive Styles */
@media (max-width: 1300px) {
.news-section .news-slider-prev {
    left: 5%;
}

.news-section .news-slider-next {
    right: 5%;
}
    
}
@media (max-width: 1200px) {
    .news-section .news-slider-prev {
        left: 3%;
    }
    
    .news-section .news-slider-next {
        right: 3%;
    }
    
    .news-slider:not(.slick-initialized) .news-slide {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}
@media (max-width: 992px) {
    .news-section .news-slider-prev {
        left: 1%;
    }
    
    .news-section .news-slider-next {
        right: 1%;
    }
}
@media (max-width: 768px) {
    .slick-arrow{
        display:none !important;
    }
    
    .news-slider:not(.slick-initialized) .news-slide {
        flex: 0 0 50%;
        max-width: 50%;
    }
}
@media (max-width: 576px) {
    .news-slider:not(.slick-initialized) .news-slide {
        flex: 0 0 100%;
        max-width: 100%;
    }
}