/* リセットCSS */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff;
    color: #333;
    overflow-x: hidden;
}

/* ヘッダー */
header {
    text-align: center;
    padding: 40px 20px;
    background-color: #fff;
}

h1 {
    font-size: 24px;
    letter-spacing: 2px;
    margin-bottom: 30px;
    font-weight: normal;
}

/* タブメニュー */
.tab-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    cursor: pointer;
}

.tab-menu li {
    font-size: 14px;
    letter-spacing: 1px;
    color: #aaa;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-menu li.active,
.tab-menu li:hover {
    color: #000;
    border-bottom: 2px solid #000;
}

/* セクション表示制御 */
.content-section {
    display: none;
    padding-bottom: 50px;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   1. PHOTO セクション (修正)
   - 縦2列に変更
   - 左右に余白を追加 (max-width + padding)
   ========================================= */
.photo-grid {
    display: grid;
    /* PC: 2列 */
    grid-template-columns: repeat(2, 1fr);
    gap: 4px; /* タイルの隙間（狭め維持） */
    
    /* 左右の余白設定 */
    width: 100%;
    max-width: 1400px; /* 大きすぎるモニター対策 */
    margin: 0 auto;    /* 中央寄せ */
    padding: 0 40px;   /* 画面端からの余白 */
}

.photo-item {
    position: relative;
    width: 100%;
    /* 16:9 の比率を固定 */
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #f0f0f0;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    cursor: pointer;
}

.photo-item:hover img {
    transform: scale(1.03);
}

/* =========================================
   2. RETOUCH セクション
   ========================================= */
.retouch-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 上段（A4画像 2つ横並び） */
.retouch-layout-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* 下段（横長画像 1つずつ縦並び） */
.retouch-layout-bottom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.retouch-item {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #f0f0f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.item-a4 { aspect-ratio: 210 / 297; }
.item-wide { aspect-ratio: 1190 / 760; }

.retouch-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    cursor: pointer;
}

.retouch-item:hover img {
    transform: scale(1.03);
}

/* =========================================
   3. VIDEO セクション
   ========================================= */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
}

.video-item { width: 100%; }

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    margin-bottom: 15px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.video-info h3 { font-size: 16px; margin-bottom: 5px; font-weight: bold; }
.video-info p { font-size: 13px; color: #666; }

/* =========================================
   モーダル
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 20px; right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10001;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    padding: 16px;
    cursor: pointer;
    user-select: none;
    z-index: 10000;
    transition: 0.3s;
}
.modal-nav:hover { background-color: rgba(0,0,0,0.5); border-radius: 5px; }
.prev { left: 10px; }
.next { right: 10px; }

/* =========================================
   レスポンシブ (スマホ表示)
   ========================================= */
@media (max-width: 768px) {
    /* PHOTO: スマホでは1列にする（2列だと狭すぎるため）
       もしスマホでも2列が良ければここを削除してください */
    .photo-grid {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 0 20px; /* スマホでの余白は少し狭めに */
    }

    /* RETOUCH: スマホではすべて1列 */
    .retouch-layout-top {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }
    .retouch-layout-bottom {
        gap: 20px;
    }
    
    /* VIDEO: 1列 */
    .video-grid {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 30px;
    }

    .tab-menu { gap: 20px; }
    .modal-nav { font-size: 30px; padding: 10px; }
}