/* ==================== فونت و متغیرها ==================== */
@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

:root {
    --bg: #0a0612;
    --bg-2: #0f0a1a;
    --card: #1a1228;
    --card-2: #221530;
    --border: rgba(139, 92, 246, 0.15);
    --text: #ffffff;
    --text-2: #b8b3c7;
    --text-3: #6b6480;
    --purple: #8b5cf6;
    --purple-light: #a855f7;
    --purple-dark: #6d28d9;
    --blue: #3b82f6;
    --pink: #c084fc;
    --grad: linear-gradient(135deg, #a855f7 0%, #8b5cf6 50%, #3b82f6 100%);
    --grad-btn: linear-gradient(90deg, #6d28d9 0%, #8b5cf6 50%, #3b82f6 100%);
    --radius: 16px;
    --radius-lg: 24px;
    --transition: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    direction: ltr;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 #0a0612;
    overflow-x: hidden;
    /* stable باعث ایجاد نوار خالی در لبه راست می‌شد - حذف شد */
}
html::-webkit-scrollbar { width: 8px; height: 8px; }
html::-webkit-scrollbar-track { background: #0a0612; }
html::-webkit-scrollbar-thumb { background: #8b5cf6; border-radius: 8px; }
html::-webkit-scrollbar-thumb:hover { background: #a855f7; }

body {
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at top, rgba(139, 92, 246, 0.15), transparent 60%),
        radial-gradient(ellipse at bottom, rgba(59, 130, 246, 0.08), transparent 60%);
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 #0a0612;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }

button, a, input, textarea, select, .filter-btn, .social-link, .portfolio-card, .team-card {
    -webkit-tap-highlight-color: transparent;
}

button:focus, a:focus, input:focus, textarea:focus, select:focus {
    outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid rgba(168, 85, 247, .75);
    outline-offset: 3px;
}

/* جلوگیری از سرریز افقی محتوا در همه دستگاه‌ها */
h1, h2, h3, h4, p, span, a, li {
    overflow-wrap: break-word;
    word-break: break-word;
}

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

section {
    padding: 90px 0;
}

/* ==================== هدر - لوگو سمت چپ ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 6, 18, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    direction: ltr;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    direction: ltr;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    overflow: hidden;
    flex-shrink: 0;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-name {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 1px;
    color: var(--text);
}

.logo-sub {
    font-size: 11px;
    color: var(--text-2);
    letter-spacing: 3px;
    text-align: left;
}

.nav {
    display: flex;
    gap: 35px;
    direction: rtl;
}

.nav-link {
    color: var(--text-2);
    font-size: 15px;
    font-weight: 400;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover { color: var(--text); }

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--grad);
    transition: var(--transition);
}

.nav-link:hover::after { width: 100%; }

.menu-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: none;
    border: none;
    padding: 0;
    flex-shrink: 0;
    z-index: 6;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .28s ease, opacity .2s ease;
}

/* انیمیشن تبدیل به ضربدر */
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* اورلی تیره پشت منوی موبایل - باید زیر هدر باشد تا منو محو نشود */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 3, 12, .72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    z-index: 90;
}
.nav-overlay.show { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }

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

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.25), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.2), transparent 50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 30px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 12px var(--purple);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.hero-title {
    font-size: clamp(80px, 15vw, 160px);
    font-weight: 900;
    background: linear-gradient(180deg, #ffffff 0%, #c8b0ff 60%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.35;
    padding-bottom: 18px;
    margin-bottom: 0;
    display: block;
    overflow: visible;
}

.hero-subtitle {
    font-size: 22px;
    color: var(--text-2);
    margin-bottom: 50px;
    font-weight: 400;
    margin-top: -12px;
}

/* === لوگوی اصلی - نمایش خاص بدون کادر مات === */
.logo-hero-wrap {
    position: relative;
    width: fit-content;
    margin: 0 auto 65px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-hero-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(168,85,247,0.55) 0%, rgba(139,92,246,0.25) 35%, transparent 75%);
    filter: blur(35px);
    z-index: 0;
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

.logo-hero-glow-2 {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59,130,246,0.4) 0%, transparent 70%);
    filter: blur(30px);
    z-index: 0;
    bottom: -30px;
    right: -20px;
    pointer-events: none;
}

@keyframes glowPulse {
    0%,100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.08); opacity: 1; }
}

