/* Theme */
:root {
  --color-bg: #0f172a; /* slate-900 */
  --color-surface: #111827; /* gray-900 */
  --color-surface-alt: #0b1223; /* darker */
  --color-text: #e5e7eb; /* gray-200 */
  --color-muted: #9ca3af; /* gray-400 */
  --color-primary: #eab308; /* amber-500 */
  --color-primary-600: #ca8a04;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Vazirmatn', system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
}

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15,23,42,.7);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo-frame { height: 60px; display: flex; align-items: center; overflow: hidden; }
.logo { height: 150px; width: auto; filter: drop-shadow(0 2px 8px rgba(0,0,0,.3)); display: block; clip-path: inset(20% 0 20% 0); }
.brand-text { display: grid; }
.brand-text strong { font-weight: 800; letter-spacing: -.2px; }
.brand-text span { font-size: 12px; color: var(--color-muted); }

.nav { display: flex; gap: 18px; align-items: center; }
.nav a { color: #e5e7eb; text-decoration: none; font-weight: 600; opacity: .9; }
.nav a:hover { color: var(--color-primary); }
.nav .cta { padding: 10px 16px; border-radius: 999px; background: var(--color-primary); color: #0a0a0a; }
.nav .cta:hover { background: var(--color-primary-600); }
.nav #langToggle { margin-inline-start: 8px; }

/* Burger */
.burger { display: none; background: transparent; border: 0; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; position: fixed; top: 12px; left: 12px; right: auto; z-index: 1300; }
.burger span { display: block; width: 22px; height: 2px; background: #e5e7eb; margin: 4px 0; transition: transform .2s ease, opacity .2s ease; }
.burger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile Menu Drawer */
.mobile-menu { position: fixed; top: 0; bottom: 0; right: 0; left: auto; width: 78%; max-width: 360px; background: #0b1223; border-left: 1px solid rgba(255,255,255,.06); transform: translateX(100%); transition: transform .25s ease; z-index: 1200; display: none; flex-direction: column; }
.mobile-menu.open { transform: translateX(0); }
.rtl .mobile-menu { right: 0; left: auto; border-left: 1px solid rgba(255,255,255,.06); }
.rtl .burger { left: 12px; right: auto; }
.ltr .mobile-menu { left: 0; right: auto; border-right: 1px solid rgba(255,255,255,.06); border-left: none; transform: translateX(-100%); }
.ltr .mobile-menu.open { transform: translateX(0); }
.ltr .burger { right: 12px; left: auto; }
.mobile-menu__header { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-bottom: 1px solid rgba(255,255,255,.06); }
.mobile-menu__nav { display: grid; padding: 8px; }
.mobile-menu__nav a { padding: 12px; color: #e5e7eb; text-decoration: none; border-radius: 10px; }
.mobile-menu__nav a:hover { background: rgba(255,255,255,.06); }

body.menu-open { overflow: hidden; }

/* Backdrop */
.menu-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 1100; }
.menu-backdrop.open { opacity: 1; pointer-events: auto; }

/* Hero - تغییرات اصلی اینجا اعمال شد */
.hero { 
  position: relative; 
  min-height: 84vh; 
  display: grid; 
  place-items: center; 
  overflow: hidden; 
}

.parallax-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.parallax {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.overlay { 
  position: absolute; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  width: 100%; 
  height: 100%; 
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.45)); 
  pointer-events: none; 
  z-index: 1;
}

.hero-content { 
  position: relative; 
  text-align: center; 
  max-width: 850px; 
  padding: 80px 0; 
  z-index: 2; 
}

.title { font-size: clamp(28px, 5vw, 52px); margin: 0 0 10px; letter-spacing: -0.5px; font-weight: 800; }
.subtitle { color: #d1d5db; margin: 0 auto 20px; font-size: clamp(14px, 2.4vw, 18px); }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); text-decoration: none; font-weight: 700; transition: transform .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--color-primary); color: #0a0a0a; }
.btn-primary:hover { background: var(--color-primary-600); }
.btn-ghost { background: rgba(255,255,255,.06); color: #f3f4f6; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }

/* Partners */
.partners { padding: 36px 0; background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)); }
.logo-showcase {
  margin: 0 auto;
  background: #ffffff;
  color: #111827;
  border-radius: 28px;
  padding: 18px 22px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 12px 30px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.8);
  display: grid;
  grid-template-columns: repeat(3, max-content);
  align-items: center;
  justify-content: center;
  gap: 24px 40px;
  max-width: min(980px, 92%);
  position: relative;
}
.logo-showcase:before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 30px;
  background: radial-gradient(600px 180px at 50% -40px, rgba(234,179,8,.20), transparent 60%);
  z-index: -1;
}
.partner-logo { height: 100px; width: auto; opacity: 1; filter: none; }

/* Sections */
.section { padding: 72px 0; }
.section--alt { background: radial-gradient(1200px 500px at 50% -50px, rgba(234,179,8,.1), transparent), var(--color-surface);
  border-block: 1px solid rgba(255,255,255,.04);
}
.section-title { font-size: clamp(22px, 4vw, 36px); margin: 0 0 12px; }
.section-subtitle { color: var(--color-muted); margin: 0 0 24px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.06); padding: 18px; border-radius: var(--radius); box-shadow: var(--shadow); }
.card h3 { margin-top: 4px; margin-bottom: 6px; }
.card p { margin: 0; color: #d1d5db; }

/* Parallax secondary - تغییرات اینجا هم اعمال شد */
.parallax--secondary {
  position: relative;
  min-height: 320px; 
  display: grid; 
  align-items: center;
}

.parallax--secondary .parallax-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.parallax--secondary .overlay {
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.35));
}

