.gallery-hero {
    position: relative;
    padding: 10rem 5% 8rem 5%;
    min-height: 100vh;
    background: url('../assets/background/imges/bg2.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .gallery-hero {
        padding: 8rem 5% 6rem 5%;
    }
}

.gallery-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 8, 8, 0.82);
    z-index: 1;
}

.gallery-hero>* {
    position: relative;
    z-index: 2;
}

.back-btn {
    position: fixed;
    top: 30px;
    left: 30px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    z-index: 100;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: #00d5ff;
    transform: translateX(-5px);
    box-shadow: 0 0 20px rgba(0, 213, 255, 0.4);
}

@media (max-width: 768px) {
    .back-btn {
        top: 15px;
        left: 15px;
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1400px;
    margin-top: 2rem;
}

.gallery-item.large {
    grid-column: 1 / -1;
    height: auto;
    min-height: 500px;
}

@media (max-width: 768px) {
    .gallery-item.large {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 250px;
    }
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 250px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.4s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0, 213, 255, 0.4) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
    transition: bottom 0.4s ease;
}

.gallery-overlay span {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-item:hover {
    transform: scale(1.03);
    border-color: #00d5ff;
    box-shadow: 0 10px 30px rgba(0, 213, 255, 0.2);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    bottom: 0;
}

@media (max-width: 768px) {
    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .gallery-item {
        height: 200px;
    }

    .section-title {
        font-size: 2.5rem;
    }
}