/* main.css */

/* --- グローバル設定 --- */
:root {
    --font-family: 'Montserrat', sans-serif;
    --primary-color: #111111;
    --secondary-color: #888888;
    --bg-color: #ffffff;
    --bg-color-alt: #f7f7f7;
    --border-color: #eeeeee;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--primary-color);
    background-color: var(--bg-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    padding-top: 10px;
    max-width: 1100px;
    margin: 0 auto;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 20px;
}

.header__logo img {
    height: 32px;
    width: auto;
    display: block;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
}

.header__nav a {
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    color: inherit;
    transition: font-size 0.3s ease, text-decoration 0.3s ease, color 0.3s ease, transform 0.3s ease;
    position: relative;
    padding: 5px;
}

.header__nav a:hover {
    font-size: 18px;
    text-decoration: underline;
    text-underline-offset: 5px;
    color: #007bff;
    transform: scale(1.05);
}


/* --- ドロップダウンメニュー --- */
.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: "\25BC";
    font-size: 10px;
    margin-left: 5px;
    vertical-align: middle;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px 0;
    min-width: 150px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    animation: fadeIn 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: #000;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.5s ease;
    overflow: hidden;
    box-sizing: border-box;
}

.dropdown-menu a:hover {
    background-color: #f0f0f0;
    transform: scale(1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- ハンバーガーメニュー --- */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 150;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--primary-color);
    margin: 6px 0;
    transition: all 0.3s ease-in-out;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* --- モバイルナビゲーション --- */
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--bg-color);
    flex-direction: column;
    align-items: center;
    padding-top: 50px;
    z-index: 99;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}

.mobile-nav.active {
    display: flex;
    transform: translateX(0);
}

.mobile-nav a {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
}

/* --- ヒーローセクション --- */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: #fff;
}

.hero__video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero__video-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); 
    z-index: 2;
}

.hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__content {
    position: relative;
    z-index: 3;
}

/* ★★★ ここからアニメーション関連のCSSを修正 ★★★ */
.hero__content h1,
.hero__content p {
    opacity: 0; /* JSで制御するため、初期状態は透明 */
    transition: opacity 1.5s ease-out, transform 1.5s ease-out; /* トランジションで動きを滑らかに */
    transform: translateY(20px);
}

/* JSでこのクラスを付与してアニメーションを開始 */
.hero__content .visible {
    opacity: 1;
    transform: translateY(0);
}
/* ★★★ ここまで ★★★ */


.hero__content h1 {
    font-size: 5vw;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero__content p {
    max-width: 90vw;
    font-family: sans-serif; /* ★★★ フォントを元に戻す ★★★ */
    font-weight: bold;
    font-size: 20px;
    text-align: center;
    letter-spacing: 1px;
    margin-top: 20px;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.7);
}


/* --- 横に流れるティッカー --- */
.ticker {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 15px 0;
    white-space: nowrap;
    overflow: hidden;
    z-index: 4;
}

.ticker__inner {
    display: inline-block;
    animation: ticker-scroll 40s linear infinite;
}

.ticker__inner span {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin: 0 30px;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}


/* --- 共通セクションスタイル --- */
.section {
    padding: 100px 0;
}

main>section:nth-of-type(even) {
    background-color: var(--bg-color-alt);
}

.section__title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-bottom: 60px;
    text-align: center;
    color: var(--secondary-color);
}

.box__title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-bottom: 60px;
    text-align: center;
    color: var(--secondary-color);
    margin-top: 80px;
}

/* --- カードグリッドのレイアウト --- */
.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 150px;
    justify-content: center;
    padding: 20px 0;
}

/* --- 個々のカードのスタイル --- */
.card {
    position: relative;
    width: calc(33.333% - 100px);
    min-width: 400px;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 120px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    background-color: #ffffff;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.card-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.card-background-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    transition: filter 0.3s ease-in-out;
}

.card:hover .card-background-image img {
    filter: brightness(0.9);
}

.card-content {
    position: relative;
    z-index: 3;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    color: #fff;
}

.card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left,
            rgba(197, 196, 196, 0.95) 45%,
            rgba(30, 71, 121, 0) 70%);
    z-index: -1;
    border-radius: 15px;
}

.card-category {
    font-size: 0.9em;
    opacity: 0.8;
    margin-bottom: 10px;
    font-weight: 300;
}

.card-title {
    font-size: 1.7em;
    line-height: 1.3;
    margin-bottom: auto;
    font-weight: 600;
}

