/* Header Styles */

/* Utility Classes */
.flex { display: flex; }
.flex-j-between { justify-content: space-between; }
.flex-j-ctr { justify-content: center; }
.flex-a-ctr { align-items: center; }
.txt-wh { color: #fff; }
.txt-sm { font-size: 14px; }
.font-jp { font-family: "Noto Sans JP", sans-serif; }

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 116px;
    z-index: 9990;
    transition: all .4s ease-out;
}

.site-header:not(.fixed) > .header-container,
.site-header:not(.fixed) a {
    color: #fff;
}

.site-header.fixed > .header-container,
.site-header.fixed a {
    color: #333;
}

.page-contact .site-header,
.page-entry .site-header {
    position: absolute;
}

.site-header > .header-container {
    width: 100%;
    max-width: 100%;
    height: 100%;
    padding-left: 24px;
}

.site-header.on > .header-container {
    border-color: #0D0D0D;
}

.site-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    text-decoration: none;
}

.site-logo a:hover {
    opacity: .7;
}

.site-logo img {
    height: 50px;
    width: auto;
    transition: opacity 0.3s ease;
}

.site-logo .logo-default {
    display: block;
}

.site-logo .logo-fixed {
    display: none;
}

.site-header.fixed .site-logo .logo-default {
    display: none;
}

.site-header.fixed .site-logo .logo-fixed {
    display: block;
}

.company-name {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    line-height: 1.2;
}

.company-prefix {
    font-size: 14px;
    font-weight: 500;
}

.company-main {
    font-size: 24px;
    font-weight: bold;
}

/* Navigation */
.nav-menu {
    position: relative;
    list-style: none;
}

.nav-menu a {
    padding: .5em 1em;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
    text-decoration: none;
}

.nav-link span {
    position: relative;
    line-height: 1.4;
}

.nav-link span::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    border-bottom: 1px solid;
    opacity: 0;
    transform: translateY(8px);
    transition: all .4s ease-out;
}

.nav-link:hover span::before,
.nav-menu li.current > .nav-link span::before {
    opacity: 1;
    transform: translateY(0);
}

/* Header Phone */
.header-phone {
    position: absolute;
    top: 124px;
    right: 166px;
    font-size: 200%;
    letter-spacing: .1em;
    text-decoration: none;
}

.site-header.on .header-phone {
    color: #0d0d0d;
}

/* Header CTA */
.header-cta {
    position: absolute;
    top: 0;
    right: 0;
    list-style: none;
}

.header-cta a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 112px;
    height: 112px;
    text-decoration: none;
    color: #fff !important;
}

.header-cta i {
    font-size: 20px;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.cta-contact-btn a,
.cta-entry-btn a,
.cta-recruit-btn a {
    position: relative;
    overflow: hidden;
}

.cta-contact-btn a::before,
.cta-entry-btn a::before,
.cta-recruit-btn a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateX(-100%);
    transition: all .4s ease-out;
}

.cta-contact-btn a {
    background-color: #061609;
}

.cta-entry-btn a {
    background-color: #2C8843;
}

.cta-recruit-btn a {
    background-color: #008597;
}

.cta-contact-btn a::before {
    background-color: #103306;
}

.cta-entry-btn a::before {
    background-color: #00a63c;
}

.cta-recruit-btn a::before {
    background-color: #00a5ba;
}

.cta-contact-btn a:hover::before,
.cta-entry-btn a:hover::before,
.cta-recruit-btn a:hover::before {
    transform: translateX(0);
}

.cta-contact-btn span,
.cta-entry-btn span,
.cta-recruit-btn span {
    position: relative;
    z-index: 1;
}

/* Menu Toggle (Hamburger) */
.menu-toggle {
    position: fixed;
    top: 0;
    right: 0;
    width: 64px;
    height: 64px;
    z-index: 9999;
    display: none;
}

.toggle-lines {
    position: relative;
    width: 32px;
    height: 22px;
}

.toggle-lines span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all .4s ease-out;
}

.toggle-lines span:nth-of-type(1) {
    top: 0;
}

.toggle-lines span:nth-of-type(2) {
    top: 10px;
}

.toggle-lines span:nth-of-type(3) {
    bottom: 0;
}

.site-header.fixed .toggle-lines span {
    background-color: #2C8843;
}

.site-header.fixed .menu-toggle.active .toggle-lines span {
    background-color: #fff;
}

.menu-toggle.active .toggle-lines span:nth-of-type(1) {
    transform: translateY(10px) rotate(-45deg);
}

.menu-toggle.active .toggle-lines span:nth-of-type(2) {
    opacity: 0;
}

.menu-toggle.active .toggle-lines span:nth-of-type(3) {
    transform: translateY(-10px) rotate(45deg);
}

/* Desktop Styles */
@media print, screen and (min-width: 1081px) {
    .site-header.fixed {
        height: 88px;
        background-color: rgba(255,255,255,.8);
    }

    .site-header > .header-container {
        width: calc(100% - 216px);
        max-width: calc(100% - 216px);
        margin-left: 50px;
        margin-right: 166px;
    }

    .page-contact .site-header > .header-container,
    .page-entry .site-header > .header-container {
        width: calc(100% - 100px);
        max-width: calc(100% - 100px);
        margin-right: 50px;
    }

    .main-nav,
    .nav-menu,
    .nav-menu li,
    .nav-menu a {
        height: 100%;
    }

    .site-header.fixed .header-phone {
        top: 96px;
        padding: 0 1em;
        background-color: rgba(255,255,255,.8);
    }
}

/* Mobile Styles */
@media screen and (max-width: 1080px) {
    .site-header {
        height: 64px;
    }

    .site-header.fixed {
        background-color: #fff;
    }

    .site-header.active {
        background-color: #2C8843;
    }

    .site-header * {
        color: #fff;
    }

    .site-header > .header-container {
        padding-left: 14px;
    }

    .site-logo img {
        height: 35px;
    }

    .company-prefix {
        font-size: 11px;
    }

    .company-main {
        font-size: 16px;
    }

    .site-header.active .site-logo a {
        color: #fff;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        z-index: 300;
        width: 100%;
        height: calc(100% - 64px);
        margin: 0;
        padding: 24px 7% 24px;
        overflow: scroll;
        background-color: #2C8843;
        opacity: 0;
        pointer-events: none;
        transition: .4s ease-out;
        -webkit-overflow-scrolling: touch;
    }

    .main-nav.active {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-menu {
        display: block;
        font-size: 16px;
    }

    .nav-menu > li {
        position: relative;
        display: block;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,.1);
    }

    .nav-menu > li:first-child {
        border-top: 1px solid rgba(255,255,255,.1);
    }

    .nav-menu a {
        padding: 1em;
    }

    .nav-link {
        display: block !important;
        text-align: left;
    }

    .nav-link::before {
        content: '';
        position: absolute;
        top: 26px;
        right: 1.5em;
        width: 8px;
        height: 8px;
        border-top: 1px solid;
        border-right: 1px solid;
        transform: rotate(45deg);
    }

    .header-phone,
    .header-cta {
        position: static;
    }

    .header-phone {
        display: block !important;
        padding-top: 16px;
        padding-bottom: 16px;
        text-align: center;
    }

    .header-cta a {
        position: relative;
        flex-direction: inherit;
        width: 100%;
        height: 56px;
        padding: 1em;
    }
}
