/* Tutorials Styles - SEO-Optimized Educational Content */

/* Tutorials Header */
.tutorials-header {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    padding: 4rem 0;
    color: white;
    text-align: center;
}

.tutorials-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tutorials-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

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

/* Tutorial Card */
.tutorial-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tutorial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.tutorial-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    position: relative;
}

.tutorial-card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tutorial-card-badge.beginner {
    background: #dcfce7;
    color: #166534;
}

.tutorial-card-badge.intermediate {
    background: #fef3c7;
    color: #92400e;
}

.tutorial-card-badge.advanced {
    background: #fee2e2;
    color: #991b1b;
}

.tutorial-card-content {
    padding: 1.5rem;
}

.tutorial-card-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7c3aed;
    margin-bottom: 0.5rem;
}

.tutorial-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.tutorial-card-title a {
    color: inherit;
    text-decoration: none;
}

.tutorial-card-title a:hover {
    color: #7c3aed;
}

.tutorial-card-excerpt {
    color: #6b7280;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tutorial-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #9ca3af;
}

.tutorial-card-duration {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.tutorial-card-duration svg {
    width: 16px;
    height: 16px;
}

/* Tutorial Page */
.tutorial-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.tutorial-header {
    margin-bottom: 2rem;
}

.tutorial-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.tutorial-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}

.tutorial-breadcrumb a:hover {
    color: #7c3aed;
}

.tutorial-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.tutorial-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9375rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.tutorial-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.tutorial-meta-item svg {
    width: 18px;
    height: 18px;
}

/* Difficulty Badge */
.difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.difficulty-badge.beginner {
    background: #dcfce7;
    color: #166534;
}

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

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

/* Progress Bar */
.progress-bar-container {
    position: sticky;
    top: 0;
    z-index: 50;
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #7c3aed, #a855f7);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
    text-align: center;
}

/* Tutorial Steps */
.tutorial-steps {
    counter-reset: tutorial-step;
}

.tutorial-step {
    position: relative;
    padding-left: 4rem;
    padding-bottom: 3rem;
    border-left: 2px solid #e5e7eb;
    margin-left: 1rem;
}

.tutorial-step:last-child {
    border-left: 2px solid transparent;
    padding-bottom: 0;
}

.tutorial-step::before {
    counter-increment: tutorial-step;
    content: counter(tutorial-step);
    position: absolute;
    left: -1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
}

.tutorial-step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.tutorial-step-content {
    font-size: 1rem;
    line-height: 1.75;
    color: #374151;
}

.tutorial-step-content p {
    margin-bottom: 1rem;
}

.tutorial-step-content ul, .tutorial-step-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.tutorial-step-content li {
    margin-bottom: 0.5rem;
}

/* Code Blocks in Tutorials */
.code-block {
    position: relative;
    margin: 1rem 0;
}

.code-block pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

.code-block .copy-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.code-block .copy-button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.code-block .copy-button.copied {
    background: #10b981;
    color: white;
}

/* Interactive Elements */
.interactive-demo {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1rem 0;
}

.interactive-demo-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.interactive-demo-title svg {
    width: 18px;
    height: 18px;
    color: #7c3aed;
}

/* Quiz/Check Understanding */
.quiz-section {
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.quiz-title {
    font-size: 1rem;
    font-weight: 600;
    color: #7c3aed;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz-question {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 1rem;
}

.quiz-options {
    list-style: none;
    padding: 0;
}

.quiz-option {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.quiz-option:hover {
    border-color: #7c3aed;
    background: white;
}

.quiz-option.selected {
    border-color: #7c3aed;
    background: white;
}

.quiz-option.correct {
    border-color: #10b981;
    background: #dcfce7;
}

.quiz-option.incorrect {
    border-color: #ef4444;
    background: #fee2e2;
}

/* Prerequisites */
.prerequisites {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.prerequisites-title {
    font-size: 1rem;
    font-weight: 600;
    color: #166534;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prerequisites-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prerequisites-list li {
    padding: 0.375rem 0;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prerequisites-list svg {
    width: 16px;
    height: 16px;
    color: #10b981;
}

/* What You'll Learn */
.learning-objectives {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.learning-objectives-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.learning-objectives-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.learning-objectives-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: #374151;
}

.learning-objectives-list svg {
    width: 16px;
    height: 16px;
    color: #2563eb;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

/* Next Steps */
.next-steps {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border-radius: 0.75rem;
    padding: 2rem;
    color: white;
    margin-top: 3rem;
}

.next-steps h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.next-steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.next-steps-list li {
    margin-bottom: 0.75rem;
}

.next-steps-list a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.next-steps-list a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Video Embed */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

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

/* Filter/Sort */
.tutorials-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 0.75rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.filter-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
    color: #374151;
    background: white;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .tutorials-header h1 {
        font-size: 1.75rem;
    }

    .tutorials-grid {
        grid-template-columns: 1fr;
    }

    .tutorial-title {
        font-size: 1.75rem;
    }

    .tutorial-step {
        padding-left: 3rem;
    }

    .tutorial-step::before {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
        left: -1rem;
    }

    .tutorial-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .learning-objectives-list {
        grid-template-columns: 1fr;
    }
}
