/* ═══════════════════════════════════════════════════════════════ */
/* ریست و پایه */
/* ═══════════════════════════════════════════════════════════════ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Vazir, Tahoma, sans-serif;
    direction: rtl;
    color: #1a1a1a;
    line-height: 1.7;
    overflow-x: hidden;
    background: #faf5ff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════ */
/* کانتینر */
/* ═══════════════════════════════════════════════════════════════ */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

/* ═══════════════════════════════════════════════════════════════ */
/* هدر - منظم و تمام عرض */
/* ═══════════════════════════════════════════════════════════════ */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
    flex-wrap: nowrap;
}

/* لوگو */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    flex-shrink: 0;
}

.logo-text {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

/* منو - مرتب و یکنواخت */
.nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    margin: 0 15px;
}

.nav a {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    transition: 0.3s;
    color: #475569;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav a:hover {
    background: #f1f5f9;
    color: #7c3aed;
}

/* دکمه پنل کاربری */
.nav a[href*="user-panel"] {
    background: #e0f2fe;
    color: #0369a1;
}
.nav a[href*="user-panel"]:hover {
    background: #bae6fd;
    color: #075985;
}

/* دکمه خروج */
.nav a[href*="logout"] {
    background: #fee2e2;
    color: #b91c1c;
}
.nav a[href*="logout"]:hover {
    background: #fecaca;
    color: #991b1b;
}

/* دکمه ورود */
.nav a[href*="login"] {
    background: #dbeafe;
    color: #1e40af;
}
.nav a[href*="login"]:hover {
    background: #bfdbfe;
    color: #1e3a8a;
}

