/* ==========================================================================
   Variables & Base Styles
   ========================================================================== */

:root {
    --vsg-cyan: rgb(45, 190, 205);
    --vsg-dark: #545d5f;
    --vsg-light: #f4f4f4;
    --vsg-muted: #8f9495;
    --vsg-container: 1040px;
    --vsg-header-container: 1140px;
    --vsg-header-px: 70px;
    --vsg-sp-px: 35px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.vsg-brand-body {
    margin: 0;
    padding-top: 100px;
    background: var(--vsg-light);
    color: var(--vsg-dark);
    font-family: "Noto Sans JP", sans-serif;
    font-feature-settings: "palt";
    -webkit-font-smoothing: antialiased;
}

@media (max-width: 641px) {
    body.vsg-brand-body {
        padding-top: 70px;
    }
}

body.vsg-brand-body img {
    max-width: 100%;
    height: auto;
}

body.vsg-brand-body a,
body.vsg-brand-body button {
    transition: none !important;
}

body.vsg-brand-body a:hover,
body.vsg-brand-body a:focus,
body.vsg-brand-body a:active,
body.vsg-brand-body button:hover,
body.vsg-brand-body button:focus,
body.vsg-brand-body button:active {
    color: currentColor !important;
    text-decoration: none !important;
    opacity: 1 !important;
    filter: none !important;
    -ms-filter: none !important;
    box-shadow: none !important;
    outline: none !important;
}

body.vsg-brand-body .vsg-header__tel,
body.vsg-brand-body .vsg-header__tel:visited,
body.vsg-brand-body .vsg-header__tel:hover,
body.vsg-brand-body .vsg-header__tel:focus,
body.vsg-brand-body .vsg-header__tel:active,
body.vsg-brand-body .vsg-btn--white,
body.vsg-brand-body .vsg-btn--white:visited,
body.vsg-brand-body .vsg-btn--white:hover,
body.vsg-brand-body .vsg-btn--white:focus,
body.vsg-brand-body .vsg-btn--white:active,
body.vsg-brand-body .vsg-mobile-submenu__panel a,
body.vsg-brand-body .vsg-mobile-submenu__panel a:visited,
body.vsg-brand-body .vsg-mobile-submenu__panel a:hover,
body.vsg-brand-body .vsg-mobile-submenu__panel a:focus,
body.vsg-brand-body .vsg-mobile-submenu__panel a:active {
    color: #fff !important;
    border-color: #fff !important;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.vsg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 220px;
    height: 50px;
    padding: 8px 35px;
    border: 2px solid var(--vsg-cyan);
    color: var(--vsg-cyan);
    text-decoration: none;
    font-size: 21px;
    line-height: 1;
    font-weight: 700;
    background: transparent;
}

.vsg-btn::after {
    content: "";
    width: 14px;
    height: 14px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
}

.vsg-btn--white {
    color: #fff;
    border-color: #fff;
}

/* ==========================================================================
   Mobile Submenu
   ========================================================================== */

.vsg-mobile-submenu {
    width: 100%;
    max-width: 400px;
}

.vsg-mobile-submenu__toggle {
    cursor: pointer;
}

.vsg-mobile-submenu__toggle::after {
    transition: transform .2s ease;
}

.vsg-mobile-submenu.is-open .vsg-mobile-submenu__toggle::after {
    transform: rotate(135deg);
}

.vsg-mobile-submenu__panel {
    display: none;
    padding: 6px 0 12px 32px;
}

.vsg-mobile-submenu.is-open .vsg-mobile-submenu__panel {
    display: grid;
}

.vsg-mobile-submenu__panel a {
    display: block;
    padding: 9px 0;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
}

/* ==========================================================================
   Header
   ========================================================================== */

.vsg-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    background: var(--vsg-cyan);
    color: #fff;
    height: 137px;
    border-bottom: 1px solid #fff;
}

.vsg-header__inner {
    background-color: #2DBECD;
}

.vsg-header__toggle:focus {
    outline: none !important;
}

.vsg-mobile-submenu__toggle {
    outline: none !important;
}

/* WordPress Admin Bar compensation */
.admin-bar .vsg-header {
    top: 32px;
}

.admin-bar .vsg-header__mobile-nav {
    top: calc(100px + 32px);
}

.to-areaSite {
    background-color: #fff;
    padding: 0;
}

.bg-basic {
    background-color: #2DBECD;
}

/* Vertical divider between .to-areaSite .flex links */
.to-areaSite .flex {
    max-width: var(--vsg-header-container, 1140px);
    margin: 0 auto;
}

.to-areaSite.bg-basic {
    padding: 0; /* Đảm bảo không có padding thừa */
}

.to-areaSite.bg-basic .to-areaSite-second .flex {
    max-width: var(--vsg-header-container, 1140px);
    margin: 0 auto;
}

.to-areaSite .flex a {
    position: relative;
    padding: 3px 12px 7px; /* tạo khoảng cách trái/phải đều nhau */
    text-decoration: none;
    white-space: nowrap; /* tránh xuống dòng trên desktop */
}

/* ===== Separator for top level menu only ===== */
.to-areaSite-second .flex > * {
    position: relative;
}

