/* ============================================================
   TUTORIALS PAGE — نوویکس | Novix
   طراحی مدرن، ساده و هماهنگ با بقیه سایت
   ============================================================ */

/* ============================================================
   🏠 پایه صفحه
   ============================================================ */
.tutorials-page {
    padding: 0.5rem 0 3rem;
    position: relative;
}

/* ============================================================
   🎥 گرید ویدیوها
   ============================================================ */
.videos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 920px;
    margin: 0 auto 2rem;
}

/* ============================================================
   🎞️ کارت ویدیو — نسخه ساده‌شده
   ============================================================ */
.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    animation: videoCardIn 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

/* خط رنگی بالای کارت */
.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--accent),
        var(--accent-light),
        var(--info),
        #EC4899
    );
    background-size: 300% 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 3;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.video-card:hover::before {
    opacity: 1;
}

.video-card:hover {
    border-color: rgba(108, 60, 225, 0.25);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px -12px rgba(108, 60, 225, 0.15),
                0 8px 24px rgba(0, 0, 0, 0.08);
}

@keyframes videoCardIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-card:nth-child(1) { animation-delay: 0.05s; }
.video-card:nth-child(2) { animation-delay: 0.12s; }
.video-card:nth-child(3) { animation-delay: 0.19s; }
.video-card:nth-child(4) { animation-delay: 0.26s; }
.video-card:nth-child(5) { animation-delay: 0.33s; }
.video-card:nth-child(6) { animation-delay: 0.4s; }

/* ============================================================
   📺 فریم ویدیو
   ============================================================ */
.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0a0a14;
    overflow: hidden;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    z-index: 2;
    background: #0a0a14;
}

/* ============================================================
   📝 اطلاعات ویدیو
   ============================================================ */
.video-info {
    padding: 1.4rem 1.8rem 1.5rem;
}

/* ===== عنوان ===== */
.video-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-primary);
    line-height: 1.5;
    letter-spacing: -0.3px;
}

.video-title-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg,
        rgba(108, 60, 225, 0.12),
        rgba(236, 72, 153, 0.1));
    color: var(--accent-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: all var(--transition);
    border: 1px solid rgba(108, 60, 225, 0.15);
}

.video-card:hover .video-title-icon {
    background: linear-gradient(135deg, var(--accent), #EC4899);
    color: #fff;
    transform: scale(1.08) rotate(-8deg);
    box-shadow: 0 6px 18px rgba(108, 60, 225, 0.25);
}

.video-title-text {
    flex: 1;
    min-width: 0;
}

/* ===== توضیحات ===== */
.video-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.95;
    margin: 0;
}

/* ============================================================
   📭 حالت خالی
   ============================================================ */
.tutorials-empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-xl);
    transition: all var(--transition);
}

.tutorials-empty-state:hover {
    border-color: var(--border-light);
}

.tutorials-empty-state .empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        rgba(108, 60, 225, 0.08),
        rgba(6, 182, 212, 0.05)
    );
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 1.2rem;
    opacity: 0.9;
}

.tutorials-empty-state h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.4rem;
    letter-spacing: -0.2px;
}

.tutorials-empty-state p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
    line-height: 1.8;
}

.tutorials-empty-state .empty-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   📚 CTA پایین صفحه
   ============================================================ */
.tutorials-footer-cta {
    display: flex;
    align-items: center;
    gap: 1.3rem;
    padding: 1.4rem 1.8rem;
    margin-top: 2.5rem;
    background: linear-gradient(
        135deg,
        rgba(16, 185, 129, 0.04) 0%,
        rgba(6, 182, 212, 0.03) 100%
    );
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
}

.tutorials-footer-cta::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #10B981, #06B6D4);
    opacity: 0.8;
}

.tutorials-footer-cta:hover {
    border-color: var(--border-light);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.08);
}

.tutorials-footer-cta .cta-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg,
        rgba(16, 185, 129, 0.1),
        rgba(6, 182, 212, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: #10B981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: all var(--transition);
}

