#tag-filters {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.tag-filter {
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent);
    border-radius: var(--standard-border-radius);
    background: white;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.tag-filter:hover {
    background: var(--accent);
    color: white;
}

.tag-filter.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 190px);
    gap: 1rem;
    margin: 1rem auto;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    width: 190px;
    height: 190px;
}

.photo-item:hover {
    transform: translateY(-5px);
}

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

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail video {
    margin: 0;
    display: block;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    color: white;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover .play-button {
    opacity: 1;
}

.photo-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.9rem;
}

.photo-date {
    margin-bottom: 0.25rem;
}

.photo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.tag {
    background: var(--accent);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* Modal styles - Removing since we're using lightGallery now */

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent);
    border-radius: var(--standard-border-radius);
    text-decoration: none;
    color: var(--accent);
    background: white;
    transition: all 0.2s ease;
    font-weight: 500;
}

.page-link:hover {
    background: var(--accent);
    color: white;
}

.page-link.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    #photo-grid {
        grid-template-columns: repeat(2, 190px);
    }
}

@media (max-width: 600px) {
    #photo-grid {
        grid-template-columns: 190px;
    }
    
    .modal-nav {
        padding: 0.5rem;
        font-size: 1rem;
    }
}

/* Recent Gallery on Home Page */
.recent-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 0 0 ;
    width:100%;
    background: rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
    border-radius: 8px;
}

/* Override global img/video styles for gallery */
.recent-gallery img,
.recent-gallery video,
.photo-item img,
.photo-item video,
.video-thumbnail img,
.video-thumbnail video {
    margin: 0;
    display: block;
    background-color: transparent;
}

.recent-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    aspect-ratio: 1;
    width: 100%;
    display: block;
    height: auto;
}

.recent-gallery-item:hover {
    transform: translateY(-5px);
}

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

.recent-gallery .video-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
}

.recent-gallery .video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-gallery .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    color: white;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.recent-gallery .video-thumbnail:hover .play-button {
    opacity: 1;
}

.title {
    margin-top: 1.5rem;
    font-weight: bold;
    display: block;
}

.section-link {
    color: var(--text) !important;
    font-weight: bold;
    display: inline-block;
    text-decoration: none;
    color: inherit;
}

.section-link:hover {
    color: var(--accent);
}

.section-link::after {
    content: " →";
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.section-link:hover::after {
    opacity: 1;
}

/* LightGallery custom styles */
.lg-counter {
    display: inline !important;
    white-space: nowrap !important;
}

.lg-counter span {
    display: inline !important;
}

/* Override global video size restrictions for lightGallery */
.lg-video-container video,
.lg-inner video {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
}

/* Empty gallery message */
.empty-gallery-message {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-gallery-message p {
    margin: 0.5rem 0;
}