/* ---------------------------------- */
/* アニメーション用キーフレーム */
/* ---------------------------------- */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in-from-top {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ---------------------------------- */
/* ヘッダー */
/* ---------------------------------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(245, 245, 245, 0.219);
    backdrop-filter: blur(4px);
    padding: 7px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    height: 5em;
}

/* 背景を暗くするオーバーレイ */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 900;
    transition: opacity 0.3s ease;
}

.logo {
    font-size: 1.9em;
    font-weight: 350;
    animation: slide-in-from-top 1s ease-out forwards;
}

.logo a {
    margin-top: 15px;
    margin-left: -10px;
    display: inline-flex;
    align-items: center;
    color: #222222;
    transition: color 0.3s ease;
}

.logo a img {
    height: 36px;
    width: auto;
    display: block;
}

.logo a img:hover {
    opacity: 0.6;
}

nav {
    display: flex;
    align-items: center;
    animation: slide-in-from-top 1s ease-out;
}

nav a {
    margin-left: 25px;
    font-weight: 400;
    font-size: 15px;
    position: relative;
    transition: color 0.3s;
    display: inline-block;
    text-align: center;
}

nav a.is-active {
    color: #ffcc99;
}

nav a .sub {
    display: block;
    font-size: 11px;
    color: #4e4e4e;
    margin-top: 4px;
    line-height: 1;
    font-weight: 400;
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: #ffcc99;
    transition: width 0.3s ease-out;
}

nav a:hover::after,
nav a.is-active::after,
nav a[style*="color"]:after {
    /* アクティブ/ホバー時に下線を表示 */
    width: 100%;
}

nav a:hover {
    color: #ffa953;
}

nav a .sub:hover {
    filter: brightness(0.2);
}

nav a.is-active:hover,
nav a.is-active:focus-visible {
    color: #ffa953;
}

/* === ハンバーガーメニュー === */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    cursor: pointer;
    z-index: 1100;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #1a3a6e;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* メニュー開いたときのアニメーション */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/*アニメーションの遅延クラス*/
.delay-1 {
    transition-delay: .1s;
}

.delay-2 {
    transition-delay: .2s;
}

.delay-3 {
    transition-delay: .3s;
}

.delay-4 {
    transition-delay: .4s;
}

.delay-5 {
    transition-delay: .5s;
}

.delay-6 {
    transition-delay: .6s;
}

.delay-7 {
    transition-delay: .7s;
}

.delay-8 {
    transition-delay: .8s;
}

.delay-9 {
    transition-delay: .9s;
}

.delay-10 {
    transition-delay: 1s;
}

.delay-11 {
    transition-delay: 1.1s;
}

.delay-12 {
    transition-delay: 1.2s;
}

.delay-13 {
    transition-delay: 1.3s;
}

/* ---------------------------------- */
/* フッター */
/* ---------------------------------- */
footer {
    background-color: #1a3a6e;
    color: #bebebe;
    text-align: center;
    padding: 30px 50px;
    font-size: 0.9em;
}

/* ---------------------------------- */
/* ページTOPボタン */
/* ---------------------------------- */
.page-top-button {
    letter-spacing: 0.1em;
    background-color: #1a3a6e;
    background: linear-gradient(135deg, #1a3a6e, #3c5fa3);
    color: #fff !important;
    font-weight: bold;
    text-decoration: none;
    position: fixed;
    right: 5px;
    bottom: 24px;
    z-index: 99999;
    top: auto;
    left: auto;
    margin-left: 0;
    padding: 12px 20px;
    border-radius: 28px;
    box-shadow: 0 4px 10px rgba(26, 58, 110, 0.25);
    transition: all 0.3s ease;
    opacity: 0.95 !important;
}

.page-top-button:hover {
    background: linear-gradient(135deg, #142c56, #2f4d85);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(26, 58, 110, 0.3);
}

/* ---------------------------------- */
/* ページ内リンク（採用情報TOPに戻る） */
/* ---------------------------------- */
.careers-top-button {
    letter-spacing: 0.1em;
    background-color: #1a3a6e;
    /* フォールバック */
    background: linear-gradient(135deg, #1a3a6e, #3c5fa3);
    color: #fff !important;
    font-weight: bold;
    text-decoration: none;
    position: fixed;
    right: 5px;
    bottom: 24px;
    z-index: 99999;
    padding: 12px 20px;
    border-radius: 28px;
    box-shadow: 0 4px 10px rgba(26, 58, 110, 0.25);
    transition: all 0.3s ease;
    opacity: 0.95 !important;
}

.careers-top-button:hover {
    background: linear-gradient(135deg, #142c56, #2f4d85);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(26, 58, 110, 0.3);
}

/* PCでは改行させない */
.sp-br {
    display: none;
}

/* ---------------------------------- */
/* レスポンシブ対応 */
/* max-width は「大きい→小さい」の順に配置（小さい方が上書きされるため） */
/* ---------------------------------- */
@media (max-width: 900px) {
    .careers-top-button {
        right: 16px;
        bottom: 16px;
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {

    /* ヘッダー/ナビ */
    header {
        padding: 10px 20px;
        display: flex;
        justify-content: space-between;
        flex-direction: row;
    }

    .logo img {
        height: 32px;
    }

    .hamburger {
        display: flex;
        justify-content: flex-end;
        gap: 5px;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 40%;
        max-width: 300px;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: start;
        padding: 60px 0;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        transition: right 0.4s ease;
        z-index: 1000;
    }

    nav.active {
        right: 0;
    }

    nav a {
        margin: 15px 0;
        font-size: 18px;
    }

    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(206, 206, 206, 0.633);
        z-index: 900;
        transition: opacity 0.3s ease;
    }

    .nav-overlay.active {
        display: block;
    }

    /* フッター */
    footer {
        padding: 20px 16px;
        font-size: 0.85em;
    }

    /* page top */
    .page-top-button {
        right: 16px;
        bottom: 16px;
        padding: 10px 16px;
        font-size: 14px;
    }


    /* スマホだけ改行 */
    .sp-br {
        display: inline;
    }
}

/* ---------------------------------- */
/* モーション軽減 */
/* ---------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .voice-button.scroll-fade.active {
        animation: none;
    }
}