.logo-hero-img {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    height: auto;
    border-radius: 28px;
    border: 1px solid rgba(168,85,247,0.3);
    box-shadow:
        0 0 0 1px rgba(139,92,246,0.15),
        0 20px 80px rgba(139,92,246,0.35),
        0 0 100px rgba(139,92,246,0.25),
        0 0 140px rgba(59,130,246,0.15);
    animation: floatLogo 6s ease-in-out infinite;
    transition: var(--transition);
    background: #0a0a0f;
}

.logo-hero-img:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow:
        0 0 0 1px rgba(168,85,247,0.4),
        0 30px 90px rgba(139,92,246,0.5),
        0 0 120px rgba(139,92,246,0.35);
}

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

/* تگ‌لاین */
.hero-tagline {
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--text);
}

.hero-text {
    font-size: 15px;
    color: var(--text-2);
    margin-bottom: 40px;
    line-height: 2;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    direction: ltr;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    transition: var(--transition);
    border: 1px solid transparent;
    text-align: center;
    min-width: 180px;
}

.btn-primary {
    background: var(--grad-btn);
    color: white;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    order: 1;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    order: 2;
}

.btn-secondary:hover {
    background: var(--card-2);
    border-color: var(--purple);
    transform: translateY(-3px);
}

/* ==================== عناوین بخش ==================== */
.section-tag {
    display: inline-block;
    padding: 6px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-2);
    font-size: 13px;
    width: fit-content;
    margin: 0 auto 15px;
    display: block;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 900;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text);
}

.section-subtitle {
    text-align: center;
    color: var(--text-2);
    font-size: 15px;
    margin-bottom: 10px;
}

.section-line {
    width: 60px;
    height: 3px;
    background: var(--grad);
    margin: 20px auto 50px;
    border-radius: 2px;
}

.section-line.center { margin-bottom: 50px; }

/* ==================== خدمات ==================== */
.services-list {
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.service-item {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 26px;
    align-items: start;
    padding: 0 0 24px;
    border-bottom: 1px solid var(--border);
}

.service-item:last-child { border-bottom: none; }

.service-item h3 {
    font-size: 19px;
    font-weight: 800;
    color: var(--text);
}

.service-item p {
    color: var(--text-2);
    font-size: 15px;
    line-height: 2;
}

/* ==================== نمونه کارها ==================== */
.portfolio-filter {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
    direction: rtl;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text-2);
    border-radius: 50px;
    font-size: 14px;
    transition: var(--transition);
}

.filter-btn:hover {
    color: var(--text);
    border-color: var(--purple);
}

.filter-btn.active {
    background: var(--grad-btn);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 25px;
    width: 100%;
    max-width: 100%;
}

.portfolio-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: none;
}

.portfolio-card.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.portfolio-card:hover {
    transform: translateY(-5px);
    border-color: var(--purple);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

.portfolio-image-wrap {
    position: relative;
    overflow: hidden;
}

.portfolio-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.portfolio-tag-card {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-size: 12px;
    z-index: 2;
}

.portfolio-tech-badge {
    position: absolute;
    bottom: 15px;
    left: 15px;
    padding: 7px 14px;
    background: rgba(10, 6, 18, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(168,85,247,0.3);
    border-radius: 50px;
    color: var(--text-2);
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 7px;
    letter-spacing: 0.3px;
    direction: ltr;
    z-index: 2;
}

.tech-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--purple-light);
    box-shadow: 0 0 8px var(--purple-light);
    flex-shrink: 0;
}

