/* gallery.css - grid layout + modal */

/* Container */
.gallery-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 16px;
}

.gallery-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
}

/* Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
	padding: 15px;
}

/* Card */
.gallery-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    text-align: center;
    padding: 8px;
}
.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.gallery-card img {
    width: 100%;
    aspect-ratio: 1 / 1; /* maintains a perfect square */
    object-fit: cover;
}

.gallery-card h4 {
    margin: 10px 0 0;
    font-size: 15px;
    color: #111;
}

/* Modal (lightbox) */
.modal {
    display: none; /* shown via inline style 'flex' */
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 30px;
}

/* central inner to keep img centered and responsive */
.modal-inner {
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.modal-img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.5);
}

.modal-title {
    color: #fff;
    font-size: 18px;
    text-align: center;
}

/* close + nav */
.modal-close {
    position: absolute;
    top: 18px;
    right: 28px;
    font-size: 36px;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 38px;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    user-select: none;
}

.modal-nav.prev { left: 16px; }
.modal-nav.next { right: 16px; }

@media (max-width: 600px) {
    .gallery-card img { height: 120px; }
    .modal-nav { font-size: 30px; }
}
