/* =========================================================
   1. DESIGN TOKENS & GLOBALS
   ========================================================= */
:root {
  --bg-color: #fafaf9; --surface: #ffffff; --bg-light: #f5f5f4; --border: #e7e5e4;
  --text-dark: #1c1917; --text-gray: #57534e; --text-mute: #a8a29e;
  --accent: #c2410c; --accent-soft: #ea580c; --accent-tint: rgba(194,65,12,.07);
  --radius-lg: 24px; --radius-md: 16px; --radius-sm: 12px;
  --shadow-sm: 0 10px 30px rgba(28,25,23,.04); --shadow-md: 0 24px 48px rgba(28,25,23,.08); --shadow-lg: 0 30px 60px rgba(28,25,23,.12);
  --ease: cubic-bezier(.16,1,.3,1);
}
* { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg-color); color: var(--text-dark); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-family: 'Syne', sans-serif; font-weight: 700; letter-spacing: -.02em; }
a { text-decoration: none; }
.text-gray { color: var(--text-gray)!important; }
.section { padding: 110px 0; }
.section-tight { padding: 70px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 2.5px; font-size: .75rem; font-weight: 700; color: var(--accent); display: inline-block; margin-bottom: 14px; }
.h-section { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; }
.accent { color: var(--accent); }

/* Animation */
.fade-up { opacity: 0; transform: translateY(30px); transition: all .9s var(--ease); }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* اصلاح فونت اعداد: استفاده از فونت ساده و صاف */
.num, .svc-num, .step-num, .stat-band .num, .stat-band .num span { font-family: 'Inter', sans-serif !important; }

/* =========================================================
   2. NAVBAR & MEGA MENU (FIXED POSITIONING)
   ========================================================= */
