/* -----------------------------------------------------------
   1. Design Tokens (متغیرهای رنگ و فونت)
----------------------------------------------------------- */
:root {
    /* رنگ‌های سازمانی: آبی سلطنتی + طلایی مات */
    --primary: #1e3a8a;
    /* آبی سرمه‌ای */
    --primary-light: #3b82f6;
    /* آبی روشن‌تر برای دکمه‌ها */
    --secondary: #d97706;
    /* طلایی/نارنجی */
    --dark: #0f172a;
    /* مشکی مایل به آبی */
    --light: #f8fafc;
    /* پس‌زمینه خیلی روشن */
    --white: #ffffff;
    --gray: #64748b;

    /* سایه‌ها */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* ابعاد */
    --radius: 12px;
    --container: 1150px;
    --header-height: 80px;
}

/* ریست و تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--white);
    color: var(--dark);
    line-height: 1.8;
    overflow-x: hidden;
    padding-bottom: 80px;
    /* فضا برای نویگیشن موبایل */
}

/* حذف فضای پایین در دسکتاپ */
@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

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

/* کلاس‌های عمومی */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.bg-light {
    background-color: var(--light);
}

.bg-dark {
    background-color: var(--dark);
}

.text-white {
    color: var(--white);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* -----------------------------------------------------------
   2. نویگیشن دسکتاپ (Sticky Header)
----------------------------------------------------------- */
.desktop-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    display: none;
    /* در موبایل مخفی */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-area {
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-symbol {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text .highlight {
    color: var(--primary-light);
}

.desktop-nav ul {
    display: flex;
    gap: 30px;
}

.desktop-nav a {
    font-weight: 500;
    color: var(--gray);
    font-size: 0.95rem;
    position: relative;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--primary);
}

/* خط زیر لینک فعال */
.desktop-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary);
}

.header-btn {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.header-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

@media (min-width: 992px) {
    .desktop-header {
        display: block;
    }
}

/* -----------------------------------------------------------
   3. نویگیشن موبایل (Bottom App Bar)
----------------------------------------------------------- */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
}

.m-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    color: var(--gray);
    gap: 4px;
}

.m-nav-item i {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.m-nav-item.active {
    color: var(--primary);
    font-weight: 700;
}

@media (min-width: 992px) {
    .mobile-nav {
        display: none;
    }
}

/* -----------------------------------------------------------
   4. دکمه‌ها و المان‌ها
----------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    transition: 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--dark);
}

.section {
    padding: 80px 0;
}

.section-subtitle {
    display: block;
    color: var(--secondary);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 50px;
    color: var(--dark);
}

/* -----------------------------------------------------------
   5. Hero Section
----------------------------------------------------------- */
.hero-section {
    padding-top: 140px;
    /* فاصله از بالا برای هدر */
    padding-bottom: 80px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #dcfce7;
    color: #166534;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.pulse {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse 2s infinite;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 30px;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 30px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--dark);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: #e2e8f0;
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.image-wrapper {
    position: relative;
    width: 400px;
    height: 450px;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: var(--shadow-hover);
    z-index: 1;
    position: relative;
}

/* کارت‌های شناور */
.visual-card {
    position: absolute;
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
    font-size: 0.9rem;
}

.card-flutter {
    top: 40px;
    left: -30px;
    color: #02569b;
}

.card-web {
    bottom: 60px;
    right: -30px;
    color: #e34c26;
}

/* -----------------------------------------------------------
   6. Services Cards
----------------------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--radius);
    border: 1px solid #f1f5f9;
    transition: 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.srv-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 25px;
}

.bg-blue-light {
    background: #dbeafe;
}

.text-blue {
    color: #2563eb;
}

.bg-gold-light {
    background: #fef3c7;
}

.text-gold {
    color: #d97706;
}

.bg-purple-light {
    background: #f3e8ff;
}

.text-purple {
    color: #9333ea;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--gray);
    margin-bottom: 20px;
}

.srv-list li {
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
}

.srv-list i {
    color: #16a34a;
}

/* -----------------------------------------------------------
   7. Process Steps
----------------------------------------------------------- */
.process-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 60px;
}

.step {
    text-align: center;
    flex: 1;
    padding: 0 15px;
}

.step-number {
    font-size: 3rem;
    font-weight: 900;
    color: #e2e8f0;
    line-height: 1;
    margin-bottom: 10px;
}

.step h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.step p {
    font-size: 0.9rem;
    color: var(--gray);
}

.step-line {
    width: 100px;
    height: 2px;
    background: #e2e8f0;
    margin-top: 40px;
}

/* -----------------------------------------------------------
   8. Portfolio
----------------------------------------------------------- */
.space-between {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 50px;
}

.space-between .section-title {
    margin-bottom: 0;
}

.btn-text {
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.portfolio-item {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: 0.3s;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.port-media {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.port-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.port-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 138, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

.portfolio-item:hover .port-overlay {
    opacity: 1;
}

.port-btn {
    background: white;
    color: var(--primary);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
}

.port-info {
    padding: 25px;
}

.port-cat {
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.port-info h3 {
    font-size: 1.1rem;
}

/* -----------------------------------------------------------
   9. Resume & Skills
----------------------------------------------------------- */
.resume-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.col-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
}

.tl-card {
    border-right: 2px solid #e2e8f0;
    padding-right: 25px;
    position: relative;
    padding-bottom: 40px;
}

.tl-card::before {
    content: '';
    position: absolute;
    right: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--secondary);
    border-radius: 50%;
}

.tl-year {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.85rem;
}

.tl-loc {
    display: block;
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 10px;
}

.tl-card p {
    font-size: 0.9rem;
    color: var(--dark);
}

.skill-group {
    margin-bottom: 40px;
}

.skill-group h5 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.skill-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.skill-row>span {
    width: 30%;
}

.progress {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.bar {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-cloud span {
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray);
}

/* -----------------------------------------------------------
   10. Contact & Footer
----------------------------------------------------------- */
.cta-box {
    background: var(--primary);
    border-radius: 20px;
    padding: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.cta-text h2 {
    color: white;
    margin-bottom: 10px;
    font-size: 2rem;
}

.cta-text p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
}

.cta-actions {
    display: flex;
    gap: 15px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--secondary);
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* -----------------------------------------------------------
   11. Responsive Design
----------------------------------------------------------- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .image-wrapper {
        width: 300px;
        height: 350px;
        margin: 0 auto;
    }

    .services-grid,
    .portfolio-grid,
    .resume-wrapper {
        grid-template-columns: 1fr;
    }

    .process-steps {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .step-line {
        display: none;
    }

    .cta-box {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        padding: 40px 20px;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-large {
        width: 100%;
        justify-content: center;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}