/* ================================
   ベーススタイル
================================ */
body, h1, h2, p, ul, li, a {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Hiragino Sans", "Helvetica", sans-serif;
}

body {
    overflow-x: hidden;
    background-color: #1a1a1a;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-family: "Hiragino Sans", "Helvetica", sans-serif;
}

/* ================================
   ヘッダー
================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw; /* ウィンドウ幅を超えないようにする */
    height: 60px;
    padding: 10px 20px; /* 余白を調整 */
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box; /* padding を含めてもはみ出さないように */
    transition: background 0.3s ease, opacity 0.5s ease;
    z-index: 1000;
}
.header .logo {
    font-size: clamp(1.25rem, 3vw, 1.5rem); /* ウィンドウ幅に応じてフォントサイズを調整 */
    color: #f1c40f;
    text-shadow: #111111;
    font-weight: bold;
    cursor: pointer; /* クリック可能であることを示す */
    white-space: nowrap; /* ロゴが1行に収まるように */
    transition: transform 0.3s ease, opacity 0.3s ease, color 0.3s ease; /* 変化のスムーズなアニメーション */
}

/* マウスオーバー時のアクション */
.logo:hover {
    transform: scale(1.1); /* ロゴを少し拡大 */
    opacity: 0.8; /* 透明度を下げる */
}

/* 言語スイッチャースタイル */
.language-switcher {
    position: absolute;
    top: 10px;
    right: 65px;
    z-index: 1001;
  }
  
  .lang-btn {
    background: none;
    border: 0.01px solid #f2da7b;
    color: #f1c40f;
    padding: 2px 5px;
    margin: 1 2px;
    cursor: pointer;
    transition: all 0.5s;
  }
  
  .lang-btn:hover {
    background: rgba(241, 196, 15, 0.2);
  }

/* ================================
   ナビゲーションバーのスタイル
================================ */
.nav {
    display: flex;
    justify-content: center;
    width: auto;
}
.nav ul {
    list-style: none;
    display: none; /* 初期状態で非表示 */
    flex-direction: column;
    align-items: center;
    justify-content: center; /* メニューを中央に配置 */
    gap: 1vw;
    background-color: rgba(255, 255, 255, 0.3); /* 背景色 */
    position: absolute;
    top: 60px;
    left: 1;
    right: 0;
    transition: max-height 0.9s ease; /* メニューが展開されるときのアニメーション */
    max-height: 0;
    overflow: hidden;
    z-index: 10;
}
.nav.active ul {
    display: flex; /* アクティブ時のみ表示 */
    max-height: 200px; /* 展開後の高さ */
    transition: max-height 0.9s ease; /* スムーズに展開 */
}
.nav a {
    text-decoration: none;
    color:#f1c40f;
    font-size: calc(0.5vw + 1px);
    font-weight: 350;
    transition: color 0.6s ease;
}
.nav a:hover {
    color: #bea65d;
}

/* ================================
   ハンバーガーメニューアイコン
================================ */
.menu-toggle {
    display: inline-block;
    font-size: 2rem;
    color: #f1c40f;
    position: absolute;
    top: 3px; /* 上に配置 */
    right: 20px; /* 右端に配置 */
    z-index: 20; /* メニューより前面 */

     /* ★ 外枠を消すための指定を追加 ★ */
     background: none; /* 背景を消す */
     border: none;     /* 枠線を消す */
     outline: none;    /* フォーカス時のアウトラインを消す */
     cursor: pointer;  /* カーソルをポインターに */

}

/* ================================
   レスポンシブ対応（モバイルとPC両方に対応）
================================ */
@media (max-width: 768px) {
    .nav ul {
        flex-direction: column; /* モバイルでは縦並び */
        gap: 1.5rem;
        display: none; /* モバイルでは非表示 */
    }
    .nav a {
        font-size: 1.2rem;
        text-align: center;
        padding: 10px;
    }
        /* ヘッダーとナビゲーションのスタイル */
        .header {
            height: auto;
            padding: 10px;
            flex-direction: column;
        }    

    /* Section1 と Section2 のテキスト */
    .section-content h2 {
        font-size: calc(4vw + 2rem);
    }
    .section-content p {
        font-size: calc(2vw + 1rem);
    }

    /* Contact Us のテキスト位置調整 */
    .contact-title-container {
        top: 10%; /* モバイル用に位置を調整 */
    }
}

@media (min-width: 769px) {
    .nav ul {
        display: flex; /* PC では横並び */
        justify-content: flex-end; /* 横並びにして右寄せ */
        align-items: center;
    }
    .nav a {
        padding: 15px;
        font-size: 1rem;
    }
}

