* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

header {
    text-align: center;
    padding: 40px 20px;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
    letter-spacing: 2px;
}

header p {
    font-size: 1rem;
    color: #666;
    font-weight: 300;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag-filter {
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tag-filter:hover {
    border-color: #999;
}

.tag-filter.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* Gallery Grid - Improved Masonry Layout */
.gallery {
    column-count: 4;
    column-gap: 15px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 15px;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    display: inline-block;
    width: 100%;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 10px 20px;
    transition: background 0.3s ease;
    border-radius: 4px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.4);
}

.lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 3rem;
    line-height: 1;
    padding: 5px 15px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .gallery {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .gallery {
        column-count: 2;
        column-gap: 10px;
    }

    .gallery-item {
        margin-bottom: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        padding: 5px 15px;
    }

    .lightbox img {
        max-width: 95%;
        max-height: 95%;
    }
}

@media (max-width: 480px) {
    .gallery {
        column-count: 1;
    }

    header {
        padding: 30px 15px;
    }

    main {
        padding: 20px 10px;
    }

    .footer-content h2 {
        font-size: 1.5rem;
    }
}

/* Footer */
footer {
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 40px 20px 20px;
    margin-top: 40px;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto 30px;
}

.footer-content h2 {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 10px;
    color: #333;
}

.footer-content p {
    color: #666;
    margin-bottom: 15px;
    font-weight: 300;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.contact-info p {
    margin: 0;
}

.contact-info a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.footer-credit {
    font-size: 0.85rem;
    color: #999;
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
    margin: 0;
}

@media (max-width: 768px) {
    footer {
        padding: 30px 15px 15px;
    }

    .contact-info {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .footer-content h2 {
        font-size: 1.2rem;
    }
}
