/* =========================
   1. تنظیمات پایه و متغیرها
========================= */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;300;400;700&display=swap');

:root {
    --primary: #007bff;
    --primary-dark: #0056b3;
    --accent: #00d4ff;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --text: #333;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* انیمیشن نرم و فنری */
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--white);
    color: var(--text);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* =========================
   2. هدر و نویگیشن (فیکس شده)
========================= */
.site-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px); /* افکت شیشه‌ای */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 10px 0;
}

.site-nav {
    display: flex;
    justify-content: space-between; /* فاصله حداکثری بین لوگو و منو */
    align-items: center;
    height: 60px;
}

.logo img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}
.logo img:hover { transform: rotate(-5deg) scale(1.1); } /* انیمیشن لوگو */

/* --- منوی دسکتاپ (انیمیشن جدید) --- */
.desktop-menu ul { display: flex; gap: 30px; }

.desktop-menu a {
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    padding: 5px 0;
}

/* خط متحرک زیر منو */
.desktop-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    right: 0;
    background: var(--primary);
    transition: width 0.3s ease;
}

.desktop-menu a:hover { color: var(--primary); }
.desktop-menu a:hover::after { width: 100%; }

/* --- دکمه همبرگری (پیش‌فرض مخفی) --- */
.menu-toggle {
    display: none; /* در دسکتاپ دیده نشود */
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1002;
}

.menu-toggle:hover span:nth-child(2) { transform: translateX(-5px); }

/* =========================
   3. بخش Hero (انیمیشن‌دار)
========================= */
/* =========================
   Hero دسکتاپ (همانند موبایل)
========================= */
.hero {
    min-height: 85vh;
    display: flex;
    flex-direction: row; /* متن چپ، تصویر راست */
    justify-content: space-between;
    align-items: center;
    padding: 80px 60px;
    background: radial-gradient(circle at center, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px; /* فاصله مناسب دسکتاپ */
    width: 100%;
}

.hero-content {
    flex: 1;
    text-align: left;
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* دکمه‌ها دسکتاپ */
.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    padding: 15px 40px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.hero-buttons .btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.5s ease;
    border-radius: 50%;
}

.hero-buttons .btn:hover::before {
    transform: scale(1);
}

.hero-buttons .btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #f9d423, #ff4e50);
}

/* تصویر هرو */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    animation: floatImage 4s ease-in-out infinite;
}

.hero-image img {
    max-width: 100%;
    border-radius: 20px;
    filter: drop-shadow(0 25px 60px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: translateY(-10px) scale(1.03);
}

/* المان‌های تزیینی پشت متن */
.floating-shape {
    position: absolute;
    background: linear-gradient(45deg, var(--accent), var(--primary));
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    z-index: 1;
}

.shape-1 { width: 350px; height: 350px; top: -150px; left: -120px; }
.shape-2 { width: 250px; height: 250px; bottom: -70px; right: 5%; }

/* انیمیشن‌ها */
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

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

/* ریسپانسیو دسکتاپ تا تبلت */
@media (max-width: 992px) {
    .hero-wrapper { flex-direction: column; gap: 40px; text-align: center; }
    .hero-content { text-align: center; }
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .hero-buttons { justify-content: center; }
    .hero-image img { max-width: 80%; }
}

/* موبایل */
@media (max-width: 768px) {
    .hero-wrapper {
        flex-direction: column !important;
        gap: 30px !important;
        align-items: center;
    }
    .hero-content { text-align: center !important; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; padding: 0 20px; }
    .hero-buttons { flex-direction: column; gap: 15px; align-items: center; }
    .hero-buttons .btn { width: 90% !important; max-width: 250px; }
    .hero-image { max-width: 280px !important; margin: 0 auto; border-radius: 20px; }
}

/* =========================
   4. خدمات و کارت‌ها (هاور ۳ بعدی)
========================= */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin: 80px 0 50px;
    color: var(--dark);
    position: relative;
}
/* خط کوچک زیر تیتر */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 10px auto;
    border-radius: 2px;
}

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

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid #eee;
    transition: var(--transition);
    position: relative;
    top: 0;
}

.service-card:hover {
    top: -10px; /* بالا آمدن کارت */
    box-shadow: 0 20px 40px rgba(0, 123, 255, 0.15);
    border-color: transparent;
}

