/*
  Siyamattress Gallery Page Stylesheet
  ---
  - Layout
  - Gallery Grid & Items
  - Hover Animation
  - Responsive Adjustments
*/

/* Adjust main content padding for fixed header */
main.section {
    padding-top: 8rem;
}

.gallery-subtitle {
    text-align: center;
    max-width: 600px;
    margin: -1.5rem auto 3rem;
}

/* --- Gallery Grid & Items --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    margin: 0;
    overflow: hidden; /* Crucial for the zoom effect */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative; /* For caption positioning */
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Hover Animation --- */
.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1rem 1rem;
    background: linear-gradient(to top, rgba(13, 27, 42, 0.8), transparent);
    color: var(--light-text-color);
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item:hover figcaption {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
    main.section.container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}