/* CSSをより整理して、関連するスタイルをグループ化します */
:root {
    --primary-color: #2d5aa0;
    --secondary-color: #30b9c4;
    --text-color: #4a4a4a;
    --light-gray: #f8f9fa;
    --dark-gray: #6c757d;
    --footer-bg: #212529;
    --footer-text: #adb5bd;
    --max-width: 1024px;
    --section-padding: 80px 5%;
    --font-heading: 'Inter', 'Noto Sans JP', sans-serif;
    --font-body: 'Inter', 'Noto Sans JP', sans-serif;
}

/* スクロールアニメーション用のスタイル */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}

.slide-in-left.appear, .slide-in-right.appear {
    opacity: 1;
    transform: translateX(0);
}

.zoom-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: opacity, transform;
}

.zoom-in.appear {
    opacity: 1;
    transform: scale(1);
}

.delay-200 { transition-delay: 0.2s; }
.delay-400 { transition-delay: 0.4s; }
.delay-600 { transition-delay: 0.6s; }
.delay-800 { transition-delay: 0.8s; }

/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本スタイル */
body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6, .logo, .section-title, .section-subtitle {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--dark-gray);
    margin-bottom: 40px;
}

/* ヘッダー */
header {
    background-color: white;
    position: relative;
    width: 100%;
    z-index: 1000;
    overflow: visible;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.logo span {
    color: var(--primary-color);
    font-weight: 800;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
    order: -1;
}

.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

/* ハンバーガーメニューがアクティブ時の状態 */
.hamburger-menu.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

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

nav ul {
    display: flex;
    list-style: none;
    position: relative;
    z-index: 3;
}

nav li {
    margin-left: 30px;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

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

.contact-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.contact-btn:hover {
    background-color: #1f4580;
}

/* メインビジュアル */
.hero {
    position: relative;
    color: white;
    padding: 0 5% 100px;
    text-align: center;
    overflow: hidden;
    margin-top: -80px;
    min-height: 100vh;
}

.hero-content {
    padding-top: 160px;
    padding-bottom: 80px;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 80px);
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease;
    max-width: 100vw;
}

.hero-video.active {
    opacity: 1;
}

/* 動画再生失敗時のフォールバックモード */
.hero.video-fallback-mode .hero-video {
    display: none !important;
}

.hero.video-fallback-mode {
    background-image: url('data/helo_poster.png');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 透明度を上げるために、rgba値の最後の数値（アルファ値）をさらに小さくする */
    background: linear-gradient(135deg, rgba(45, 90, 160, 0.2), rgba(48, 185, 196, 0.2));
    z-index: 2;
    /* 網掛けパターンも薄くする */
    background-image: 
        linear-gradient(135deg, rgba(45, 90, 160, 0.2), rgba(48, 185, 196, 0.2)),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255, 255, 255, 0.01) 2px, rgba(255, 255, 255, 0.01) 4px);
}

