/* styles.css */

/* フォントと基本スタイル */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --primary-color: #007BFF;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #ffffff;
    --primary-color: #1e90ff;
    --secondary-color: #adb5bd;
    --accent-color: #17a2b8;
}

/* ハンバーガーメニュー（スマホ用） */
.hamburger {
    display: none; /* デスクトップでは非表示 */
    font-size: 24px;
    cursor: pointer;
    color: white;
    margin-right: 20px;
}


/* ロゴのスタイル */
.logo {
    font-size: auto; /* ロゴのフォントサイズを大きく設定 */
    font-weight: 700; /* 太字に設定 */
    font-family: 'Roboto', sans-serif; /* Google Fontsを使用 */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3); /* 文字に影を追加 */
    letter-spacing: 2px; /* 文字間のスペースを広げる */
    padding: 20px;
    background: rgba(255, 255, 255, 0.1); /* 半透明の背景を追加 */
}

/* ナビゲーションバー */
header {
    background-color: var(--bg-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
/* ナビゲーションバー全体 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: auto;
    background-color: #333;
    color: white;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

/* ナビゲーションリンク（左揃え） */
.nav-links {
    display: flex;
    list-style: none;
    gap: 15px;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
}


/* テーマ切り替えアイコン */
.theme-toggle {
    margin-left: auto; /* 右端に配置 */
    font-size: 24px;
    cursor: pointer;
    color: white;
}

/* ヒーローセクション */
.hero {
    height: 100vh;
    background: url('https://via.placeholder.com/1920x1080') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 0 1rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3; /* Darker shade of primary color */
}

/* セクションスタイル */
section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-content,
.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.about-content img {
    flex: 1 1 400px;
    border-radius: 10px;
    max-width: 100%;
    height: auto;
}

.about-text {
    flex: 1 1 400px;
}

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

.service-card {
    background-color: var(--bg-color);
    border: 1px solid var(--secondary-color);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.service-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.contact-form .btn {
    align-self: flex-start;
}

/* フッター */
footer {
    background-color: var(--bg-color);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--secondary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-links a {
    color: var(--text-color);
    margin: 0 0.5rem;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* モバイル対応スタイル */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 60px; /* Adjust based on navbar height */
        right: 0;
        background-color: var(--bg-color);
        flex-direction: column;
        width: 200px;
        padding: 1rem;
        border: 1px solid var(--secondary-color);
        border-radius: 5px;
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .theme-toggle {
        margin-left: 1rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .about-content,
    .services-grid {
        flex-direction: column;
    }

    .about-content img,
    .about-text {
        flex: 1 1 100%;
    }
}

/* タッチデバイス向けのボタンサイズ調整 */
.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn:active {
    transform: scale(0.98);
}

/* ギャラリーセクション */
.gallery {
    padding: 4rem 2rem;
    background-color: var(--secondary-color);
    color: #fff;
}

.gallery h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: auto;
    transition: transform 0.3s;
    cursor: pointer; /* 手のひらアイコン */
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* ライトボックスのスタイル */
.lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}

.lightbox-content img {
    width: 100%;
    height: auto;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* モーダルのスタイルはそのままでOK */
.modal {
    display: none; /* デフォルトは非表示 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: hidden;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    display: block;
    margin: auto;
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2em;
    color: white;
    cursor: pointer;
}

/* ギャラリーグリッドやモーダルはそのまま */

.modal-navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.modal-navigation button {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1.5em;
    transition: background 0.3s ease;
}

.modal-navigation button:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* モーダル全体のスタイル */
.modal {
    display: none; /* デフォルトは非表示 */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
/*    width: 100%; /* 横幅を画面全体に設定 */
/*    height: 100%; /* 高さを画面全体に設定 */
    background-color: rgba(0, 0, 0, 0.8); /* 背景を半透明の黒に設定 */
    justify-content: center; /* 水平方向に中央揃え */
    align-items: center; /* 垂直方向に中央揃え */
}

/* モーダル内の画像スタイル */
.modal-content {
    max-width: 100%; /* 画面幅の最大90%まで画像を表示 */
    max-height: 100%; /* 画面高さの最大90%まで画像を表示 */
    display: block;
    margin: auto; /* 中央揃え */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* 画像に軽い影を追加 */
    border-radius: 5px; /* 角を少し丸める（必要なら） */
}
.youtube-gallery {
    padding: 20px;
    background-color: #f9f9f9;
    text-align: center;
}

.youtube-gallery h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

/* グリッドの設定 */
.youtube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* 最小150px、1列以上 */
    gap: 15px; /* グリッドアイテム間の間隔 */
    justify-content: center;
}

.youtube-item {
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.youtube-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* サムネイル画像の設定 */
.youtube-item img {
    width: auto; /* グリッド幅に対して100% */
    max-width: auto; /* 最大150pxに制限 */
    height: auto; /* アスペクト比を保つ */
    border-radius: 5px; /* 少し丸みを付ける */
    margin: 0 auto 10px; /* 中央揃えと下部マージン */
}

/* テキストの設定 */
.youtube-item p {
    font-size: 16px;
    color: #333;
    margin: 0;
    text-align: center;
}

/* スマホ対応レスポンシブデザイン */
@media (max-width: 768px) {
    .youtube-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* 幅120pxから */
        gap: 10px; /* 間隔を狭める */
    }

    .youtube-item img {
        max-width: 120px; /* スマホではサムネイルをさらに小さく */
    }
}

@media (max-width: 480px) {
    .youtube-grid {
        grid-template-columns: 1fr; /* 1列に並べる */
    }

    .youtube-item img {
        max-width: 100px; /* 小さなデバイス向けにさらに縮小 */
    }

    .youtube-item p {
        font-size: 14px; /* テキストサイズを小さく */
    }
    .nav-links {
        display: none; /* 初期状態では非表示 */
    }

    .hamburger {
        display: block; /* スマホでは表示 */
    }

    .nav-links.active {
        display: flex; /* ハンバーガーメニューがアクティブ時に表示 */
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%; /* 全幅に展開 */
        background-color: #333;
        padding: 10px 0;
    }

    .nav-links li {
        padding: 10px 20px;
        text-align: left;
    }
}
