/* public/css/navbar.css */

/* ========================================= */
/* 1. CẤU HÌNH CHUNG & FIX LỖI */
/* ========================================= */

/* Tăng kích thước chữ cho toàn bộ Link trong Navbar */
.navbar-nav .nav-link,
.desktop-nav-link,
.nav-link.dropdown-toggle {
    font-weight: 700 !important; /* Chữ đậm hơn nữa */
    font-size: 1.2rem !important; /* Tăng cỡ chữ to hơn (Gốc là 1rem) */
    color: --dark !important; /* Màu chữ đậm */
    text-transform: uppercase;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

/* FIX LỖI 2 MŨI TÊN: Ẩn mũi tên mặc định của Bootstrap */
.dropdown-toggle::after {
    display: none !important;
    content: none !important;
}

/* Hiệu ứng Icon rung nhẹ hoặc tỏa sáng trong menu */
@keyframes pulse-icon {
    0% { box-shadow: 0 0 0 0 rgba(196, 153, 99, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(196, 153, 99, 0); }
    100% { box-shadow: 0 0 0 0 rgba(196, 153, 99, 0); }
}

/* ========================================= */
/* 2. DESKTOP MENU STYLE */
/* ========================================= */

.desktop-nav-link {
    margin: 0 15px;
    padding: 10px 0;
    position: relative;
}

.desktop-nav-link:hover,
.desktop-nav-link.active,
.nav-link.dropdown-toggle:hover {
    color: #c49963; /* Màu vàng cam */
}

/* Hiệu ứng gạch dưới khi hover */
.desktop-nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: #c49963;
    transition: width 0.3s ease-in-out;
}

.desktop-nav-link:hover::after {
    width: 100%;
}

/* --- DROPDOWN MENU (DỊCH VỤ) --- */
.nav-item.dropdown {
    position: relative;
    margin: 0 15px;
}

/* Menu con xổ xuống */
.dropdown-menu {
    border: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 10px 0;
    margin-top: 0;
    display: none;
    position: absolute;
    background: #fff;
    min-width: 260px; /* Làm rộng ra chút để chứa chữ to */
    animation: fadeIn 0.3s ease;
}

.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    padding: 12px 20px;
    font-weight: 600;
    font-size: 1rem; /* Chữ trong menu con nhỏ hơn menu chính 1 chút */
    color: #555;
    transition: all 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #faefe0;
    color: #c49963;
    padding-left: 25px;
}

/* --- CUSTOM CALL BUTTON (NỔI BẬT) --- */
.btn-call-highlight {
    /* 1. MÀU SẮC & NỀN */
    background-color: #85634c !important; /* Mã màu Dark theo yêu cầu */
    color: #ffffff !important;            /* Chữ trắng */
    border: 1px solid #85634c;
    
    /* 2. KÍCH THƯỚC & FONT */
    font-weight: 800;
    font-size: 1.1rem;
    padding: 10px 25px;
    border-radius: 50px; /* Bo tròn viên thuốc */
    
    /* 3. CĂN CHỈNH */
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
    text-decoration: none;
    
    /* 4. HIỆU ỨNG CHUYỂN ĐỘNG (PULSE TOÀN BỘ NÚT) */
    position: relative;
    box-shadow: 0 0 0 0 rgba(133, 99, 76, 0.7); /* Màu bóng là màu #85634c dạng RGB */
    animation: pulse-gold-soft 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    transition: all 0.3s ease;
}

/* Hiệu ứng khi di chuột vào */
.btn-call-highlight:hover {
    background-color: #ffffff !important; /* Nền trắng */
    color: #85634c !important;            /* Chữ nâu */
    transform: translateY(-3px);          /* Nhấc nhẹ lên */
    box-shadow: 0 10px 20px rgba(0,0,0,0.15); /* Bóng đổ sâu hơn */
}

/* Icon điện thoại */
.btn-call-highlight i {
    font-size: 1.2rem;
    /* Hiệu ứng rung lắc cho riêng cái icon */
    animation: phone-shake 3s infinite; 
}

