/* ==========================
   GALLERY SECTION (REFINED)
========================== */

.gallery {
    padding: 3rem 0;
}

/* ==========================
   GALLERY HEADING
========================== */

.gallery h2 {
    color: #0f766e; /* deep luxury teal */
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
}

.gallery h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: #1abc9c;
    border-radius: 2px;
}

/* ==========================
   GALLERY TRAIN EFFECT
========================== */

.gallery-carousel {
    overflow: hidden;
    width: 100%;
    position: relative;
}

.gallery-track {
    display: flex;
    width: max-content;
    animation: trainMove 28s linear infinite;
}

/* Pause animation on hover */
.gallery-carousel:hover .gallery-track {
    animation-play-state: paused;
}

/* ==========================
   GALLERY CARD
========================== */

.gallery .item {
    width: 300px;
    height: 250px;
    margin-right: 2rem;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #f0fbf9;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.22);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover lift */
.gallery .item:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 34px rgba(15, 118, 110, 0.38);
}

/* ==========================
   IMAGE
========================== */

.gallery .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================
   OVERLAY
========================== */

.gallery .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(15, 118, 110, 0.9),
        rgba(15, 118, 110, 0.15)
    );
    color: #ffffff;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.gallery .item:hover .overlay {
    opacity: 1;
}

/* Overlay Text */
.gallery .overlay h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==========================
   PERFECT INFINITE LOOP
========================== */

@keyframes trainMove {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* ==========================
   RESPONSIVE
========================== */

@media (max-width: 768px) {
    .gallery h2 {
        font-size: 2rem;
    }

    .gallery .item {
        width: 260px;
        height: 200px;
        margin-right: 1.5rem;
    }
}

@media (max-width: 480px) {
    .gallery h2 {
        font-size: 1.75rem;
    }

    .gallery .item {
        width: 220px;
        height: 180px;
        margin-right: 1rem;
    }
}

/* ==========================
   FIX GALLERY BACKGROUND
========================== */

.section.gallery {
    background-color: #ffffff !important;
    padding-top: 3rem;
    padding-bottom: 3rem;
}