/* =========================================
   TOP MENU (white background)
========================================= */
.to-areaSite > .flex > a:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 16px;
    background-color: #2DBECD;
}

/* =========================================
   BOTTOM MENU (cyan background)
========================================= */
.to-areaSite-second .flex > *:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 18px;
    background-color: #fff;
}

.vsg-submenu a::after {
    content: none !important;
    display: none !important;
}

.to-areaSite a {
    color: #2DBECD;
    font-weight: 700;
    border-top: 5px solid #FFF;
}


.to-areaSite .disp-area {
    color: #2DBECD;
    display: inline-block;
    position: relative;
}

.to-areaSite .disp-area::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 44%;
    transform: translateX(-50%); /* căn giữa */
    width: 90%;
    height: 5px;
    background: #2DBECD;
}

.to-areaSite-second {
    text-align: right;
}

.to-areaSite-second a {
    color: #FFF;
    border-top: none;
}
/* ----- Căn phải toàn bộ menu ----- */
.to-areaSite-second .flex {
    display: flex;
    justify-content: flex-end;   /* đẩy các item sang phải */
    align-items: center;
    gap: 0;                      /* khoảng cách tự do, để padding tạo ra */
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Mỗi item (a hoặc div có submenu) */
.to-areaSite-second .flex > * {
    position: relative;
    padding: 0 12px;
}

/* ===== Link layout ===== */
.to-areaSite-second .flex a {
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    padding: 10px;
}

/* ===== Arrow icon ===== */
.vsg-arrow {
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

/* Arrow xuống */
.vsg-arrow--down {
    transform: rotate(135deg);
    position: relative;
    top: -4px;
}

/* ----- Submenu (dropdown) ----- */
.vsg-submenu {
    position: absolute;
    top: 100%;
    right: -50px;
    background: white;
    min-width: 200px;
    padding: 8px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
    text-align: left;
}

.to-areaSite-second .flex .vsg-submenu a {
    padding: 8px 16px 8px 20px;
}

.vsg-submenu a {
    display: block;
    padding: 8px 16px;
    white-space: nowrap;
    color: #2DBECD;
    border: none !important;
    background: transparent !important;
    padding: 8px 16px;
    border-bottom: none !important;
}

.to-areaSite .flex a:hover {
    background-color: #FFF;
    color: #2DBECD;
}

.to-areaSite-second .flex a:hover {
    background-color: #2DBECD;
    color: #FFF;
}

.to-areaSite-second .flex .vsg-submenu a:hover {
    color: #4CCDD8 !important;
}

/* 1. Tăng padding-right cho các link chính (menu cấp 1) */
.to-areaSite-second .flex > a,
.to-areaSite-second .flex > .vsg-nav-item--has-submenu > a {
    padding-right: 24px;
}

/* Hiện submenu khi hover vào item chứa nó */
.vsg-nav-item--has-submenu:hover .vsg-submenu {
    opacity: 1;
    visibility: visible;
}

.to-areaSite .flex> :first-child {
    padding-left: 0;
}

.to-areaSite-second .flex > :last-child {
    padding-right: 0;
}

/* Responsive: trên mobile có thể ẩn hoặc xếp dọc */
@media (max-width: 768px) {
    .to-areaSite-second .flex {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .vsg-submenu {
        position: static;
        box-shadow: none;
        padding-left: 20px;
        opacity: 1;
        visibility: visible;
        display: none;
    }
    .vsg-nav-item--has-submenu:hover .vsg-submenu {
        display: block;
    }
}

@media screen and (max-width: 782px) {
    .admin-bar .vsg-header {
        top: 46px;
    }
    .admin-bar .vsg-header__mobile-nav {
        top: calc(70px + 46px);
    }
}

/* Mobile Admin Bar Adjustment */
@media screen and (max-width: 600px) {
    #wpadminbar {
        position: fixed !important;
    }
    .admin-bar .vsg-header {
        top: 46px;
    }
    .admin-bar .vsg-header__mobile-nav {
        top: calc(70px + 46px);
    }
}

.vsg-header__inner {
    width: min(calc(100% - calc(var(--vsg-header-px) * 2)), var(--vsg-header-container));
    height: 100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #fff;
}

.vsg-header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    margin-right: auto;
}

.vsg-header__logo img {
    display: block;
    width: 560px;
    height: auto;
}

.vsg-header__logo-box {
    width: 46px;
    height: 46px;
    background: #fff;
    color: var(--vsg-cyan);
    display: flex;
    align-items: end;
    justify-content: center;
    font-size: 19px;
    font-weight: 900;
}

.vsg-header__logo-text {
    margin-left: 7px;
    max-width: 70px;
    font-size: 15px;
    line-height: 1.05;
    font-weight: 600;
}

.vsg-header__divider {
    width: 3px;
    height: 50px;
    background: #fff;
    flex-shrink: 0;
}

.vsg-header__center {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.vsg-header__site-name {
    font-size: 31px;
    line-height: 1;
    font-weight: 600;
    white-space: nowrap;
}

.vsg-header__nav {
    margin-left: auto;
    display: flex;
    gap: 15px;
    align-items: center;
}

.vsg-header__nav a {
    color: #fff;
    text-decoration: none;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
}

.vsg-header__recruit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    height: 40px;
    border: 2px solid #fff;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    margin-right: 15px;
    transition: all 0.3s ease;
}

.vsg-header__recruit-btn:hover, .vsg-header__tel:hover {
    color: #fff !important;
    text-decoration: none;
}

.vsg-header__contact {
    min-width: 190px;
    text-align: right;
    color: #fff;
}

.vsg-header__tel {
    font-family: Roboto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #fff;
    text-decoration: none;
    font-size: 28.6px;
    line-height: 1;
    font-weight: 600;
}

.vsg-header__tel-icon {
    width: 35px;
    height: auto;
    margin-right: 6px;
    transform: translateY(2px);
}

.vsg-header__tel-note {
    font-size: 15px;
    line-height: 27.5px;
    font-weight: 400;
    margin-top: 4px;
    transform: translateX(-10px);
}

.vsg-header__toggle {
    display: none;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    padding: 0;
    margin-left: auto;
}

.vsg-header__toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    margin: 5px auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.vsg-header__mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    overflow-y: auto;
}

