/* Khung bọc ngoài toàn bộ mặt cắt */
.sg-section-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Lưới hiển thị trên Desktop (2 Cột) */
.sg-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Cấu trúc Thẻ dịch vụ mặc định */
.sg-card {
    background-color: transparent; 
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-light-blue);
    box-shadow: 0 8px 24px rgba(27, 42, 78, 0.04);
    transition: 
        transform 0.3s ease, 
        box-shadow 0.3s ease, 
        border-left-color 0.3s ease, 
        border-right-color 0.3s ease, 
        border-bottom-color 0.3s ease;
}

/* Tạo ảnh nền và làm mờ riêng biệt */
.sg-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/wp-content/uploads/2026/09/zzz.jpg');
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    z-index: -1;
}

/* Thêm lớp phủ nhẹ để chữ đọc rõ ràng hơn (tùy chọn) */
.sg-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7); /* Phủ một lớp trắng mờ để chữ tương phản tốt hơn */
    z-index: -1;
}

/* Định nghĩa viền trên riêng biệt cho nhóm màu Indigo */
.sg-card.sg-theme-indigo {
    border-top: 4px solid var(--color-indigo) !important;
}

/* Định nghĩa viền trên riêng biệt cho nhóm màu Teal */
.sg-card.sg-theme-teal {
    border-top: 4px solid var(--color-teal) !important;
}

/* HIỆU ỨNG HOVER Chỉ thay đổi màu viền Trái, Phải, Dưới và nâng nhẹ thẻ lên. Viền trên giữ nguyên. */
.sg-card.sg-theme-indigo:hover {
    transform: translateY(-6px);
    border-left-color: var(--color-indigo);
    border-right-color: var(--color-indigo);
    border-bottom-color: var(--color-indigo);
    box-shadow: 0 12px 30px rgba(61, 78, 216, 0.08);
}

.sg-card.sg-theme-teal:hover {
    transform: translateY(-6px);
    border-left-color: var(--color-teal);
    border-right-color: var(--color-teal);
    border-bottom-color: var(--color-teal);
    box-shadow: 0 12px 30px rgba(0, 141, 165, 0.08);
}

/* Phần Đầu của Thẻ */
.sg-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    width: 100%;
}

.sg-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Khung chứa Icon Bo góc tròn */
.sg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.sg-theme-indigo .sg-icon {
    background-color: var(--color-light-blue);
    color: var(--color-indigo);
}

.sg-theme-teal .sg-icon {
    background-color: rgba(0, 141, 165, 0.1);
    color: var(--color-teal);
}

/* Tiêu đề */
.sg-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    color: var(--color-deep-navy);
}

/* Chỉ số góc phải (#01, #02...) */
.sg-number {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-teal);
    background-color: var(--color-brand-white);
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* --- PHẦN NỘI DUNG MÔ TẢ CHỮ VÀ GIÃN DÒNG --- */
.sg-card-body p {
    font-size: 17px;
    line-height: 1.6;
    color: var(--color-black);
    margin: 0 0 14px 0; 
}

/* Loại bỏ khoảng cách thừa của dòng cuối cùng để thẻ cân đối */
.sg-card-body p:last-child {
    margin-bottom: 0;
}

/* Chỉ định màu chữ khi sử dụng tính năng Tô đậm */
.sg-card-body strong {
    color: var(--color-deep-navy);
    font-weight: 700;
}

/* --- HỆ THỐNG ĐIỀU HƯỚNG DOTS TRÊN MOBILE --- */
.sg-dots {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.sg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-slate-gray);
    opacity: 0.3;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Hiệu ứng hoạt động của dấu chấm */
.sg-dot.active {
    opacity: 1;
    background-color: var(--color-indigo);
    width: 20px;
    border-radius: 4px;
}

/* --- ĐIỀU CHỈNH TƯƠNG THÍCH TRÊN DI ĐỘNG (MOBILE & TABLET) --- */
@media (max-width: 768px) {
    .sg-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        padding: 10px 16px 20px 16px;
        margin: 0 -16px;
    }
    
    .sg-grid::-webkit-scrollbar {
        display: none;
    }
    
    .sg-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }
    
    .sg-dots {
        display: flex;
    }
}