/* ===== Gallery Page Specific Styles ===== */

/* Gallery Hero Section */
.gallery-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
    padding: 120px 20px 60px;
}

.gallery-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0.08;
    z-index: 0;
}

.gallery-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.gallery-hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.gallery-hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 0 6rem;
    background: var(--bg-secondary);
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.8rem 1.8rem;
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.filter-btn {
    text-decoration: none;
}

.filter-btn:hover {
    text-decoration: none;
}

/* Events List View */
.events-list {
    padding: 2rem 0;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.event-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out;
}

.event-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.event-card.hidden {
    display: none;
}

.event-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.event-thumbnail {
    width: 100%;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.event-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-card:hover .event-thumbnail img {
    transform: scale(1.1);
}

.event-thumbnail.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
}

.placeholder-icon {
    font-size: 5rem;
    opacity: 0.6;
}

.event-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.event-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.event-place {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.event-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.view-event-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.view-event-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

/* Event Photos View */
.event-photos {
    padding: 2rem 0;
}

.back-to-events {
    padding: 0.75rem 2rem;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-to-events:hover {
    background: var(--accent-gradient);
    color: white;
    transform: translateX(-5px);
}

.event-photos-header {
    text-align: center;
    margin-bottom: 3rem;
}

.event-photos-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.event-photos-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Photos Grid */
.photos-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin: 0 auto;
}

.gallery-item {
    animation: fadeInUp 0.6s ease-out;
}

.gallery-item.hidden {
    display: none;
}

.gallery-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-image img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info {
    color: white;
    width: 100%;
}

.gallery-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.gallery-info p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.view-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--accent-gradient);
    color: white;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.gallery-card:hover .view-btn {
    transform: scale(1.05);
}

/* Empty State */
.gallery-empty,
.no-photos {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.gallery-empty p,
.no-photos p {
    font-size: 1.2rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-caption {
    margin: auto;
    display: block;
    max-width: 80%;
    text-align: center;
    color: #ccc;
    padding: 20px 0;
    font-size: 1.2rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(102, 126, 234, 0.8);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Video Player Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.video-container {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
}

.video-modal video {
    width: 100%;
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
}

.video-modal-caption {
    text-align: center;
    color: #f1f1f1;
    padding: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.video-modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10001;
}

.video-modal-close:hover,
.video-modal-close:focus {
    color: #667eea;
}

/* Video Thumbnail Styling */
.video-item .gallery-image {
    position: relative;
}

.video-thumbnail {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
}

.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
}

.video-placeholder svg {
    width: 80px;
    height: 80px;
    color: var(--accent-primary);
    opacity: 0.6;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 2;
}

.video-play-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.video-item:hover .video-play-icon {
    transform: translate(-50%, -50%) scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-hero {
        padding: 100px 20px 40px;
        min-height: 40vh;
    }

    .gallery-hero-title {
        font-size: 2.5rem;
    }

    .gallery-hero-subtitle {
        font-size: 1.1rem;
    }

    .gallery-filters {
        gap: 0.8rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .gallery-image {
        height: 220px;
    }

    .lightbox {
        padding: 20px;
    }

    .lightbox-content {
        max-width: 100%;
        max-height: 80vh;
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 24px;
        padding: 12px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
    
    .video-modal-close {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }
    
    .video-container {
        max-width: 95%;
    }
    
    .video-modal-caption {
        font-size: 1.1rem;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .gallery-hero-title {
        font-size: 2rem;
    }

    .gallery-hero-subtitle {
        font-size: 1rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-image {
        height: 250px;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
