/* 相關圖片縮圖 */
.image-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 一列三個 */
    gap: 1rem;
    justify-items: center;
}

.image-display-row2 {
    height: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 一列2個 */
    gap: 1rem;
    justify-items: center;
}

.image-item {
    text-align: center;
    max-width: 220px;
}

.image-item-Seedling {
    text-align: center;
    max-width: 800px;
}

.seedling-thumb {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.gallery-caption {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: #666;
}

.seedling-thumb {
    max-width: auto;
    height: auto;
    cursor: pointer;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .seedling-thumb:hover {
        transform: scale(1.02);
        box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    }


/* 圖片放大用的覆蓋層 */
.image-modal {
    display: none; /* 預設隱藏 */
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

    .image-modal.open {
        display: flex;
    }

.image-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    padding: 0.75rem;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .image-modal-content img {
        max-width: 100%;
        max-height: 80vh;
        height: auto;
        display: block;
    }

.image-modal-caption {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: #444;
    text-align: center;
}

.image-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
}

/* 手機寬度時改成一列一個 */
@media (max-width: 768px) {
    .image-display {
        grid-template-columns: repeat(1, 1fr);
    }

    .image-display-row2 {
        height: auto;
        display: grid;
        grid-template-columns: repeat(1, 1fr); /* 一列2個 */
        gap: 1rem;
        justify-items: center;
    }
}
