.photo-gallery-section {
    background: #f2f2f2;
    padding: 54px 20px 70px;
}

.photo-gallery-wrap {
    max-width: 1240px;
    margin: 0 auto;
}

.photo-gallery-head {
    max-width: 780px;
    margin: 0 auto 30px;
    text-align: center;
}

.photo-gallery-head h1 {
    margin: 0 0 10px;
    color: #15263f;
    font-size: clamp(36px, 2.4vw, 52px);
}

.photo-gallery-head p {
    margin: 0;
    color: #5d6775;
    line-height: 1.7;
    font-size: 15px;
}

.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.photo-card {
    background: #fff;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(20, 37, 62, 0.08);
    transform: translateY(0);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    position: relative;
    cursor: pointer;
}

.photo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(20, 37, 62, 0.16);
}

.photo-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(16, 36, 63, 0.3), transparent 52%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.photo-card:hover::after {
    opacity: 1;
}

.photo-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
    animation: galleryZoomPulse 11s ease-in-out infinite alternate;
}

.photo-card-info {
    padding: 14px 14px 16px;
    transition: transform 0.35s ease;
    position: relative;
    z-index: 1;
}

.photo-card:hover .photo-card-info {
    transform: translateY(-4px);
}

.photo-card:hover img {
    transform: scale(1.12);
    filter: contrast(1.05) saturate(1.05);
    animation-play-state: paused;
}

.photo-card-info p {
    margin: 0;
    color: #5b6678;
    font-size: 14px;
    line-height: 1.5;
}

[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.photo-card:nth-child(2n) img {
    animation-duration: 12.5s;
}

.photo-card:nth-child(3n) img {
    animation-duration: 13.5s;
}

@keyframes galleryZoomPulse {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .photo-card img {
        animation: none;
        transition: none;
    }
}

@media (max-width: 980px) {
    .photo-gallery-section {
        padding: 38px 14px 48px;
    }

    .photo-gallery-grid {
        grid-template-columns: 1fr;
    }
}
