/* ===== General ===== */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background: #f7f9fc;
    color: #333;
}

h1 {
    text-align: center;
    margin: 40px 0 20px;
    font-weight: 700;
    font-size: 2.5rem;
    color: #1a1a1a;
}

/* ===== Category Filter ===== */
.filter {
    text-align: center;
    margin-bottom: 40px;
}
.filter button {
    display: inline-block;
    padding: 12px 25px;
    margin: 5px;
    background: #fff;
    border: 2px solid #007BFF;
    border-radius: 50px;
    color: #007BFF;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
}
.filter button.active,
.filter button:hover {
    background: #007BFF;
    color: #fff;
    box-shadow: 4px 4px 15px rgba(0,0,0,0.2);
}

/* ===== Gallery Grid ===== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.5s ease;
    border-radius: 15px;
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(0.85);
}

/* Caption Overlay on Hover */
.gallery-item::after {
    content: attr(data-category);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px 0;
    text-align: center;
    background: rgba(0, 123, 255, 0.7);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.gallery-item:hover::after {
    opacity: 1;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    margin: 50px 0;
    flex-wrap: wrap;
}
.pagination button {
    margin: 5px;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    background: #007BFF;
    transition: all 0.3s ease;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.15);
}
.pagination button.active,
.pagination button:hover {
    background: #0056b3;
    transform: scale(1.1);
}

/* ===== Lightbox ===== */
#lightbox {
    display: none;
    position: fixed;
    top:0; left:0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.4s ease;
}
#lightbox img {
    max-width: 85%;
    max-height: 85%;
    border-radius: 15px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}
#lightbox:hover img {
    transform: scale(1.02);
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .gallery-item img { height: 180px; }
    .gallery-item::after { font-size: 0.9rem; }
}
@media (max-width: 480px) {
    .gallery-item img { height: 150px; }
    h1 { font-size: 2rem; }
}
/* Smooth fade effect */
#gallery, #pagination {
    transition: opacity 0.6s ease;
}
