/* =========================================
   GALLERY 360 CSS (SECTION 6)
   ========================================= */

.gallery-section {
    padding: 100px 0 40px; /* Cut bottom padding to close gap with contact section */
    background-color: var(--color-off-white);
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
}

.gallery-title {
    font-size: clamp(2rem, 3.5vw, 3rem);
    max-width: 500px;
    line-height: 1.2;
    text-transform: uppercase;
}

.gallery-desc {
    font-size: 1.1rem;
    color: var(--color-gray);
    max-width: 450px;
    line-height: 1.6;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding-bottom: 60px;
    align-items: flex-start;
}

/* Gallery Card */
.gallery-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

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

/* Gradient block to ensure text readability */
.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 40%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 30px;
    transition: background 0.3s ease;
}

.gallery-card:hover .gallery-card-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
}

.gallery-card-title {
    color: var(--color-white);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* 360 View Badge */
.badge-360 {
    position: absolute;
    top: 20px;
    left: 20px; /* changed to left according to design or right? Design puts it around top center/right */
    /* Wait, original design has badge right below top edge */
    top: 20px;
    right: 20px;
    left: auto;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.4);
    color: var(--color-white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

/* V1: Margin Top Stagger */
.gallery-card:nth-child(even) {
    margin-top: 60px;
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-card:nth-child(even) {
        margin-top: 0;
    }
    .gallery-card:nth-child(2n) {
        margin-top: 40px; /* offset for 2 columns */
    }
}

@media (max-width: 600px) {
    .gallery-header {
        flex-direction: column;
        gap: 20px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-card:nth-child(n) {
        margin-top: 0; /* remove stagger on 1 column */
    }
}
