.gallery-header{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 4rem 0;
}

.gallery-header h1{
    font-family: var(--font-segoe);
    color: var(--heading-color);
}

.masonry-container {
    column-count: 1;
    column-gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 5rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    cursor: pointer;
}

.masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.masonry-image {
    width: 100%;
    display: block;
    transition: transform 0.5s;
}

.masonry-item:hover .masonry-image {
    transform: scale(1.05);
}

.image-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    padding: 60px 15px 15px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
}

.masonry-item:hover .image-title {
    opacity: 1;
    transform: translateY(0);
}

.title-text {
    font-weight: 600;
    font-size: 16px;
    font-family: var(--font-segoe);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-image {
    display: block;
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
}

.modal-title {
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: center;
    border-top: 1px solid #eee;
    font-family: var(--font-segoe);
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
    z-index: 10;
}

.close-button:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Responsive layout */
@media (min-width: 640px) {
    .masonry-container {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .masonry-container {
        column-count: 3;
    }
}

@media (min-width: 1280px) {
    .masonry-container {
        column-count: 4;
    }
}

@media (min-width: 1536px) {
    .masonry-container {
        column-count: 5;
    }
}