/* Tutorials Page Styles */

/* Enhanced Header and Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    text-decoration: none;
}

.nav-brand i {
    color: #6366f1;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.nav-link:hover {
    color: #6366f1;
}

.nav-link.active {
    color: #6366f1;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #6366f1;
    border-radius: 1px;
}

.nav-link.btn {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nav-link.btn-outline {
    color: #6366f1;
    border-color: #6366f1;
    background: transparent;
}

.nav-link.btn-outline:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-link.btn-primary {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.nav-link.btn-primary:hover {
    background: #5b5af1;
    border-color: #5b5af1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #4b5563;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .nav-toggle {
        display: flex;
    }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: left 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 1rem;
        z-index: 9999;
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        text-align: center;
        width: 100%;
        display: block;
    }
    .nav-link:hover {
        background: #f3f4f6;
    }
    .nav-link.btn {
        margin-top: 0.5rem;
    }
    .nav-brand {
        font-size: 1.3rem;
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (max-width: 480px) {
    .nav {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .nav-brand {
        font-size: 1.2rem;
    }
    
    .nav-brand i {
        font-size: 1.4rem;
    }
    
    .nav-menu {
        padding: 1.5rem;
    }
}

/* Hero Section */
.tutorials-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.tutorials-hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tutorials-hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    background: white;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.1rem;
}

/* Category Tabs */
.tutorial-categories {
    background: #f9fafb;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.category-tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.category-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 25px;
    background: white;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-tab:hover {
    color: #6366f1;
    border-color: #c7d2fe;
    background: #f0f0ff;
}

.category-tab.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* Tutorials Grid */
.tutorials-grid {
    padding: 3rem 0;
}

.tutorials-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.tutorial-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.tutorial-thumbnail {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}

.tutorial-thumbnail iframe {
    width: 100%;
    min-height: 315px;
    aspect-ratio: 16/9;
    border: none;
    display: block;
}

.tutorial-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tutorial-card:hover .tutorial-thumbnail img {
    transform: scale(1.05);
}

.play-overlay {
    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;
}

.tutorial-card:hover .play-overlay {
    background: #6366f1;
    transform: translate(-50%, -50%) scale(1.1);
}

.tutorial-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.8rem;
    font-weight: 500;
}

.tutorial-content {
    padding: 1.5rem;
}

.tutorial-category {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.tutorial-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.tutorial-content p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tutorial-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
}

.difficulty {
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.difficulty.beginner {
    background: #d1fae5;
    color: #065f46;
}

.difficulty.intermediate {
    background: #fef3c7;
    color: #92400e;
}

.difficulty.advanced {
    background: #fee2e2;
    color: #991b1b;
}

.views {
    color: #9ca3af;
}

/* Upload Section */
.upload-section {
    background: #f9fafb;
    padding: 3rem 0;
    border-top: 1px solid #e5e7eb;
}

.upload-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin: 0 auto;
}

.upload-card h2 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.upload-form .form-group {
    margin-bottom: 1.5rem;
}

.upload-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.upload-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.upload-form input,
.upload-form select,
.upload-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.upload-form input:focus,
.upload-form select:focus,
.upload-form textarea:focus {
    outline: none;
    border-color: #6366f1;
}

.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-display {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload:hover .file-upload-display,
.file-upload-display.drag-over {
    border-color: #6366f1;
    background: #f0f0ff;
}

.file-upload-display i {
    font-size: 2rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
    display: block;
}

.file-upload-display span {
    color: #6b7280;
    font-weight: 500;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.video-modal-content {
    position: relative;
    margin: 2% auto;
    padding: 2rem;
    width: 90%;
    max-width: 1000px;
    background: white;
    border-radius: 12px;
    animation: slideInDown 0.3s ease;
}

.video-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.3s ease;
}

.video-modal-close:hover {
    color: #374151;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-bottom: 1.5rem;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.video-info h3 {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.video-info p {
    color: #6b7280;
    line-height: 1.6;
}

/* Documentation Section */
.documentation-section {
    padding: 4rem 0;
    background: white;
}

.documentation-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 3rem;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.doc-card {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.doc-card:hover {
    background: white;
    border-color: #e5e7eb;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.doc-card i {
    font-size: 3rem;
    color: #6366f1;
    margin-bottom: 1rem;
    display: block;
}

.doc-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.doc-card p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hidden state for filtering */
.tutorial-card.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tutorials-hero-content h1 {
        font-size: 2.2rem;
    }
    
    .tutorials-hero-content p {
        font-size: 1rem;
    }
    
    .category-tabs {
        gap: 0.5rem;
        padding: 0 1rem;
    }
    
    .category-tab {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .tutorials-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .upload-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .video-modal-content {
        margin: 5% auto;
        width: 95%;
        padding: 1rem;
    }
    
    .docs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .documentation-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .tutorials-hero {
        padding: 100px 0 60px;
    }
    
    .tutorials-hero-content h1 {
        font-size: 1.8rem;
    }
    
    .search-box input {
        padding: 14px 18px 14px 45px;
    }
    
    .tutorial-content {
        padding: 1rem;
    }
    
    .upload-card {
        padding: 1.5rem;
    }
}