.portfolio-content {
    padding: 20px;
}

.portfolio-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
    text-align: right;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.portfolio-desc {
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 15px;
    text-align: right;
    line-height: 1.7;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* نوار اسکرین‌شات‌ها روی کارت - سبک Google Play */
.card-shots {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 14px;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-overflow-scrolling: touch;
}
.card-shots.dragging { cursor: grabbing; }
.card-shots::-webkit-scrollbar { display: none; }
.card-shots img { -webkit-user-drag: none; }
.card-shot {
    flex: 0 0 auto;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-2);
    display: block;
}
.card-shot.desktop { width: 112px; aspect-ratio: 16/9; }
.card-shot.mobile  { width: 54px;  aspect-ratio: 9/16; }
.card-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-size: 13px;
    transition: var(--transition);
}

.portfolio-link:hover {
    background: var(--grad-btn);
    border-color: transparent;
}

/* ==================== اعضای تیم ==================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 25px;
    margin-top: 50px;
    width: 100%;
    max-width: 100%;
}

.team-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 35px 25px;
    text-align: center;
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-5px);
    border-color: var(--purple);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

.team-card.highlight {
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px rgba(168,85,247,0.2), 0 20px 50px rgba(139,92,246,0.4);
    transform: translateY(-5px) scale(1.02);
}

.team-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 20px;
    padding: 3px;
    background: var(--grad);
    position: relative;
}

.team-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--card);
}

.team-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 900;
    color: var(--purple-light);
}

.team-name {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 4px;
}

.team-role {
    font-size: 14px;
    color: var(--purple-light);
    font-weight: 500;
    margin-bottom: 12px;
}

.team-bio {
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 20px;
    line-height: 1.8;
    min-height: 45px;
}

.team-socials {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.social-link {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-2);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--grad-btn);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
}

.social-link svg { width: 18px; height: 18px; }

/* ==================== ارتباط با ما ==================== */
.contact-box {
    max-width: 800px;
    margin: 50px auto 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
}

.contact-text {
    font-size: 15px;
    color: var(--text-2);
    margin-bottom: 25px;
}

.contact-members {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-member-btn {
    padding: 10px 22px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.contact-member-btn:hover {
    background: var(--grad-btn);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139,92,246,0.3);
}

/* ==================== فوتر ==================== */
.footer {
    border-top: 1px solid var(--border);
    padding: 50px 0 30px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    direction: ltr;
}

.footer-logo {
    width: 44px;
    height: 44px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    overflow: hidden;
}

.footer-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.footer-name {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 2px;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-copy {
    color: var(--text-2);
    font-size: 13px;
}

/* ==================== آیکون روبیکا - لوگوی اصلی رسمی به صورت سیاه سفید ==================== */
.rubika-icon {
    width: 24px;
    height: 24px;
    display: block;
    border-radius: 4px;
    transition: var(--transition);
    flex-shrink: 0;
    object-fit: contain;
}

.social-link:hover .rubika-icon {
    filter: brightness(1.25) contrast(1.1) drop-shadow(0 0 10px rgba(255,255,255,0.7));
    transform: scale(1.08);
}

.social-link svg:not(.rubika-icon) {
    width: 18px;
    height: 18px;
}

/* ==========================================================
   ریسپانسیو - چند بریک‌پوینت برای همه دستگاه‌ها
   ========================================================== */

/* ---------- دسکتاپ بزرگ ---------- */
@media (min-width: 1400px) {
    .container { max-width: 1320px; }
    .hero-title { font-size: clamp(120px, 11vw, 180px); }
    .logo-hero-img { max-width: 560px; }
}

/* ---------- لپ‌تاپ / دسکتاپ کوچک ---------- */
@media (max-width: 1200px) {
    .container { padding: 0 24px; }
    .nav { gap: 26px; }
}

/* ---------- تبلت افقی ---------- */
@media (max-width: 1024px) {
    section { padding: 72px 0; }
    .nav { gap: 20px; }
    .nav-link { font-size: 14px; }
    .hero { padding: 110px 0 50px; }
    .logo-hero-img { max-width: 440px; }
    .logo-hero-glow { width: 380px; height: 380px; }
    .logo-hero-glow-2 { width: 260px; height: 260px; }
    .team-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 20px; }
    .portfolio-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 20px; }
    .portfolio-image { height: 200px; }
}