.service-card h3 { margin: 20px 0 10px; color: var(--dark); }

/* =========================
   5. نمونه کارها (افکت زوم)
========================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding-bottom: 80px;
}

.project-item {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    height: 280px;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-overlay {
    position: absolute;
    inset: 0; /* تمام صفحه */
    background: rgba(0, 123, 255, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.4s ease;
}

.project-item:hover img { transform: scale(1.15) rotate(2deg); }
.project-item:hover .project-overlay { opacity: 1; transform: translateY(0); }

/* =========================
   6. فرم تماس (مدرن)
========================= */
.contact-form {
    max-width: 600px;
    margin: 0 auto 80px;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

input, textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #eee;
    border-radius: 10px;
    background: #fafafa;
    transition: 0.3s;
    font-family: inherit;
}

input:focus, textarea:focus {
    border-color: var(--primary);
    background: #fff;
    transform: scale(1.02);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
}
.submit-btn:hover { background: var(--primary-dark); letter-spacing: 1px; }

/* ==========================================
   7. سایدبار موبایل حرفه‌ای (اصلاح شده)
   ========================================== */

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -320px; /* شروع از بیرون صفحه */
    width: 300px;
    max-width: 85%;
    height: 100vh;
    background: #0f3460;
    color: #fff;
    z-index: 9999;
    padding: 100px 20px 40px 20px;
    transition: all 0.4s ease-in-out; /* این خط باعث می‌شود منو نرم برود بیرون */
   box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    overflow-y: auto;
    direction: rtl; /* جهت راست به چپ */
}

.mobile-sidebar.active {
    right: 0;
}

/* لایه تاریک پشت سایدبار */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* دکمه بستن (ضربدر) */
.close-btn {
    position: absolute;
    top: 25px;
    left: 25px; /* سمت چپ در سایت فارسی */
    font-size: 35px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.close-btn:hover {
    transform: rotate(90deg);
    color: #ff4e50;
}

/* کانتینر منوی وردپرس */
.mobile-menu-container ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 15px; /* فاصله بین دکمه‌ها */
    width: 100%;
}

.mobile-menu-container li {
    width: 100%;
    list-style: none !important;
}

/* انیمیشن ورود دکمه‌ها وقتی سایدبار باز می‌شود */
.mobile-sidebar.active .mobile-menu-container li {
    animation: slideIn 0.4s forwards;
}

.mobile-sidebar.active .mobile-menu-container li:nth-child(1) { animation-delay: 0.2s; }
.mobile-sidebar.active .mobile-menu-container li:nth-child(2) { animation-delay: 0.3s; }
.mobile-sidebar.active .mobile-menu-container li:nth-child(3) { animation-delay: 0.4s; }
.mobile-sidebar.active .mobile-menu-container li:nth-child(4) { animation-delay: 0.5s; }

/* استایل لینک‌ها (دکمه‌ها) */
.mobile-menu-container li a {
    display: block !important;
    width: 100%; /* گرفتن کل عرض */
    padding: 15px 20px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px;
    color: #fff !important;
    text-decoration: none !important;
    text-align: center; /* متن وسط باشد مثل تصویرت */
    box-sizing: border-box; /* برای اینکه پدینگ عرض را خراب نکند */
    transition: 0.3s;
}
.mobile-menu-container li a:hover {
    background: #ffda79 !important;
    color: #0f3460 !important;
}

/* آیکون همبرگری */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
}

.menu-toggle span {
    height: 3px;
    width: 100%;
    background: #333; /* رنگ در حالت عادی */
    border-radius: 3px;
    transition: 0.3s;
}
/* استایل مخصوص لوگوی داخل سایدبار */
.mobile-sidebar .sidebar-logo {
    display: flex;
    justify-content: center; /* وسط‌چین کردن لوگو */
    align-items: center;
    margin-bottom: 30px; /* فاصله از منوهای زیرین */
    padding: 10px;
    width: 100%;
}

.mobile-sidebar .sidebar-logo img {
    max-width: 140px; /* اندازه لوگو را اینجا کوچک یا بزرگ کنید */
    height: auto;
    object-fit: contain;
    /* اگر لوگوی اصلی رنگی است و می‌خواهید در سایدبار تیره، سفید شود: */
    filter: brightness(0) invert(1); 
}

