/* صفحه اصلی */
.page-wrapper-index { position: relative; z-index: 2; padding: 120px 24px 80px; overflow: hidden; }

/* بخش هیرو */
.hero-section { display: flex; align-items: center; justify-content: space-between; gap: 60px; max-width: 1200px; margin: 0 auto; padding: 40px 0 60px; flex-wrap: wrap; position: relative; }
.hero-glow-orb { position: absolute; top: 10%; right: 0; width: 400px; height: 400px; background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%); filter: blur(80px); z-index: -1; animation: pulse 8s ease-in-out infinite; }
.hero-content { flex: 1; min-width: 300px; }
.status-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); border-radius: 100px; padding: 8px 18px; margin-bottom: 24px; box-shadow: var(--shadow); }
.status-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; animation: pulse 2s ease-in-out infinite; box-shadow: 0 0 10px var(--primary); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(1.2); } }
.status-badge span { font-size: 13px; font-weight: 600; color: var(--primary); }
.hero-heading { font-size: clamp(36px, 5vw, 56px); font-weight: 900; line-height: 1.2; margin-bottom: 24px; color: var(--text); }
.hero-subtitle { font-size: 17px; color: var(--text); opacity: 0.7; line-height: 1.8; margin-bottom: 40px; max-width: 500px; }
.hero-subtitle strong { color: var(--primary); font-weight: 700; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* بخش تصویر هیرو */
.hero-visual { flex: 1; min-width: 300px; position: relative; display: flex; justify-content: center; align-items: center; height: auto; margin-top: 20px; }
.hero-card-glow { position: absolute; width: 320px; height: 320px; background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%); filter: blur(50px); z-index: 1; animation: pulse 6s ease-in-out infinite; }
.hero-avatar-wrap { position: relative; z-index: 2; width: clamp(220px, 30vw, 300px); height: clamp(220px, 30vw, 300px); border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-hover); border: 4px solid var(--bg); background: var(--bg); }
.hero-avatar { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.hero-avatar-wrap:hover .hero-avatar { transform: scale(1.05); }

.floating-badge { position: absolute; z-index: 3; background: var(--bg); backdrop-filter: blur(12px); padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow-hover); display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); border: 1px solid var(--glass-border); animation: floatBadges 4s ease-in-out infinite; }
.floating-badge iconify-icon { font-size: 20px; color: var(--primary); }
.badge-wp { top: 20%; left: -20px; animation-delay: 0s; }
.badge-html { bottom: 30%; right: -20px; animation-delay: 1s; }
.badge-ai { bottom: 10%; left: 20%; animation-delay: 2s; }
@keyframes floatBadges { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

/* بخش آمار هیرو */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 900px;
    margin: 0 auto 60px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: var(--shadow);
}
.hero-stat { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-stat__icon { width: 44px; height: 44px; background: var(--primary-light); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; transition: all .3s; }
.hero-stat__icon iconify-icon { font-size: 22px; color: var(--primary); }
.hero-stat:hover .hero-stat__icon { background: var(--primary); transform: scale(1.1); }
.hero-stat:hover .hero-stat__icon iconify-icon { color: #fff; }
.hero-stat__num { font-family: 'Space Grotesk', sans-serif; font-size: clamp(28px, 3.5vw, 38px); font-weight: 700; color: var(--primary); line-height: 1; }
.hero-stat__plus { font-family: 'Space Grotesk', sans-serif; font-size: clamp(18px, 2vw, 24px); font-weight: 700; color: var(--primary); opacity: 0.5; margin-top: -6px; }
.hero-stat__label { font-size: 12px; color: var(--text); opacity: 0.5; font-weight: 500; }

/* بخش تکنولوژی و ابزارها */
.tech-stack-section { max-width: 1000px; margin: 0 auto 80px; text-align: center; }
.tech-stack-section h3 { font-size: 18px; color: var(--text); opacity: 0.7; margin-bottom: 24px; font-weight: 600; }
.tech-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.tech-item { display: flex; align-items: center; gap: 8px; background: var(--glass); border: 1px solid var(--glass-border); padding: 10px 20px; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--text); box-shadow: var(--shadow); transition: all 0.3s; }
.tech-item:hover { transform: translateY(-3px); border-color: var(--primary); color: var(--primary); }
.tech-item iconify-icon { font-size: 20px; color: var(--primary); }

/* بخش‌های صفحات */
.services-section, .featured-work-section, .featured-icons-section, .featured-library-section { padding: 60px 0; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; color: var(--text); margin-bottom: 12px; }
.section-header p { font-size: 16px; color: var(--text); opacity: 0.6; }

/* خدمات ما */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.service-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 20px; padding: 32px; transition: all .3s; box-shadow: var(--shadow); text-align: center; backdrop-filter: blur(10px); position: relative; overflow: hidden; }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--primary), var(--secondary)); transform: scaleX(0); transition: transform 0.4s ease; transform-origin: right; }
.service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); background: var(--bg); border-color: var(--primary); }
.service-card:hover::before { transform: scaleX(1); transform-origin: left; }
.service-icon { width: 70px; height: 70px; background: var(--primary-light); border-radius: 18px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; transition: all .3s; }
.service-card:hover .service-icon { background: var(--primary); transform: rotate(-5deg) scale(1.1); }
.service-icon iconify-icon { font-size: 32px; color: var(--primary); transition: color .3s; }
.service-card:hover .service-icon iconify-icon { color: #fff; }
.service-card h3 { font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.service-card p { font-size: 14px; color: var(--text); opacity: 0.6; line-height: 1.7; }

/* ردیف اسکرول افقی */
.drag-scroll-wrapper {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 30px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    cursor: grab;
    user-select: none;
    max-width: 100%;
    width: 100%;
    align-items: flex-start;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
}
.drag-scroll-wrapper:active { cursor: grabbing; }
.drag-scroll-wrapper::-webkit-scrollbar { display: none; }
.drag-scroll-wrapper { -ms-overflow-style: none; scrollbar-width: none; }

/* کارت‌های نمونه‌کارها در ردیف افقی */
#featuredPortfolioGrid .portfolio-card,
#featuredLibraryGrid .portfolio-card {
    flex: 0 0 260px;
    height: 400px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
#featuredPortfolioGrid .portfolio-content,
#featuredLibraryGrid .portfolio-content {
    margin-top: auto;
    flex-grow: 0;
}
#featuredIconsGrid .icon-item {
    flex: 0 0 110px;
    height: 120px;
}

