/* Project Gallery Section */
.gallery {
    position: relative;
    width: 100%;
    max-width: 1440px;
    padding: 48px 0 40px;
    margin: 0 auto;
}

/* Gallery background */
.gallery__bg {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background: linear-gradient(180deg, #131114 0%, rgba(19, 17, 20, 0) 100%);
    z-index: -1;
}

/* Gallery title */
.gallery__title {
    position: relative;
    width: 100%;
    margin: 0 auto 40px;
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 18px;
    line-height: 120%;
    text-align: center;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: #FFFFFF;
}

/* Gallery container */
.gallery__container {
    position: relative;
    width: 100%;
}

/* Gallery rows */
.gallery__row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 30px;
    padding: 0 100px;
}

/* Gallery cards */
.gallery__card {
    flex: 0 0 calc(25% - 23px);
    max-width: 280px;
    height: 150px;
    background: #1a1a1a;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    padding: 20px;
    box-sizing: border-box;
}

.gallery__card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 108, 0, 0.3);
}

.gallery__card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Gallery gradient overlay */
.gallery__gradient {
    display: none;
}

/* Mobile Adaptation */
@media (max-width: 1440px) {
    .gallery {
        width: 100%;
    }
    
    .gallery__bg {
        width: 100%;
    }
    
    .gallery__gradient {
        width: 100%;
    }
}

@media (max-width: 1200px) {
    .gallery__row {
        padding: 0 60px;
        gap: 20px;
    }
    
    .gallery__card {
        flex: 0 0 calc(25% - 15px);
        max-width: 250px;
        height: 140px;
    }
}

@media (max-width: 1024px) {
    .gallery {
        height: auto;
        position: relative;
        top: auto;
    }
    
    .gallery__bg {
        position: relative;
        height: 100%;
        top: auto;
    }
    
    .gallery__title {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        padding: 40px 20px 20px;
    }
    
    .gallery__container {
        position: relative;
        top: auto;
        padding: 20px;
    }
    
    .gallery__row {
        padding: 0;
        margin-bottom: 20px;
    }
    
    .gallery__card {
        height: 160px;
        max-width: 350px;
    }
    
    .gallery__gradient {
        display: none;
    }
}

@media (max-width: 768px) {
    .gallery__container {
        padding: 20px 16px;
    }
    
    .gallery__row {
        /* Keep horizontal layout for 4 cards */
        flex-direction: row;
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .gallery__card {
        /* Make cards fit 4 per row */
        flex: 0 0 calc(25% - 8px);
        width: calc(25% - 8px);
        height: 70px;
        max-width: none;
        padding: 6px;
    }
    
    .gallery__card img {
        width: 100%;
        height: 100%;
        max-width: none;
        padding: 0;
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    .gallery__title {
        font-size: 16px;
        padding: 32px 16px 16px;
    }
    
    .gallery__row {
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .gallery__card {
        /* 4 cards per row on small screens */
        flex: 0 0 calc(25% - 6px);
        width: calc(25% - 6px);
        height: 60px;
        border-radius: 12px;
        padding: 5px;
    }
    
    .gallery__card img {
        width: 100%;
        height: 100%;
        max-width: none;
        padding: 0;
        object-fit: contain;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .gallery__container {
        padding: 15px 10px;
    }
    
    .gallery__row {
        gap: 5px;
        margin-bottom: 5px;
    }
    
    .gallery__card {
        flex: 0 0 calc(25% - 4px);
        width: calc(25% - 4px);
        height: 50px;
        border-radius: 10px;
        padding: 4px;
    }
    
    .gallery__card img {
        width: 100%;
        height: 100%;
        max-width: none;
        padding: 0;
        object-fit: contain;
    }
}

/* About page gallery specific styles */
.gallery__about-container {
    position: relative;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 40px 0;
}

.gallery__about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 0;
}

.gallery__image {
    position: relative;
    background: #333333;
    border-radius: 48px;
    width: 100%;
    height: 350px;
}

.gallery__image-1 {
    background: #333333;
}

.gallery__image-2 {
    background: #333333;
}

.gallery__image-3 {
    background: #333333;
}

.gallery__image-4 {
    background: #121013;
}

.gallery__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    margin: 40px auto;
    background: #FF6C00;
    border: 1px solid #FF9939;
    border-radius: 90px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.gallery__button:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 108, 0, 0.4);
}

.gallery__button span {
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 16px;
    line-height: 120%;
    color: #FFFFFF;
}

/* About page gallery responsive */
@media (max-width: 768px) {
    .gallery__about-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery__image {
        height: 250px;
    }
    
    .gallery__about-container {
        padding: 60px 20px;
    }
}

@media (max-width: 480px) {
    .gallery__image {
        height: 200px;
        border-radius: 24px;
    }
    
    .gallery__about-container {
        padding: 40px 15px;
    }
}