#gallery {
    padding: 100px 0;
}

.gallery-header {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.gallery-header .section-title {
    margin: 0 0 18px;
}

.gallery-header .section-title span {
    color: #1ea46d;
}

.gallery-header .section-desc {
    margin: 0 auto;
    max-width: 650px;
    color: #667085;
    font-size: 16px;
    line-height: 1.8;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin-top: 55px;
    width: 100%;
}

.gallery-item {
    position: relative;
    width: 100%;
    height: 420px;
    min-width: 0;
    overflow: hidden;
    background: #111;
    border: 1px solid rgba(30, 164, 109, 0.15);
    border-radius: 24px;
    cursor: pointer;
    isolation: isolate;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

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

.gallery-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    background: linear-gradient( to top, rgba(0, 0, 0, 0.90) 0%, rgba(0, 0, 0, 0.65) 35%, rgba(0, 0, 0, 0.20) 65%, rgba(0, 0, 0, 0) 100% );
}

.gallery-content h3 {
    margin: 0 0 9px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.gallery-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
    display: -webkit-box; 
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-item:hover {
    transform: translateY(-7px);
    border-color: rgba(30, 164, 109, 0.55);

    boxshadow:
        0 20px 50px rgba(0, 0, 0, 0.12),
        0 10px 30px rgba(30, 164, 109, 0.10);
}


.gallery-item:hover img {
    transform: scale(1.07);
}

.gallery-item::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 3;
    pointer-events: none;
    background: linear-gradient( 45deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60% ); 
    transform: translateX(-30%) rotate(25deg);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.gallery-item:hover::before {
    opacity: 1;
}

@media (max-width: 1100px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

}

@media (max-width: 768px) {
    #gallery {
        padding: 80px 0;
    }

    .gallery-header {
        max-width: 600px;
    }

    .gallery-header .section-desc {
        font-size: 15px;
        line-height: 1.7;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 40px;
    }

    .gallery-item {
        height: 360px;
        border-radius: 20px;
    }

    .gallery-content {
        padding: 24px;
    }

    .gallery-content h3 {
        font-size: 21px;
    }

    .gallery-content p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #gallery {
        padding: 65px 0;
    }

    .gallery-grid {
        gap: 16px;
    }

    .gallery-item {
        height: 300px;
        border-radius: 18px;
    }

    .gallery-content {
        padding: 20px;
    }

    .gallery-content h3 {
        font-size: 19px;
    }

    .gallery-content p {
        font-size: 13px;
        line-height: 1.6;
    }
}