/* بخش CTA */
.cta-section {
    margin: 80px auto;
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 60px 40px;
    text-align: center;
    color: var(--text);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at center, var(--primary-light) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}
.cta-section h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; margin-bottom: 16px; color: var(--text); }
.cta-section p { font-size: 16px; opacity: 0.8; margin-bottom: 32px; color: var(--text); }
.cta-section .btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-light);
}
.cta-section .btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ===== ریسپانسیو ===== */

/* تبلت (981px و کمتر) */
@media (max-width: 980px) {
    .hero-section { gap: 40px; padding: 20px 0 40px; }
    .hero-heading { font-size: clamp(30px, 4.5vw, 44px); }
    .hero-subtitle { font-size: 15px; max-width: none; }
    .hero-glow-orb { width: 280px; height: 280px; }
    .hero-card-glow { width: 260px; height: 260px; }
    .hero-stats { max-width: 100%; margin-left: 16px; margin-right: 16px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    #featuredPortfolioGrid .portfolio-card { flex: 0 0 220px; height: 360px; }
    .cta-section { margin-left: 16px; margin-right: 16px; padding: 48px 24px; }
    .cta-section h2 { font-size: 26px; }
    .section-header { margin-bottom: 40px; }
    .section-header h2 { font-size: clamp(24px, 3.5vw, 32px); }
}

/* موبایل (768px و کمتر) */
@media (max-width: 768px) {
    .page-wrapper-index { padding: 100px 16px 80px; }

    .hero-section { flex-direction: column-reverse; text-align: center; padding-top: 10px; gap: 32px; }
    .hero-content { min-width: unset; }
    .hero-subtitle { max-width: none; font-size: 14px; line-height: 1.9; margin-bottom: 28px; }
    .hero-actions { justify-content: center; gap: 12px; }
    .hero-visual { width: 100%; max-width: 240px; height: auto; margin-top: 0; }
    .hero-avatar-wrap { width: 180px; height: 180px; border-radius: 24px; }
    .hero-card-glow { width: 180px; height: 180px; }
    .hero-glow-orb { width: 200px; height: 200px; top: 5%; right: -10%; }

    .status-badge { margin: 0 auto 20px; }
    .badge-wp { left: 5px; top: 15%; padding: 8px 14px; font-size: 12px; }
    .badge-html { right: 5px; bottom: 25%; padding: 8px 14px; font-size: 12px; }
    .badge-ai { left: 15%; bottom: 5%; padding: 8px 14px; font-size: 12px; }

    .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 20px 16px; margin-left: 0; margin-right: 0; margin-bottom: 40px; border-radius: 16px; }
    .hero-stat__num { font-size: 22px; }
    .hero-stat__plus { font-size: 14px; }
    .hero-stat__label { font-size: 11px; }

    .tech-stack-section { margin-bottom: 48px; }
    .tech-list { gap: 8px; }
    .tech-item { padding: 8px 14px; font-size: 13px; }

    .services-section, .featured-work-section, .featured-icons-section { padding: 40px 0; }
    .services-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .service-card { padding: 24px 16px; border-radius: 16px; }
    .service-icon { width: 56px; height: 56px; border-radius: 14px; }
    .service-icon iconify-icon { font-size: 26px; }
    .service-card h3 { font-size: 16px; }
    .service-card p { font-size: 13px; }

    #featuredPortfolioGrid .portfolio-card { flex: 0 0 200px; height: 320px; }
    #featuredIconsGrid .icon-item { flex: 0 0 90px; height: 100px; }
    .drag-scroll-wrapper { padding: 16px; gap: 14px; border-radius: 18px; cursor: default; }

    .cta-section { margin: 48px 0; padding: 40px 20px; border-radius: 24px; }
    .cta-section h2 { font-size: 22px; }
    .cta-section p { font-size: 14px; margin-bottom: 24px; }
}