/* ================================
   HERO セクション
================================ */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    color: white;
}

/* HEROコンテンツ */
.hero-content {
    position: relative;
    z-index: 10; /* 背景より前面に */
}

/* 背景レイヤー */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* 背景を背面に */
}

/* ================================
   スクロール誘導エリア（最前面）
================================ */
.scroll-indicator {
    position: fixed; /* 画面の下部に常に固定 */
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 15;
    cursor: pointer; /* クリック可能に */
}

/* ================================
   SCROLL テキスト（横書きを90度回転）
================================ */
.scroll-text {
    display: flex;
    flex-direction: column; /* 文字を横並び */
    align-items: center;
    font-size: 7px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.01px;
    white-space: nowrap; /* 文字を1行にする */
}

.scroll-text span {
    opacity: 0;
    animation: scrollFadeIn 1.5s infinite;
}

/* SCROLL の文字が左から右へ点滅（倒すと上から下） */
.scroll-text span:nth-child(1) { animation-delay: 0s; }
.scroll-text span:nth-child(2) { animation-delay: 0.1s; }
.scroll-text span:nth-child(3) { animation-delay: 0.2s; }
.scroll-text span:nth-child(4) { animation-delay: 0.3s; }
.scroll-text span:nth-child(5) { animation-delay: 0.4s; }
.scroll-text span:nth-child(6) { animation-delay: 0.5s; }

/* SCROLLの文字のアニメーション（上から下に光るように点滅） */
@keyframes scrollFadeIn {
    0% { opacity: 0; transform: rotate(90deg) translateY(1px); }
    50% { opacity: 1; transform: rotate(90deg) translateY(1px); }
    100% { opacity: 0; transform: rotate(90deg) translateY(1px); }
}

/* ================================
   三連矢印（間隔を狭く）
================================ */
.arrow-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px; /* 矢印の間隔を狭く */
}

/* 矢印の基本スタイル */
.arrow {
    width: 6px;
    height: 6px;
    border-right: 1px solid white;
    border-bottom: 1px solid white;
    transform: rotate(deg);
    opacity: 0;
    animation: arrowMove 1.5s infinite;
}

/* 1つずつ時間差で点滅 */
.arrow1 { animation-delay: 0.6s; }
.arrow2 { animation-delay: 0.7s; }
.arrow3 { animation-delay: 0.8s; }

/* 矢印のアニメーション（上から流れて点滅） */
@keyframes arrowMove {
    0% { transform: rotate(45deg) translateY(1px); opacity: 0; }
    50% { transform: rotate(45deg) translateY(1px); opacity: 1; }
    100% { transform: rotate(45deg) translateY(1px); opacity: 0; }
}

/* ================================
   セクション
================================ */
.section {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10; /* 最前面に配置 */
    padding: 0vw;
    overflow: hidden;
}

/* ================================
   セクションのテキスト（Section1, Section2, Section3）
================================ */
.section-content h2 {
    font-size: clamp(1.5rem, 2vw + 1rem, 3rem); /* 最小1.5rem、最大3rem */
    max-width: 200rem; /* 最大幅 */
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.section-content p {
    font-size: calc(1vw + 1rem); /* ウィンドウ幅に応じたサイズ調整 */
    line-height: 1.6;
}

/* ================================
   セクションリンク（クリック可能）
================================ */
.section-link {
    display: block;
    text-decoration: none;
    color: white;
    transition: color 0.3s ease, transform 0.3s ease; /* 色変化と少しの浮き上がり効果 */;
}

/* マウスホバー時のアニメーション */
.section-content:hover {
    color: #f1c40f; /* 控えめな色変化 */
    transform: scale(1.1) ; /* ロゴを少し拡大 */
    opacity: 0.8; /* 透明度を下げる */
    transition: transform 0.3s ease, opacity 0.3s ease, color 0.3s ease; /* 変化のスムーズなアニメーション */
}

/* クリックできることを示す点滅アニメーション */
@keyframes clickHint {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.3; }
}

/* 初回ロード時に軽く点滅 */
.section-content {
    animation: clickHint 2s infinite ease-in-out;
}

/* ================================
   ポップアップモーダル（スライド表示）
================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: hidden; /* モーダル外のスクロールを防止 */
}

.modal-content {
    position: relative;
    width: 80%;
    max-width: 1200px;
    height: 80%;
    background: white;
    padding: 15px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow: hidden; /* コンテンツがはみ出ないように */
}

