/* ==========================================================================
   1. CSS MENU CHO PC (Màn hình lớn hơn 768px)
   ========================================================================== */
@media (min-width: 769px) {
    #header.active #global_menu li.mega-menu-item > a.mega-menu-link {
        color: #000000 !important;
    }   

    body.page-id-2260 #global_menu li.mega-menu-item > a.mega-menu-link,
    body.single #global_menu li.mega-menu-item > a.mega-menu-link {
        color: #000000 !important;
    }

    #global_menu:hover li.mega-menu-item > a.mega-menu-link {
        color: #000000 !important;
    }

    #header.active #global_menu li.mega-menu-item:hover > a.mega-menu-link,
    .header_fixed #global_menu li.mega-menu-item:hover > a.mega-menu-link,
    #global_menu li.mega-menu-item:hover > a.mega-menu-link {
        color: rgb(0,114,159) !important;
    }

    #global_menu li.mega-company-menu-parent{
        border-top: 1px solid #ddd !important;
        border-bottom: 1px solid #ddd !important;
    }

    /** CSS submenu company - img **/ 
    #global_menu li.mega-company-menu-pc > ul > li > a,
    #global_menu li.mega-company-menu-pc > ul > li > a:hover {
        background: transparent;
    }

    #global_menu li.mega-company-menu-pc > ul > li {
        border-left: 1px solid #ddd !important;
    }
    #global_menu li.mega-company-menu-parent > ul > li:last-child {
        border-right: 1px solid #ddd !important;
    }

    #global_menu li.mega-company-menu-pc > ul > li > a {
        padding: 5px !important;
    }

    #global_menu li.mega-company-menu-pc > ul > li {
        overflow: hidden !important; 
        display: block;
    }

    #mega-menu-item-21223:hover img {
        animation-name: slideInRight;
        animation-duration: 0.6s;
        animation-fill-mode: both;
        animation-timing-function: ease-out;
    }

    #mega-menu-item-21223 img.attachment-full.size-full {
        object-fit: cover !important;
        height: 500px !important;
        object-position: center center !important;
        width: 100% !important;
    }

    /** CSS submenu company - text **/ 
    p.company-menu-title-pc-1, p.company-menu-title-pc-2,
    p.company-menu-title-pc-3, p.company-menu-title-pc-4 {
        font-size: 24px;
        margin: 0px !important;
    }

    #global_menu li.mega-company-menu-pc .textwidget > a {
        text-align: center;
        background: transparent;
        color: black;
    }

    #global_menu li.mega-company-menu-pc .textwidget > a:hover {
        color: #00729f;
    }


    /** CSS title menu company **/ 
    #global_menu li.mega-company-menu-title-pc {
        padding-top: 150px !important;
    }

    #global_menu li.mega-company-menu-title-pc > ul > li.mega-menu-item {
        width: auto;
    }

    #global_menu li.mega-company-menu-title-pc > ul.mega-sub-menu {
        justify-self: flex-end;
    }

    #global_menu li.mega-company-menu-title-pc a {
        padding-right: 30px;
    }

    #global_menu li.mega-company-menu-title-pc a:before {
        font-family: 'design_plus';
        content: '\e910';
        color: #000;
        font-size: 18px;
        display: block;
        height: 18px;
        line-height: 18px;
        text-align: center;
        font-weight: 500;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    #global_menu li.mega-company-menu-title-pc a,
    #global_menu li.mega-company-menu-title-pc a:hover {
        background: transparent;
    }
    #global_menu li.mega-company-menu-title-pc a:hover:before {
        color: #6e6e6e;
    }

    #global_menu p.company-menu-title-pc {
        margin: auto !important;
        line-height: normal;
        font-size: 24px;
        font-weight: 600;
        color: #0070a4;
    }

    #global_menu p.company-menu-subtitle-pc {
        margin: auto !important;
        color: black;
        text-align: center;
    }
    #global_menu li.mega-company-menu-pc > ul > li.mega-menu-item {
        padding: 0px !important;
    }

    /* CSS Service menu */
    #global_menu li.mega-service-menu-pc ul.mega-sub-menu a.mega-menu-link {
        color: #ffffff !important;
        padding: 10px !important;
    }

    #header.active #mega-menu-wrap-global-menu li.mega-service-menu-parent li.mega-menu-item > a.mega-menu-link {
        color: white !important;
    }

    #header.active #mega-menu-wrap-global-menu li.mega-service-menu-parent li.mega-menu-item > a.mega-menu-link:hover {
        color: #00729f !important;
    }

    /** CSS title menu Service **/ 
    #global_menu li.mega-service-menu-title-pc {
        padding-top: 150px !important;
    }

    #global_menu li.mega-service-menu-title-pc > ul > li.mega-menu-item {
        width: auto;
    }

    #global_menu li.mega-service-menu-title-pc > ul.mega-sub-menu {
        justify-self: flex-end;
    }

    #global_menu li.mega-service-menu-title-pc a {
        padding-right: 30px;
    }

    #global_menu li.mega-service-menu-title-pc a:before {
        font-family: 'design_plus';
        content: '\e910';
        color: #000;
        font-size: 18px;
        display: block;
        height: 18px;
        line-height: 18px;
        text-align: center;
        font-weight: 500;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    #global_menu li.mega-service-menu-title-pc a,
    #global_menu li.mega-service-menu-title-pc a:hover {
        background: transparent;
    }
    #global_menu li.mega-service-menu-title-pc a:hover:before {
        color: #6e6e6e;
    }

    #global_menu p.service-menu-title-pc {
        margin: auto !important;
        line-height: normal;
        font-size: 24px;
        font-weight: 600;
        color: #0070a4;
    }

    #global_menu p.service-menu-subtitle-pc {
        margin: auto !important;
        color: black;
        text-align: center;
    }

    #global_menu li.mega-service-menu-pc > ul > li.mega-menu-item {
        padding: 0px !important;
    }

    #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-flyout ul.mega-sub-menu {
        box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px !important;
    }

    #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item:not(:last-child) {
        border-bottom: 1px solid #c2c0c0 !important;
    }
    /* --- CẤU HÌNH FONT CHỮ & HOVER MENU CHUNG --- */
    #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-item > a.mega-menu-link {
        font-size: 14px !important;       
        font-weight: bold !important;
        font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif !important;
        letter-spacing: 0.05em !important;
        padding: 0 15px !important;
        height: 80px !important;
        align-content: center;
        line-height: 20px !important;
        transition: color 0.3s ease; /* Hiệu ứng đổi màu mượt */
        display: inline-flex;
        align-items: center;
    }