.card-description {
    font-size: 0.9em;
    line-height: 1.6;
    margin-top: auto;
    padding-bottom: 20px;
    font-weight: bold;
    color: #fff;
}

.card-button {
    position: absolute;
    bottom: 45px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8em;
    text-decoration: none;
    transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.card-button:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

/* --- companyセクション --- */
.company-table {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.company-table th,
.company-table td {
    border-bottom: 1px solid var(--border-color);
    padding: 24px;
    vertical-align: top;
}

.company-table th {
    font-weight: 700;
    width: 25%;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
    border-bottom: none;
}

/* --- About & Recruit セクション共通 --- */
.main-img {
    display: block;
    max-width: 600px;
    width: 100%;
    margin: 0 auto 40px;
}

.main-text {
    max-width: 720px;
    margin: 0 auto 40px;
    text-align: center;
}

/* --- Newsセクション --- */
.news-list {
    list-style: none;
    max-width: 900px;
    margin: 0 auto 40px;
    border-top: 1px solid var(--border-color);
}

.news-item {
    border-bottom: 1px solid var(--border-color);
}

.news-item a {
    display: flex;
    align-items: center;
    padding: 24px 20px;
    transition: opacity 0.3s ease;
}

.news-item a:hover {
    opacity: 0.7;
    color: var(--primary-color);
}

.news-date {
    min-width: 100px;
    font-size: 14px;
    color: var(--secondary-color);
}

.news-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border: 1px solid var(--primary-color);
    margin: 0 30px;
    white-space: nowrap;
}

.news-title {
    font-size: 16px;
}

/* --- Contactセクション --- */
.contact__text {
    text-align: center;
    margin-top: 80px;
    margin-bottom: 40px;
}

/* --- ボタン --- */
.btn {
    display: inline-block;
    border: 1px solid var(--primary-color);
    padding: 15px 40px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.section .btn {
    display: block;
    width: fit-content;
    margin: 0 auto;
}

.btn--primary {
    background-color: var(--primary-color);
    color: var(--bg-color);
}

.btn--primary:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

/* --- フッター --- */
.footer {
    padding: 40px 0;
    text-align: center;
    font-size: 12px;
    color: var(--secondary-color);
    background-color: #fff;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.social-icons img {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.social-icons img:hover {
    transform: scale(1.1);
}

/* --- フェードインアニメーション --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- レスポンシブデザイン --- */
@media (max-width: 992px) {
    .card-grid {
        gap: 60px;
    }

    .card {
        width: calc(50% - 30px);
        height: 480px;
        min-width: unset;
    }

    .card-title {
        font-size: 1.6em;
    }
}

@media (max-width: 768px) {
    .header__nav {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }

    .hero__content h1 {
        font-size: 10vw;
    }

    .header__logo img {
        width: 70%;
    }

    .hero__content p {
        font-size: 1rem;
        line-height: 1.8;
        padding: 0 20px;
    }

    .section {
        padding: 80px 0;
    }

    .card-grid {
        gap: 30px;
    }

    .card {
        width: 90%;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        height: 450px;
    }

    .card-content {
        padding: 25px;
    }

    .card-title {
        font-size: 1.5em;
    }

    .card-button {
        bottom: 25px;
        right: 25px;
        width: 45px;
        height: 45px;
        font-size: 1.6em;
    }

    .company-table th,
    .company-table td {
        display: block;
        width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }

    .company-table th {
        padding-top: 15px;
        padding-bottom: 10px;
        font-weight: 700;
        background-color: rgba(0, 0, 0, 0.02);
        border-bottom: none;
    }

    .company-table td {
        padding-top: 0;
        padding-bottom: 15px;
    }

    .news-item a {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 10px;
    }

    .news-date {
        margin-bottom: 10px;
    }

    .news-category {
        margin: 0 0 10px 0;
    }
}

@media (max-width: 480px) {
    .card {
        width: 85%;
        border-radius: 10px;
        height: 420px;
        margin-bottom: 60px;
    }

    .header__logo img {
        width: 80%;
    }

    .card-content {
        padding: 20px;
    }

    .card-description {
        font-size: 0.85em;
    }

    .card-button {
        width: 40px;
        height: 40px;
        font-size: 1.4em;
    }

    .section__title,
    .box__title {
        font-size: 1.8em;
    }

    .main-text {
        font-size: 0.9rem;
    }

    .ticker__inner span {
        font-size: 13px;
        margin: 0 15px;
    }
}