/* Gallery specific styles */
.gallery-section {
    padding: 4rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.4s ease;
    height: 300px; /* Taller images */
}

/* Hover Effect: Scale Up */
.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

/* Image Styling */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

/* Overlay Styling */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    z-index: 1;
}

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

.gallery-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.gallery-date {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.gallery-date i {
    color: var(--secondary-color);
}

/* --- Lightbox Styles --- */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.lightbox-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 90vh;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.lightbox-image {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
  from {transform:scale(0.8); opacity:0}
  to {transform:scale(1); opacity:1}
}

.lightbox-caption {
    margin-top: 20px;
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 500;
}

/* Navigation Buttons */
.mobile-nav-btn {
    display: none; /* Show only on mobile if needed, though side arrows usually suffice */
}

.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
    text-decoration: none;
    z-index: 10001;
}

.lightbox-next {
    right: 20px;
    border-radius: 3px 0 0 3px;
}
.lightbox-prev {
    left: 20px;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--secondary-color);
    color: white;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10002;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--secondary-color);
    text-decoration: none;
    cursor: pointer;
}

/* Responsive Design */
@media screen and (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .gallery-item {
        height: 220px;
    }

    .gallery-title {
        font-size: 1rem;
    }

    .gallery-date {
        font-size: 0.8rem;
    }

    .gallery-overlay {
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .gallery-grid {
        gap: 10px;
    }

    .gallery-item {
        height: 180px;
        border-radius: 12px;
    }

    .gallery-title {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .gallery-date {
        font-size: 0.7rem;
    }

    .gallery-overlay {
        padding: 10px;
    }
}

/* --- Lightbox Styles --- */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.lightbox-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 90vh;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.lightbox-image {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
  from {transform:scale(0.8); opacity:0}
  to {transform:scale(1); opacity:1}
}

.lightbox-caption {
    margin-top: 20px;
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 500;
}

/* Navigation Buttons */
.mobile-nav-btn {
    display: none; /* Show only on mobile if needed, though side arrows usually suffice */
}

.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
    text-decoration: none;
    z-index: 10001;
}

.lightbox-next {
    right: 20px;
    border-radius: 3px 0 0 3px;
}
.lightbox-prev {
    left: 20px;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--secondary-color);
    color: white;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10002;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--secondary-color);
    text-decoration: none;
    cursor: pointer;
}

/* Responsive Lightbox */
@media only screen and (max-width: 768px) {
    .lightbox-image {
        max-width: 95%;
        max-height: 60vh;
    }
    .lightbox-prev, .lightbox-next {
        font-size: 24px;
        padding: 10px;
    }
}

/* Skeleton Loading Animation */
@keyframes skeleton-loading {
    0% { background-color: #f0f0f0; }
    50% { background-color: #e0e0e0; }
    100% { background-color: #f0f0f0; }
}

.skeleton-item {
    animation: skeleton-loading 1.5s infinite ease-in-out;
    border-radius: 16px;
    display: block;
}

