/**
 * Video Widget Styles
 * Consistent with trending widget layout
 */

/* Video Posts Section */
.video-posts-section {
    margin-bottom: 30px;
}

/* Video Header */
.video-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.video-title-section {
    flex: 1;
}

.video-title {
    margin: 0 0 5px 0;
    font-size: 1.5em;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-icon {
    color: #e74c3c;
    font-size: 1.2em;
}

.video-subtitle {
    margin: 0;
    color: #6c757d;
    font-size: 0.9em;
}

.view-all-videos {
    display: inline-block;
    color: #1a1a1a;
    background: #fff;
    padding: 0.5rem 1.0rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid #b6b2b2;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* Video Grid Layout */
.video-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.video-post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Video Thumbnail */
.video-post-image {
    position: relative;
    overflow: hidden;
}

.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-post-card:hover .video-thumb {
    transform: scale(1.05);
}

.no-thumbnail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-thumb i {
    font-size: 3em;
    color: white;
    opacity: 0.7;
}

/* Play Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.video-post-card:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.play-overlay i {
    color: #e74c3c;
    font-size: 1.2em;
    margin-left: 2px;
}

/* Video Duration */
.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Video Category */
.video-post-category {
    display: inline-block;
    background: #fff5e6;
    border: solid 1px #f39c12;
    color: black;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    margin-bottom: 8px;
}

/* Video Content */
.video-post-content {
    padding: 15px;
}

.video-post-title {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.4;
}

.video-post-title a {
    color: #2c3e50;
    text-decoration: none;
}

.video-post-title a:hover {
    color: #e74c3c;
}

.video-post-excerpt {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Video Meta */
.video-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.85em;
}

.video-speaker {
    flex: 1;
}

.speaker-name {
    color: #e74c3c;
    font-weight: 500;
}

.video-stats {
    display: flex;
    gap: 10px;
    color: #6c757d;
}

.views,
.date {
    font-size: 0.8em;
}

/* Watch Button */
.watch-btn {
    display: block;
    background: #e74c3c;
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.watch-btn:hover {
    background: #c0392b;
    color: white;
    text-decoration: none;
}

/* Video List Layout */
.video-list-layout .video-posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
}

.video-post-item {
    display: flex;
    gap: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.video-post-thumbnail {
    flex: 0 0 150px;
    border-radius: 8px;
    overflow: hidden;
}

.video-post-thumbnail .video-thumbnail-wrapper {
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.video-post-thumbnail img,
.video-thumbnail-wrapper img {
    border-radius: 8px;
    overflow: hidden;
}

.video-post-details {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.video-post-details .video-post-title {
    font-size: 1em;
    margin-bottom: 8px;
}

.video-post-details .video-post-excerpt {
    margin-bottom: 10px;
}

/* Video Carousel Layout */
.video-carousel-layout .video-carousel-container {
    position: relative;
    padding: 0 20px;
}

.video-carousel {
    display: flex;
    gap: 20px;
    overflow: hidden;
}

.video-carousel-item {
    flex: 0 0 calc(33.333% - 14px);
    min-width: 300px;
}

.video-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.video-carousel-prev,
.video-carousel-next {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: all;
    transition: background 0.3s ease;
}

.video-carousel-prev:hover,
.video-carousel-next:hover {
    background: white;
}

/* Video Hero Layout */
.video-hero-layout .video-hero-container {
    padding: 0 20px;
}

.video-hero-featured {
    margin-bottom: 20px;
}

.video-hero-featured .video-post-card {
    display: flex;
    gap: 20px;
}

.video-hero-featured .video-post-image {
    flex: 0 0 400px;
}

.video-hero-featured .video-thumbnail-wrapper {
    height: 250px;
}

.video-hero-featured .video-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-hero-featured .video-post-title {
    font-size: 1.3em;
    margin-bottom: 15px;
}

.video-hero-featured .video-post-excerpt {
    margin-bottom: 20px;
}

.video-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.video-hero-grid .video-post-card.small {
    display: flex;
    gap: 10px;
}

.video-hero-grid .video-post-card.small .video-post-image {
    flex: 0 0 80px;
}

.video-hero-grid .video-post-card.small .video-thumbnail-wrapper {
    height: 60px;
}

.video-hero-grid .video-post-card.small .video-post-content {
    flex: 1;
    padding: 10px;
}

.video-hero-grid .video-post-card.small .video-post-title {
    font-size: 0.9em;
    margin-bottom: 5px;
}

.video-hero-grid .video-post-card.small .video-post-meta {
    margin-bottom: 0;
}

/* Video Cards Layout */
.video-cards-layout .video-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-card-image {
    position: relative;
}

.video-card-content {
    padding: 20px;
}

.video-card-header {
    margin-bottom: 15px;
}

.video-card-category {
    display: inline-block;
    background: #f39c12;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    margin-bottom: 8px;
}

.video-card-title {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.4;
}

.video-card-title a {
    color: #2c3e50;
    text-decoration: none;
}

.video-card-title a:hover {
    color: #e74c3c;
}

.video-card-excerpt {
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.5;
}

.video-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-card-meta {
    flex: 1;
}

.video-card-btn {
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-card-btn:hover {
    background: #c0392b;
    color: white;
    text-decoration: none;
}

/* Video Masonry Layout */
.video-masonry-layout .video-masonry-grid {
    columns: 3;
    column-gap: 20px;
    padding: 0 20px;
}

.video-masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
}

.video-masonry-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-masonry-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.video-masonry-content {
    padding: 15px;
}

.video-masonry-category {
    display: inline-block;
    background: #f39c12;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    margin-bottom: 8px;
}

.video-masonry-title {
    margin: 0 0 10px 0;
    font-size: 1em;
    font-weight: 600;
    line-height: 1.4;
}

.video-masonry-title a {
    color: #2c3e50;
    text-decoration: none;
}

.video-masonry-title a:hover {
    color: #e74c3c;
}

.video-masonry-excerpt {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 0.85em;
    line-height: 1.5;
}

.video-masonry-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.8em;
}

.video-masonry-btn {
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-masonry-btn:hover {
    background: #c0392b;
    color: white;
    text-decoration: none;
}

/* Video Timeline Layout */
.video-timeline-layout .video-timeline {
    position: relative;
    padding: 0 20px;
}

.video-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e74c3c;
}

.video-timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 60px;
}

.video-timeline-marker {
    position: absolute;
    left: 0;
    top: 20px;
    width: 40px;
    height: 40px;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background: #e74c3c;
    border-radius: 50%;
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
}

.timeline-line {
    width: 2px;
    height: 100%;
    background: #e74c3c;
    position: absolute;
    left: 19px;
    top: 28px;
}

.video-timeline-content {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-timeline-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.video-timeline-card {
    display: flex;
    gap: 15px;
}

.video-timeline-image {
    flex: 0 0 200px;
}

.video-timeline-image .video-thumbnail-wrapper {
    height: 120px;
}

.video-timeline-details {
    flex: 1;
    padding: 15px;
}

.video-timeline-category {
    display: inline-block;
    background: #f39c12;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    margin-bottom: 8px;
}

.video-timeline-date {
    color: #e74c3c;
    font-size: 0.85em;
    font-weight: 500;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-timeline-title {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.4;
}

.video-timeline-title a {
    color: #2c3e50;
    text-decoration: none;
}

.video-timeline-title a:hover {
    color: #e74c3c;
}

.video-timeline-excerpt {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.5;
}

.video-timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.85em;
}

.video-timeline-btn {
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-timeline-btn:hover {
    background: #c0392b;
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-header {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

    .video-posts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }

    .video-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .video-list-layout .video-post-item {
        flex-direction: column;
    }

    .video-post-thumbnail {
        flex: none;
    }

    .video-post-thumbnail .video-thumbnail-wrapper {
        height: 150px;
    }

    .video-carousel-item {
        flex: 0 0 100%;
    }

    .video-hero-featured .video-post-card {
        flex-direction: column;
    }

    .video-hero-featured .video-post-image {
        flex: none;
    }

    .video-hero-featured .video-thumbnail-wrapper {
        height: 200px;
    }

    .video-hero-grid {
        grid-template-columns: 1fr;
    }

    .video-cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }

    .video-masonry-grid {
        columns: 1;
        column-gap: 15px;
        padding: 0 15px;
    }

    .video-timeline-item {
        padding-left: 40px;
    }

    .video-timeline-marker {
        width: 30px;
    }

    .timeline-dot {
        width: 12px;
        height: 12px;
        left: 9px;
        top: 14px;
    }

    .timeline-line {
        left: 15px;
        top: 26px;
    }

    .video-timeline-card {
        flex-direction: column;
    }

    .video-timeline-image {
        flex: none;
    }

    .video-timeline-image .video-thumbnail-wrapper {
        height: 150px;
    }
}

@media (max-width: 768px) {
    .video-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .video-title {
        font-size: 1.3em;
    }

    .video-posts-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .video-post-content {
        padding: 12px;
    }

    .video-post-title {
        font-size: 1em;
    }
}