/* ==========================================================================
   TurboWeb - Light Minimalist Portfolio (Exact Pixel Match to Target Card)
   Font: IRANYekanXVFaNum / IRANYekanX
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Font-Face Setup
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'IRANYekanX';
  src: url('../fonts/IRANYekanXVFaNumVF.DBKnep-K.woff2') format('woff2-variations'),
       url('../fonts/IRANYekanXVFaNumVF.DBKnep-K.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IRANYekanX-Regular';
  src: url('../fonts/IRANYekanXFaNum-Regular.NJOSFezJ.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Light Theme System Variables
   -------------------------------------------------------------------------- */
:root {
  --font-main: 'IRANYekanX', 'IRANYekanX-Regular', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', Consolas, Monaco, monospace;

  /* Clean Light Palette */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;

  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --shadow-card: 0 12px 35px rgba(0, 0, 0, 0.05);
  --shadow-card-hover: 0 20px 45px rgba(0, 0, 0, 0.09);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   3. Base Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-primary);
  scroll-behavior: smooth;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-color: var(--bg-body);
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   4. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
}

.brand-logo img {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 600;
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #ecfdf5;
  border: 1px solid rgba(5, 150, 105, 0.2);
  color: #059669;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #059669;
  border-radius: 50%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.2);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.3);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-hover);
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 3.5rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(2, 132, 199, 0.08);
  color: var(--accent-primary);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  width: fit-content;
}

.hero-title {
  font-size: 2.3rem;
  line-height: 1.3;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

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

.hero-description {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

/* Terminal Window */
.terminal-window {
  background: #0f172a;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18), 0 0 30px rgba(2, 132, 199, 0.05);
  overflow: hidden;
  border: 1px solid #1e293b;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.terminal-window:hover {
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.22), 0 0 40px rgba(56, 189, 248, 0.1);
  transform: translateY(-4px);
}

.terminal-header {
  background: #1e293b;
  padding: 0.75rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dots {
  display: flex;
  gap: 0.45rem;
}

.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
  direction: ltr;
  text-align: left;
  color: #f8fafc;
  min-height: 200px;
}

.code-line {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.line-num {
  color: #475569;
  user-select: none;
  width: 20px;
  font-size: 0.82rem;
}

.line-content {
  display: inline-block;
  white-space: pre-wrap;
}

.code-keyword { color: #f43f5e; font-weight: 600; }
.code-variable { color: #38bdf8; font-weight: 600; }
.code-property { color: #c084fc; }
.code-string { color: #34d399; }
.code-boolean { color: #fbbf24; font-weight: 600; }
.code-plain { color: #f8fafc; }
.code-comment { color: #64748b; font-style: italic; }

.typing-cursor {
  display: inline-block;
  width: 9px;
  height: 1.15em;
  background-color: #38bdf8;
  margin-left: 3px;
  vertical-align: middle;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
  animation: cursorBlink 0.85s infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Scroll Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   6. Exact Target Card Design (Pixel Match to User Image)
   -------------------------------------------------------------------------- */
.section-wrapper {
  padding: 3rem 0;
}

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.section-subtitle {
  color: var(--accent-primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1px;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-primary);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.pcard-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.pcard-item:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08) !important;
}

/* Card Outer Container */
.card-exact-single {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 28px;
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.card-exact-single:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: #cbd5e1;
}

/* Top Banner Graphic (20px rounded corners) */
.card-exact-banner {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-banner-1 {
  background: linear-gradient(135deg, #0b4f6c 0%, #0f172a 100%);
}
.bg-banner-2 {
  background: linear-gradient(135deg, #311042 0%, #0f172a 100%);
}
.bg-banner-3 {
  background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
}

.card-exact-banner-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}

.card-exact-center-icon {
  font-size: 3.8rem;
  color: #38bdf8;
  filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.4));
  user-select: none;
}

/* Right-aligned Card Body */
.card-exact-info {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: right;
}

.card-exact-cat {
  font-size: 0.85rem;
  font-weight: 800;
  color: #06b6d4;
}

.card-exact-title-main {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.4;
}

.card-exact-meta {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.5;
}

/* Card Footer Row */
.card-exact-footer-row {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-exact-price-wrap {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.price-old {
  font-size: 0.78rem;
  color: #cbd5e1;
  text-decoration: line-through;
  font-weight: 600;
}

.price-current {
  font-size: 1.2rem;
  font-weight: 900;
  color: #0f172a;
}

.card-exact-btn-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-card-gradient {
  background: linear-gradient(135deg, #0b4f6c, #1e3a8a);
  color: #ffffff;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.btn-card-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(11, 79, 108, 0.3);
}

.btn-card-outline-subtle {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.btn-card-outline-subtle:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* --------------------------------------------------------------------------
   7. Designer & Developer Concept Section
   -------------------------------------------------------------------------- */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.concept-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
}

.concept-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.concept-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(2, 132, 199, 0.08);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.concept-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.concept-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   8. Footer & Direct Telegram Contact
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 2.25rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.telegram-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #0088cc;
  color: #ffffff;
  padding: 0.7rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 14px rgba(0, 136, 204, 0.2);
}

.telegram-link-btn:hover {
  background: #0077b5;
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.35);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   9. Mobile Hamburger Drawer & Responsive Layout
   -------------------------------------------------------------------------- */
.hamburger-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 105;
  padding: 0;
}

.hamburger-bar {
  width: 100%;
  height: 3px;
  background-color: var(--text-primary);
  border-radius: 4px;
  transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.hamburger-toggle.active .hamburger-bar:nth-child(1) {
  transform: translateY(9.5px) rotate(45deg);
}
.hamburger-toggle.active .hamburger-bar:nth-child(2) {
  opacity: 0;
}
.hamburger-toggle.active .hamburger-bar:nth-child(3) {
  transform: translateY(-9.5px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 290px;
  height: 100vh;
  height: 100dvh;
  background: #ffffff;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.drawer-close-btn:hover {
  background: var(--bg-subtle);
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  list-style: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

.mobile-drawer-links .nav-link {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  width: 100%;
  display: block;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px dashed #f1f5f9;
  transition: var(--transition-smooth);
}

.mobile-drawer-links .nav-link:hover,
.mobile-drawer-links .nav-link.active {
  color: var(--accent-primary);
  background: rgba(2, 132, 199, 0.05);
  border-radius: 8px;
  padding-right: 0.75rem;
}

.drawer-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.desktop-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

@media (max-width: 992px) {
  .hamburger-toggle {
    display: flex;
  }

  .desktop-links,
  .desktop-actions {
    display: none !important;
  }

  /* Hero Section Responsive Layout & Centering */
  .hero-section {
    padding: 2.25rem 0 2rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .badge-tag {
    margin: 0 auto;
  }

  .hero-title {
    font-size: 1.9rem;
    text-align: center;
  }

  .hero-description {
    font-size: 0.98rem;
    text-align: center;
    max-width: 580px;
    margin: 0 auto;
  }

  .hero-cta {
    justify-content: center;
    width: 100%;
  }

  .terminal-window {
    width: 100%;
    margin: 0 auto;
  }

  /* Products & Services Centering */
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

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

  .concept-card {
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 540px) {
  .hero-title {
    font-size: 1.6rem;
  }

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

  .hero-cta .btn {
    width: 100%;
  }

  .terminal-body {
    padding: 1.1rem;
    font-size: 0.82rem;
  }

  .site-header {
    padding: 0;
  }

  .navbar {
    height: 60px;
  }
}