/* تغییر رنگ همبرگری در هدر اگر پس‌زمینه تیره است، این را به سفید تغییر دهید */
.site-header.scrolled .menu-toggle span {
    background: #fff;
}

/* اسکرول بار زیبا برای سایدبار */
.mobile-sidebar::-webkit-scrollbar {
    width: 5px;
}
.mobile-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =========================
   8. مدیا کوئری (فیکس نهایی)
========================= */

/* تبلت */
@media (max-width: 992px) {
    .hero h1 { font-size: 2.8rem; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

/* موبایل */
@media (max-width: 768px) {
    .site-nav {
        /* نکته کلیدی: لوگو و دکمه در یک خط */
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
    }

    .desktop-menu { display: none !important; }
    .menu-toggle { display: flex !important; }

    /* اصلاح محتوا */
    .services-grid, .projects-grid { grid-template-columns: 1fr; gap: 20px; }
    .hero { min-height: 60vh; padding: 60px 20px; }
    .hero h1 { font-size: 2rem; }
    .contact-form { padding: 25px; }
}
@media (max-width: 768px) {
    .services-section, .portfolio-section {
        padding: 60px 0;
    }
    
    .service-card {
        padding: 30px 20px;
        margin: 0 10px;
    }

    .projects-grid {
        grid-template-columns: 1fr !important;
        padding: 0 25px;
    }
}
/* =========================
   9. کی‌فریم‌های انیمیشن
========================= */
@keyframes pulse-white {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    z-index: 5;
}

.hero-content {
    flex: 1;
    text-align: right;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    animation: float 4s ease-in-out infinite; /* انیمیشن شناور بودن عکس */
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.3));
}

/* دکمه دوم (شیشه‌ای) */
.btn-outline {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid var(--white) !important;
    color: var(--white) !important;
    margin-right: 15px;
    animation: none !important;
}

/* المان‌های تزیینی پشت متن */
.floating-shape {
    position: absolute;
    background: linear-gradient(45deg, var(--accent), var(--primary));
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    z-index: 1;
}

.shape-1 { width: 300px; height: 300px; top: -100px; left: -100px; }
.shape-2 { width: 200px; height: 200px; bottom: -50px; right: 10%; }

/* انیمیشن بالا و پایین رفتن عکس */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@media (max-width: 768px) {
    .hero {
        min-height: auto !important;
        padding: 60px 20px !important;
        background: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
        color: #fff;
        position: relative;
        overflow: hidden;
    }

    .hero-wrapper {
        flex-direction: column !important;
        gap: 30px !important;
        align-items: center;
    }

    .hero-content {
        text-align: center !important;
        order: 1;
        animation: fadeInUp 0.8s ease forwards;
        opacity: 0;
    }

    .hero-image {
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        order: 2;
        border-radius: 20px;
        box-shadow: 0 12px 25px rgba(0,0,0,0.5);
        animation: floatImage 3s ease-in-out infinite, fadeInUp 1s ease 0.3s forwards;
        opacity: 0;
    }

    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.4 !important;
        font-weight: 700;
        margin-bottom: 15px;
        color: #f5f5f5;
        text-shadow: 0 2px 6px rgba(0,0,0,0.5);
    }

    .hero p {
        font-size: 1rem !important;
        padding: 0 20px;
        color: #d1d1d1;
        line-height: 1.6;
        margin-bottom: 20px;
    }

.hero-buttons {
    display: flex !important;
    flex-direction: column !important; /* دکمه‌ها را زیر هم می‌چیند */
    align-items: center !important;    /* دکمه‌ها را در مرکز تراز می‌کند */
    gap: 15px !important;              /* فاصله بین دو دکمه */
    width: 100%;
    margin-top: 20px;
}

