/* ===============================
   Darkroom Gallery Layout
   =============================== */

body {
    background-color: #000;
    color: #fff;
    font-family: "Shippori Mincho", "Noto Serif JP", serif;
    margin: 0;
    padding: 0;
}

main {
    max-width: 1900px;
    margin: 0 auto;
    padding: 2rem 3rem;
}

h1 {
    text-align: center;
    font-weight: 300;
    font-size: 2rem;
    letter-spacing: 0.1em;
    margin-bottom: 3rem;
}

.title {
    text-align: center;
    font-size: 1.2rem;
    margin: 1vw 0 2vw 0;
}

/* ===== グリッド全体 ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
}

/* ===== サムネイルボックス ===== */
.thumb {
    position: relative;
    overflow: hidden;
    width: 100%;
    /* ここで比率を調整する：↓横長だけど縦もある */
    aspect-ratio: 1.6 / 1;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.thumb:hover {
    transform: scale(1.03);
    opacity: 0.9;
}

/* ===== 画像 ===== */
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== 戻るボタン ===== */
.back-btn {
    display: inline-flex;
    align-items: center;
    margin: 3rem auto 5rem;
    padding: 0.5rem 1rem;
    color: #aaa;
    background: none;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.back-btn:hover {
    color: #fff;
    border-color: #555;
}

/* ===== レスポンシブ対応 ===== */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    .thumb {
        aspect-ratio: 1.5 / 1;
    }
}

@media (max-width: 640px) {
    main {
        padding: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .thumb {
        aspect-ratio: 1.3 / 1;
    }
}

/* ===== 戻るボタン ===== */
.back-wrap {
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 5rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    color: #aaa;
    background: none;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.back-btn:hover {
    color: #fff;
    border-color: #666;
    transform: translateX(-2px);
}