/*
Theme Name: Wabi Sabi Child Theme
Theme URI: https://wabi-sabi.ancorathemes.com/
Description: Wabi Sabi is a Premium WordPress theme that has built-in support for popular Page Builders, slider with swipe gestures, and is SEO- and Retina-ready. The unique system of inheritance and override options allows setting up individual parameters for different sections of your site and supported plugins.
Author: AncoraThemes
Author URI: https://ancorathemes.com/
Version: 1.10.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, e-commerce, portfolio, grid-layout, one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, sticky-post, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks
Text Domain: wabi-sabi
Template: wabi-sabi
*/


/* ==========================================================================
   CSS CHO DARLEYS ACCORDION SLIDER
   ========================================================================== */

/* 1. Thiết lập chung cho Container */
.darleys-accordion-container {
    display: flex;
    display: -webkit-flex;
    flex-direction: row; /* Luôn nằm ngang trên PC */
    width: 100%;
    overflow: hidden;
    gap: 0; /* Khoảng cách mặc định, sẽ bị ghi đè bởi Elementor Control */
    box-sizing: border-box;
    transition: all 0.5s ease;
}

/* 2. Thiết lập cho từng Slide (Item) */
.darleys-accordion-item {
    position: relative;
    flex: 1; /* Chia đều chiều rộng ban đầu */
    height: 100%;
    min-width: 0; /* Tránh vỡ layout flex */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    overflow: hidden;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1), transform 0.3s ease;
}

/* Hiệu ứng phóng to khi Hover trên Desktop */
@media (min-width: 768px) {
    .darleys-accordion-item:hover {
        flex: 3; /* Độ rộng dãn ra khi hover */
    }
}

/* 3. Lớp phủ Overlay (Tạo độ tương phản để đọc chữ) */
.darleys-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0) 100%);
    opacity: 0.6;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.darleys-accordion-item:hover .darleys-item-overlay {
    opacity: 0.8;
}

/* 4. Nội dung bên trong (Content) */
.darleys-item-content {
    position: absolute;
    bottom: 40px;
    left: 30px;
    right: 30px;
    z-index: 2;
    color: #ffffff;
    pointer-events: none; /* Tránh cản trở việc click vào link */
}

.darleys-cat {
    display: block;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
    opacity: 0.8;
}

.darleys-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.2;
    white-space: nowrap; /* Tránh chữ bị xuống dòng khi item thu nhỏ */
}

/* Ẩn mô tả và nút khi không hover trên Desktop */
@media (min-width: 768px) {
    .darleys-desc, .darleys-readmore {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease 0.1s;
        max-height: 0;
        overflow: hidden;
    }

    .darleys-accordion-item:hover .darleys-desc,
    .darleys-accordion-item:hover .darleys-readmore {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
        margin-top: 10px;
        pointer-events: auto;
    }
}

/* 5. Nút Xem Thêm (Read More) */
.darleys-readmore {
    display: inline-flex;
    align-items: center;
    color: #ff4d4d; /* Màu cam/đỏ giống ảnh */
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    gap: 8px;
}

.darleys-svg-icon {
    display: flex;
    align-items: center;
}

/* ==========================================================================
   CSS CHO MOBILE (Dưới 767px) - CHUYỂN DỌC
   ========================================================================== */
@media (max-width: 767px) {
    .darleys-accordion-container {
        flex-direction: column !important; /* Quan trọng: Chuyển sang hàng dọc */
        height: auto !important; 
        gap: 20px !important; /* Khoảng cách giữa các card */
        padding: 10px;
    }

    .darleys-accordion-item {
        flex: none !important;
        width: 100% !important;
        height: 300px !important; /* Chiều cao cố định trên mobile */
        border-radius: 15px; /* Bo góc nhẹ */
    }

    .darleys-item-content {
        bottom: 20px;
        left: 20px;
    }

    /* Trên mobile luôn hiện thông tin, không cần hover */
    .darleys-desc, .darleys-readmore {
        opacity: 1 !important;
        transform: translateY(0) !important;
        max-height: none !important;
        display: block !important;
        pointer-events: auto;
    }

    .darleys-title {
        font-size: 22px;
        white-space: normal; /* Cho phép xuống dòng trên mobile */
    }

    .darleys-desc {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 10px;
        display: -webkit-box !important;
        -webkit-line-clamp: 2; /* Giới hạn 2 dòng mô tả */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}