/* ==============================================================
   CẤU TRÚC CHUNG BỘ NÚT LIÊN HỆ
============================================================== */
.floating-contact {
    position: fixed;
    z-index: 9999;
    display: flex;
    transition: all 0.3s ease;
}

.contact-item {
    position: relative;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.2s ease-in-out;
}

.contact-item:hover {
    transform: translateY(-5px); /* Hiệu ứng nảy nhẹ khi hover trên PC */
}

.contact-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

/* ==============================================================
   HIỆU ỨNG SÓNG TỎA (PULSE EFFECT) CHO GIAO DIỆN PC
============================================================== */
.icon-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    z-index: 1;
    animation: contactPulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

.pulse-phone { background: #ed1b24; }
.pulse-zalo { background: #ffffff; }
.pulse-messenger { background: #ffffff; }

@keyframes contactPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.2);
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
        box-shadow: 0 0 0 15px rgba(0, 0, 0, 0);
    }
}

/* ==============================================================
   RESPONSIVE CHO MÀN HÌNH DESKTOP (MẶC ĐỊNH BÊN TRÁI)
============================================================== */
@media (min-width: 769px) {
    .floating-contact {
        bottom: 80px;
        right: 30px; /* Đổi thành "right: 30px; left: auto;" nếu muốn hiện bên phải */
        flex-direction: column;
        gap: 20px;
    }
}

/* ==============================================================
   RESPONSIVE CHO MÀN HÌNH MOBILE (NẰM NGANG DƯỚI ĐÁY)
============================================================== */
@media (max-width: 768px) {
    .floating-contact {
        bottom: 0;
        left: 0;
        width: 100%;
        flex-direction: row;
        justify-content: space-around;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(5px);
        padding: 10px 0;
        box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
        /* Hỗ trợ vùng an toàn trên iPhone đời mới */
        padding-bottom: env(safe-area-inset-bottom, 10px); 
    }
    
    .contact-item {
        width: 45px; /* Thu nhỏ icon lại một chút trên mobile */
        height: 45px;
    }
    
    .contact-item:hover {
        transform: none; /* Tắt hiệu ứng nảy trên cảm ứng */
    }
    
    .icon-pulse {
        display: none; /* Tắt sóng tỏa trên mobile để tránh vướng và rối mắt */
    }
}
/* Kết thúc nút liên hệ */

/* Menu bên trái */
/* Thiết lập biến màu sắc để dễ dàng thay đổi theo bộ nhận diện thương hiệu */
:root {
    --menu-primary-color: #0f75bd; /* Màu chủ đạo (Xanh dương) */
    --menu-highlight-color: #ff3131; /* Màu nổi bật (Đỏ/Cam) */
    --menu-bg-color: #ffffff;
    --menu-border-color: #e0e0e0;
    --menu-text-dark: #333333;
    --menu-text-light: #555555;
    --transition-speed: 0.3s;
}

/* Container chính */
.expert-vertical-menu {
    width: 100%;
    max-width: 320px;
    background-color: var(--menu-bg-color);
    border: 1px solid var(--menu-border-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    font-family: 'Segoe UI', Arial, sans-serif; /* Fallback an toàn, nhanh */
}

/* Reset danh sách */
.expert-vertical-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.expert-vertical-menu a {
    text-decoration: none;
    display: block;
    transition: all var(--transition-speed) ease;
}

/* ========== LÀM NỔI BẬT MENU CHA ========== */
.expert-vertical-menu .menu-level-1 > li.parent-item {
    border-bottom: 2px solid var(--menu-border-color);
}
.expert-vertical-menu .menu-level-1 > li.parent-item:last-child {
    border-bottom: none;
}

.expert-vertical-menu .menu-level-1 > li.parent-item > a {
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    color: var(--menu-primary-color);
    background-color: #f8f9fa; /* Nền nhạt phân biệt */
    border-left: 4px solid var(--menu-primary-color);
    text-transform: uppercase;
    position: relative;
    letter-spacing: 0.5px;
}

/* Hiệu ứng hover cho Menu Cha */
.expert-vertical-menu .menu-level-1 > li.parent-item > a:hover {
    background-color: var(--menu-primary-color);
    color: #ffffff;
    border-left-color: var(--menu-highlight-color);
}

/* Icon (mũi tên hoặc gạch đầu dòng) cho menu cha bằng CSS thuần (Không cần tải font icon) */
.expert-vertical-menu .menu-level-1 > li.parent-item.has-children > a::after {
    content: "▼";
    position: absolute;
    right: 20px;
    font-size: 12px;
    color: inherit;
    opacity: 0.7;
}

/* ========== MENU CON (HIỂN THỊ SẴN, KHÔNG ẨN) ========== */
.expert-vertical-menu .menu-level-2 {
    display: block; /* Yêu cầu: Hiện menu con ra */
    background-color: var(--menu-bg-color);
}

.expert-vertical-menu .menu-level-2 li {
    border-bottom: 1px dashed #ececec;
}
.expert-vertical-menu .menu-level-2 li:last-child {
    border-bottom: none;
}

.expert-vertical-menu .menu-level-2 li a {
    padding: 0px 10px 0px 20px; /* Thụt lề để thấy rõ phân cấp */
    font-size: 16px;
    font-weight: 500;
    color: var(--menu-text-light);
    position: relative;
}

/* Dấu chấm trang trí cho menu con */
.expert-vertical-menu .menu-level-2 li a::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: #cccccc;
    border-radius: 50%;
    transition: background-color var(--transition-speed) ease;
}

/* Hiệu ứng đẹp, mượt mà khi Hover Menu Con */
.expert-vertical-menu .menu-level-2 li a:hover {
    color: var(--menu-highlight-color);
    padding-left: 42px; /* Hiệu ứng đẩy nhẹ text sang phải */
    background-color: #fafafa;
}

.expert-vertical-menu .menu-level-2 li a:hover::before {
    background-color: var(--menu-highlight-color);
    box-shadow: 0 0 5px var(--menu-highlight-color);
}
/* Kết thúc Menu bên trái */