/*
Theme Name: YousofSoft
Theme URI: https://yousofsoft.com
Author: YousofSoft
Author URI: https://yousofsoft.com
Description: Space-age theme for YousofSoft.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: yousofsoft
*/

/* ── Vazirmatn ── */
@font-face {
  font-family: 'Vazirmatn';
  src: url('assets/fonts/Vazirmatn-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('assets/fonts/Vazirmatn-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('assets/fonts/Vazirmatn-SemiBold.ttf') format('truetype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('assets/fonts/Vazirmatn-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ── Reset & Root ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep: #06060e;
  --bg-surface: #0c0c1d;
  --bg-card: rgba(255,255,255,0.03);
  --text: #e8e8f0;
  --text-dim: #8888a8;
  --accent: #8b5cf6;
  --accent-glow: #a78bfa;
  --cyan: #22d3ee;
  --cyan-glow: #67e8f9;
  --border: rgba(255,255,255,0.06);
  --border-glow: rgba(139,92,246,0.2);
  --radius: 20px;
  --radius-sm: 12px;
  --font: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1120px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Animated Starfield Background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 40% 10%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1.5px 1.5px at 70% 20%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 85% 55%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 15% 70%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 60% 75%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 90% 85%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 35% 90%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 50% 60%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 75% 5%, rgba(255,255,255,0.4), transparent),
    /* ambient glows */
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(139,92,246,0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(34,211,238,0.04) 0%, transparent 50%);
  pointer-events: none;
}

/* ── Site wrapper (above stars) ── */
.site-header, .top-bar, main, .site-footer { position: relative; z-index: 1; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12,12,29,0.78);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-branding img {
  height: 38px; width: auto;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(139,92,246,0.2);
}

.site-title {
  font-size: 20px; font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

/* ── Nav ── */
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
}

.main-nav > ul a, .main-nav > a {
  text-decoration: none;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 14px;
  transition: color 0.25s;
}

.main-nav a:hover { color: #fff; }

/* ── Email Button ── */
.header-email-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 10px;
  background: rgba(139,92,246,0.12);
  color: var(--accent-glow) !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  white-space: nowrap;
  border: 1px solid rgba(139,92,246,0.2);
}

.header-email-btn:hover {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(139,92,246,0.3);
}

/* ── Lang Switcher ── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.04);
  border-radius: 28px;
  padding: 3px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.lang-flag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
  background: transparent;
}

.lang-flag:not(.active) {
  filter: grayscale(0.8);
  opacity: 0.35;
}

.lang-flag:not(.active):hover {
  filter: grayscale(0.2);
  opacity: 0.8;
  background: rgba(255,255,255,0.05);
}

.lang-flag.active {
  filter: grayscale(0);
  opacity: 1;
  background: rgba(139,92,246,0.18);
  box-shadow: 0 0 16px rgba(139,92,246,0.25);
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  position: relative;
  padding: 120px 24px 100px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(139,92,246,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-glow), transparent);
}

.hero > * { position: relative; z-index: 1; }

.hero-logo {
  width: 120px; height: 120px;
  border-radius: 28px;
  margin-bottom: 32px;
  box-shadow: 0 0 60px rgba(139,92,246,0.3), 0 0 120px rgba(139,92,246,0.1);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  animation: float 6s ease-in-out infinite;
}

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

.hero-logo:hover {
  transform: scale(1.05);
  box-shadow: 0 0 80px rgba(139,92,246,0.5), 0 0 160px rgba(34,211,238,0.15);
}

.hero h1 {
  font-size: 58px; font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.08;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 40%, #67e8f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: 19px;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* ── Buttons ── */
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  position: relative;
}

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  box-shadow: 0 4px 28px rgba(139,92,246,0.35);
}

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

.btn-outline {
  background: transparent;
  color: var(--accent-glow);
  border: 1.5px solid rgba(139,92,246,0.35);
}

.btn-outline:hover {
  background: rgba(139,92,246,0.1);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(139,92,246,0.2);
}

/* ═══════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════ */
.section {
  padding: 100px 24px;
  position: relative;
}

.section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 5%; right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-label {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-glow);
  margin-bottom: 16px;
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.2);
}

.section-title {
  font-size: 38px; font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.18;
  margin-bottom: 20px;
  color: #fff;
}

.section-text {
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 640px;
}

/* ═══════════════════════════════════════════
   SERVICE CARDS
   ═══════════════════════════════════════════ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, rgba(139,92,246,0.3), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
}

.service-card:hover {
  border-color: rgba(139,92,246,0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(139,92,246,0.1);
  background: rgba(255,255,255,0.04);
}

.service-card:hover::before { opacity: 1; }

.service-card .icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(34,211,238,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 24px;
  border: 1px solid rgba(139,92,246,0.2);
}

.service-card h3 {
  font-size: 20px; font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}

.service-card p {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.75;
}

/* ═══════════════════════════════════════════
   AL-MIZAN FEATURE
   ═══════════════════════════════════════════ */