.hero-buttons .btn {
    width: 90% !important;             /* عرض دکمه‌ها در موبایل */
    max-width: 280px !important;
    margin: 0 auto !important;         /* حذف مارجین‌های مزاحم */
    display: block !important;
}
    .btn .btn-outline{
        margin-left: 100px;
    }

    .hero-buttons .btn::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
        transform: scale(0);
        transition: transform 0.5s ease;
        border-radius: 50%;
    }

    .hero-buttons .btn:hover::before {
        transform: scale(1);
    }

    .hero-buttons .btn:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.4);
        background: linear-gradient(135deg, #f9d423, #ff4e50);
    }

    /* انیمیشن متن */
    @keyframes fadeInUp {
        0% {
            transform: translateY(20px);
            opacity: 0;
        }
        100% {
            transform: translateY(0);
            opacity: 1;
        }
    }

    /* افکت شناور تصویر */
    @keyframes floatImage {
        0%, 100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(-10px);
        }
    }
}
/* فقط لینک‌های داخل سایدبار موبایل انیمیشن داشته باشند */
/* فقط لینک‌های داخل سایدبار موبایل انیمیشن ورود داشته باشند */
.mobile-sidebar .mobile-menu-container a {
    opacity: 0;
    transform: translateX(20px);
    animation: slideInSidebar 0.5s forwards;
}

/* اختصاصی کردن نام انیمیشن برای جلوگیری از تداخل */
@keyframes slideInSidebar {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* تاخیر برای هر لینک سایدبار */
.mobile-sidebar .mobile-menu-container a:nth-child(1) { animation-delay: 0.1s; }
.mobile-sidebar .mobile-menu-container a:nth-child(2) { animation-delay: 0.2s; }
.mobile-sidebar .mobile-menu-container a:nth-child(3) { animation-delay: 0.3s; }
.mobile-sidebar .mobile-menu-container a:nth-child(4) { animation-delay: 0.4s; }
/* سایدبار موبایل و هامبورگر فقط برای موبایل */
@media (min-width: 769px) {
    /* سایدبار کاملاً مخفی */
    .mobile-sidebar,
    .sidebar-overlay,
    .menu-toggle {
        display: none !important;
    }
}

/* نمایش سایدبار و هامبورگر فقط در موبایل */
@media (max-width: 768px) {
    .menu-toggle { display: flex !important; }
    .mobile-sidebar { display: block !important; }
    .sidebar-overlay { display: block; } /* وقتی فعال شود overlay دیده می‌شود */
}
/* دکمه‌های Hero دسکتاپ */
.hero-buttons .btn {
    padding: 15px 45px;      /* اندازه استاندارد */
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 50px;
    color: #fff;
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    animation: pulse-white 2s infinite; /* انیمیشن pulse */
}

/* افکت hover برای دسکتاپ */
.hero-buttons .btn:hover::before {
    transform: scale(1);
}

.hero-buttons .btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #f9d423, #ff4e50);
}

/* دکمه شیشه‌ای */
.hero-buttons .btn-outline {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid #fff !important;
    color: #fff !important;
    padding: 15px 45px;        /* هم‌اندازه با دکمه اصلی */
    border-radius: 50px;
    animation: pulse-white 2s infinite !important; /* انیمیشن pulse */
}

/* افکت hover برای دکمه شیشه‌ای */
.hero-buttons .btn-outline:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

/* نسخه موبایل: یکسان کردن دکمه‌ها */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .hero-buttons .btn,
    .hero-buttons .btn-outline {
        width: 90%;
        max-width: 250px;
        padding: 14px 0;
        font-size: 1rem;
    }
}
.hero {
    /* ... کدهای قبلی ... */
    background: linear-gradient(180deg, #1e3a8a 0%, #0f172a 100%); 
    margin-bottom: 0;
}

.portfolio-section {
    background: #0f172a; /* شروع دقیقاً از رنگ انتهای هیرو */
    padding-top: 50px;
}


/* ================================
   نمونه کار ها
================================ */

.portfolio-section {
    background-color: #0f2139  !important; /* رنگ ثابت برای یکپارچگی */
    margin-top: -1px;
    position: relative;
    padding-top: 40px !important;    /* فاصله از بالای نمونه کار کم شد */
    margin-top: -1px;
}
/* اضافه کردن یک خط جداکننده نرم بین هیرو و این بخش */
.portfolio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.section-title {
    color: #ffffff;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
    margin-bottom: 60px;
}

/* Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 35px;
    direction: rtl;
}

/* Card */
.project-card {
    position: relative;
    height: 340px;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05) !important; /* شیشه‌ای */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    transition: all 0.45s cubic-bezier(.4,0,.2,1);
}

/* Glow Layer */
.project-card::before {
    content: "";
    position: absolute;
    inset: 0;

    background: radial-gradient(
        circle at top right,
        rgba(0,123,255,0.25),
        transparent 60%
    );

    opacity: 0;
    z-index: 1;
    transition: 0.4s;
}

