/**
 * Xe Tải VP - Features / Commitments Box Styling
 * Hỗ trợ 3 kiểu giao diện:
 * 1. Style "cards" (Khuyên Dùng): Mỗi ưu điểm là 1 thẻ Card riêng biệt, đổ bóng nhẹ, bo góc, hover nhấc lên.
 * 2. Style "clean" (Thanh Lịch / Phẳng): Trong suốt không viền/nền, hiển thị phẳng tự nhiên như ảnh mẫu.
 * 3. Style "bar": Dạng thanh ngang nguyên khối có vạch ngăn cách.
 */

.xetai-features-box {
    margin: 20px 0 35px 0;
    position: relative;
    z-index: 2;
    width: 100%;
}

.xetai-features-grid {
    display: grid;
    grid-template-columns: repeat(var(--xetai-feat-cols, 4), 1fr);
    gap: var(--xetai-feat-gap, 20px);
    align-items: stretch;
}

/* ==========================================================================
   STYLE 1: CARDS (Mỗi ưu điểm là 1 thẻ riêng biệt)
   ========================================================================== */
.xetai-features-box.style-cards .xetai-feature-card {
    background: #ffffff;
    border-radius: var(--xetai-card-radius, 14px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 72, 143, 0.09);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.28s ease;
    text-decoration: none !important;
    color: inherit;
    height: 100%;
}

.xetai-features-box.style-cards .xetai-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 72, 143, 0.12), 0 4px 10px rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 72, 143, 0.25);
}

/* ==========================================================================
   STYLE 2: CLEAN / FLAT (Phẳng, không viền/nền, hòa vào trang)
   ========================================================================== */
.xetai-features-box.style-clean .xetai-feature-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    transition: transform 0.25s ease;
    text-decoration: none !important;
    color: inherit;
    height: 100%;
}

.xetai-features-box.style-clean .xetai-feature-card:hover {
    transform: translateY(-3px);
}

/* ==========================================================================
   STYLE 3: BAR (Thanh ngang nguyên khối)
   ========================================================================== */
.xetai-features-box.style-bar {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 72, 143, 0.08);
    padding: 22px 26px;
}

.xetai-features-box.style-bar .xetai-features-grid {
    gap: 0;
}

.xetai-features-box.style-bar .xetai-feature-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    transition: transform 0.25s ease;
    text-decoration: none !important;
    color: inherit;
}

.xetai-features-box.style-bar.has-divider .xetai-feature-card:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(0, 72, 143, 0.15), transparent);
}

/* ==========================================================================
   COMMON CARD ELEMENTS (Icon, Title, Desc)
   ========================================================================== */
.xetai-feature-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.xetai-feature-card:hover .xetai-feature-icon {
    transform: scale(1.1) rotate(2deg);
}

.xetai-feature-icon img,
.xetai-feature-icon svg {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.xetai-feature-content {
    flex: 1;
    min-width: 0;
}

.xetai-feature-title {
    margin: 0 0 4px 0 !important;
    font-size: 15px;
    font-weight: 700;
    color: #00488F;
    line-height: 1.3;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.xetai-feature-card:hover .xetai-feature-title {
    color: #D32F2F;
}

.xetai-feature-desc {
    margin: 0 !important;
    font-size: 12.5px;
    color: #555555;
    line-height: 1.45;
    word-break: break-word;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    .xetai-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .xetai-features-box.style-bar .xetai-features-grid {
        gap: 16px 0;
    }
    .xetai-features-box.style-bar.has-divider .xetai-feature-card:nth-child(2n)::after {
        display: none;
    }
    .xetai-features-box.style-bar.has-divider .xetai-feature-card:nth-child(2n-1)::after {
        display: block;
    }
}

@media (max-width: 600px) {
    .xetai-features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .xetai-features-box.style-cards .xetai-feature-card,
    .xetai-features-box.style-clean .xetai-feature-card {
        padding: 14px 16px;
        gap: 14px;
    }
    .xetai-features-box.style-bar {
        padding: 16px 12px;
        border-radius: 12px;
    }
    .xetai-features-box.style-bar.has-divider .xetai-feature-card::after {
        display: none !important;
    }
    .xetai-features-box.style-bar .xetai-feature-card {
        padding: 8px 12px;
        gap: 14px;
    }
}