.feature-almizan {
  background: rgba(139,92,246,0.02);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.feature-layout {
  display: flex;
  align-items: center;
  gap: 64px;
  flex-wrap: wrap;
}

.feature-text {
  flex: 1;
  min-width: 300px;
}

.feature-visual {
  flex: 0 0 280px;
  text-align: center;
}

.feature-bazaar-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 36px 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(34,211,238,0.04));
  border: 1px solid rgba(139,92,246,0.15);
  text-decoration: none;
  transition: all 0.4s ease;
}

.feature-bazaar-badge:hover {
  border-color: rgba(139,92,246,0.4);
  box-shadow: 0 0 40px rgba(139,92,246,0.15);
  transform: translateY(-4px);
}

.bazaar-logo-img {
  width: 180px;
  height: auto;
  opacity: 0.95;
  transition: opacity 0.3s;
}

.feature-bazaar-badge:hover .bazaar-logo-img { opacity: 1; }

.bazaar-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-glow);
  text-align: center;
}

.feature-checklist {
  list-style: none;
  margin: 28px 0 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-checklist li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
}

.feature-checklist .check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: #fff;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(139,92,246,0.4);
}

/* ═══════════════════════════════════════════
   CTA
   ═══════════════════════════════════════════ */
.cta-section {
  text-align: center;
  padding: 120px 24px;
}

/* ═══════════════════════════════════════════
   CONTACT PAGE
   ═══════════════════════════════════════════ */
.contact-card {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 32px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
}

.contact-card:hover {
  border-color: rgba(139,92,246,0.3);
  box-shadow: 0 12px 48px rgba(0,0,0,0.4), 0 0 32px rgba(139,92,246,0.08);
  transform: translateY(-3px);
  background: rgba(255,255,255,0.04);
}

.contact-card-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(34,211,238,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  border: 1px solid rgba(139,92,246,0.2);
}

.contact-card-label {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-glow);
  margin-bottom: 4px;
}

.contact-card-value {
  font-size: 20px; font-weight: 700;
  color: #fff;
}

/* ═══════════════════════════════════════════
   CONTENT
   ═══════════════════════════════════════════ */
.content-area {
  max-width: 780px; margin: 0 auto;
}

.entry-title {
  font-size: 36px; font-weight: 800;
  margin-bottom: 16px;
  color: #fff;
}

.entry-meta {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 36px;
}

.entry-content {
  font-size: 17px; line-height: 1.85;
  color: var(--text-dim);
}

.entry-content h2 { font-size: 28px; font-weight: 800; margin: 56px 0 16px; color: #fff; }
.entry-content h3 { font-size: 22px; font-weight: 700; margin: 44px 0 12px; color: #fff; }
.entry-content p { margin-bottom: 22px; }
.entry-content a { color: var(--accent-glow); }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  height: 28px; width: auto;
  border-radius: 7px;
  vertical-align: middle;
  opacity: 0.7;
}

/* ── Utilities ── */
.text-center { text-align: center; }
.mt-48 { margin-top: 48px; }

/* ── RTL ── */
[dir="rtl"] .header-inner { flex-direction: row-reverse; }
[dir="rtl"] .main-nav { flex-direction: row-reverse; }
[dir="rtl"] .main-nav ul { flex-direction: row-reverse; }
[dir="rtl"] .site-branding { flex-direction: row-reverse; }
[dir="rtl"] .feature-layout { flex-direction: row-reverse; }
[dir="rtl"] .section-text { margin-left: auto; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero { padding: 80px 20px 64px; }
  .hero h1 { font-size: 36px; }
  .hero .subtitle { font-size: 16px; }
  .hero-logo { width: 100px; height: 100px; border-radius: 22px; }

  .header-inner { height: 62px; padding: 0 20px; }
  .site-branding img { height: 30px; }
  .site-title { font-size: 16px; }

  .section { padding: 64px 20px; }
  .section-title { font-size: 28px; }

  .services-grid { grid-template-columns: 1fr; gap: 16px; }
  .feature-layout { gap: 40px; }
  .feature-bazaar-badge { padding: 24px 20px; }
  .feature-visual { flex: 0 0 auto; margin: 0 auto; }

  .footer-inner { flex-direction: column; text-align: center; }

  .main-nav ul { display: none; }
  .header-email-btn { font-size: 12px; padding: 6px 14px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 28px; }
  .hero-logo { width: 80px; height: 80px; border-radius: 18px; }
  .section-title { font-size: 24px; }
  .section { padding: 48px 16px; }

  .lang-flag { width: 34px; height: 34px; font-size: 18px; }
  .btn { padding: 12px 22px; font-size: 14px; }
  .service-card { padding: 28px 22px; }
  .contact-card { padding: 22px 20px; }
  .contact-card-value { font-size: 16px; }
}