/* モーダルを閉じるボタン */
.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    cursor: pointer;
}

/* PDFビューア */
#pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    max-width: 100%; /* 幅を最大でも100%に制限 */
    max-height: 100%; /* 高さを最大でも100%に制限 */
    object-fit: contain; /* PDFが枠内に収まるように設定 */
    overflow-y: auto; /* PDFが縦にスクロール可能に */
}

/* ================================
   レスポンシブ対応
================================ */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        height: 90%;
        max-width: 100%;
        max-height: 90%; /* ビューポートに合わせた最大高さ */
        padding: 5px; /* パディングの調整 */
    }

    #pdf-viewer {
        max-width: 100%; /* 幅を最大100%に調整 */
        max-height: 100%; /* 高さを最大100%に */
        object-fit: contain; /* PDFが枠に収まるように調整 */
        overflow-y: auto; /* 縦方向のスクロールを可能に */
    }
}

/* ================================
   Contact Us タイトル（独立配置）
================================ */
.contact-title-container {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
}

.contact-title {
    font-size: 16px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
}


/* ================================
   Contact Form セクション
================================ */
.contact {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 80vh;
}

/* コンテナ */
.contact-container {
    width: 40%;
    max-width: 400px;
    background: rgba(255, 255, 255, 1.6); /* 半透明の背景 */
    padding: 50px;
    border-radius: 10px;
    backdrop-filter: blur(10px); /* ガラスのような効果 */
}

/* 入力欄 */
.input-group {
    margin-bottom: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    font-size: 13px;
    color: white;
    background: rgba(209, 208, 208, 0.35); /* 半透明 */
    border: 1px solid rgba(255, 255, 255, 0.2); /* ほぼ見えない枠 */
    border-radius: 4px;
    outline: none;
}

/* テキストエリアの高さを調整 */
.contact-form textarea {
    height: 100px;
    resize: none;
}

/* フォーカス時のエフェクト */
.contact-form input:focus,
.contact-form textarea:focus {
    background: rgba(160, 160, 160, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

/* 送信ボタン */
.submit-btn {
    width: 40%;
    padding: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: white;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.5s ease-in-out;
}

.submit-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 全画面を覆う半透明の背景 */
.popup-overlay {
    display: none; /* 初期は非表示 */
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5); /* 背景を暗く */
    justify-content: center;
    align-items: center;
    z-index: 9999; 
  }
  
  /* モーダル本体 */
  .popup-content {
    background: #1b1b1b;
    padding: 20px;
    border-radius: 5px;
    max-width: 400px;
    width: 80%;
    text-align: center;
    position: relative;
  }
  
  /* 閉じるボタン */
  .popup-close {
    position: absolute;
    top: 10px; 
    right: 10px;
    cursor: pointer;
    font-size: 20px;
  }

  /* メッセージの余白など */
#popup-message {
    margin: 0;
    padding: 20px 0 10px;
    font-size: 16px;
    line-height: 1.4;
  }

/* ================================
   テキストを最前面に配置
================================ */
.section-content {
    position: relative;
    z-index: 10; /* 最前面に配置 */
    color: white;
    width: 100%;
    max-width: 900px;
}

.section-content h2 {
    font-size: 2.5vw;
    margin-bottom: 18px;
}

.section-content p {
    font-size: 1.7vw;
    line-height: 1.6;
}

/* ================================
   幾何学模様のスペース (.geometric-spacing)
================================ */
.geometric-spacing {
    height: 70px;
    background: url('https://ajfront.com/image/arabic-pattern.jpg') repeat center;
    background-size: contain;
    opacity: 0.03;
    transition: opacity 2s ease-in-out;
}

/* ================================
   フェードオーバーレイ（暗くする）
================================ */
.section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2); /* 透明な黒 */
    opacity: 0; /* デフォルトは非表示 */
    transition: opacity 0.8s ease-in-out;
    z-index: 5; /* テキストより下、背景より上 */
}

/* スクロールして表示されたときに暗くする */
.section.active::after {
    opacity: 1;
}

/* ================================
   背景レイヤーの修正（テキストとは独立）
================================ */
.background-layer {
    position: absolute;
    top: -10%;
    left: -10%;
    right: -10%;
    bottom: -10%;
    width: 130vw;
    height: 140vh;
    overflow: hidden;
    z-index: -1; /* テキストより背面 */
}

