:root {
    --primary-color: #FCA311;
    --text-color: #FCA311;
    --background-light: #f8f9fa;
    --background-dark: rgba(20, 33, 61, 0.98);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}


.gallery-section {
    position: relative;
    padding: 2rem 0;
    background-color: var(--background-light);
}

.gallery-wrapper {
    background-color: white;
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin: 2rem auto;
    max-width: 1400px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    color: var(--text-color) !important;
    margin-bottom: 3rem;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition: var(--transition-smooth);
    cursor: pointer;
    aspect-ratio: 1;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    background-color: #f8f9fa;
}

.gallery-item:hover {
    transform: scale(1.02) translateY(-8px) rotate(1deg);
    box-shadow: 0 15px 30px rgba(20, 33, 61, 0.15);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(20, 33, 61, 0.8), transparent);
    opacity: 0;
    transition: var(--transition-smooth);
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
    filter: brightness(1.05);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    color: white;
    z-index: 2;
    transition: var(--transition-smooth);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover::after {
    bottom: 20px;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-dark);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    transform: scale(0.9);
    transition: var(--transition-smooth);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 15px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
}

.close-lightbox:hover {
    transform: scale(1.1);
}

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 1rem;
    z-index: 2;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.nav-button:hover, .close-lightbox:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3%) scale(1.1);
}

.prev-button { left: 20px; }
.next-button { right: 20px; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .nav-button {
        padding: 0.8rem;
        font-size: 20px;
    }
}