/* Hover Card */
.project-card:hover {
    transform: translateY(-14px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}
.project-card:hover::before {
    opacity: 1;
}

/* Thumbnail */
.project-thumb {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform 1s cubic-bezier(.4,0,.2,1);
}

.project-card:hover img {
    transform: scale(1.15) rotate(1deg);
}

/* Overlay */
.project-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;

    background: linear-gradient(
        to top,
        rgba(0,0,0,0.85),
        rgba(0,0,0,0.35),
        transparent 70%
    );

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    padding: 40px;

    opacity: 0;
    backdrop-filter: blur(2px);

    transition: all 0.45s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

/* Title */
.project-overlay h3 {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 600;

    margin-bottom: 15px;
    line-height: 1.4;

    transform: translateY(30px);
    opacity: 0;

    transition: all 0.45s ease 0.15s;
}

.project-card:hover h3 {
    transform: translateY(0);
    opacity: 1;
}

/* Button */
.view-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: #fff;
    text-decoration: none;

    background: linear-gradient(
        135deg,
        rgba(0,123,255,0.9),
        rgba(0,90,200,0.9)
    );

    padding: 10px 22px;
    border-radius: 50px;

    font-size: 0.9rem;
    font-weight: 500;

    box-shadow: 0 8px 18px rgba(0,123,255,0.35);

    transform: translateY(20px);
    opacity: 0;

    transition: all 0.4s ease 0.25s;
}

.project-card:hover .view-link {
    transform: translateY(0);
    opacity: 1;
}

.view-link:hover {
    background: linear-gradient(
        135deg,
        #0d6efd,
        #084298
    );
}

/* ================================
   Tablet
================================ */

@media (max-width: 992px) {

    .projects-grid {
        gap: 28px;
    }

    .project-card {
        height: 300px;
    }

    .project-overlay {
        padding: 30px;
    }
}



/* ================================
   Mobile (Sharp & Premium)
================================ */

@media (max-width: 768px) {

    .portfolio-section {
        padding: 60px 0;
        background: #0f172a !important;
    }
    .section-title {
    color: #ffffff; /* تیتر سفید بشه */
}
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 14px;
    }

    .project-card {
        height: 240px;
        border-radius: 16px;

        box-shadow: 0 10px 25px rgba(0,0,0,0.12);

        background: #000;
        overflow: hidden;
    }

    /* Keep image vivid */
    .project-thumb img {
        filter: contrast(1.05) saturate(1.15);
        transform: scale(1.04);

        transition: all 0.4s ease;
    }

    /* Tap zoom */
    .project-card:active img {
        transform: scale(1.1);
    }

    /* Light overlay (not dark) */
    .project-overlay {
        opacity: 1;

        background: linear-gradient(
            to top,
            rgba(0,0,0,0.45),
            rgba(0,0,0,0.05),
            transparent
        );

        padding: 20px;

        backdrop-filter: none;
    }

    .project-overlay h3 {
        font-size: 1.15rem;
        margin-bottom: 6px;

        color: #fff;
        text-shadow: 0 2px 8px rgba(0,0,0,0.4);

        transform: none;
        opacity: 1;
    }

    .view-link {
        font-size: 0.8rem;
        padding: 6px 14px;

        background: rgba(255,255,255,0.9);
        color: #000;

        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
        margin-bottom: 10px;
        transform: none;
        opacity: 1;
    }

    .view-link:hover {
        background: #fff;
        color: #000;
    }

}


/* --- بخش خدمات --- */
.services-section {
padding-top: 40px !important;    /* فاصله از بالای خدمات کم شد */
    padding-bottom: 40px !important; /* فاصله از پایین خدمات کم شد */
    margin-top: -1px;    background-color: #0f172a   !important; 
    margin-top: -1px; /* برای از بین بردن خط احتمالی سفید بین دو بخش */
    position: relative;
    
}

