/*
 * gallery.css
 * This file contains styles specific to the Gallery section.
 * It should be included AFTER index.css in gallery.html.
 */

/* Gallery Section Styling */
#gallery {
    background-color: #f0f4f8;
    position: relative;
    overflow: hidden;
}
#gallery::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4e0eb' fill-opacity='0.2'%3E%3Cpath d='M0 0h40v40H0zM40 40h40v40H40z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.5;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    aspect-ratio: 4 / 3;
    cursor: pointer; /* <-- ADDED THIS LINE */
}
.gallery-item:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover img {
    transform: scale(1.1);
}
.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 1.5rem 1rem 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    font-size: 0.9rem;
    text-align: center;
}
.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
    transform: translateY(0);
}
.gallery-item-overlay h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #FBBF24;
}

/* ===== NEW PAGINATION STYLES ===== */

/* This class will be added by JavaScript to hide items */
.gallery-item.hidden {
    display: none;
}

/* Styles for the page buttons */
.page-btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    min-width: 2.5rem;
    border: 1px solid #d1d5db; /* Tailwind gray-300 */
    background-color: #ffffff;
    color: #374151; /* Tailwind gray-700 */
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.page-btn:hover {
    background-color: #f9fafb; /* Tailwind gray-50 */
    border-color: #9ca3af; /* Tailwind gray-400 */
}

/* Style for the currently active page button */
.page-btn.active {
    background-color: #FBBF24; /* Your theme's amber color */
    color: #ffffff;
    border-color: #FBBF24;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ===== NEW LIGHTBOX STYLES ===== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Must be higher than header (z-50) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    animation: zoomIn 0.3s ease;
}
@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 3rem;
    line-height: 1;
    color: #ffffff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.lightbox-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3.5rem;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    opacity: 0.7;
    transition: opacity 0.2s ease, background 0.2s ease;
    user-select: none;
}
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.4);
}
.lightbox-prev {
    left: 1rem;
}
.lightbox-next {
    right: 1rem;
}