/* Enhanced Video Showcase Styles - Mobile Optimized */
.video-showcase {
    padding:  1rem; /* Reduced from 6rem for mobile */
    background: linear-gradient(135deg, var(--background-light) 0%, rgba(93, 95, 239, 0.05) 100%);
}

@media (min-width: 768px) {
    .video-showcase {
        padding: 1cqh 0;
    }
}

@media (min-width: 1024px) {
    .video-showcase {
        padding: 1rem 0;
    }
}

.section-preheading {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: clamp(0.75rem, 2vw, 0.85rem); /* Responsive font sizing */
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    /* Better touch targets */
    min-height: 32px;
    display: inline-flex;
    align-items: center;
}

/* Hero Video Section */
.hero-video-container {
    margin: 2rem 0; /* Reduced from 4rem for mobile */
}

@media (min-width: 768px) {
    .hero-video-container {
        margin: 3rem 0;
    }
}

@media (min-width: 1024px) {
    .hero-video-container {
        margin: 4rem 0;
    }
}

.hero-video-wrapper {
    position: relative;
    border-radius: 12px; /* Slightly reduced for mobile */
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1); /* Adjusted shadow */
    background: var(--white);
    /* Improve performance on mobile */
    will-change: transform;
    backface-visibility: hidden;
}

@media (min-width: 768px) {
    .hero-video-wrapper {
        border-radius: 16px;
    }
}

@media (min-width: 1024px) {
    .hero-video-wrapper {
        border-radius: 20px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    }
}

.youtube-embed-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    /* Optimize for mobile performance */
    transform: translateZ(0);
}

.youtube-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    /* Improve mobile performance */
    will-change: transform;
}

.hero-video-overlay {
    padding: 1.5rem; /* Reduced from 2rem for mobile */
    background: var(--white);
}

@media (min-width: 768px) {
    .hero-video-overlay {
        padding: 2rem;
    }
}

.hero-video-content h3 {
    font-size: clamp(1.4rem, 4vw, 1.8rem); /* Responsive font sizing */
    color: var(--dark-color);
    margin: 1rem 0 0.5rem 0;
    font-weight: 700;
    line-height: 1.3; /* Better mobile readability */
}