/* دکمه تماس */
.nav-cta {
    background: linear-gradient(135deg, #7c3aed, #ec4899) !important;
    color: #fff !important;
    padding: 10px 20px !important;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
    flex-shrink: 0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13.5px;
    white-space: nowrap;
    transition: 0.3s;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
    background: linear-gradient(135deg, #6d28d9, #db2777) !important;
    color: #fff !important;
}

/* منوی موبایل */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #7c3aed;
    border-radius: 2px;
    transition: 0.3s;
}

/* ═══════════════════════════════════════════════════════════════ */
/* هیرو */
/* ═══════════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    padding: 80px 0 100px;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(124, 58, 237, 0.15), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.1), transparent 70%);
    z-index: 0;
    animation: heroGlow 10s infinite alternate;
}

@keyframes heroGlow {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(2deg); }
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-content {
    animation: fadeInUp 0.8s ease;
}

.badge {
    display: inline-block;
    background: #fff;
    color: #7c3aed;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.15);
}

.hero h1 {
    font-size: 52px;
    line-height: 1.3;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 25px;
}

.gradient-text {
    background: linear-gradient(135deg, #7c3aed, #ec4899, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s infinite alternate;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.hero-desc {
    font-size: 18px;
    color: #64748b;
    line-height: 1.9;
    margin-bottom: 35px;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 45px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: #fff;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.4);
}

.btn-ghost {
    background: #fff;
    color: #7c3aed;
    border: 2px solid rgba(124, 58, 237, 0.2);
}

.btn-ghost:hover {
    background: #faf5ff;
    border-color: #7c3aed;
    transform: translateY(-3px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: #fff;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.hero-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-stats > div {
    text-align: right;
}

.hero-stats strong {
    display: block;
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 5px;
}

.hero-stats span {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-wrap {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    padding: 8px;
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 30px 80px rgba(124, 58, 237, 0.4);
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 180px;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════ */
/* بخش‌ها */
/* ═══════════════════════════════════════════════════════════════ */
.section {
    padding: 90px 0;
    position: relative;
    width: 100%;
}

.section-alt {
    background: #fff;
}

.section-head {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-tag {
    display: inline-block;
    background: #faf5ff;
    color: #7c3aed;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 15px;
    border: 1px solid rgba(124, 58, 237, 0.15);
}

.section-head h2 {
    font-size: 40px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 15px;
    line-height: 1.4;
}

.section-head p {
    font-size: 17px;
    color: #64748b;
}

/* ═══════════════════════════════════════════════════════════════ */
/* گرید */
/* ═══════════════════════════════════════════════════════════════ */
.grid {
    display: grid;
    gap: 25px;
    width: 100%;
}

.grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

@media (min-width: 1400px) {
    .grid-3 { grid-template-columns: repeat(4, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 600px) and (max-width: 1199px) {
    .grid-3, .grid-4, .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 599px) {
    .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════ */
/* کارت‌ها */
/* ═══════════════════════════════════════════════════════════════ */
.card {
    background: #fff;
    border-radius: 20px;
    padding: 35px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: 0.4s;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    display: block;
    color: inherit;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #7c3aed, #ec4899, #06b6d4);
    transform: scaleX(0);
    transform-origin: right;
    transition: 0.4s;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.1);
}

/* خدمات */
.service-card {
    text-align: center;
}

.service-card .icon {
    font-size: 64px;
    margin-bottom: 20px;
    display: inline-block;
    transition: 0.4s;
}

.service-card:hover .icon {
    transform: scale(1.2) rotate(-5deg);
}

.service-card h3 {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}

.service-card p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.8;
}

/* نمونه‌کارها */
.portfolio-card {
    padding: 0;
    overflow: hidden;
}

.portfolio-thumb {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: #fff;
    transition: 0.5s;
    position: relative;
    overflow: hidden;
}

.portfolio-card:hover .portfolio-thumb {
    transform: scale(1.05);
}

.portfolio-body {
    padding: 25px;
}

.portfolio-body h3 {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}

.portfolio-body p {
    font-size: 14.5px;
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portfolio-link {
    color: #7c3aed;
    font-weight: 700;
    font-size: 14px;
    transition: 0.3s;
}

.portfolio-card:hover .portfolio-link {
    padding-right: 8px;
}

/* مهارت‌ها */
.skills-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.skill-chip {
    display: inline-block;
    background: #fff;
    color: #7c3aed;
    padding: 12px 26px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    border: 2px solid rgba(124, 58, 237, 0.15);
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.08);
}

.skill-chip:hover {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: #fff;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.3);
    border-color: transparent;
}

/* نظرات */
.testimonial-card {
    position: relative;
    padding-top: 50px;
}

.testimonial-card .quote {
    position: absolute;
    top: 15px;
    right: 30px;
    font-size: 100px;
    font-family: Georgia, serif;
    color: rgba(124, 58, 237, 0.15);
    line-height: 1;
}

.testimonial-card p {
    font-size: 15px;
    color: #475569;
    line-height: 1.9;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
}

.avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.testimonial-author strong {
    display: block;
    font-size: 15px;
    color: #0f172a;
    font-weight: 800;
    margin-bottom: 3px;
}

.testimonial-author span {
    font-size: 13px;
    color: #64748b;
}

/* سؤالات متداول */
.faq-wrap {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: 0.3s;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.faq-item:hover {
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.1);
}

.faq-item[open] {
    border-color: #7c3aed;
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.15);
}

.faq-item summary {
    padding: 22px 28px;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-left: 55px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: '+';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    transition: 0.3s;
    line-height: 1;
    padding-top: 2px;
}

.faq-item[open] summary::before {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}

.faq-item p {
    padding: 20px 28px 25px;
    font-size: 15px;
    color: #475569;
    line-height: 1.9;
    border-top: 1px dashed #e2e8f0;
}

/* تماس */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    width: 100%;
}

.contact-card {
    text-align: center;
    padding: 30px 25px;
}

.contact-card .icon {
    font-size: 42px;
    margin-bottom: 15px;
    display: inline-block;
}

.contact-card h3 {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.contact-card p {
    font-size: 14px;
    color: #64748b;
    direction: ltr;
    word-break: break-all;
}

/* فوتر */
.footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 50px 0 20px;
    margin-top: 60px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* موبایل */
/* ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { order: -1; }
    
    .profile-wrap { width: 300px; height: 300px; }
    .profile-img { font-size: 140px; }
    .hero h1 { font-size: 40px; }
    .section-head h2 { font-size: 32px; }
}

@media (max-width: 768px) {
    .container { padding: 0 15px; }
    
    .header { padding: 10px 0; }
    .header-inner { gap: 10px; }
    
    .logo { font-size: 17px; }
    
    .menu-toggle { display: flex; }
    
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: #fff;
        flex-direction: column;
        padding: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        gap: 8px;
        margin: 0;
        border-radius: 0 0 15px 15px;
    }
    
    .nav.active { display: flex; }
    
    .nav a {
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: 14px;
    }
    
    .nav-cta {
        display: none;
    }
    
    .hero { padding: 40px 0 60px; min-height: auto; }
    .hero h1 { font-size: 30px; }
    .hero-desc { font-size: 15px; }
    .hero-stats strong { font-size: 28px; }
    
    .profile-wrap { width: 220px; height: 220px; }
    .profile-img { font-size: 100px; }
    
    .section { padding: 60px 0; }
    .section-head h2 { font-size: 26px; }
    .section-head p { font-size: 14px; }
    
    .card { padding: 25px 20px; }
    
    .btn { padding: 12px 24px; font-size: 14px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 24px; }
    .profile-wrap { width: 180px; height: 180px; }
    .profile-img { font-size: 80px; }
    .section-head h2 { font-size: 22px; }
    .avatar { width: 45px; height: 45px; font-size: 18px; }
}

/* اسکرول‌بار */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #6d28d9, #db2777);
}