/* موبایل کوچک (480px و کمتر) */
@media (max-width: 480px) {
    .page-wrapper-index { padding: 90px 12px 48px; }

    .hero-heading { font-size: 26px; line-height: 1.3; margin-bottom: 16px; }
    .hero-subtitle { font-size: 13px; margin-bottom: 24px; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions a { width: 100%; text-align: center; justify-content: center; }
    .hero-visual { max-width: 200px; }
    .hero-avatar-wrap { width: 150px; height: 150px; border-radius: 20px; }
    .hero-card-glow { width: 150px; height: 150px; }

    .badge-wp, .badge-html, .badge-ai { padding: 6px 10px; font-size: 11px; }
    .floating-badge iconify-icon { font-size: 16px; }

    .hero-stats { padding: 16px 12px; gap: 10px; }
    .hero-stat__num { font-size: 20px; }
    .hero-stat__label { font-size: 10px; }

    .tech-item { padding: 7px 12px; font-size: 12px; gap: 6px; }
    .tech-item iconify-icon { font-size: 16px; }

    .services-grid { grid-template-columns: 1fr; gap: 14px; }
    .service-card { padding: 20px 16px; }

    .section-header { margin-bottom: 28px; }
    .section-header h2 { font-size: 22px; }
    .section-header p { font-size: 14px; }

    #featuredPortfolioGrid .portfolio-card { flex: 0 0 180px; height: 280px; }
    #featuredIconsGrid .icon-item { flex: 0 0 80px; height: 90px; }

    .cta-section { padding: 32px 16px; border-radius: 20px; }
    .cta-section h2 { font-size: 20px; }
}

/* موبایل بسیار کوچک (360px و کمتر) */
@media (max-width: 360px) {
    .page-wrapper-index { padding: 80px 8px 40px; }
    .hero-heading { font-size: 22px; }
    .hero-stats { grid-template-columns: 1fr; gap: 8px; padding: 14px 10px; }
    .hero-stat { flex-direction: row; justify-content: center; gap: 8px; }
    .hero-stat__label { font-size: 11px; }
    .hero-actions a { font-size: 12px; padding: 10px 14px; }
    #featuredPortfolioGrid .portfolio-card { flex: 0 0 160px; height: 260px; }
    #featuredIconsGrid .icon-item { flex: 0 0 70px; height: 80px; }
}

/* دسکتاپ‌های بزرگ (1440px و بیشتر) */
@media (min-width: 1440px) {
    .page-wrapper-index { padding: 140px 32px 100px; }
    .hero-section { max-width: 1320px; gap: 80px; padding: 60px 0 80px; }
    .hero-heading { font-size: clamp(48px, 4vw, 64px); }
    .hero-subtitle { font-size: 18px; max-width: 560px; }
    .hero-avatar-wrap { width: clamp(280px, 28vw, 360px); height: clamp(280px, 28vw, 360px); border-radius: 36px; }
    .hero-card-glow { width: 380px; height: 380px; }
    .hero-glow-orb { width: 500px; height: 500px; }

    .services-section, .featured-work-section, .featured-icons-section, .featured-library-section { max-width: 1320px; }
    .services-grid { grid-template-columns: repeat(4, 1fr); gap: 32px; }
    .service-card { padding: 40px; }
    .service-icon { width: 80px; height: 80px; }
    .service-icon iconify-icon { font-size: 36px; }

    #featuredPortfolioGrid .portfolio-card { flex: 0 0 300px; height: 440px; }
    #featuredIconsGrid .icon-item { flex: 0 0 120px; height: 130px; }

    .hero-stats { max-width: 1000px; padding: 40px 32px; }
    .hero-stat__num { font-size: clamp(34px, 2.5vw, 44px); }
    .hero-stat__label { font-size: 13px; }

    .cta-section { max-width: 1200px; padding: 80px 56px; }
    .cta-section h2 { font-size: 36px; }
    .cta-section p { font-size: 18px; }

    .tech-stack-section { max-width: 1100px; }
    .tech-list { gap: 16px; }
    .tech-item { padding: 12px 24px; font-size: 15px; }

    .section-header h2 { font-size: clamp(34px, 3vw, 46px); }
    .section-header p { font-size: 18px; }
}

/* دسکتاپ فوق بزرگ (1920px و بیشتر) */
@media (min-width: 1920px) {
    .hero-section { max-width: 1500px; }
    .services-section, .featured-work-section, .featured-icons-section { max-width: 1500px; }
    .hero-stats { max-width: 1200px; }
    .hero-heading { font-size: clamp(56px, 3.5vw, 72px); }
}

/* ترجیح کاربر برای کاهش حرکت */
@media (prefers-reduced-motion: reduce) {
    .floating-badge, .hero-glow-orb, .hero-card-glow, .status-dot { animation: none; }
}