/* ---------- تبلت عمودی / موبایل بزرگ ---------- */
@media (max-width: 900px) {
    .hero { min-height: auto; }
    .logo-hero-wrap { margin-bottom: 48px; }
    .team-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
    .portfolio-filter { gap: 9px; margin-bottom: 38px; }
    .filter-btn { padding: 9px 18px; font-size: 13.5px; }
}

/* ---------- موبایل ---------- */
@media (max-width: 768px) {
    .container { padding: 0 18px; }
    section { padding: 56px 0; }

    /* هدر */
    .header-inner { height: 66px; }
    .logo-icon { width: 40px; height: 40px; border-radius: 11px; }
    .logo-name { font-size: 13.5px; letter-spacing: .5px; }
    .logo-sub { font-size: 9.5px; letter-spacing: 2px; }

    .nav {
        position: fixed;
        top: 66px;
        right: 0;
        left: auto;
        flex-direction: column;
        align-items: stretch;
        width: 76%;
        max-width: 290px;
        height: calc(100vh - 66px);
        height: calc(100dvh - 66px);
        background: #140f22;
        border-left: 1px solid rgba(139, 92, 246, .28);
        padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
        gap: 8px;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .32s cubic-bezier(.4,0,.2,1), visibility .32s;
        overflow-y: auto;
        z-index: 5;
        box-shadow: -14px 0 44px rgba(0,0,0,.6);
    }
    .nav.active { transform: translateX(0); visibility: visible; }

    .nav-link {
        display: block;
        font-size: 15.5px;
        font-weight: 500;
        color: #e9e6f5;
        text-align: right;
        padding: 14px 16px;
        border-radius: 12px;
        border: 1px solid transparent;
        background: rgba(255,255,255,.03);
        transition: background .22s ease, color .22s ease, border-color .22s ease;
    }
    .nav-link:active,
    .nav-link:hover {
        background: rgba(139, 92, 246, .16);
        border-color: rgba(168, 85, 247, .38);
        color: #fff;
    }
    .nav-link::after { display: none; }

    .menu-toggle { display: flex; }

    /* هیرو */
    .hero { padding: 96px 0 40px; }
    .hero-title { font-size: clamp(64px, 19vw, 110px); padding-bottom: 12px; }
    .hero-subtitle { font-size: 18px; margin-bottom: 38px; margin-top: -8px; }
    .status-badge { font-size: 13px; padding: 7px 16px; margin-bottom: 24px; }
    .hero-tagline { font-size: clamp(20px, 5.4vw, 28px); line-height: 1.7; }
    .hero-text { font-size: 14px; margin-bottom: 32px; }

    .logo-hero-wrap { margin-bottom: 42px; }
    .logo-hero-img { max-width: min(340px, 88vw); border-radius: 20px; }
    .logo-hero-glow { width: 290px; height: 290px; }
    .logo-hero-glow-2 { width: 200px; height: 200px; }

    .hero-buttons { flex-direction: column; direction: rtl; gap: 12px; }
    .btn { width: 100%; min-width: 0; padding: 14px 20px; }
    .btn-primary { order: 1; }
    .btn-secondary { order: 2; }

    /* عناوین */
    .section-title { font-size: clamp(23px, 6vw, 30px); }
    .section-subtitle { font-size: 14px; }
    .section-line { margin: 16px auto 34px; }

    .service-item {
        grid-template-columns: 1fr;
        gap: 8px;
        padding-bottom: 20px;
    }
    .service-item h3 { font-size: 17px; }
    .service-item p { font-size: 14px; }

    /* نمونه‌کارها */
    .portfolio-grid { grid-template-columns: 1fr; gap: 18px; }
    .portfolio-image { height: 190px; }
    .portfolio-title { font-size: 16.5px; }
    .portfolio-desc { font-size: 13.5px; }
    .portfolio-tech-badge { font-size: 10px; padding: 6px 11px; max-width: calc(100% - 30px); }
    .portfolio-tech-badge span:last-child {
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .portfolio-tag-card { font-size: 11px; padding: 5px 11px; }

    /* تیم */
    .team-grid { grid-template-columns: 1fr; gap: 18px; }
    .team-card { padding: 28px 20px; }
    .team-avatar { width: 96px; height: 96px; }
    .team-name { font-size: 17.5px; }
    .team-bio { min-height: 0; }

    /* ارتباط */
    .contact-box { padding: 24px 18px; }
    .contact-text { font-size: 14px; }
    .contact-members { flex-direction: column; }
    .contact-member-btn { width: 100%; justify-content: center; }

    /* فوتر */
    .footer { padding: 40px 0 26px; }
}

/* ---------- موبایل کوچک ---------- */
@media (max-width: 480px) {
    .container { padding: 0 15px; }
    section { padding: 48px 0; }

    .header-inner { height: 62px; }
    .logo-icon { width: 36px; height: 36px; }
    .logo-name { font-size: 12.5px; }
    .logo-sub { font-size: 9px; letter-spacing: 1.5px; }
    .nav { top: 62px; height: calc(100dvh - 62px); width: 82%; max-width: 275px; }
    .nav-link { font-size: 15px; padding: 13px 14px; }

    .hero { padding: 88px 0 34px; }
    .hero-title { font-size: clamp(54px, 20vw, 84px); }
    .hero-subtitle { font-size: 16px; margin-bottom: 30px; }
    .hero-tagline { font-size: 19px; }
    .hero-text { font-size: 13.5px; line-height: 1.9; }
    .logo-hero-img { max-width: 92vw; border-radius: 16px; }
    .logo-hero-glow { width: 240px; height: 240px; }

    .filter-btn { padding: 8px 15px; font-size: 12.5px; }
    .portfolio-filter { gap: 7px; }
    .portfolio-image { height: 175px; }
    .portfolio-content { padding: 16px; }
    .card-shot.desktop { width: 96px; }
    .card-shot.mobile { width: 46px; }

    .team-card { padding: 24px 16px; }
    .team-avatar { width: 88px; height: 88px; }
    .social-link { width: 38px; height: 38px; }

    .section-tag { font-size: 12px; padding: 5px 14px; }
}

/* ---------- موبایل خیلی کوچک ---------- */
@media (max-width: 360px) {
    .container { padding: 0 12px; }
    .logo-sub { display: none; }
    .hero-title { font-size: 50px; }
    .hero-tagline { font-size: 17.5px; }
    .btn { font-size: 14px; padding: 13px 14px; }
    .team-socials { gap: 7px; }
    .social-link { width: 35px; height: 35px; }
    .social-link svg:not(.rubika-icon) { width: 16px; height: 16px; }
    .rubika-icon { width: 21px; height: 21px; }
}

/* ---------- ارتفاع کم (موبایل افقی) ---------- */
@media (max-height: 520px) and (orientation: landscape) {
    .hero { min-height: auto; padding: 90px 0 40px; }
    .hero-title { font-size: 62px; }
    .logo-hero-img { max-width: 300px; }
    .nav { padding-top: 20px; gap: 14px; }
}

/* ---------- کاهش انیمیشن ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- دستگاه‌های لمسی: حذف افکت‌های هاور ---------- */
@media (hover: none) {
    .portfolio-card:hover,
    .team-card:hover,
    .logo-hero-img:hover,
    .btn:hover,
    .social-link:hover { transform: none; }
    .shot:hover img { transform: none; }
}
