/* Tutorials Page - Mobile First Responsive Design */

/* Navigation for tutorial pages */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0.75rem 1rem;
}

nav .nav-logo {
    display: inline-block;
}

nav .nav-logo img {
    height: 40px;
    width: auto;
}

nav .nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

nav .nav-links li {
    margin: 0;
}

nav .nav-links a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s;
}

nav .nav-links a:hover {
    background: #f5f5f5;
    color: var(--primary, #0066b3);
}

/* Hero Section */
.tutorials-hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    padding: 120px 20px 60px;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tutorial Content Wrapper */
.tutorial-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    padding-top: 160px;
    background: #ffffff;
    min-height: calc(100vh - 200px);
}

.tutorial-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    line-height: 1.8;
}

.back-to-tutorials,
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    margin-bottom: 20px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.back-to-tutorials:hover,
.back-button:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #28a745;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.download-button:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

.tutorials-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.tutorials-hero i {
    margin-right: 10px;
}

.hero-subtitle {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 300;
    line-height: 1.6;
}

/* Main Content */
.tutorials-main {
    padding: 40px 20px;
    padding-top: 120px;
    background: #f5f5f5;
    min-height: calc(100vh - 400px);
}

.tutorials-intro {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tutorials-intro p {
    margin: 0;
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
}

/* Tutorial Tree Structure */
.tutorial-tree {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Folder Section */
.folder-section {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.folder-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Folder Header */
.folder-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.folder-header:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    transform: translateX(5px);
}

.folder-header.open {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
}

.folder-icon,
.folder-icon-open {
    font-size: 1.3rem;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.folder-icon {
    color: #ffc107;
}

.folder-header.open .folder-icon {
    display: none;
}

.folder-icon-open {
    display: none;
    color: #ffd54f;
}

.folder-header.open .folder-icon-open {
    display: inline-block;
}

.folder-name {
    font-size: 1.2rem;
    font-weight: 600;
    flex: 1;
}

.folder-toggle {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.folder-header.open .folder-toggle {
    transform: rotate(180deg);
}

/* Folder Content */
.folder-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 0 0 20px;
}

.folder-content.open {
    max-height: 1000px;
    padding: 15px 0 0 20px;
}

/* Tutorial Item */
.tutorial-item {
    position: relative;
    margin-bottom: 15px;
    padding-left: 30px;
}

.tutorial-item:last-child {
    margin-bottom: 0;
}

.tutorial-connector {
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 100%;
    border-left: 2px solid #dee2e6;
    border-bottom: 2px solid #dee2e6;
}

.tutorial-item:last-child .tutorial-connector {
    height: 50%;
}

.tutorial-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.tutorial-info:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.tutorial-file-icon {
    color: var(--primary);
    font-size: 1.2rem;
}

.tutorial-link {
    flex: 1;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.tutorial-link:hover {
    color: var(--primary);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.download-btn i {
    font-size: 0.85rem;
}

/* Coming Soon Message */
.coming-soon-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: #fff3cd;
    border-radius: 6px;
    color: #856404;
    margin: 10px 0;
}

.coming-soon-message i {
    font-size: 1.5rem;
    color: #ff9800;
}

.coming-soon-message p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Responsive Design - Tablet */
@media (min-width: 768px) {
    .tutorials-hero h1 {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .tutorials-main {
        padding: 60px 40px;
    }

    .tutorials-intro {
        padding: 25px;
    }

    .tutorials-intro p {
        font-size: 1.05rem;
    }

    .tutorial-tree {
        padding: 30px;
    }

    .folder-header {
        padding: 15px 20px;
    }

    .folder-content {
        padding: 0 0 0 30px;
    }

    .folder-content.open {
        padding: 20px 0 0 30px;
    }

    .tutorial-item {
        padding-left: 40px;
    }

    .tutorial-connector {
        width: 30px;
    }

    .tutorial-info {
        padding: 12px 20px;
    }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
    .tutorials-hero {
        padding: 140px 20px 80px;
    }

    .tutorials-hero h1 {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .tutorials-main {
        padding: 80px 60px;
    }

    .tutorial-tree {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Dark Mode Support (if implemented) */
@media (prefers-color-scheme: dark) {
    .tutorials-main {
        background: #1a1a1a;
    }

    .tutorials-intro,
    .tutorial-tree {
        background: #2d2d2d;
        color: #e0e0e0;
    }

    .tutorials-intro p {
        color: #b0b0b0;
    }

    .folder-header {
        background: linear-gradient(135deg, #3a3a3a, #4a4a4a);
        color: #e0e0e0;
    }

    .folder-header:hover {
        background: linear-gradient(135deg, #4a4a4a, #5a5a5a);
    }

    .tutorial-info {
        background: #3a3a3a;
    }

    .tutorial-info:hover {
        background: #4a4a4a;
    }

    .tutorial-link {
        color: #e0e0e0;
    }

    .tutorial-connector {
        border-color: #4a4a4a;
    }

    .coming-soon-message {
        background: #3a3a1a;
        color: #d4af37;
    }
}
