/* =========================================================================
   NamaTSP — صفحه آموزش ویدئویی (Amoozesh)
   استایل اصلی namatsp.ir/Amoozesh/index.html — فقط @import فونت با نسخه‌ی
   محلی جایگزین شده تا آفلاین هم کار کند.
   ========================================================================= */

/* Local Vazirmatn (the original page loaded it from a CDN). The family is
   registered as both 'Vazirmatn' — which the rules below reference — and
   'Vazirmatn FD', matching the rest of the site. */
@font-face{font-family:'Vazirmatn';src:url('/fonts/vazir/webfonts/Vazirmatn-FD-Regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Vazirmatn';src:url('/fonts/vazir/webfonts/Vazirmatn-FD-Medium.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:'Vazirmatn';src:url('/fonts/vazir/webfonts/Vazirmatn-FD-SemiBold.woff2') format('woff2');font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:'Vazirmatn';src:url('/fonts/vazir/webfonts/Vazirmatn-FD-Bold.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:'Vazirmatn';src:url('/fonts/vazir/webfonts/Vazirmatn-FD-ExtraBold.woff2') format('woff2');font-weight:800;font-style:normal;font-display:swap}


* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* Vazirmatn is served locally (see /fonts/vazir/Farsi-Digits/) */
        
        body {
            font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
            color: #1d1d1f;
            line-height: 1.6;
            overflow-x: hidden;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* Header */
        header {
            background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(147, 112, 219, 0.1);
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
            transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 0;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .logo img {
            height: 40px;
            width: auto;
            object-fit: contain;
        }

        .logo-text {
            font-size: 24px;
            font-weight: 700;
            background: linear-gradient(135deg, #9370db, #6a5acd);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .nav-links {
            display: flex;
            gap: 30px;
            list-style: none;
            align-items: center;
        }

        .nav-links a {
            text-decoration: none;
            color: #1d1d1f;
            font-weight: 400;
            font-size: 17px;
            transition: all 0.2s ease;
            position: relative;
        }

        .nav-links a:hover {
            color: #9370db;
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: -5px;
            left: 50%;
            background: linear-gradient(90deg, #9370db, #6a5acd);
            transition: all 0.3s ease;
            transform: translateX(-50%);
        }

        .nav-links a:hover::after {
            width: 100%;
        }

        /* Home Button */
        .home-button {
            background: linear-gradient(135deg, #9370db 0%, #6a5acd 100%);
            color: white !important;
            padding: 10px 20px;
            border-radius: 20px;
            text-decoration: none;
            font-weight: 600;
            font-size: 16px;
            transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            border: none;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .home-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(147, 112, 219, 0.3);
            color: white !important;
        }

        .home-button::after {
            display: none;
        }

        /* Hero Section */
        .hero {
            margin-top: 80px;
            padding: 40px 0 16px;
            text-align: center;
            background: linear-gradient(135deg, rgba(147, 112, 219, 0.03) 0%, rgba(255, 255, 255, 0.1) 100%);
        }

        .hero h1 {
            font-size: clamp(18px, 2.5vw + 8px, 38px);
            font-weight: 700;
            margin-bottom: 0;
            background: linear-gradient(135deg, #1d1d1f 0%, #9370db 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            opacity: 0;
            transform: translateY(50px);
            animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
        }

        .hero p {
            font-size: 24px;
            color: #6e6e73;
            margin-bottom: 40px;
            opacity: 0;
            transform: translateY(30px);
            animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
        }

        /* Video Grid */
        .videos-section {
            padding: 24px 0 80px;
        }

        .section-title {
            text-align: center;
            font-size: 48px;
            font-weight: 700;
            margin-bottom: 60px;
            background: linear-gradient(135deg, #1d1d1f 0%, #9370db 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .videos-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 40px;
            margin-top: 0;
        }

        .video-card {
            background: rgba(255, 255, 255, 0.9);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
            border: 1px solid rgba(147, 112, 219, 0.1);
            transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            transform: translateY(0);
            opacity: 0;
            animation: slideInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
        }

        .video-card:nth-child(1) { animation-delay: 0.1s; }
        .video-card:nth-child(2) { animation-delay: 0.2s; }
        .video-card:nth-child(3) { animation-delay: 0.3s; }
        .video-card:nth-child(4) { animation-delay: 0.4s; }
        .video-card:nth-child(5) { animation-delay: 0.5s; }

        .video-card:hover {
            transform: translateY(-10px) scale(1.02);
            box-shadow: 0 20px 60px rgba(147, 112, 219, 0.15);
            border-color: rgba(147, 112, 219, 0.3);
        }

        .video-thumbnail {
            width: 100%;
            height: 200px;
            background: linear-gradient(135deg, #9370db 0%, #6a5acd 100%);
            border-radius: 15px;
            margin-bottom: 25px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
            cursor: pointer;
		    background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        .video-thumbnail::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
            transform: translateX(-100%);
            transition: transform 0.6s;
        }

        .video-thumbnail:hover::before {
            transform: translateX(100%);
        }

        .play-button {
            width: 60px;
            height: 60px;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: #9370db;
            transition: all 0.3s ease;
        }

        .video-thumbnail:hover .play-button {
            transform: scale(1.1);
            background: rgba(255, 255, 255, 1);
        }

        .video-info h3 {
            font-size: 22px;
            font-weight: 600;
            margin-bottom: 10px;
            color: #1d1d1f;
        }

        .video-info p {
            color: #6e6e73;
            font-size: 16px;
            line-height: 1.5;
            margin-bottom: 20px;
        }

        /* Styled Links */
        .video-info a {
            color: #9370db;
            text-decoration: none;
            font-weight: 500;
            font-size: 16px;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            transition: all 0.2s ease;
            position: relative;
            padding: 8px 16px;
            background: rgba(147, 112, 219, 0.1);
            border-radius: 15px;
            margin-bottom: 15px;
        }

        .video-info a:hover {
            background: rgba(147, 112, 219, 0.2);
            transform: translateY(-1px);
        }

        .video-info a::before {
            content: "🔗";
            font-size: 14px;
        }

        .video-duration {
            display: inline-flex;
            align-items: center;
            background: rgba(147, 112, 219, 0.1);
            color: #9370db;
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
        }

        .video-duration::before {
            content: "🕒";
            margin-left: 8px;
        }

        /* Footer */
        footer {
            background: linear-gradient(135deg, #f8f9ff 0%, rgba(147, 112, 219, 0.05) 100%);
            padding: 60px 0;
            text-align: center;
            border-top: 1px solid rgba(147, 112, 219, 0.1);
        }

        .footer-content {
            max-width: 600px;
            margin: 0 auto;
        }

        .footer-content h3 {
            font-size: 28px;
            font-weight: 600;
            margin-bottom: 15px;
            color: #1d1d1f;
        }

        .footer-content p {
            color: #6e6e73;
            font-size: 18px;
            margin-bottom: 30px;
        }

        .cta-button {
            background: linear-gradient(135deg, #9370db 0%, #6a5acd 100%);
            color: white;
            padding: 15px 30px;
            border-radius: 25px;
            text-decoration: none;
            font-weight: 600;
            font-size: 18px;
            display: inline-block;
            transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            border: none;
            cursor: pointer;
        }

        .cta-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(147, 112, 219, 0.3);
        }

        /* Animations */
        @keyframes fadeInUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes slideInUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Mobile Styles */
        @media (max-width: 768px) {
            .nav-links {
                gap: 15px;
            }

            .home-button {
                padding: 8px 16px;
                font-size: 14px;
            }

            .logo img {
                height: 35px;
            }

            .logo-text {
                font-size: 20px;
            }

            .hero h1 {
                font-size: clamp(16px, 4.6vw, 22px);
            }

            .hero {
                padding: 32px 0 12px;
            }

            .videos-section {
                padding: 16px 0 64px;
            }

            .hero p {
                font-size: 20px;
            }

            .videos-grid {
                grid-template-columns: 1fr;
                gap: 30px;
            }

            .video-card {
                padding: 25px;
            }

            .section-title {
                font-size: 36px;
            }
        }

        @media (max-width: 480px) {
            .container {
                padding: 0 15px;
            }

            .video-card {
                padding: 20px;
            }

            .video-thumbnail {
                height: 180px;
            }

            .hero {
                padding: 28px 0 12px;
            }

            .logo {
                gap: 10px;
            }

            .nav-links {
                gap: 10px;
            }

            .home-button {
                padding: 6px 12px;
                font-size: 13px;
            }
        }

        /* Scroll behavior */
        html {
            scroll-behavior: smooth;
        }

        /* Loading animation for video thumbnails */
        .loading {
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            animation: loading 1.5s infinite;
        }

        @keyframes loading {
            0% {
                background-position: 200% 0;
            }
            100% {
                background-position: -200% 0;
            }
        }
