/**
 * Video Gallery Styles
 *
 * @package NORD_Content_Subscriber
 * @since 1.3.0
 */

/* ==========================================================================
   Video Gallery
   ========================================================================== */

.nord-video-gallery {
    margin: 2rem 0;
}

.nord-video-category-section {
    margin-bottom: 3rem;
}

.nord-video-category-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.nord-video-category-description {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.nord-video-gallery__no-videos {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

/* ==========================================================================
   Video Grid
   ========================================================================== */

.nord-video-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.nord-video-grid--1-cols {
    grid-template-columns: 1fr;
}

.nord-video-grid--2-cols {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.nord-video-grid--3-cols {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.nord-video-grid--4-cols {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.nord-video-grid--5-cols {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.nord-video-grid--6-cols {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ==========================================================================
   Video Cards
   ========================================================================== */

.nord-video-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.nord-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.nord-video-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.nord-video-card__thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f8f9fa;
}

.nord-video-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.nord-video-card:hover .nord-video-card__thumbnail img {
    transform: scale(1.05);
}

.nord-video-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.nord-video-card__play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.nord-video-card:hover .nord-video-card__play-button {
    background: rgba(52, 152, 219, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.nord-video-card__info {
    padding: 1.25rem;
}

.nord-video-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nord-video-card__category {
    font-size: 0.875rem;
    color: #3498db;
    margin: 0 0 0.75rem 0;
    font-weight: 500;
}

.nord-video-card__excerpt {
    font-size: 0.875rem;
    color: #7f8c8d;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Single Video Page
   ========================================================================== */

.nord-single-video-page {
    padding: 2rem 0;
}

.nord-single-video-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nord-single-video-page__navigation {
    margin-bottom: 2rem;
}

.nord-back-link {
    display: inline-flex;
    align-items: center;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nord-back-link:hover {
    color: #2980b9;
}

.nord-single-video-page__header {
    margin-bottom: 2rem;
}

.nord-single-video-page__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.nord-single-video-page__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nord-video-category-badge {
    background: #3498db;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.nord-single-video-page__embed {
    margin-bottom: 2rem;
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.nord-single-video-page__embed iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    border: none;
}

.nord-single-video-page__error {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: #6c757d;
}

.nord-single-video-page__description,
.nord-single-video-page__resources {
    margin-bottom: 2rem;
}

.nord-single-video-page__description h3,
.nord-single-video-page__resources h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 1rem 0;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.nord-single-video-page__excerpt {
    font-size: 1.1rem;
    color: #34495e;
    margin-bottom: 1rem;
    font-weight: 500;
}

.nord-single-video-page__content-text {
    color: #2c3e50;
    line-height: 1.6;
}

.nord-single-video-page__related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #dee2e6;
}

.nord-single-video-page__related h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 1.5rem 0;
}

.nord-video-nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nord-video-nav-links a {
    display: inline-flex;
}

/* ==========================================================================
   Video Resources
   ========================================================================== */

.nord-video-resources {
    display: grid;
    gap: 1rem;
}

.nord-video-resource {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: background-color 0.3s ease;
}

.nord-video-resource:hover {
    background: #e9ecef;
}

.nord-video-resource__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.nord-video-resource__content {
    flex: 1;
}

.nord-video-resource__name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
}

.nord-video-resource__link {
    display: inline-flex;
    align-items: center;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nord-video-resource__link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.nord-video-resource__size {
    color: #7f8c8d;
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

/* ==========================================================================
   Single Video Shortcode
   ========================================================================== */

.nord-single-video {
    margin: 2rem 0;
}

.nord-single-video__title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 1.5rem 0;
}

.nord-single-video__embed {
    margin-bottom: 1.5rem;
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.nord-single-video__embed iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    border: none;
}

.nord-single-video__description,
.nord-single-video__resources {
    margin-bottom: 1.5rem;
}

.nord-single-video__description h4,
.nord-single-video__resources h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 1rem 0;
}

/* ==========================================================================
   Error States
   ========================================================================== */

.nord-video-error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin: 1rem 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .nord-video-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .nord-single-video-page__title {
        font-size: 2rem;
    }
    
    .nord-video-card__info {
        padding: 1rem;
    }
    
    .nord-video-card__play-button {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .nord-video-resource {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .nord-video-resource__icon {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .nord-single-video-page .container {
        padding: 0 0.75rem;
    }
    
    .nord-single-video-page__title {
        font-size: 1.75rem;
    }
    
    .nord-video-card__title {
        font-size: 1rem;
    }
    
    .nord-video-category-title {
        font-size: 1.25rem;
    }
}

/* ==========================================================================
   Placeholder Thumbnail Styles
   ========================================================================== */

/* Enhanced styles for videos without thumbnails */
.nord-video-card--no-thumbnail {
    border: 2px dashed #dee2e6;
}

.nord-video-card--no-thumbnail .nord-video-card__thumbnail {
    background: #f8f9fa;
}

.nord-video-card__placeholder-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.nord-video-card__placeholder-wrapper img {
    max-width: 80%;
    max-height: 80%;
    opacity: 0.7;
}

.nord-video-card__status {
    color: #6c757d;
    font-style: italic;
    margin-top: 0.5rem;
}

.nord-video-card--no-thumbnail .nord-video-card__play-button {
    background: rgba(108, 117, 125, 0.8);
}

.nord-video-card--no-thumbnail:hover .nord-video-card__play-button {
    background: rgba(108, 117, 125, 0.9);
    transform: translate(-50%, -50%) scale(1.05);
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .nord-video-card__play-button,
    .nord-single-video-page__embed,
    .nord-single-video__embed {
        display: none;
    }
    
    .nord-video-card {
        break-inside: avoid;
    }
}