.nav-wrap { position: fixed; top: 0; left: 0; right: 0; z-index: 1040; }
.glass-nav { position: relative; background: rgba(255,255,255,.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(0,0,0,.05); border-radius: 50px; padding: 10px 14px 10px 25px; margin-top: 18px; transition: all .35s var(--ease); }
.nav-wrap.scrolled .glass-nav { box-shadow: 0 12px 32px rgba(28,25,23,.09); background: rgba(255,255,255,.95); }
.navbar-brand { font-family: 'Syne', sans-serif; font-weight: 800; color: var(--text-dark)!important; font-size: 1.35rem; }
.nav-link { color: var(--text-gray)!important; font-weight: 500; font-size: .9rem; margin: 0 4px; border-radius: 20px; padding: 8px 14px!important; transition: all .25s ease; cursor: pointer; }
.nav-link:hover, .nav-item.open>.nav-link { color: var(--accent)!important; background: var(--accent-tint); }
.nav-link .bi-chevron-down { font-size: .62rem; margin-left: 5px; transition: transform .3s ease; }
.nav-item.open>.nav-link .bi-chevron-down { transform: rotate(180deg); }
.btn-nav { background: var(--text-dark); color: #fff!important; border-radius: 30px; padding: 10px 24px!important; font-weight: 600; font-size: .88rem; transition: all .3s ease; white-space: nowrap; }
.btn-nav:hover { background: var(--accent); transform: translateY(-1px); }

/* ساختار جدید مگامنو */
.mega {
  position: absolute; top: calc(100% + 14px);
  background: rgba(255,255,255,.97); backdrop-filter: blur(24px);
  border: 1px solid rgba(0,0,0,.06); border-radius: var(--radius-lg);
  padding: 34px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; z-index: 1050; transition: all .35s var(--ease);
}
/* منوی فول‌سایز (مثل Services) */
.position-static .mega { left: 0; width: 100%; transform: translateY(12px); }
.position-static.open .mega { transform: translateY(0); opacity: 1; visibility: visible; }
/* منوی کوچک (مثل Resources) که دقیقا زیر آیکون باز می‌شود */
.position-relative .mega { left: 50%; transform: translate(-50%, 12px); width: 380px; padding: 24px; }
.position-relative.open .mega { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
/* منوی خیلی کوچک (مثل Academy) */
.mega-xs { width: 220px !important; }

.mega-hub { display: flex; align-items: center; gap: 10px; font-family: 'Syne', sans-serif; font-weight: 800; font-size: .95rem; color: var(--text-dark); margin-bottom: 10px; }
.mega-hub i { color: var(--accent); font-size: .9rem; }
.mega-hub:hover { color: var(--accent); }
.mega-link { display: block; padding: 7px 12px; border-radius: 10px; color: var(--text-gray); font-size: .85rem; transition: all .25s ease; }
.mega-link:hover { background: var(--accent-tint); color: var(--accent); transform: translateX(4px); }
.mega-promo { background: var(--text-dark); border-radius: var(--radius-md); padding: 26px; color: #fff; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.mega-promo h5 { font-size: 1.05rem; color: #fff; }
.mega-promo p { font-size: .82rem; color: rgba(255,255,255,.6); margin-bottom: 14px; }
.mega-promo a { color: var(--accent-soft); font-weight: 600; font-size: .85rem; }

/* =========================================================
   3. HERO & TRUST STRIP
   ========================================================= */
.hero { padding: 170px 0 60px; }
.hero-title { font-size: clamp(2.4rem, 5.4vw, 4.4rem); line-height: 1.03; margin-bottom: 1.4rem; }
.pill-badge { background: var(--surface); border: 1px solid var(--border); border-radius: 40px; padding: 8px 18px; font-size: .82rem; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-sm); margin-bottom: 26px; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(194,65,12,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(194,65,12,0); } 100% { box-shadow: 0 0 0 0 rgba(194,65,12,0); } }
.btn-primary-lg { background: var(--text-dark); color: #fff; border-radius: 40px; padding: 15px 32px; font-weight: 600; display: inline-block; transition: all .3s var(--ease); }
.btn-primary-lg:hover { background: var(--accent); color: #fff; transform: translateY(-2px); box-shadow: 0 14px 28px rgba(194,65,12,.25); }
.btn-ghost-lg { border: 1px solid var(--border); background: var(--surface); color: var(--text-dark); border-radius: 40px; padding: 15px 30px; font-weight: 600; display: inline-block; transition: all .3s ease; }
.btn-ghost-lg:hover { border-color: var(--accent); color: var(--accent); }
.hero-collage { position: relative; height: 520px; }
.hero-img-main { width: 82%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); position: absolute; right: 0; top: 0; box-shadow: var(--shadow-md); }
.hero-img-float { width: 46%; position: absolute; left: 0; bottom: -24px; border-radius: var(--radius-md); border: 8px solid var(--bg-color); box-shadow: var(--shadow-md); }
.hero-kpi { position: absolute; top: 26px; left: -10px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-radius: var(--radius-sm); padding: 14px 18px; box-shadow: var(--shadow-md); border: 1px solid rgba(255,255,255,.7); }
.hero-kpi .num { font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--accent); }
.hero-kpi .lbl { font-size: .72rem; color: var(--text-gray); text-transform: uppercase; letter-spacing: 1px; }

.trust-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 26px 0; background: var(--surface); }
.trust-logo { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.05rem; color: var(--text-mute); letter-spacing: -.5px; transition: color .3s ease; }
.trust-logo:hover { color: var(--accent); }

/* =========================================================
   4. SERVICES, PROCESS, & ACCORDION
   ========================================================= */
.svc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 38px 34px; height: 100%; position: relative; overflow: hidden; transition: all .45s var(--ease); display: block; }
.svc-card:hover { transform: translateY(-7px); border-color: rgba(194,65,12,.35); box-shadow: var(--shadow-md); }
.svc-card::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.svc-card:hover::after { transform: scaleX(1); }
.svc-num { position: absolute; top: 24px; right: 30px; font-size: 3.2rem; font-weight: 800; color: var(--bg-light); line-height: 1; }
.svc-icon { width: 58px; height: 58px; border-radius: 16px; background: var(--accent-tint); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 22px; transition: all .4s var(--ease); }
.svc-card:hover .svc-icon { background: var(--accent); color: #fff; transform: rotate(-6deg); }
.svc-card h3 { font-size: 1.45rem; margin-bottom: 10px; color: var(--text-dark); }
.svc-card p { color: var(--text-gray); font-size: .95rem; line-height: 1.7; margin-bottom: 20px; }
.svc-chip { display: inline-block; font-size: .76rem; padding: 6px 13px; border: 1px solid var(--border); border-radius: 20px; margin: 0 6px 8px 0; color: var(--text-gray); transition: all .3s ease; }
.svc-card:hover .svc-chip { border-color: rgba(194,65,12,.25); background: var(--accent-tint); color: var(--accent); }
.svc-link { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: .9rem; color: var(--text-dark); margin-top: 8px; }
.svc-card:hover .svc-link { color: var(--accent); }
.svc-link i { transition: transform .3s ease; }
.svc-card:hover .svc-link i { transform: translateX(6px); }

.why-band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.why-item { padding: 0 10px; }
.why-item i { font-size: 1.8rem; color: var(--accent); margin-bottom: 16px; display: block; }
.why-item h4 { font-size: 1.15rem; margin-bottom: 8px; }

.step { position: relative; padding-top: 34px; }
.step::before { content: ''; position: absolute; top: 9px; left: 0; width: 100%; height: 2px; background: var(--border); }
.step::after { content: ''; position: absolute; top: 3px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--bg-color); border: 3px solid var(--accent); }
.step-num { font-size: .75rem; font-weight: 700; letter-spacing: 2px; color: var(--accent); text-transform: uppercase; }

.cinematic { background: url('https://images.unsplash.com/photo-1504307651254-35680f356f12?auto=format&fit=crop&q=80&w=2000') center/cover fixed; position: relative; border-radius: var(--radius-lg); overflow: hidden; padding: 90px 0; color: #fff; text-align: center; }
.cinematic-overlay { position: absolute; inset: 0; background: rgba(28,25,23,.87); backdrop-filter: blur(4px); }
.cinematic-content { position: relative; z-index: 2; }
.viewer-ui { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-md); padding: 10px; max-width: 820px; margin: 40px auto 0; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.viewer-bar { display: flex; gap: 6px; padding: 6px 8px 10px; }
.viewer-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.25); }