.services-section .section-title {
    color: #ffffff; /* تیتر حتماً سفید باشد */
    text-align: center;
    margin-bottom: 60px;
    font-size: 2.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* کارت‌های خدمات با افکت شیشه‌ای (Glassmorphism) */
.service-card {
    /* یک لایه بسیار شفاف سفید روی پس‌زمینه تیره */
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 50px 30px;
    border-radius: 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(15px); /* مات کردن پشت کارت برای حس شیشه‌ای */
}

.service-card:hover {
    transform: translateY(-15px);
    background: rgba(255, 255, 255, 0.07);
    /* استفاده از رنگ دکمه‌های هیرو برای حاشیه هنگام هاور */
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

/* آیکون‌ها با رنگ گرادینت مشابه دکمه‌های هیرو */
.service-icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.service-card h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.6rem;
}

.service-card p {
    color: rgba(255, 255, 255, 0.6); /* متن توضیحات کمی کمرنگ‌تر برای خوانایی بهتر */
    line-height: 1.8;
}
@media (max-width: 768px) {
    .services-section, 
    .portfolio-section {
        padding-top: 30px !important;
        padding-bottom: 30px !important;
    }
    
    .hero {
        padding-bottom: 20px !important;
    }
}
/* --- بخش تماس با من --- */
.contact-section {
    padding: 60px 0; /* پدینگ کم برای نزدیکی به بخش قبلی */
    background-color: #0f172a !important;
    position: relative;
    margin-top: -1px;
}

.contact-wrapper {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    padding: 0 20px;
}

/* بخش اطلاعات سمت راست */
.contact-info {
    flex: 1;
    color: #fff;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}
.info-item i {
    color: #ff4e50;
    font-size: 1.4rem;
}

/* فرم سمت چپ */
.contact-form-container {
    flex: 1.2;
    background: rgba(255, 255, 255, 0.03);
    padding: 40px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
}

.input-group { margin-bottom: 20px; }

.modern-form input, 
.modern-form textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    transition: 0.3s;
}

.modern-form input:focus, 
.modern-form textarea:focus {
    border-color: #bdbdbd;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.submit-btn {
    width: 100%;
    border-radius: 12px !important;
    padding: 15px !important;
    font-size: 1.1rem !important;
}

/* ریسپانسیو موبایل */
@media (max-width: 768px) {
    .contact-wrapper {
        flex-direction: column;
        gap: 40px;
    }
    
    .contact-info { text-align: center; }
    .info-item { justify-content: center; }
    
    .contact-form-container {
        padding: 25px;
        width: 100%;
    }
}
.info-text {
    display: flex;
    flex-direction: column; /* چیدمان زیر هم */
    align-items: flex-start;
}

.family-name {
    font-size: 0.9rem;
    color: #ff4e50; /* همان رنگ قرمز گرم دکمه‌ها */
    margin-top: 2px;
    font-weight: 300;
    letter-spacing: 1px;
}

/* در حالت موبایل وسط‌چین شود */
@media (max-width: 768px) {
    .info-text {
        align-items: center;
    }
}
.social-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-item i {
    font-size: 1.6rem;
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s ease;
}

.social-item:hover {
    color: #fff !important;
    transform: translateX(-10px); /* حرکت ظریف به سمت چپ در هاور */
}

.social-item:hover i {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(255, 78, 80, 0.6));
}

/* اصلاح چیدمان در موبایل */
@media (max-width: 768px) {
    .social-links {
        align-items: center;
    }
    .social-item:hover {
        transform: translateY(-5px); /* در موبایل به سمت بالا حرکت کند */
    }
}
/* ظرف کلی */
.social-wrapper {
    margin-top: 25px;
}

.social-title {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.social-icons-box {
    display: flex;
    gap: 15px;
}

/* استایل آیکون‌های دایره‌ای */
.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%; /* کاملاً دایره‌ای */
    color: #fff !important;
    font-size: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* افکت هاور اینستاگرام */
.social-icon.insta:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    border-color: transparent;
    transform: translateY(-5px) rotate(10deg);
    box-shadow: 0 10px 20px rgba(214, 36, 159, 0.4);
}

/* افکت هاور تلگرام */
.social-icon.tele:hover {
    background: #0088cc;
    border-color: transparent;
    transform: translateY(-5px) rotate(-10deg);
    box-shadow: 0 10px 20px rgba(0, 136, 204, 0.4);
}

/* ریسپانسیو موبایل */
@media (max-width: 768px) {
    .social-icons-box { justify-content: center; }
    .social-wrapper { text-align: center; }
}

