/* Gallery Design System - Premium Overhaul */
.gallery-section {
    padding-bottom: 7rem;
    background: radial-gradient(circle at 50% 0%, rgba(11, 79, 163, 0.05), transparent 70%);
}

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

.gallery-card {
    position: relative;
    display: flex;
    flex-direction: column;
    group: hover;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 0.85rem;
    border: 1px solid rgba(11, 79, 163, 0.08);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease, border-color 0.5s ease;
}

.gallery-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px -12px rgba(11, 79, 163, 0.12);
    border-color: rgba(11, 79, 163, 0.2);
}

.gallery-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: calc(var(--radius-lg) - 0.5rem);
    overflow: hidden;
    background: var(--surface-muted);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Glassy Overlay on Hover */
.gallery-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(7, 44, 99, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-card:hover .gallery-thumb::after {
    opacity: 1;
}

.gallery-content {
    padding: 1.5rem 0.5rem 0.75rem;
    text-align: center;
}

.gallery-content strong {
    display: block;
    color: var(--text-strong);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    line-height: 1.35;
    font-weight: 700;
    margin-bottom: 0.4rem;
    transition: color 0.3s ease;
}

.gallery-card:hover .gallery-content strong {
    color: var(--brand);
}

.gallery-content small {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gallery-content small::before {
    content: "";
    width: 12px;
    height: 1px;
    background: var(--brand-alt);
}

/* Full Gallery Decorations */
.gallery-header-box {
    position: relative;
    z-index: 1;
}

.gallery-header-box::before {
    content: "";
    position: absolute;
    top: -20%;
    left: -5%;
    width: 15rem;
    height: 15rem;
    background: radial-gradient(circle, rgba(27, 159, 224, 0.15), transparent 70%);
    filter: blur(40px);
    z-index: -1;
}

/* Home Preview Layout specifically for home page */
.gallery-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .gallery-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Infinite Scroll / Marquee Styles */
.gallery-marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.gallery-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.gallery-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.scroll-card {
    flex: 0 0 350px;
    height: 350px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    border: 1px solid rgba(11, 79, 163, 0.1);
}

.scroll-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-card:hover img {
    transform: scale(1.1);
}

.scroll-overlay {
    position: absolute;
    inset: 0;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(0deg, rgba(7, 44, 99, 0.72) 0%, transparent 50%);
    opacity: 1;
    transition: background 0.4s ease;
}

.scroll-card:hover .scroll-overlay {
    background: linear-gradient(0deg, rgba(7, 44, 99, 0.88) 0%, transparent 65%);
}


.scroll-overlay strong {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    line-height: 1.15;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-card:hover .scroll-overlay strong {
    transform: translateY(-8px);
}


@media (max-width: 768px) {
    .scroll-card {
        flex: 0 0 280px;
        height: 280px;
    }
}

