/* ============================================================
   1. BIẾN GLOBAL & CẤU HÌNH CHUNG
   ============================================================ */
:root {
    --blue-dark: #004a99;
    --yellow-bright: #ffd400;
}

body { 
    background: #f0f2f5; 
    font-size: 15px; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
}

.transition { transition: all 0.3s ease; }
.object-fit-cover { object-fit: cover; }
.border-start-4 { border-left-width: 4px !important; }

/* ============================================================
   2. HEADER & NAVIGATION (Giao diện chính)
   ============================================================ */
.main-header { background-color: var(--blue-dark); color: #fff; padding: 20px 0; }

.logo-circle { 
    width: 170px; height: 170px; 
    object-fit: contain; border-radius: 50%; 
    padding: 5px; border: 3px solid var(--yellow-bright); 
}

.seo-h1 { 
    font-size: 25px; color: var(--yellow-bright); 
    text-transform: uppercase; font-weight: 800; margin-top: 10px; 
}

.branch-info { font-size: 13px; line-height: 1.6; }
.branch-info strong { color: var(--yellow-bright); }

/* Menu Vàng & Navbar */
.navbar-custom { background-color: var(--yellow-bright); font-weight: bold; }

.navbar-nav .nav-link {
    color: #000 !important;
    padding: 15px 10px !important;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.navbar-custom .nav-link { text-transform: uppercase; }

.navbar-nav .nav-link:hover, 
.navbar-custom .nav-link:hover {
    color: var(--blue-dark) !important;
    background: rgba(255, 255, 255, 0.2);
    border-bottom: 3px solid var(--blue-dark);
}

@media (min-width: 992px) {
    .navbar-nav { display: flex; justify-content: space-between; }
}

/* ============================================================
   3. NỘI DUNG BÀI VIẾT (CKEditor)
   ============================================================ */
.post-content { line-height: 1.8; font-size: 1.05rem; color: #333; }
.post-content p { margin-bottom: 1.5rem; text-align: justify; }

.post-content img { 
    max-width: 100% !important; 
    height: auto !important; 
    border-radius: 8px; 
    margin: 20px auto; 
    display: block; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
}

.post-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.post-content table td, .post-content table th { border: 1px solid #dee2e6; padding: 8px; }

/* ============================================================
   4. SẢN PHẨM & DỊCH VỤ (Cards & Grids)
   ============================================================ */
.product-card { transition: 0.3s; border-radius: 0; }
.product-card:hover { transform: scale(1.03); z-index: 10; box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important; }

.service-strip { background-color: #003366; border-top: 3px solid #ffd400; }
.service-item { text-align: center; overflow: hidden; }

.service-img-wrapper { width: 100%; height: 180px; overflow: hidden; }
.service-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.service-item:hover img { transform: scale(1.1); }

.service-title {
    background-color: #004a99; color: #ffd400;
    font-weight: bold; font-size: 13px; padding: 12px 5px;
    min-height: 55px; display: flex; align-items: center; justify-content: center;
    text-transform: uppercase; line-height: 1.3;
}

.category-header h4 { box-shadow: 3px 3px 0px #ffd400; }
.meta-desc { font-size: 13px; text-transform: uppercase; font-weight: 600; padding-bottom: 10px; text-align: center; }

/* ============================================================
   5. HIỆU ỨNG & TIỆN ÍCH (Utilities)
   ============================================================ */
.hover-yellow:hover { background-color: #ffc107 !important; border-color: #ffc107 !important; color: #000 !important; transition: 0.3s; }
.hover-primary:hover { color: #004a99 !important; text-decoration: underline !important; }
.link-dark-hover:hover { color: #004a99 !important; }

.img-zoom { transition: transform 0.5s ease; }
.img-zoom:hover { transform: scale(1.1); }

.hover-zoom { transition: transform 0.5s ease; }
.hover-zoom:hover { transform: scale(1.05); }

.shadow-sm-hover:hover { box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important; }
.h-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Carousel mượt */
.carousel-fade .carousel-item { transition-duration: 0.8s; transition-property: opacity; }

/* Pagination */
.pagination .page-link { border-radius: 0; margin: 0 3px; }
.pagination .page-item.active .page-link { font-weight: bold; }
.page-link:focus { box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25); }

/* Tables Custom */
.custom-table thead th { font-size: 14px; text-transform: uppercase; padding: 12px 8px; }
.custom-table tbody td { font-size: 14px; padding: 10px 8px; }

/* Pills */
.custom-pill { color: #555 !important; background-color: #f1f1f1 !important; border: 1px solid #ddd !important; font-size: 13.5px !important; padding: 8px 16px !important; transition: 0.3s; border-radius: 4px !important; }
.custom-pill.active { background-color: #ffc107 !important; color: #000 !important; border-color: #ffc107 !important; box-shadow: 0 3px 6px rgba(0,0,0,0.1) !important; }

/* ============================================================
   6. CÁC KHỐI ĐẶC BIỆT (Marquee, Map, Zalo, Sidebar)
   ============================================================ */
/* Chạy ngang Partner */
.marquee-wrapper { overflow: hidden; width: 100%; position: relative; padding: 10px 0; }
.marquee-content { display: flex; white-space: nowrap; width: max-content; animation: scroll-left 30s linear infinite; }
.marquee-content:hover { animation-play-state: paused; }
.marquee-content img { filter: none !important; opacity: 1 !important; transition: transform 0.3s; flex-shrink: 0; }
.marquee-content img:hover { transform: scale(1.1); }

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Map & Facebook */
.map-container iframe { width: 100% !important; height: 100% !important; border: 0; }
.transition-hover { transition: all 0.3s ease; }
.transition-hover:hover { background-color: #0d47a1 !important; transform: translateY(-3px); }

/* Sidebar */
.last-child-0:last-child { border-bottom: 0 !important; }
.tag-item:hover { background-color: #ffc107 !important; color: #000 !important; border-color: #ffc107 !important; transition: 0.3s; }
.sidebar-title:hover { color: #004a99 !important; transition: 0.2s; }
.hover-menu:hover { color: #004a99 !important; padding-left: 5px; transition: 0.3s; }

/* ============================================================
   7. LIÊN HỆ CỐ ĐỊNH & FOOTER
   ============================================================ */
.fixed-contact-left { position: fixed; bottom: 30px; left: 20px; z-index: 9999; display: flex; flex-direction: column; }
.contact-item { display: flex; align-items: center; border-radius: 50px; padding: 6px 20px 6px 6px; text-decoration: none; color: #fff; font-weight: bold; box-shadow: 0 4px 12px rgba(0,0,0,0.15); transition: all 0.3s ease; }
.contact-icon { width: 35px; height: 35px; background: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-right: 10px; }

.phone-bg { color: #e93b3b; animation: quick-shake 1.5s infinite; }
.hotline-wrapper { background: #e93b3b; }
.hotline-banner { background: var(--yellow-bright); color: #000; padding: 10px 20px; border-radius: 5px; text-align: center; min-width: 180px; }
.hotline-box { border: 2px solid #fff; box-shadow: 0 0 10px rgba(0,0,0,0.1); }

.zalo-bg { background: #fff; }
.zalo-wrapper { background: #0084ff; }
.zalo-link { color: inherit; text-decoration: none; display: block; width: 100%; }
.zalo-link:hover { color: #007bff !important; text-decoration: underline; }

.back-to-top { position: fixed; bottom: 30px; right: 20px; width: 45px; height: 45px; background: #888; color: #fff; border: none; border-radius: 4px; cursor: pointer; display: none; z-index: 9999; transition: background 0.3s; }
.back-to-top:hover { background: #555; }

.grayscale { filter: grayscale(100%); opacity: 0.6; transition: 0.3s; }
.grayscale:hover { filter: grayscale(0%); opacity: 1; }
footer a:hover { color: #ffd400 !important; }

@keyframes quick-shake {
    0% { transform: rotate(0); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-15deg); }
    30% { transform: rotate(15deg); }
    40% { transform: rotate(0); }
}