/* Gallery Styles */
.gallery-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Home-specific gallery section styling */
.gallery-section.home-gallery {
    position: relative;
    overflow: hidden;
}

.gallery-section.home-gallery::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255, 183, 3, 0.08), transparent 55%),
                radial-gradient(circle at bottom right, rgba(13, 110, 253, 0.08), transparent 55%);
    pointer-events: none;
}

.gallery-section.home-gallery .section-title {
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
}

.gallery-section.home-gallery .image-card {
    position: relative;
}

.gallery-section.home-gallery .image-container {
    will-change: transform;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

.gallery-overlay h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.gallery-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Gallery Filters */
.gallery-filters {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.filter-dropdown .dropdown-toggle {
    border-radius: 10px;
    border: 2px solid var(--border-color);
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-dropdown .dropdown-toggle:hover {
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    color: white;
}

.search-form .input-group {
    border-radius: 10px;
    overflow: hidden;
}

.search-form .form-control {
    border: 2px solid var(--border-color);
    border-right: none;
    padding: 12px 20px;
    font-weight: 500;
}

.search-form .form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 183, 3, 0.25);
}

.search-form .btn {
    border: 2px solid var(--accent-color);
    background-color: var(--accent-color);
    padding: 0 20px;
    border-radius: 0;
}

.view-options {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.view-options .btn-group .btn {
    border-radius: 8px !important;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-muted);
    padding: 8px 12px;
}

.view-options .btn-group .btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.view-options .btn-group .btn.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

/* Video Styles */
.video-item {
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.video-item h4 {
    padding: 15px;
    margin: 0;
    background: var(--accent-color);
    color: white;
}

/* Report Styles */
.report-item {
    background: var(--surface-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.report-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.report-item h4 {
    margin-bottom: 10px;
}

.report-item p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Featured Section */
.featured-section {
    margin-bottom: 50px;
}

.featured-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    height: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.featured-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.featured-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-link:hover img {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

.featured-overlay h5 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.featured-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Tags Section */
.tags-section {
    margin-bottom: 50px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tag-link {
    display: inline-block;
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.tag-link:hover {
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 183, 3, 0.3);
}

.tag-count {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-left: 5px;
}

/* Gallery Grid */
.gallery-grid {
    margin-bottom: 40px;
}

.gallery-item {
    margin-bottom: 30px;
}

.image-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.image-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-link:hover .gallery-image {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.9), rgba(255, 140, 0, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-link:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.overlay-content i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.overlay-content h6 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.overlay-content p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.image-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.image-title {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.image-title a {
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.image-title a:hover {
    color: var(--accent-color);
}

.image-meta {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.meta-item.featured {
    margin-left: auto;
}

/* List View */
.gallery-grid.list-view .gallery-item {
    margin-bottom: 20px;
}

.gallery-grid.list-view .image-card {
    flex-direction: row;
    height: auto;
}

.gallery-grid.list-view .image-container {
    width: 300px;
    aspect-ratio: 4/3;
    flex-shrink: 0;
}

.gallery-grid.list-view .image-info {
    padding: 25px;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 50px;
}

.pagination .page-link {
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 15px;
    margin: 0 2px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

.pagination .page-item.active .page-link {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.pagination .page-item.disabled .page-link {
    border-color: var(--border-color);
    color: var(--text-muted);
}

/* Lightbox */
.lightbox-content {
    position: relative;
    text-align: center;
}

.lightbox-content img {
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 40px 20px 20px;
    text-align: center;
}

.lightbox-info h4 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.lightbox-info p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.lightbox-nav button {
    pointer-events: all;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Empty State */
.empty-state {
    padding: 80px 20px;
}

.empty-state .display-1 {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--heading-color);
    margin-bottom: 15px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Dark Mode */
[data-theme="dark"] .gallery-section {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

[data-theme="dark"] .gallery-filters,
[data-theme="dark"] .image-card,
[data-theme="dark"] .featured-item {
    background: var(--surface-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .image-title a {
    color: var(--body-color);
}

[data-theme="dark"] .tag-link {
    background: var(--surface-color);
    border-color: var(--border-color);
    color: var(--body-color);
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-section {
        padding: 60px 0;
    }
    
    .gallery-filters {
        padding: 20px;
    }
    
    .gallery-filters .row > div {
        margin-bottom: 15px;
    }
    
    .view-options {
        justify-content: center;
        margin-top: 15px;
    }
    
    .featured-section .row {
        --bs-gutter-y: 1rem;
    }
    
    .featured-item {
        height: 150px;
    }
    
    .tags-cloud {
        justify-content: center;
    }
    
    .gallery-grid.list-view .image-card {
        flex-direction: column;
    }
    
    .gallery-grid.list-view .image-container {
        width: 100%;
    }
    
    .lightbox-info {
        padding: 30px 15px 15px;
    }
    
    .lightbox-info h4 {
        font-size: 1.2rem;
    }
    
    .lightbox-info p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .gallery-section {
        padding: 40px 0;
    }
    
    .image-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .meta-item.featured {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
    
    .overlay-content i {
        font-size: 2rem;
    }
    
    .overlay-content h6 {
        font-size: 1rem;
    }
    
    .overlay-content p {
        font-size: 0.8rem;
    }
}

/* Loading Animation */
.gallery-image {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Section Title */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}
