* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.gallery-container {
    width: 100%;
    background: linear-gradient(135deg, rgb(31, 1, 89), rgb(31, 1, 89));
    padding: 150px 15px 50px 15px;
    margin: 0 auto;
}

.gallery-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.gallery-header h1 {
    font-size: 2.8rem;
    color: #fff;
    margin-bottom: 0.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.gallery-header p {
    font-size: 1.1rem;
    color: #fff;
    max-width: 600px;
    margin: 0 auto;
}

.search-container {
    max-width: 500px;
    margin: 0 auto 2rem;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 48px 12px 20px;
    border: none;
    border-radius: 24px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.2rem;
}

/* Filter Buttons */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    gap: 10px;
}

.filter-btn {
    background: #fff;
    color: #555;
    border: none;
    padding: 10px 20px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.filter-btn:hover,
.filter-btn.active {
    background: #e60023;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 0, 35, 0.3);
}

/* Pinterest-Style Gallery */
.pinterest-grid {
    column-count: 5;
    column-gap: 16px;
    margin-bottom: 2rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 16px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    background: #fff;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
    transition: all 0.3s ease;
}

.gallery-item.show {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: all 0.5s ease;
}

.gallery-item .content {
    padding: 15px;
}

.gallery-item h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.gallery-item p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
}

.gallery-item .actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.save-btn {
    background: #d81c6f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(5px);
}

.gallery-item:hover .save-btn {
    opacity: 1;
    transform: translateY(0);
}



.action-icons {
    display: flex;
    gap: 12px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #e0e0e0;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    height: 1200px;
    overflow-y: scroll;
    position: relative;
    max-width: 90%;
    max-height: 90%;
    border-radius: 16px;
    background: white;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.lightbox-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.lightbox-img-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    padding: 20px;
}

.lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-info {
    padding: 20px;
    border-top: 1px solid #eee;
    max-width: 100%;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    background: white;
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.lightbox-close {
    top: 16px;
    right: 16px;
}

.lightbox-prev {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

/* Load More Button */
.load-more {
    display: block;
    margin: 2rem auto;
    background: #d81c6f;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(230, 0, 35, 0.3);
}

.load-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(230, 0, 35, 0.4);
    background: #ad081b;
}

/* Spinner Animation */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 1400px) {
    .pinterest-grid {
        column-count: 4;
    }
}

@media (max-width: 1100px) {
    .pinterest-grid {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .pinterest-grid {
        column-count: 2;
    }

    .gallery-header h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 576px) {
    .pinterest-grid {
        column-count: 1;
    }

    .gallery-header h1 {
        font-size: 1.8rem;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}