/* 背景画像 */
.parallax-bg {
    position: absolute;
    width: 110%;
    height: 110%;
    left: -10%;
    right: -10%;
    background-size: cover;
    background-repeat: no-repeat;
    transition: transform 0.3s ease-out, opacity 3.0s ease-in-out;
}

/* 各 Layer ごとの clip-path & background-position の修正 */
.hero .background-layer.layer1 { clip-path: polygon(39% 43%, 78% 24%, 100% 46%, 70% 66%); background-position: top left; }
.hero .background-layer.layer2 { clip-path: polygon(100% 20%, 100% 0, 0 0, 0 35%); background-position: left top; }
.hero .background-layer.layer3 { clip-path: polygon(0 50%, 48% 54%, 88% 100%, 0 100%); background-position: bottom left; }

.section#section1 .background-layer.layer7 { clip-path: polygon(-30% 58%, 100% 38%,100% 100%, -50% 110%); background-position: right center; }
.section#section1 .background-layer.layer9 { clip-path: polygon(0 0, 100% 0, 100% 32%, 0 47%); background-position: center top; }

.section#section2 .background-layer.layer15 { clip-path: polygon(0% 99%, -23% -20%, 88% 100%, 60% 100%); background-position: top bottom; }
.section#section2 .background-layer.layer16 { clip-path: polygon(0% 0, 100% 0%, 100% 100%, 92% 99%); background-position: left right; }

.section#section3 .background-layer.layer4 { clip-path: polygon(0 0, 100% 0, 100% 42%, 0 16%);   background-position: top left; }
.section#section3 .background-layer.layer5 { clip-path: polygon(0 19%, 0 24%, 38% 100%, 0 100%); background-position: right bottom; }
.section#section3 .background-layer.layer6 { clip-path: polygon(0 19%, 100% 46%, 100% 100%, 40% 100%); background-position: left center; }

.section#contact .background-layer.layer10 { clip-path: polygon(-5% 10%, 100% -30%, 100% 55%, 63% 27%); background-position: top left; }
.section#contact .background-layer.layer13 { clip-path: polygon(2% 14%, 60% 29%, 100% 59%, 0 100%); background-position: right; }

/* ================================
   背景画像の適用（ajfront.com）
================================ */
.hero .layer1 .parallax-bg { background-image: url('https://ajfront.com/image/SaudiForest.jpg');}
.hero .layer2 .parallax-bg { background-image: url('https://ajfront.com/image/SaudiNegotiation.jpg'); }
.hero .layer3 .parallax-bg { background-image: url('https://ajfront.com/image/AlUla.jpg');background-position: bottom left; }

.section#section1 .layer7 .parallax-bg { background-image: url('https://ajfront.com/image/SaudiBusinessMtg.jpg'); }
.section#section1 .layer9 .parallax-bg { background-image: url('https://ajfront.com/image/SaudiBusinessMtg2.jpg'); }

.section#section2 .layer15 .parallax-bg { background-image: url('https://ajfront.com/image/SUMOaudience.jpg'); background-position: top bottom;}
.section#section2 .layer16 .parallax-bg { background-image: url('https://ajfront.com/image/SUMOring.jpg'); background-position: left right; }

.section#section3 .layer4 .parallax-bg { background-image: url('https://ajfront.com/image/LINE.jpg'); background-position: left bottom;}
.section#section3 .layer5 .parallax-bg { background-image: url('https://ajfront.com/image/SaudiDesertCamel.jpg'); }
.section#section3 .layer6 .parallax-bg { background-image: url('https://ajfront.com/image/NEOMworld.jpg'); background-position: left center; }

.section#contact .layer10 .parallax-bg { background-image: url('https://ajfront.com/image/SaudiFarm.jpg'); }
.section#contact .layer13 .parallax-bg { background-image: url('https://ajfront.com/image/SaudiMekka.jpg'); }

/* ================================
   フェードアニメーション
================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(100px); }
    to { opacity: 1; transform: translateY(100px); }
}

.section.active .section-content h2,
.section.active .section-content p {
    animation: fadeIn 1.5s ease-out forwards;
}


/* ================================
   フッター
================================ */
.footer {
    position: relative;
    width: 100%;
    padding: 15px 0;
    background: rgba(0, 0, 0, 0.7); /* 半透明のダーク背景 */
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6); /* 文字をやや薄く */
    letter-spacing: 1px;
    backdrop-filter: blur(5px); /* ほんのりぼかし */
}

/* スクロール時にフッターが目立ちすぎないよう調整 */
.footer-text {
    margin: 0;
    padding: 5px;
    font-weight: 300;
}