.tutorials-footer-cta:hover .cta-icon-wrapper {
    transform: rotate(-6deg) scale(1.06);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.tutorials-footer-cta .cta-content {
    flex: 1;
    min-width: 0;
}

.tutorials-footer-cta .cta-content h4 {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.3rem;
    letter-spacing: -0.2px;
}

.tutorials-footer-cta .cta-content p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

.tutorials-footer-cta .cta-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
    font-family: 'Vazirmatn', sans-serif;
    border: 1px solid transparent;
    white-space: nowrap;
    letter-spacing: -0.1px;
}

.cta-btn i {
    font-size: 0.72rem;
}

.cta-btn-primary {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.cta-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
    color: #fff;
}

/* ============================================================
   🌞 تم روشن
   ============================================================ */
[data-theme="light"] .video-card {
    background: #ffffff;
}

[data-theme="light"] .tutorials-footer-cta {
    background: linear-gradient(
        135deg,
        rgba(16, 185, 129, 0.025),
        rgba(6, 182, 212, 0.02)
    );
}

/* ============================================================
   📱 ریسپانسیو — تبلت
   ============================================================ */
@media (max-width: 768px) {
    .video-info {
        padding: 1.2rem 1.3rem 1.3rem;
    }

    .video-title {
        font-size: 1.05rem;
    }

    .video-desc {
        font-size: 0.82rem;
    }

    .tutorials-footer-cta {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.2rem 1.3rem;
    }

    .tutorials-footer-cta::before {
        width: 100%;
        height: 3px;
    }

    .tutorials-footer-cta .cta-icon-wrapper {
        align-self: center;
    }

    .tutorials-footer-cta .cta-actions {
        justify-content: center;
        width: 100%;
    }
}

/* ============================================================
   📱 ریسپانسیو — موبایل
   ============================================================ */
@media (max-width: 480px) {
    .tutorials-page {
        padding: 0.5rem 0 2rem;
    }

    .videos-grid {
        gap: 1.4rem;
    }

    .video-info {
        padding: 1rem 1.1rem 1.15rem;
    }

    .video-title {
        font-size: 0.95rem;
        gap: 0.5rem;
        margin-bottom: 0.55rem;
    }

    .video-title-icon {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }

    .video-desc {
        font-size: 0.78rem;
        line-height: 1.85;
    }

    .tutorials-empty-state {
        padding: 2.5rem 1.2rem;
    }

    .tutorials-empty-state .empty-icon {
        width: 64px;
        height: 64px;
        font-size: 1.8rem;
    }

    .tutorials-empty-state h3 {
        font-size: 1rem;
    }

    .tutorials-empty-state p {
        font-size: 0.8rem;
    }

    .tutorials-footer-cta {
        padding: 1.1rem 1.1rem;
        margin-top: 1.8rem;
    }

    .tutorials-footer-cta .cta-icon-wrapper {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .tutorials-footer-cta .cta-content h4 {
        font-size: 0.9rem;
    }

    .tutorials-footer-cta .cta-content p {
        font-size: 0.75rem;
    }

    .tutorials-footer-cta .cta-actions {
        width: 100%;
    }

    .cta-btn {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 1rem;
        font-size: 0.78rem;
    }
}

/* ============================================================
   📱 ریسپانسیو — موبایل کوچک
   ============================================================ */
@media (max-width: 360px) {
    .video-title {
        font-size: 0.88rem;
    }

    .video-desc {
        font-size: 0.72rem;
    }
}

/* ============================================================
   🎬 حالت لندسکیپ موبایل
   ============================================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .video-info {
        padding: 1rem 1.3rem;
    }
}

/* ============================================================
   🚫 کاهش افکت‌های سنگین در موبایل
   ============================================================ */
@media (max-width: 768px) {
    .video-card:hover {
        transform: translateY(-3px);
    }

    .video-card:hover .video-title-icon {
        transform: scale(1.03);
    }
}

/* ============================================================
   🎯 Smooth scroll
   ============================================================ */
html {
    scroll-behavior: smooth;
}