.vsg-header__mobile-nav.is-open {
    display: flex;
}

/* Toggle X animation */
.vsg-header__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.vsg-header__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.vsg-header__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.vsg-header__mobile-nav .vsg-btn {
    width: 100%;
    max-width: 400px;
    border: none;
}

.vsg-header__mobile-nav .vsg-btn--white-small {
    border: 2px solid #fff !important;
    padding: 0 35px !important;
    margin-bottom: 20px !important;
    justify-content: center;
    height: 40px;
}

/* override vsg-btn--white-small::after */
.vsg-header__mobile-nav .vsg-btn--white-small::after {
    display: none;
    content: none;
}

.vsg-header__mobile-contact {
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
    padding: 20px 0 36px;
    color: #fff;
    text-align: left;
    border-top: 1px solid #fff;
}

.vsg-mobile-nav-first {
    background-color: #2DBECD;
    padding: 0 20px;
}

.vsg-mobile-submenu-second {
    background-color: #fff;
    padding: 0 20px;
}
/* ==========================================================================
   Responsive Styles (Tablet)
   ========================================================================== */

@media (max-width: 1100px) {
    .vsg-header__inner {
        width: calc(100% - calc(var(--vsg-header-px) * 2));
    }

    .vsg-header__site-name {
        font-size: 18px;
    }

    .vsg-header__nav {
        gap: 10px;
    }

    .vsg-header__nav a {
        font-size: 9px;
    }

    .vsg-header__contact {
        min-width: 160px;
    }
}

/* ==========================================================================
   Responsive Styles (Mobile)
   ========================================================================== */

@media (max-width: 641px) {
    .vsg-container {
        width: calc(100% - calc(var(--vsg-sp-px) * 2));
    }

    /* Mobile Header */
    .vsg-header {
        height: 70px;
    }

    .to-areaSite {
        display: none;
    }

    .vsg-header__inner {
        height: 70px;
        width: 100%;
        padding: 0 10px;
        gap: 8px;
    }

    .vsg-main-nav {
        display: none;
    }

    .vsg-header__logo {
        margin-right: auto;
        align-self: center;
        padding-bottom: 0;
    }

    .vsg-header__logo img {
        width: 238px;
        height: auto;
    }

    .vsg-header__logo-box {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .vsg-header__logo-text {
        font-size: 10px;
        max-width: 40px;
        margin-left: 4px;
    }

    .vsg-header__site-name {
        font-size: 16px;
        line-height: 1.2;
        font-weight: 700;
        letter-spacing: 0%;
    }

    .vsg-br-sp {
        display: block;
    }

    .vsg-br-pc {
        display: none;
    }

    .vsg-header__divider {
        width: 1px;
        height: 42px;
    }

    .vsg-header__center {
        margin-left: 10px;
    }

    .vsg-header__nav,
    .vsg-header__contact,
    .vsg-header__recruit-btn {
        display: none;
    }

    .vsg-header__toggle {
        margin-top: -10px;
        display: block;
        width: 28px;
        height: 28px;
    }

    .vsg-header__toggle span {
        width: 28px;
        height: 2px;
        margin: 8px auto;
    }

    .vsg-header__mobile-nav .vsg-btn {
        font-size: 16px;
        font-weight: 700;
        padding: 0;
    }
    
    .vsg-header__mobile-nav .vsg-btn.vsg-btn--white{
        padding: 0;
    }

    .vsg-header__mobile-contact .vsg-header__tel {
        justify-content: flex-start;
    }

    .vsg-header__mobile-contact .vsg-header__tel-note {
        transform: none;
        font-weight: 700;
    }

    .title-sub-menu-second {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 0;
        font-size: 16px;
        line-height: 1.2;
        font-weight: 700;
        letter-spacing: 0%;
        color:#2DBECD !important;
    }

    .vsg-header-mobile-footer {
        width: 100%;
        height: 200px;
        background-color: #2DBECD;
        flex-shrink: 0;
    }
}