/* قوتر */
/* --- استایل فوتر --- */
.site-footer {
    background-color: #0f172a; /* همان رنگ اصلی پس‌زمینه سایت */
    padding: 50px 0 30px;
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* یک مرز بسیار ظریف در بالا */
    position: relative;
}

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

.footer-brand .footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #ff4e50, #f9d423);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    margin-bottom: 10px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    max-width: 300px;
}

/* خط درخشان وسط فوتر */
.footer-divider {
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 78, 80, 0.3), transparent);
    margin: 30px 0;
}

.footer-bottom {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #f9d423;
}

/* ریسپانسیو فوتر */
@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-links {
        order: -1; /* لینک‌ها بالای متن کپی‌رایت بیایند */
    }
}
/* تضمین کلیک خور بودن دکمه */
#mobile-menu-btn {
    position: relative; /* یا fixed اگر هدر ثابت است */
    z-index: 10001 !important; /* عددی بالاتر از سایدبار و اورلی */
    cursor: pointer;
}

/* مطمئن شویم خود دکمه عرض و ارتفاع دارد */
.menu-toggle {
    display: flex;
    width: 40px; /* اگر قبلا کم بود */
    height: 40px;
    justify-content: center; /* وسط چین */
    align-items: center;
}

.project-card { position: relative; overflow: hidden; border-radius: 15px; }
.project-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 52, 96, 0.8);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; transition: 0.4s;
}
.project-card:hover .project-overlay { opacity: 1; }

.view-link {
    background: #ffda79; color: #0f3460; padding: 10px 25px;
    border-radius: 50px; text-decoration: none; font-weight: bold;
    z-index: 10; /* برای اطمینان از کلیک شدن */
    position: relative;
}
/* ===============================
   Portfolio Page
================================ */

.portfolio-page {
    background: #0f172a;
    color: #fff;
    direction: rtl;
    min-height: 100vh;
}


/* Container */

.container {
    max-width: 1300px;
    margin: auto;
    padding: 0 20px;
}


/* ===============================
   Hero
================================ */

.portfolio-hero {
    padding: 140px 0 80px;
    text-align: center;
}

.portfolio-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: #ffda79;
}

.portfolio-excerpt {
    max-width: 700px;
    margin: 20px auto 0;
    color: #ccc;
    line-height: 1.7;
}


/* ===============================
   Content Grid
================================ */

.portfolio-content {
    padding: 80px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
}


/* ===============================
   Info
================================ */

.portfolio-info {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.info-box {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 30px;
}

.info-box h3 {
    color: #ffda79;
    margin-bottom: 20px;
}

.info-text {
    line-height: 1.9;
    color: #ddd;
}


/* ===============================
   Gallery
================================ */

.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
    gap: 25px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 16px;
    background: #111;
    transition: 0.4s;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.08);
}


/* ===============================
   Footer
================================ */

.portfolio-footer {
    padding: 60px 0 100px;
    text-align: center;
}

.btn-back {
    display: inline-block;
    padding: 14px 40px;
    border-radius: 50px;
    border: 2px solid #ffda79;
    color: #ffda79;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.btn-back:hover {
    background: #ffda79;
    color: #0f172a;
}


/* ===============================
   Responsive
================================ */

@media (max-width: 900px) {

    .content-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-info {
        position: relative;
        top: 0;
    }

}

/* افقی کردن منو و جابجایی به سمت چپ */
.site-nav {
    display: flex;
    justify-content: space-between; /* لوگو سمت راست، منو سمت چپ */
    align-items: center;
}

.desktop-menu ul {
    display: flex !important;
    list-style: none;
    gap: 20px;
    margin: 0;
}

.desktop-menu ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}
/* اصلاح اولویت نمایش: سایدبار باید روی همه چیز باشد */
.mobile-sidebar {
    z-index: 99999 !important; /* بالاترین اولویت */
    background-color: #0f3460; /* رنگ پس‌زمینه منو (سرمه‌ای) */
}

/* لایه تاریک باید زیر سایدبار باشد */
.sidebar-overlay {
    z-index: 9998 !important; /* یک پله پایین‌تر از سایدبار */
    background: rgba(0, 0, 0, 0.7); /* سیاهی پشت */
    backdrop-filter: blur(5px); /* افکت بلور شدن صفحه اصلی */
}