/*  ==========================================================================
    [START] THANH VAREAL - UPDATED: 10/02/26 (CLOSED)
    ========================================================================== */

    /* [MỚI] KHI HOVER VÀO TEXT MENU -> MÀU XANH THEME */

    /* 
    #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-item > a.mega-menu-link:hover {
        color: #00729f !important;
    } 
    */

    /* --- A. TRANG CHỦ (FRONT PAGE) --- */
    
    /* 1. Trạng thái bình thường: Header trong suốt, Chữ TRẮNG */
    /* 
    body.home #header {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 9999 !important;
        background: transparent !important;
        border: none !important;
    }
    */

    /* Mặc định chữ màu trắng trên nền ảnh */
    /* 
    body.home #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-item > a.mega-menu-link {
        color: #ffffff !important; 
    }
    */

    /* Tuy nhiên, nếu đang Hover vào chính link đó thì phải ưu tiên màu XANH */
    /* 
    body.home #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-item > a.mega-menu-link:hover {
        color: #00729f !important;
    }
    */

    /* 2. Khi Hover vào Header (nền trắng hiện ra): Chữ ĐEN */
    /* 
    body.home #header:hover,
    body.home #header.active,
    body.home .header_on_hover #header {
        background: #ffffff !important; 
        opacity: 1 !important;
    } 
    */

    /* Đổi màu chữ các menu khác sang ĐEN để nổi trên nền trắng */
    /* 
    body.home #header:hover #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-item > a.mega-menu-link,
    body.home #header.active #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-item > a.mega-menu-link,
    body.home .header_on_hover #header #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-item > a.mega-menu-link {
        color: #333333 !important; 
    }
    */

    /* Nhưng nếu đang Hover vào chính link đó (trên nền trắng) thì vẫn phải màu XANH */
    /* 
    body.home #header:hover #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-item > a.mega-menu-link:hover,
    body.home #header.active #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-item > a.mega-menu-link:hover,
    body.home .header_on_hover #header #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-item > a.mega-menu-link:hover {
        color: #00729f !important;
    } 
    */

    /* --- B. CÁC TRANG CON (DETAIL PAGES) --- */
    
    /* Trạng thái bình thường: Nền Trắng, Chữ ĐEN, Relative */
    /* body:not(.home) #header {
        position: relative !important;
        background: #fff !important; 
        z-index: 1100 !important;
        border-bottom: 1px solid #eee !important;
    }
     */
    /* body:not(.home) #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-item > a.mega-menu-link {
        color: #333333 !important;
    } */
/*  ==========================================================================
    [END] THANH VAREAL - UPDATED: 10/02/26
    ========================================================================== */

    /* Xử lý Logo & Menu nằm trên cùng */
    body.home #header_logo,
    body.home #global_menu {
        position: relative !important;
        z-index: 10000 !important;
    }

    /* Breadcrumb không bị đè */
    body:not(.home) #bread_crumb {
        margin-top: 0 !important;
        position: relative !important;
        z-index: 1 !important;
    }
}

