/* Media Gallery Page Styles */
.media-gallery-page {
    padding: 2rem 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.1rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.media-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #C41E32;
    background: transparent;
    color: #C41E32;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: #C41E32;
    color: white;
}

.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    margin-top: 2rem;
    margin-bottom: 50px;
}

.media-item {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.media-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.media-content {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.media-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(196, 30, 50, 0.1), rgba(196, 30, 50, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-item:hover .media-content::after {
    opacity: 1;
}

.media-image-link {
    display: flex;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
    z-index: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.media-image-link img {
    width: auto;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.media-item:hover .media-image-link img {
    transform: scale(1.08);
}

.media-video {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.media-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    pointer-events: none;
}

.media-video:hover .video-play-overlay {
    background: rgba(196, 30, 50, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.media-type {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(196, 30, 50, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.no-media {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    .media-gallery-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .media-content {
        height: 200px;
    }

    .page-title {
        font-size: 2.2rem;
        margin-bottom: 30px;
    }

    .media-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .media-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (min-width: 1025px) {
    .media-gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 35px;
    }
}

@media (max-width: 480px) {
    .media-gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .media-content {
        height: 180px;
    }

}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    transition: transform 0.3s ease;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: grab;
}

.lightbox-content img:active {
    cursor: grabbing;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    color: #C41E32;
    background: rgba(0, 0, 0, 0.8);
}

    .lightbox-caption {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        color: white;
        text-align: center;
        background: rgba(0, 0, 0, 0.7);
        padding: 10px 20px;
        border-radius: 4px;
    }

    .lightbox-caption a {
        color: white;
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .lightbox-caption a:hover {
        color: #C41E32;
        text-decoration: underline;
    }

    /* Pagination Styles */
    .media-pagination {
        display: flex;
        justify-content: center;
        margin-top: 3rem;
        margin-bottom: 2rem;
    }

    .media-pagination .page-numbers {
        display: inline-block;
        padding: 0.75rem 1rem;
        margin: 0 0.25rem;
        color: #6b7280;
        text-decoration: none;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        transition: all 0.3s ease;
        font-weight: 500;
    }

    .media-pagination .page-numbers:hover {
        color: #C41E32;
        border-color: #C41E32;
        background-color: #fef2f2;
    }

    .media-pagination .page-numbers.current {
        background-color: #C41E32;
        color: white;
        border-color: #C41E32;
    }

    .media-pagination .page-numbers.prev,
    .media-pagination .page-numbers.next {
        font-weight: 600;
    }

    .media-pagination .page-numbers.dots {
        border: none;
        cursor: default;
    }

    .media-pagination .page-numbers.dots:hover {
        color: #6b7280;
        border-color: #e5e7eb;
        background-color: transparent;
    }

    /* Responsive pagination */
    @media (max-width: 768px) {
        .media-pagination .page-numbers {
            padding: 0.5rem 0.75rem;
            margin: 0 0.125rem;
            font-size: 0.9rem;
        }
    }

    @media (max-width: 480px) {
        .media-pagination .page-numbers {
            padding: 0.4rem 0.6rem;
            margin: 0 0.1rem;
            font-size: 0.85rem;
        }
    }