/* --- ĐỊNH NGHĨA KEYFRAMES (CHUYỂN ĐỘNG) --- */

/* 1. Hiệu ứng sóng lan tỏa (Pulse) màu Nâu */
@keyframes pulse-gold-soft {
    0% {
        transform: scale(0.98);
        box-shadow: 0 0 0 0 rgba(255, 215, 150, 0.65);
        opacity: 1;
    }

    60% {
        transform: scale(1.04);
        box-shadow: 0 0 0 20px rgba(255, 215, 150, 0.25);
        opacity: 0.9;
    }

    100% {
        transform: scale(0.98);
        box-shadow: 0 0 0 0 rgba(255, 215, 150, 0);
        opacity: 1;
    }
}

/* 2. Hiệu ứng rung chuông điện thoại (giữ nguyên hoặc tinh chỉnh) */
@keyframes phone-shake {
    0%, 90%, 100% { transform: rotate(0) scale(1); }
    91% { transform: rotate(-15deg) scale(1.1); }
    93% { transform: rotate(15deg) scale(1.1); }
    95% { transform: rotate(-15deg) scale(1.1); }
    97% { transform: rotate(15deg) scale(1.1); }
    99% { transform: rotate(0) scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================= */
/* 3. MODERN MOBILE MENU STYLE (APP-LIKE)    
/* ========================================= */

/* ========================================= */
/* 4. MODERN MOBILE MENU STYLE (APP-LIKE)    */
/* ========================================= */

.nav-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px; /* Rộng hơn chút cho thoáng */
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15); /* Bóng đổ xịn hơn */
    z-index: 9999;
    transition: cubic-bezier(0.4, 0, 0.2, 1) 0.4s; /* Hiệu ứng trượt mượt như iPhone */
    display: flex;
    flex-direction: column;
}

.nav-overlay.open { right: 0; }

/* A. Header Menu */
.mobile-menu-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}

.close-menu-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    color: #85634c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
}
.close-menu-circle:active {
    background: #85634c;
    color: #fff;
}

/* B. Buttons Area */
.mobile-cta-container {
    padding: 20px;
    background: #fafafa; /* Nền xám nhẹ tách biệt */
}

.mobile-btn-action {
    flex: 1; /* Chia đôi chiều rộng */
    padding: 12px 0;
    border-radius: 12px; /* Bo góc hiện đại */
    text-align: center;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    font-size: 1rem;
}

.mobile-btn-action:active { transform: scale(0.96); }

/* Gradient Xanh Lá cho nút Gọi */
.btn-call-mobile {
    background: linear-gradient(135deg, #00c853 0%, #009624 100%);
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
}

/* Gradient Cam/Vàng cho nút Zalo (hoặc Xanh Zalo tùy bạn, ở đây làm màu Cam cho hợp theme) */
/* Nếu muốn màu Zalo chuẩn: linear-gradient(135deg, #0068ff 0%, #0046b8 100%) */
.btn-zalo-mobile {
    background: linear-gradient(135deg, #0068ff 0%, #0046b8 100%); 
    box-shadow: 0 4px 15px rgba(0, 104, 255, 0.3);
}

/* C. Menu List */
.mobile-menu-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 15px;
    margin-bottom: 4px;
}

.mobile-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 8px;
    border-radius: 10px;
    color: #85634c; /* Màu chữ chính */
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
    border-bottom: 1px solid #f8f8f8; /* Đường kẻ mờ ngăn cách */
}

.mobile-menu-item:hover, 
.mobile-menu-item:active {
    background-color: #faefe0; /* Màu nền hover (Light Alt) */
    color: #c49963; /* Màu highlight */
    padding-left: 20px; /* Hiệu ứng trượt chữ */
}

.small-icon {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* D. Footer Social */
.mobile-menu-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.social-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #eee;
    color: #85634c;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    transition: 0.3s;
}