.hero h1, .hero p, .hero .cta-buttons {
    position: relative;
    z-index: 3;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.primary-btn {
    background-color: white;
    color: var(--primary-color);
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.primary-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
}

.secondary-btn {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* セクション共通 */
section {
    padding: var(--section-padding);
}

.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* サービスセクション */
.services {
    background-color: var(--light-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 8px 8px 0 0;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* ホバー時に画像を少し拡大する効果 */
.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
    padding: 0 20px;
}

.service-card p {
    color: var(--dark-gray);
    margin-bottom: 20px;
    padding: 0 20px 30px;
    flex-grow: 1;
}

/* ホバー時に画像を少し拡大する効果 */
.service-card:hover .service-image img {
    transform: scale(1.05);
}

/* サービス機能リストのスタイル */
.service-features {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.service-features li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    color: var(--dark-gray);
}

.service-features li:last-child {
    border-bottom: none;
}

.service-features li:before {
    content: "•";
    color: var(--secondary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: 0;
}

/* 特徴セクション */
.features {
    background-color: var(--light-gray);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
}

.features-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.feature-item {
    display: flex;
    margin-bottom: 25px;
}

.feature-icon {
    background-color: #e9f0f8;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    color: var(--primary-color);
}

.feature-text h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.feature-text p {
    color: var(--dark-gray);
}

/* 実績セクション */
.works {
    background-color: var(--light-gray);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.work-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.work-image {
    height: 200px;
    background-color: #e9f0f8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.work-content {
    padding: 20px;
}

.work-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.work-category {
    display: inline-block;
    background-color: #e9f0f8;
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* 会社概要セクション */
.company-profile {
    background-color: var(--light-gray);
    padding: 80px 5%;
}

.info-table {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    border-collapse: collapse;
}

.info-table th,
.info-table td {
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.info-table th {
    width: 30%;
    text-align: left;
    color: var(--primary-color);
    font-weight: 600;
}

/* 企業理念セクション */
.company-philosophy {
    padding: var(--section-padding);
}

.philosophy-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.philosophy-main {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.philosophy-content p {
    margin-bottom: 20px;
}

/* お問い合わせセクション */
.contact-section {
    padding: var(--section-padding);
    background-color: white;
}

.contact-content {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.contact-form-container {
    margin: 40px auto;
    max-width: 600px;
}

.contact-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.contact-button:hover {
    background-color: #1e4785;
    transform: translateY(-3px);
}

.contact-note {
    margin-top: 15px;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

/* フッター */
footer {
    background-color: var(--footer-bg);
    color: var(--light-gray);
    padding: 50px 5% 20px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 40px;
}

.footer-links {
    flex: 1;
}

.footer-links:first-child {
    margin-right: auto;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 30px;
    }
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--light-gray);
    margin-bottom: 15px;
}

.footer-logo span {
    color: var(--secondary-color);
    font-weight: 800;
}

.footer-about p {
    color: var(--footer-text);
    margin-bottom: 20px;
}

.footer-links h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: white;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #343a40;
    color: var(--footer-text);
    font-size: 0.9rem;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .header-container {
        justify-content: center;
        position: relative;
    }
    
    .hamburger-menu {
        display: flex;
        position: absolute;
        left: 5%;
        z-index: 1001;
    }
    
    .logo {
        text-align: center;
    }
    
    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: white;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        z-index: 1000;
        padding: 80px 20px 20px;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        align-items: flex-start;
    }
    
    nav li {
        margin: 15px 0;
        width: 100%;
    }
    
    nav a.contact-btn {
        display: inline-block;
        width: 100%;
        text-align: center;
        margin-top: 20px;
    }
    
    /* オーバーレイ */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }
    
    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .language-switcher {
        margin: 20px 0 0 0;
    }

    .section-container,
    .header-container,
    .footer-container {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }
    
    .hero-content {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }
    
    /* テーブルのレスポンシブ対応 */
    .info-table {
        width: 100%;
        display: block;
        box-sizing: border-box;
    }
    
    .info-table th,
    .info-table td {
        width: 100%;
        display: block;
        box-sizing: border-box;
    }
}

/* メニュー表示中のbodyスタイル */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* 浮遊する幾何学的要素のスタイルを削除 */
.floating-element {
    display: none; /* 要素を非表示にする */
}

/* 以下の関連するスタイルも削除または非表示にする */
.floating-element.circle,
.floating-element.triangle,
.floating-element.square,
.floating-element.rectangle,
.floating-element.hexagon {
    display: none;
}

@keyframes float {
    /* アニメーションは残しておくが、使用されない */
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) translateX(10px) rotate(90deg);
    }
    50% {
        transform: translateY(0) translateX(20px) rotate(180deg);
    }
    75% {
        transform: translateY(20px) translateX(10px) rotate(270deg);
    }
    100% {
        transform: translateY(0) translateX(0) rotate(360deg);
    }
}

/* 言語切り替えボタン */
.language-switcher {
    display: flex;
    margin-left: 20px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px 10px;
    transition: color 0.3s;
    font-weight: 500;
}

.lang-btn:hover {
    color: var(--secondary-color);
}

.lang-btn.active {
    color: var(--primary-color);
    font-weight: 700;
    border-bottom: 2px solid var(--primary-color);
}

@media (max-width: 768px) {
    .language-switcher {
        margin: 20px 0 0 0;
    }
}

/* パララックスセクション */
.parallax-section {
    position: relative;
    height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform; /* パフォーマンス最適化 */
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center bottom; /* 初期位置を下部に設定 */
    background-repeat: no-repeat;
    transform: translateZ(0); /* ハードウェアアクセラレーションを有効化 */
    will-change: transform, background-position; /* パフォーマンス最適化 */
    z-index: 1;
    -webkit-transform: translate3d(0,0,0); /* iOS Safari対応 */
    -webkit-backface-visibility: hidden; /* iOS Safari対応 */
    backface-visibility: hidden; /* 標準プロパティを追加 */
}

.parallax-content {
    position: relative;
    z-index: 2; /* z-indexを2に戻す */
    text-align: center;
    color: white;
    padding: 0 20px;
    max-width: var(--max-width);
}

.parallax-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* モバイル向け調整 */
@media (max-width: 768px) {
    .parallax-section {
        height: 200px; /* モバイルでは高さを小さく */
    }
}

/* ヒーローセクションのローディング状態 */
.hero.loading {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hero {
    opacity: 1;
}

/* スマホでの横スクロール問題を修正 */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}
