@charset "utf-8";

/* =========================================
   Hikaru Museum - カテゴリー見出し用スタイル
========================================= */
.hikaru-category-section {
    margin-bottom: 80px;
}

.hikaru-category-title {
    font-size: 1.6rem;
    font-weight: normal;
    color: #333;
    margin: 3rem auto 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    letter-spacing: 0.1em;
    display: flex;
    align-items: baseline;
    gap: 15px;
    max-width: 1200px;
}

.hikaru-category-title span {
    font-size: 0.9rem;
    color: #888;
    font-family: sans-serif;
    letter-spacing: 0.15em;
}

@media (max-width: 768px) {
    .hikaru-category-title {
        flex-direction: column;
        gap: 5px;
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    .hikaru-category-title span {
        font-size: 0.8rem;
    }
}

/* =========================================
   Hikaru Museum - ギャラリー用スタイル
========================================= */
.hikaru-gallery-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    column-count: 3;
    column-gap: 20px;
}

.hikaru-gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hikaru-gallery-item img {
    width: 100%;
    height: auto; 
    display: block;
    transition: transform 0.6s ease;
}

.hikaru-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

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

.hikaru-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.hikaru-gallery-item:hover .hikaru-gallery-caption {
    opacity: 1;
}

/* =========================================
   モーダル全体のレイアウト調整（スクロール防止・フェード版）
========================================= */
.hikaru-modal {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overscroll-behavior: contain;
    touch-action: none; 
}

.hikaru-modal.is-active {
    visibility: visible;
    opacity: 1;
}

.hikaru-modal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 900px;
    max-height: 95vh;
    position: relative;
}

.hikaru-modal-content {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
}

.hikaru-modal.is-active .hikaru-modal-content {
    transform: scale(1);
    opacity: 1;
}

/* =========================================
   解説文エリア（キャプション）
========================================= */
.hikaru-modal-caption {
    width: 100%;
    margin-top: 15px;
    padding: 25px;
    color: #fff;
    font-family: "Yu Mincho", "YuMincho", serif;
    line-height: 1.8;
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    letter-spacing: 0.05em;
    overflow-y: auto;
    max-height: 25vh;
    overscroll-behavior: contain; 
    touch-action: pan-y;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.hikaru-modal.is-active .hikaru-modal-caption {
    opacity: 1;
    transform: translateY(0);
}

.hikaru-modal-caption::-webkit-scrollbar {
    width: 6px;
}
.hikaru-modal-caption::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

/* =========================================
   閉じるボタン（×）
========================================= */
.hikaru-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 45px;
    font-weight: lighter;
    line-height: 1;
    cursor: pointer;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.6s ease 0.2s, color 0.3s ease;
}

.hikaru-modal.is-active .hikaru-modal-close {
    opacity: 0.8;
}

.hikaru-modal-close:hover {
    color: #aaa;
    opacity: 1;
}

/* =========================================
   レスポンシブ対応（スマホ表示）
========================================= */
@media (max-width: 768px) {
    .hikaru-gallery-wrapper {
        column-count: 1;
    }
}