/* ==========================================================================
   2. CSS MENU CHO SMARTPHONE (Màn hình nhỏ hơn hoặc bằng 768px)
   ========================================================================== */
@media (max-width: 768px) {
/*  ==========================================================================
    [START] THANH VAREAL - UPDATED: 10/02/26 (CLOSED)
    ========================================================================== */
    /* #header, 
    #header_logo, 
    #global_menu {
        position: relative !important; 
        background: #ffffff !important; 
        top: auto !important;
        left: auto !important;
        margin: 0;
        padding: 0;
        animation: none !important;
        opacity: 1 !important;
        width: 100% !important;
    }
    
    #header_search {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        background: transparent !important;
    } */
/*  ==========================================================================
    [END] THANH VAREAL - UPDATED: 10/02/26 (CLOSED)
    ========================================================================== */

    #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-item {
        border-bottom: 1px solid !important;
    }
    #mega-menu-wrap-global-menu a.mega-menu-link:active,
    #mega-menu-wrap-global-menu a.mega-menu-link:focus {
        background-color: #2a2b2b !important;
        transition: background-color 0.1s;
    }
    
    body.admin-bar.header_fix_mobile #header {
        margin-top: 0px !important;
    }
    
    .service-anchor-nav ul {
        display: block !important;
        text-align: center;
    }
    
    #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-item > a.mega-menu-link {
        color: #fff !important;
        background: #006f9b !important;
        border-bottom: 1px solid #ffffff96 !important;
    }

    #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-item > a.mega-menu-link > br {
        display: none;
    }
    
    #mega-menu-wrap-global-menu #mega-menu-global-menu > li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link {
        color: #fff !important;
        background: #00719b9e !important;
        border-bottom: 1px solid #ffffff96 !important;
        height: 60px;
    }
    
    #drawer_menu {
        color: #fff !important;
        background: #006f9b !important;
        padding-top: 0 !important;
    }
}

/* ==========================================================================
   3. PROJECT ARCHIVE FIX
   ========================================================================== */
#project_archive .project_list > .item > .link .desc {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    white-space: normal !important;
    display: block !important;
}

#project_archive .project_list > .item > .link .desc span {
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    display: block !important;
}

#project_archive .project_list > .item > .link .desc strong,
#project_archive .project_list > .item > .link .desc b {
    font-weight: 700 !important;
    color: #000;
}

/* ==========================================================================
   CUSTOM TAB LABEL: THÊM TEXT TIẾNG NHẬT
   ========================================================================== */

/* 1. Cấu hình chung cho các nút Tab để chấp nhận xuống dòng */
#cb_content_2 .tab .item {
    display: flex !important;           /* Sử dụng Flexbox */
    flex-direction: column !important;  /* Xếp theo chiều dọc (trên/dưới) */
    justify-content: center !important; /* Căn giữa dọc */
    align-items: center !important;     /* Căn giữa ngang */
    line-height: 1.2 !important;        /* Khoảng cách giữa 2 dòng */
    padding: 10px 0 !important;         /* Thêm khoảng cách trên dưới nếu cần */
}

/* 2. Thêm chữ "経営理念" vào sau tab PHILOSOPHY */
/* data-tab-num="tab_num_1_2" là định danh của tab đầu tiên */
#cb_content_2 .tab .item[data-tab-num="tab_num_1_2"]::after {
    content: "経営理念";        /* Nội dung text muốn thêm */
    display: block;
    font-size: 13px !important; /* Cỡ chữ nhỏ hơn cho dòng tiếng Nhật */
    margin-top: 4px;            /* Khoảng cách với dòng tiếng Anh */
    font-weight: normal;        /* Chữ thường (không in đậm) */
    opacity: 0.9;
}

/* Nếu bạn muốn làm tương tự cho các tab khác, chỉ cần copy và đổi mã tab */
/* Ví dụ: COMPANY PROFILE -> 会社概要 */
#cb_content_2 .tab .item[data-tab-num="tab_num_2_2"]::after {
    content: "会社概要";
    display: block;
    font-size: 13px !important;
    margin-top: 4px;
    font-weight: normal;
    opacity: 0.9;
}

/* PERFORMANCE -> 100年以上の実績 */
#cb_content_2 .tab .item[data-tab-num="tab_num_3_2"]::after {
    content: "100年以上の実績"; 
    display: block;
    font-size: 13px !important;
    margin-top: 4px;
    font-weight: normal;
    opacity: 0.9;
}

/* BASE -> 倉庫／物流センター一覧 (Ví dụ) */
/* 2026.3.12SKT -> 事業所一覧 */
#cb_content_2 .tab .item[data-tab-num="tab_num_4_2"]::after {
    content: "事業所一覧"; 
    display: block;
    font-size: 13px !important;
    margin-top: 4px;
    font-weight: normal;
    opacity: 0.9;
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(100%); /* Bắt đầu lệch về bên phải 40px */
    }
    100% {
        opacity: 1;
        transform: translateX(0); /* Kết thúc ở vị trí chuẩn */
    }
}

