/* ========================================
   画像拡大表示機能
======================================== */

/* 拡大可能な画像セクション */
.section-image-zoomable {
    position: relative;
    cursor: pointer;
}

.section-image-zoomable:hover .zoom-hint {
    opacity: 1;
}

/* ズームヒント */
.zoom-hint {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

/* スマホでは常に表示 */
@media (max-width: 768px) {
    .zoom-hint {
        opacity: 0.8;
        font-size: 12px;
        padding: 6px 12px;
        bottom: 10px;
        right: 10px;
    }
}

/* モーダル背景 */
.zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
    cursor: zoom-out;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* モーダル内の画像コンテナ */
.zoom-modal-content {
    position: relative;
    max-width: 95%;
    max-height: 95vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* モーダル内の画像 */
.zoom-modal-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 95vh;
    margin: 0 auto;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

/* スマホでは幅いっぱいに表示 */
@media (max-width: 768px) {
    .zoom-modal-content {
        max-width: 100%;
        max-height: 100vh;
    }
    
    .zoom-modal-image {
        max-width: none;
        width: 100%;
        max-height: none;
    }
}

/* 閉じるボタン */
.zoom-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: white;
    color: #333;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.zoom-close:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .zoom-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }
}

/* ピンチズーム説明 */
.zoom-instructions {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10000;
    animation: fadeOut 3s ease forwards;
}

@keyframes fadeOut {
    0%, 70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .zoom-instructions {
        font-size: 12px;
        padding: 8px 16px;
        bottom: 10px;
    }
}