.parallax-caption { 
  position: relative; 
  text-align: center; 
  font-weight: 700; 
  font-size: 18px; 
  color: #fef08a; 
  z-index: 2;
}

/* Catalog */
.catalog-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.catalog-item { position: relative; overflow: hidden; border-radius: 12px; background: #0b1223; border: 1px solid rgba(255,255,255,.06); }
.catalog-item img { width: 100%; height: 180px; object-fit: cover; display: block; transition: transform .5s ease; }
.catalog-item:hover img { transform: scale(1.06); }
.catalog-code { position: absolute; inset-inline-start: 10px; inset-block-end: 10px; background: rgba(0,0,0,.6); color: #fff; padding: 6px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; letter-spacing: .3px; }

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project { margin: 0; overflow: hidden; border-radius: 14px; border: 1px solid rgba(255,255,255,.06); background: #0b1223; }
.project img { width: 100%; height: 220px; object-fit: cover; display: block; transition: transform .6s ease; }
.project:hover img { transform: scale(1.05); }
.project figcaption { padding: 12px; color: #e5e7eb; font-weight: 600; }

/* About */
.about { background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)); border: 1px solid rgba(255,255,255,.06); padding: 18px; border-radius: var(--radius); }

/* Contact */
.contact { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.contact-info ul { margin: 0 0 16px; padding: 0 18px; }
.contact-info li { margin-bottom: 8px; color: #d1d5db; }
.cta-row { display: flex; gap: 10px; }
.contact-form { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.06); padding: 16px; border-radius: var(--radius); }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-form input, .contact-form textarea { width: 100%; background: rgba(255,255,255,.06); color: #fff; border: 1px solid transparent; border-radius: 10px; padding: 12px; font-family: inherit; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #9aa0aa; }
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form button { margin-top: 10px; }
.form-note { display: block; margin-top: 8px; color: var(--color-muted); }

/* Footer */
.footer { background: #0b1223; border-top: 1px solid rgba(255,255,255,.06); margin-top: 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.logo-sm { height: 72px; margin-inline-end: 8px; opacity: .9; }
.copy { color: #cbd5e1; font-size: 13px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Catalog Modal */
.catalog-modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; }
.catalog-modal.open { display: flex; }
.catalog-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.85); backdrop-filter: blur(4px); z-index: 1; }
.catalog-modal__content { position: relative; width: min(95vw, 1200px); height: min(90vh, 900px); background: #0b1223; border-radius: 20px; padding: 20px; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.5); z-index: 2; }
.catalog-modal__close { position: absolute; top: 16px; inset-inline-end: 16px; width: 40px; height: 40px; background: rgba(255,255,255,.1); border: 0; border-radius: 50%; color: #fff; font-size: 28px; cursor: pointer; z-index: 10; transition: background .2s; }
.catalog-modal__close:hover { background: rgba(255,255,255,.2); }

/* Catalog Slider */
.catalog-slider { display: flex; flex-direction: column; height: 100%; gap: 16px; }
.catalog-slider__main { position: relative; flex: 1; display: flex; align-items: center; gap: 12px; min-height: 0; }
.catalog-slider__image-container { flex: 1; position: relative; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: 12px; overflow: hidden; background: #000; }
.catalog-slider__main-image { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.catalog-slider__code { position: absolute; bottom: 16px; inset-inline-start: 16px; background: rgba(0,0,0,.7); color: #fff; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; }
.catalog-slider__nav { width: 48px; height: 48px; background: rgba(255,255,255,.1); border: 0; border-radius: 50%; color: #fff; font-size: 32px; cursor: pointer; transition: background .2s, transform .2s; display: flex; align-items: center; justify-content: center; z-index: 5; position: relative; }
.catalog-slider__nav:hover { background: rgba(255,255,255,.2); transform: scale(1.1); }
.catalog-slider__nav:active { transform: scale(.95); }

/* Thumbnails */
.catalog-slider__thumbnails-container { height: 120px; overflow: hidden; position: relative; }
.catalog-slider__thumbnails { display: flex; gap: 10px; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; padding: 8px 0; cursor: grab; }
.catalog-slider__thumbnails:active { cursor: grabbing; }
.catalog-slider__thumbnails::-webkit-scrollbar { height: 6px; }
.catalog-slider__thumbnails::-webkit-scrollbar-track { background: transparent; }
.catalog-slider__thumbnails::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }
.catalog-slider__thumbnails::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }
.catalog-thumbnail { flex-shrink: 0; width: 100px; height: 100px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; transition: border-color .2s, transform .2s; position: relative; }
.catalog-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
.catalog-thumbnail:hover { transform: scale(1.05); }
.catalog-thumbnail.active { border-color: var(--color-primary); }
.catalog-thumbnail__code { position: absolute; bottom: 4px; inset-inline-start: 4px; background: rgba(0,0,0,.7); color: #fff; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; }

/* Responsive */
@media (max-width: 1024px) {
  .catalog-grid { grid-template-columns: repeat(4, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .header-inner { gap: 12px; padding: 6px 0; }
  .logo-frame { height: 50px; }
  .logo { height: 120px; clip-path: inset(20% 0 20% 0); }
  .logo-showcase { grid-template-columns: 1fr; justify-items: center; gap: 16px; padding: 16px; }
  .nav { display: none; }
  .burger { display: inline-flex; }
  .mobile-menu { display: flex; }
  .cards { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr; }
  
  /* Parallax active on mobile - تغییرات اینجا هم اعمال شد */
  .parallax-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }
  
  .parallax {
    background-attachment: fixed;
    background-size: cover;
  }
  
  .hero { min-height: 84vh; overflow: hidden; }
  
  /* Catalog Modal Mobile */
  .catalog-modal__content { width: 100vw; height: 100vh; border-radius: 0; padding: 12px; }
  .catalog-slider__nav { width: 40px; height: 40px; font-size: 24px; }
  .catalog-slider__thumbnails-container { height: 100px; }
  .catalog-thumbnail { width: 80px; height: 80px; }
}