/* --- XỬ LÝ TABLE LINH HOẠT & THANH CUỘN NGANG --- */

.swgs-admin-content-full {
    width: 100%;
    /* Cho phép xuất hiện thanh cuộn ngang khi nội dung bên trong (table) rộng hơn khung */
    overflow-x: auto; 
    /* Hỗ trợ vuốt mượt trên điện thoại */
    -webkit-overflow-scrolling: touch; 
    margin-top: 20px;
    padding-bottom: 10px; /* Khoảng cách để thanh scroll không đè sát vào table */
}

.swgs-admin-content-full table {
    width: 100% !important;
    border-collapse: collapse;
    /* Ép table không được co quá mức, nếu dữ liệu dài sẽ kích hoạt thanh scroll ngang */
    min-width: 600px; 
    table-layout: auto; /* Để các cột tự co giãn theo nội dung */
}

.swgs-admin-content-full th, 
.swgs-admin-content-full td {
    border: 1px solid #ddd !important;
    padding: 12px 15px;
    /* Căn giữa dữ liệu */
    text-align: center;
    vertical-align: middle;
    /* --- XỬ LÝ NGẮT DÒNG HỢP LÝ --- */
    white-space: normal !important; /* Cho phép xuống dòng */
    word-break: break-word;         /* Bẻ từ dài nếu cần */
    line-height: 1.6;               /* Khoảng cách dòng dễ đọc */
}

.swgs-admin-content-full th {
    background: #f8f8f8;
    font-weight: bold;
    color: #000;
}

/* Tùy chỉnh thanh cuộn (scrollbar) cho đẹp hơn (tùy chọn) */
.swgs-admin-content-full::-webkit-scrollbar {
    height: 8px;
}
.swgs-admin-content-full::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.swgs-admin-content-full::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.swgs-admin-content-full ul {
    list-style-type: circle !important; /* Hiện nốt tròn màu đen */
    margin: 0 0 25px 30px !important; /* Thụt vào đầu dòng 30px và cách dòng dưới */
    padding: 0 !important;
}

.swgs-admin-content-full li {
    display: list-item !important;    /* Ép hiển thị dạng danh sách */
    margin-bottom: 10px !important;  /* Khoảng cách giữa các mục */
    line-height: 1.8 !important;     /* Độ cao dòng cho dễ đọc */
    color: #333;                     /* Màu chữ */
}

/* Đảm bảo nốt tròn có màu đen hoặc cùng màu theme */
.swgs-admin-content-full li::marker {
    color: #00729f; 
    font-size: 1em;
}
.swgs-admin-content-full h3 {
    text-decoration: none !important; /* Bỏ gạch chân cũ */
    border-bottom: 3px solid #00729f !important; /* Gạch chân màu xanh theme */
    padding-bottom: 20px !important; /* Khoảng cách 20px */
    display: inline-block !important; /* Đường kẻ chỉ dài bằng độ dài chữ */
    color: #000 !important;
    font-weight: bold !important;
    margin-bottom: 25px !important;
}
/* 1. Đường kẻ phân tách sau Anchor Menu */
.swgs-intro-container {
    border-bottom: 1px solid #ddd; /* Độ dày và màu sắc đường kẻ */
    padding-bottom: 40px;          /* Khoảng cách từ menu đến đường kẻ */
    margin-bottom: 60px;          /* Khoảng cách từ đường kẻ đến nội dung đầu tiên */
}

/* 2. Đường kẻ phân tách giữa các Item cha (01, 02, 03, 04, 05, sust) */
.swgs-section-wrap {
    border-bottom: 1px solid #ddd; /* Đường kẻ ngang */
    padding-bottom: 60px;          /* Khoảng cách từ nội dung đến đường kẻ */
    margin-bottom: 60px;          /* Khoảng cách từ đường kẻ đến Item tiếp theo */
}

/* 3. Loại bỏ đường kẻ ở Item cuối cùng để đảm bảo thẩm mỹ */
.swgs-section-wrap:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Chỉ áp dụng khi trang KHÔNG có page_header phía trước main_contents */
#page_header + #main_contents #main_col {
    padding-top: 50px; /* Nếu có header ảnh rồi thì không cần padding nữa */
}

/* Trường hợp trang trắng hoàn toàn (không header) */
body.page:not(.has-page-header) #main_col {
    padding-top: 80px;
}

/* Quan trọng: Trả lại trạng thái bình thường trên Mobile */
@media (max-width: 991px) {
    body.page #main_col {
        padding-top: 20px; /* Mobile menu nhỏ hơn nên chỉ cần khoảng cách nhỏ */
    }
}