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

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    color: #222;
}

/* Header */
header {
    text-align: center;
    padding: 50px 20px 30px;
}

header h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 18px;
}

/* Main */
main {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* Filter Buttons */
.filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.filter-btn {
    border: none;
    padding: 12px 22px;
    border-radius: 25px;
    background: white;
    color: #333;
    cursor: pointer;
    font-size: 15px;
    transition: 0.3s;
}

.filter-btn:hover {
    background: #222;
    color: white;
}

.filter-btn.active {
    background: #222;
    color: white;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-bottom: 50px;
}

.gallery-item {
    height: 280px;
    overflow: hidden;
    border-radius: 15px;
    background: white;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Tablet */
@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 600px) {
    header h1 {
        font-size: 32px;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        height: 250px;
    }
}
/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 80%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active img {
    transform: scale(1);
}

/* Lightbox Buttons */
.lightbox button {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.lightbox button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lightbox-close {
    top: 25px;
    right: 30px;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* Mobile Lightbox */
@media (max-width: 600px) {

    .lightbox img {
        max-width: 90%;
        max-height: 70vh;
    }

    .lightbox button {
        width: 42px;
        height: 42px;
        font-size: 22px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
    }
}
/* Image Overlay */
.image-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 25px 20px 20px;
    background: linear-gradient(
        transparent,
        rgba(0, 0, 0, 0.85)
    );
    color: white;
    transform: translateY(100%);
    transition: transform 0.35s ease;
}

.gallery-item {
    position: relative;
}

.gallery-item:hover .image-overlay {
    transform: translateY(0);
}

.image-overlay h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.image-overlay p {
    font-size: 14px;
    opacity: 0.8;
}
/* Mobile: Always show image information */
@media (max-width: 600px) {

    .image-overlay {
        transform: translateY(0);
        padding: 20px 15px 15px;
    }

    .image-overlay h3 {
        font-size: 18px;
    }

    .image-overlay p {
        font-size: 13px;
    }
}