.social-circle:hover {
    background: #85634c;
    color: #fff;
    border-color: #85634c;
}

/* --- 1. FIX STICKY & MÀU NỀN (QUAN TRỌNG) --- */
.sticky-nav-force {
    /* 1. Dùng sticky thay vì fixed để không mất chỗ */
    position: -webkit-sticky; /* Cho Safari */
    position: sticky !important;
    
    /* 2. Vị trí dính: Ngay sát mép trên cùng */
    top: 0;
    
    /* 3. Đảm bảo nằm trên mọi thứ */
    z-index: 1020;
    
    /* 4. Giao diện */
    background-color: #ffffff !important; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    
    /* Không cần transition cho position, chỉ transition cho các hiệu ứng khác nếu có */
    width: 100%;
}
html, body {
    overflow-x: clip; /* clip tốt hơn hidden cho sticky */
}

/* Đẩy nội dung xuống để không bị Navbar che mất trên Mobile */
body {
    padding-top: 80px; /* Chiều cao khoảng của Navbar Mobile */
}

/* --- DESKTOP --- */
@media (min-width: 992px) {
    body { 
        padding-top: 0; /* Desktop có Topbar nên không cần padding body */
    } 
    
    .sticky-nav-force { 
        /* PC dùng sticky để trượt qua Topbar rồi mới dính lại */
        position: -webkit-sticky !important; /* Cho Safari */
        position: relative ; 
        top: 0; 
        transition: 0.5s;
        /* Đảm bảo nền trắng trên cả PC */
        background-color: #ffffff !important; 
    }
    /* Khi đã scroll qua topbar */
    .sticky-nav-force.is-fixed {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
    }
}
@media (max-width: 991.98px) {
    .sticky-nav-force {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
    }

    body {
        padding-top: 80px;
    }
}

/* --- 2. FIX MOBILE LAYOUT (CHỐNG RỚT DÒNG) --- */
.nav-logo-img {
    height: 70px;
    width: auto;
}
/* public/css/navbar.css */

.logo-text-container {
    /* Sử dụng margin-left âm để kéo chữ về phía logo */
    margin-left: -5px !important; /* Thịnh có thể tăng lên -10px nếu muốn sát hơn nữa */
    padding-left: 0 !important;
}

.nav-logo-img {
    /* Triệt tiêu mọi margin/padding có thể có của ảnh */
    margin-right: 0 !important;
    padding-right: 0 !important;
    display: block; /* Tránh khoảng cách dòng của inline-block */
}

/* CSS cho Text Logo */
.logo-main { 
    font-size: 1.9rem; 
    letter-spacing: 1.5px;   /* giãn chữ -> nhìn cao + thanh hơn */
    font-family: var(--font-fahkwang), sans-serif !important;
    line-height: 1.1;
    transform: scaleX(0.94); 
    white-space: nowrap;
}

.logo-main-mobile {  
    font-family: var(--font-fahkwang), sans-serif !important;
    font-size: 1.1rem;
    letter-spacing: 1px !important;
    line-height: 1.1 !important;
    transform: scaleX(0.97);
}

/* Responsive cho điện thoại */
@media (max-width: 576px) {
    /* Giảm kích thước ảnh logo */
    .nav-logo-img { height: 35px !important; }
    
    /* Giảm kích thước chữ */
    .logo-main { font-size: 1.1rem !important; letter-spacing: 0px !important; }
    .logo-sub { font-size: 0.7rem !important; letter-spacing: 2px !important; }
    
    /* Chỉnh khoảng cách nút bấm bên phải */
    .mobile-icon-btn { font-size: 1.1rem; }
    .mobile-icon-btn img { width: 24px !important; height: 24px !important; }
    
    /* Đảm bảo container không bị vỡ */
    .mobile-actions-container {
        flex-shrink: 0; /* Không cho phép nhóm nút bị co lại */
    }
    
    /* Canh chỉnh padding navbar nhỏ lại */
    .navbar { padding-left: 10px !important; padding-right: 10px !important; }
}