/* ============================================
   YOUTUBE-STYLE VIDEO SECTION - MODERN DESIGN
   ============================================ */

/* Section Styling */
.investment-videos-section {
    background: #0f0f0f;
    padding: 40px 0 60px;
    min-height: 400px;
}

/* Section Header */
.youtube-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    font-family: "Roboto", "Arial", sans-serif;
    display: flex;
    align-items: center;
}

.youtube-section-title i {
    color: #ff0000;
    font-size: 28px;
}

.youtube-see-all {
    color: #aaa;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
    font-family: "Roboto", "Arial", sans-serif;
}

.youtube-see-all:hover {
    color: #fff;
}

/* Video Grid Layout */
.youtube-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px 16px;
    margin-top: 24px;
}

@media (max-width: 768px) {
    .youtube-videos-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .youtube-videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .youtube-videos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

/* Video Card */
.youtube-video-card {
    display: block;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.youtube-video-card:hover {
    transform: translateY(-2px);
}

/* Thumbnail Wrapper */
.youtube-thumbnail-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.youtube-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.youtube-video-card:hover .youtube-thumbnail {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Duration Badge */
.youtube-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: "Roboto", "Arial", sans-serif;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Play Overlay */
.youtube-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 68px;
    height: 48px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.05, 0, 0, 1);
    z-index: 1;
}

.youtube-play-overlay i {
    color: #fff;
    font-size: 20px;
    margin-left: 3px;
}

.youtube-video-card:hover .youtube-play-overlay {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Video Info Section */
.youtube-video-info {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* Channel Icon */
.youtube-channel-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.youtube-channel-icon i {
    color: #fff;
    font-size: 16px;
}

/* Video Details */
.youtube-video-details {
    flex: 1;
    min-width: 0;
}

.youtube-video-title {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
    font-family: "Roboto", "Arial", sans-serif;
    transition: color 0.2s ease;
}

.youtube-video-card:hover .youtube-video-title {
    color: #fff;
}

/* Video Metadata */
.youtube-video-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.youtube-channel-name {
    font-size: 12px;
    color: #aaa;
    font-weight: 500;
    font-family: "Roboto", "Arial", sans-serif;
    transition: color 0.2s ease;
}

.youtube-video-card:hover .youtube-channel-name {
    color: #fff;
}

.youtube-stats {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #aaa;
    font-family: "Roboto", "Arial", sans-serif;
}

.youtube-dot {
    font-size: 8px;
    line-height: 1;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .youtube-section-title {
        font-size: 20px;
    }
    
    .youtube-section-title i {
        font-size: 24px;
    }
    
    .youtube-channel-icon {
        width: 32px;
        height: 32px;
    }
    
    .youtube-channel-icon i {
        font-size: 14px;
    }
    
    .youtube-video-title {
        font-size: 13px;
    }
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.youtube-video-card.loading .youtube-thumbnail-wrapper {
    background: linear-gradient(
        90deg,
        #1a1a1a 0%,
        #2a2a2a 50%,
        #1a1a1a 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

/* Hover Effects for Smooth Interaction */
.youtube-video-card {
    -webkit-tap-highlight-color: transparent;
}

.youtube-thumbnail-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 0, 0, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.youtube-video-card:hover .youtube-thumbnail-wrapper::after {
    opacity: 1;
}

/* Accessibility */
.youtube-video-card:focus {
    outline: 2px solid #ff0000;
    outline-offset: 4px;
    border-radius: 12px;
}

.youtube-video-card:focus:not(:focus-visible) {
    outline: none;
}

/* Dark Mode Optimizations */
@media (prefers-color-scheme: dark) {
    .investment-videos-section {
        background: #0f0f0f;
    }
}

/* Performance Optimizations */
.youtube-thumbnail {
    will-change: transform;
}

.youtube-play-overlay {
    will-change: transform, opacity;
}

/* Print Styles */
@media print {
    .investment-videos-section {
        display: none;
    }
}