.accordion-gallery { display: flex; gap: 14px; height: 480px; }
.acc-item { flex: 1; border-radius: var(--radius-lg); background-size: cover; background-position: center; position: relative; overflow: hidden; transition: flex .7s var(--ease); cursor: pointer; }
.acc-item:hover { flex: 3.4; }
.acc-overlay { position: absolute; inset: 0; padding: 30px; display: flex; align-items: flex-end; background: linear-gradient(0deg, rgba(28,25,23,.92) 0%, rgba(28,25,23,0) 65%); }
.acc-title { writing-mode: vertical-rl; transform: rotate(180deg); color: #fff; font-family: 'Syne', sans-serif; font-size: 1.25rem; position: absolute; left: 22px; bottom: 30px; transition: opacity .3s ease; }
.acc-item:hover .acc-title { opacity: 0; }
.acc-content { color: #fff; opacity: 0; transform: translateY(18px); transition: all .45s ease .18s; }
.acc-item:hover .acc-content { opacity: 1; transform: translateY(0); }
.acc-tag { font-size: .72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--accent-soft); font-weight: 700; }

/* =========================================================
   5. STATS, ABOUT & CONTACT
   ========================================================= */
.stat-band { background: var(--text-dark); border-radius: var(--radius-lg); padding: 56px 40px; color: #fff; }
.stat-band .num { font-size: 2.9rem; font-weight: 800; line-height: 1; color: #fff; }
.stat-band .lbl { color: rgba(255,255,255,.55); font-size: .85rem; margin-top: 8px; display: block; }
.stat-band .num span { color: var(--accent-soft); }

.partners-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.partner-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px 18px; text-align: center; transition: all .4s var(--ease); position: relative; overflow: hidden; }
.partner-card:hover { transform: translateY(-7px); box-shadow: 0 15px 30px rgba(194,65,12,.08); border-color: var(--accent); }
.partner-icon { font-size: 2rem; color: var(--text-mute); margin-bottom: 12px; transition: color .4s ease; }
.partner-card:hover .partner-icon { color: var(--accent); }

.res-card { border-radius: var(--radius-lg); padding: 44px; height: 100%; border: 1px solid var(--border); background: var(--surface); transition: all .45s var(--ease); }
.res-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.res-card.dark { background: var(--text-dark); border-color: var(--text-dark); color: #fff; }
.res-card.dark h3, .res-card.dark .res-item { color: #fff; }
.res-item { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid rgba(0,0,0,.06); font-size: .92rem; font-weight: 500; color: var(--text-dark); }
.res-card.dark .res-item { border-bottom-color: rgba(255,255,255,.1); }
.res-item:hover { color: var(--accent); }

.about-section { background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 70px 56px; position: relative; overflow: hidden; }
.about-badge { background: var(--text-dark); color: #fff; padding: 6px 18px; border-radius: 30px; font-size: .75rem; font-weight: 600; display: inline-block; margin-bottom: 22px; letter-spacing: 1px; text-transform: uppercase; }
.about-img-wrapper { position: relative; height: 100%; min-height: 400px; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md); }
.about-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }

.quote-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 50px; }
.quote-text { font-family: 'Playfair Display', serif; font-size: 1.55rem; line-height: 1.6; color: var(--text-dark); }

.bg-linen { background: var(--bg-light); }
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 700; line-height: 1.2; }
.form-control, .form-select { border: 1px solid var(--border)!important; font-size: .92rem; }
.form-control:focus, .form-select:focus { border-color: var(--accent)!important; box-shadow: 0 0 0 .2rem rgba(194,65,12,.08); }
.btn-accent { background: var(--accent); border: none; color: #fff; padding: .8rem 2.2rem; border-radius: 40px; font-weight: 600; transition: .3s; box-shadow: 0 8px 20px rgba(194,65,12,.28); }
.btn-accent:hover { background: var(--text-dark); color: #fff; transform: translateY(-2px); }

/* =========================================================
   6. RESPONSIVE & FOOTER
   ========================================================= */
.site-footer { background: var(--text-dark); color: rgba(255,255,255,.65); padding: 70px 0 28px; }
.site-footer h6 { color: #fff; font-family: 'Syne', sans-serif; font-size: .85rem; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 18px; }
.footer-link { display: block; color: rgba(255,255,255,.55); font-size: .87rem; padding: 5px 0; transition: all .25s ease; }
.footer-link:hover { color: var(--accent-soft); transform: translateX(4px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 46px; padding-top: 22px; font-size: .82rem; }
.social-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: all .3s ease; }
.social-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

@media (max-width: 991px) {
  .hero-kpi { display: none; }
  .section { padding: 70px 0; }
  .navbar-collapse { max-height: 74vh; overflow-y: auto; padding: 10px 6px 6px; }
  .mega { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; background: transparent; padding: 6px 0 10px; display: none; }
  .position-static.open .mega, .position-relative.open .mega { display: block; width: 100% !important; padding: 10px 0; transform: none; left: auto; }
  .mega-promo { display: none; }
  .accordion-gallery { flex-direction: column; height: auto; }
  .acc-item { flex: none; height: 230px; }
  .acc-title { writing-mode: horizontal-tb; transform: none; position: static; margin-bottom: 8px; opacity: 1; }
  .acc-content { opacity: 1; transform: none; }
  .step::before, .step::after { display: none; }
  .step { padding-top: 0; border-left: 2px solid var(--border); padding-left: 20px; }
}