/* Tutorials Combined Styles - Enhanced Modern Version */

/* Tutorials Hero Section - Enhanced with Floating Background */
.tutorials-hero {
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%),
        linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 100px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tutorials-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    animation: float 20s linear infinite;
}

.tutorials-hero .container {
    position: relative;
    z-index: 2;
}

.tutorials-hero h1 {
    font-weight: 800;
    margin-bottom: 1.5rem;
    font-size: 3.2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tutorials-hero .lead {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
    100% { transform: translateY(0px) rotate(360deg); }
}

/* Category Tabs */
.category-tabs {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-top: -50px;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.nav-pills-custom .nav-link {
    border-radius: 12px;
    padding: 1rem 2rem;
    margin: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: #f8f9fa;
    color: #495057;
}

.nav-pills-custom .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.nav-pills-custom .nav-link:hover:not(.active) {
    background: coral;
    border-color: #dee2e6;
    transform: translateY(-2px);
}

/* Category Headers */
.category-header {
    text-align: center;
    margin: 3rem 0 2rem;
    position: relative;
}

.category-header h3 {
    color: #4a5568;
    font-weight: 700;
    display: inline-block;
    padding: 0 2rem;
    background: white;
    position: relative;
    z-index: 2;
    font-size: 2.2rem;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #667eea, #764ba2, transparent);
    z-index: 1;
}

.category-header p {
    font-size: 1.1rem;
    color: #6c757d;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Subcategory Grid */
.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}

/* Subcategory Cards */
.subcategory-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #eaeaea;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.subcategory-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.subcategory-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s;
}

.subcategory-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.subcategory-card:hover::before {
    transform: scaleX(1);
}

.subcategory-card:hover::after {
    left: 100%;
}

.subcategory-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.subcategory-card:hover .subcategory-icon {
    transform: scale(1.1) rotate(5deg);
}

.subcategory-card h4 {
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.subcategory-card p {
    color: #6c757d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-weight: 500;
}

.videos-count {
    font-weight: 600;
    color: #667eea;
    font-size: 1rem;
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-block;
    border: 1px solid #dee2e6;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}

/* Video Card Styles */
.video-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 1px solid #eaeaea;
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

/* Video Thumbnail */
.video-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-card:hover .thumbnail-img {
    transform: scale(1.08);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    opacity: 0;
}

.video-card:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Video Information */
.video-info {
    padding: 1.5rem;
}

.video-title {
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    line-height: 1.4;
}

.video-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-weight: 500;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
}

.video-views, .video-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Video Link Overlay */
.video-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    text-decoration: none;
}

/* NEW Video Badge */
.new-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 3;
}

/* Animation for new videos */
@keyframes newVideoPulse {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

.new-video {
    animation: newVideoPulse 2s infinite;
}

/* Back Button */
.back-to-categories {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-to-categories::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.6s;
}

.back-to-categories:hover {
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.back-to-categories:hover::before {
    left: 100%;
}

/* Subcategory Title in Video Sections */
.subcategory-title {
    color: #4a5568;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2rem;
    border-bottom: 3px solid;
    border-image: linear-gradient(135deg, #667eea, #764ba2) 1;
    padding-bottom: 0.8rem;
    display: inline-block;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-gold {
    color: #ffd700 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tutorials-hero {
        padding: 80px 0 40px;
    }
    
    .tutorials-hero h1 {
        font-size: 2.5rem;
    }
    
    .category-tabs {
        padding: 1.5rem;
        margin-top: -30px;
    }
    
    .nav-pills-custom .nav-link {
        padding: 0.75rem 1.5rem;
        margin: 0.25rem;
        font-size: 0.9rem;
    }
    
    .subcategory-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .subcategory-title {
        font-size: 1.8rem;
    }
    
    .video-thumbnail {
        height: 180px;
    }
    
    .subcategory-card {
        padding: 1.5rem;
    }
    
    .subcategory-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .tutorials-hero h1 {
        font-size: 2.2rem;
    }
    
    .tutorials-hero .lead {
        font-size: 1.1rem;
    }
    
    .nav-pills-custom .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .video-info {
        padding: 1.25rem;
    }
    
    .video-title {
        font-size: 1.1rem;
    }
    
    .subcategory-icon {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }
    
    .video-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}