/* Base Styles */
:root {
    --primary: #D4AF37;
    --dark: #0A3A40;
    --light: #F8F1E5;
    --accent: #C19A6B;
    --text-dark: #333;
    --text-light: #777;
}

/* Background */
.video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('{% static "front/images/video-pattern.png" %}');
    background-size: cover;
    opacity: 0.03;
    z-index: -1;
}

.video-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 20%, #f5f5f5 70%);
}

/* Breadcrumb */
.video-breadcrumb {
    position: relative;
    padding: 1rem;
    margin: 1rem 0;
    background-color: rgba(10, 58, 64, 0.8);
    border-radius: 5px;
    overflow: hidden;
}

.pattern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('{% static "front/images/islamic-pattern.png" %}');
    opacity: 0.1;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 2;
}

.breadcrumb-item {
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--light);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--primary);
}

/* Section Header */
.section-header {
    text-align: center;
    margin: 2rem 0;
    padding: 1rem 0;
}

.arabic-calligraphy {
    font-size: 3rem;
    font-family: 'Traditional Arabic', 'Amiri', 'Arial', sans-serif;
    color: var(--accent);
    margin-bottom: -1rem;
    line-height: 1;
}

@media (min-width: 768px) {
    .arabic-calligraphy {
        font-size: 4rem;
        margin-bottom: -1.5rem;
    }
}

.section-title {
    font-size: 1.8rem;
    color: var(--dark);
    margin: 1rem 0 0.5rem;
    position: relative;
    display: inline-block;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary);
}

.section-subtitle {
    font-style: italic;
    color: var(--text-light);
    max-width: 100%;
    margin: 0 auto;
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (min-width: 576px) {
    .section-subtitle {
        max-width: 80%;
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .section-subtitle {
        max-width: 600px;
    }
}

/* Video Grid */
.video-grid-container {
    margin: 2rem 0;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

.video-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: white;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.video-thumbnail iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255,255,255,0.8);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.video-card:hover .play-icon {
    opacity: 1;
}

.duration-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    z-index: 2;
}

.video-details {
    padding: 1rem;
}

.video-title {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .video-title {
        font-size: 1.1rem;
    }
}

.video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
}

.video-meta i {
    margin-right: 0.3rem;
}

.video-hover-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Pagination */
.video-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    padding: 0.8rem;
    background-color: white;
    border-radius: 50px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    flex-wrap: wrap;
}

.page-btn {
    padding: 0.5rem 1rem;
    margin: 0.3rem;
    border: none;
    background: var(--dark);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

@media (min-width: 576px) {
    .page-btn {
        padding: 0.5rem 1.5rem;
        margin: 0 0.5rem;
        font-size: 1rem;
    }
}

.page-btn:hover {
    background: var(--primary);
    color: #333;
}

.page-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.page-number, .current-page {
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.2rem;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

@media (min-width: 576px) {
    .page-number, .current-page {
        width: 40px;
        height: 40px;
        margin: 0 5px;
    }
}

.page-number {
    background: #f0f0f0;
    color: #333;
}

.page-number:hover {
    background: var(--primary);
    color: white;
}

.current-page {
    background: var(--dark);
    color: white;
    font-weight: bold;
}

.btn-text {
    display: none;
}

@media (min-width: 576px) {
    .btn-text {
        display: inline;
    }
}

/* Video Categories */
.video-categories {
    margin: 3rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.categories-title {
    text-align: center;
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-dark);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    color: var(--dark);
}

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.8rem;
    color: white;
    font-size: 1.5rem;
}

.category-card span {
    font-size: 0.9rem;
    text-align: center;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: white;
    border-radius: 8px;
    padding: 2rem;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--dark);
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 5px;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .arabic-calligraphy {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 1rem;
    }
}