.hero-video-content p {
    color: var(--dark-color);
    font-size: clamp(1rem, 2.5vw, 1.1rem); /* Responsive font sizing */
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.video-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: clamp(0.8rem, 2vw, 0.9rem); /* Responsive font sizing */
    font-weight: 600;
    /* Better mobile interaction */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.badge-icon {
    font-size: 1.2rem;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.video-stats {
    display: flex;
    flex-direction: column; /* Stack on mobile */
    gap: 1rem;
    margin-top: 1rem;
}

@media (min-width: 480px) {
    .video-stats {
        flex-direction: row;
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .video-stats {
        gap: 2rem;
    }
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.stat-item .icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Video Grid Section */
.video-grid-section {
    margin-top: 3rem; /* Reduced from 5rem for mobile */
}

@media (min-width: 768px) {
    .video-grid-section {
        margin-top: 4rem;
    }
}

@media (min-width: 1024px) {
    .video-grid-section {
        margin-top: 5rem;
    }
}

.video-grid-header {
    text-align: center;
    margin-bottom: 2rem; /* Reduced from 3rem for mobile */
    padding: 0 1rem; /* Better mobile spacing */
}

@media (min-width: 768px) {
    .video-grid-header {
        margin-bottom: 3rem;
        padding: 0;
    }
}

.video-grid-header h3 {
    font-size: clamp(1.6rem, 4vw, 2rem); /* Responsive font sizing */
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.video-grid-header p {
    color: var(--text-light);
    font-size: clamp(1rem, 2.5vw, 1.1rem); /* Responsive font sizing */
    max-width: 600px;
    margin: 0 auto;
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem; /* Reduced from 2rem for mobile */
    padding: 0 0.5rem; /* Better mobile spacing */
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        padding: 0;
    }
}

@media (min-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Video Cards - Mobile Optimized */
.video-card {
    background: var(--white);
    border-radius: 12px; /* Slightly reduced for mobile */
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); /* Adjusted shadow */
    transition: all 0.3s ease;
    cursor: pointer;
    /* Improve mobile performance */
    will-change: transform;
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
    .video-card {
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    }
}

/* Mobile-friendly hover effects */
.video-card:hover {
    transform: translateY(-4px); /* Reduced from -8px for mobile */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
    .video-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }
}

/* Touch-specific interactions */
@media (hover: none) and (pointer: coarse) {
    .video-card:hover {
        transform: none;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    }
    
    .video-card:active {
        transform: scale(0.98);
    }
}

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

.video-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    /* Improve mobile performance */
    will-change: transform;
}

.video-card:hover .video-card-image img {
    transform: scale(1.03); /* Reduced from 1.05 for mobile */
}

@media (min-width: 768px) {
    .video-card:hover .video-card-image img {
        transform: scale(1.05);
    }
}

/* Disable image scaling on touch devices */
@media (hover: none) and (pointer: coarse) {
    .video-card:hover .video-card-image img {
        transform: none;
    }
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Always show on mobile for better UX */
}

@media (max-width: 767px) {
    .video-overlay {
        opacity: 0.8;
    }
}

.video-card:hover .video-overlay {
    opacity: 1;
}

.play-button {
    transform: scale(0.8);
    transition: transform 0.3s ease;
    /* Better touch targets */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 767px) {
    .play-button {
        transform: scale(1);
    }
}

.video-card:hover .play-button {
    transform: scale(1);
}

@media (min-width: 768px) {
    .video-card:hover .play-button {
        transform: scale(1.1);
    }
}

.video-duration {
    position: absolute;
    bottom: 0.75rem; /* Adjusted for mobile */
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    font-weight: 600;
}

@media (min-width: 768px) {
    .video-duration {
        bottom: 1rem;
        right: 1rem;
    }
}

.video-card-content {
    padding: 1.25rem; /* Reduced from 1.5rem for mobile */
}

@media (min-width: 768px) {
    .video-card-content {
        padding: 1.5rem;
    }
}

.video-category {
    display: inline-block;
    background: rgba(93, 95, 239, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: clamp(0.75rem, 1.5vw, 0.8rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

.video-card-content h4 {
    font-size: clamp(1.1rem, 3vw, 1.25rem); /* Responsive font sizing */
    color: var(--dark-color);
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    /* Prevent text overflow */
    word-wrap: break-word;
    hyphens: auto;
}

.video-card-content p {
    color: var(--dark-color);
    font-size: clamp(0.9rem, 2vw, 0.95rem); /* Responsive font sizing */
    line-height: 1.6;
    margin-bottom: 1rem;
    /* Better mobile readability */
    word-wrap: break-word;
}

.video-meta {
    display: flex;
    flex-direction: column; /* Stack on mobile */
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

@media (min-width: 480px) {
    .video-meta {
        flex-direction: row;
        gap: 1.5rem;
    }
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-light);
    font-size: clamp(0.8rem, 1.5vw, 0.85rem);
}

.meta-item .icon {
    font-size: 1rem;
    flex-shrink: 0;
}

/* CTA Section - Mobile Optimized */
.video-cta-section {
    margin-top: 3rem; /* Reduced from 5rem for mobile */
    text-align: center;
    background: var(--white);
    padding: 2rem 1rem; /* Adjusted for mobile */
    border-radius: 16px; /* Slightly reduced for mobile */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .video-cta-section {
        margin-top: 4rem;
        padding: 2.5rem;
        border-radius: 20px;
    }
}

@media (min-width: 1024px) {
    .video-cta-section {
        margin-top: 5rem;
        padding: 3rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }
}

.cta-icon {
    margin-bottom: 1rem; /* Reduced from 1.5rem for mobile */
}

@media (min-width: 768px) {
    .cta-icon {
        margin-bottom: 1.5rem;
    }
}

.cta-content h3 {
    font-size: clamp(1.5rem, 4vw, 2rem); /* Responsive font sizing */
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cta-content p {
    color: var(--text-light);
    font-size: clamp(1rem, 2.5vw, 1.1rem); /* Responsive font sizing */
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch; /* Full width on mobile */
}

@media (min-width: 768px) {
    .cta-buttons {
        flex-direction: row;
        justify-content: center;
        align-items: center;
    }
}

.btn-icon {
    margin-right: 0.5rem;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.youtube-subscribe {
    position: relative;
    overflow: hidden;
    /* Better mobile interaction */
    -webkit-tap-highlight-color: transparent;
}

.youtube-subscribe::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.youtube-subscribe:hover::before {
    left: 100%;
}

/* Disable animation on mobile for better performance */
@media (max-width: 767px) {
    .youtube-subscribe::before {
        display: none;
    }
}

/* YouTube Modal - Mobile Optimized */
.youtube-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    padding: 1rem; /* Better mobile spacing */
}

.youtube-modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
}

.close-youtube-modal {
    position: absolute;
    top: -40px; /* Adjusted for mobile */
    right: 0;
    color: var(--white);
    font-size: 2rem; /* Reduced for mobile */
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    /* Better touch targets */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
    .close-youtube-modal {
        top: -50px;
        font-size: 2.5rem;
    }
}

.close-youtube-modal:hover {
    transform: scale(1.1);
}

/* Disable hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {
    .close-youtube-modal:hover {
        transform: none;
    }
    
    .close-youtube-modal:active {
        transform: scale(0.95);
    }
}

.youtube-iframe-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    border-radius: 8px; /* Reduced for mobile */
    overflow: hidden;
}

@media (min-width: 768px) {
    .youtube-iframe-container {
        border-radius: 12px;
    }
}

.youtube-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Desktop Layout Optimizations */
@media (min-width: 1024px) {
    .hero-video-wrapper {
        display: grid;
        grid-template-columns: 2fr 1fr;
    }
    
    .hero-video-overlay {
        display: flex;
        align-items: center;
    }
}

/* Performance Optimizations for Mobile */
@media (max-width: 767px) {
    /* Reduce animations and transitions for better performance */
    .video-card,
    .video-card-image img,
    .play-button {
        transition-duration: 0.2s;
    }
    
    /* Optimize for 60fps on mobile */
    .video-card {
        transform: translateZ(0);
    }
    
    /* Better scroll performance */
    .video-showcase {
        -webkit-overflow-scrolling: touch;
    }
}

/* Very small screens (320px and below) */
@media (max-width: 320px) {
    .video-showcase {
        padding: 2rem 0;
    }
    
    .hero-video-overlay {
        padding: 1rem;
    }
    
    .video-card-content {
        padding: 1rem;
    }
    
    .video-cta-section {
        padding: 1.5rem 0.75rem;
        margin-top: 2rem;
    }
    
    .video-grid {
        gap: 1rem;
    }
}