/* ═══════════════════════════════════════════
   Ram System (ramsystem.ir) — Public Stylesheet
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --cyan: #0ea5e9;
  --secondary: #0b1220;
  --surface-dark: #111c33;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --bg: #f8fafc;
  --bg-muted: #f1f5f9;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-light: #475569;
  --text-muted: #64748b;
  --text-white: #ffffff;
  --border: #e2e8f0;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 32px rgba(15, 23, 42, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Vazirmatn', Tahoma, Arial, system-ui, sans-serif;
  direction: rtl;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ═══ HEADER / NAVBAR ═══ */
.header {
  background: rgba(11, 18, 32, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
  height: 76px;
}

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

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-white);
  font-weight: 900;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.35);
}

.logo-text strong {
  display: block;
  color: var(--text-white);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 1.2px;
}

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

.nav-links a {
  color: #cbd5e1;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.1);
}

.nav-cta {
  background: var(--primary) !important;
  color: var(--text-white) !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  background: var(--primary-light) !important;
}

.menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: var(--text-white);
  width: 42px;
  height: 42px;
  font-size: 22px;
  cursor: pointer;
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    right: 0;
    left: 0;
    background: var(--secondary);
    flex-direction: column;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 12px 16px;
  }
}

/* ═══ HERO SECTION ═══ */
.hero {
  background:
    radial-gradient(circle at 18% 20%, rgba(14, 165, 233, 0.2), transparent 45%),
    radial-gradient(circle at 82% 80%, rgba(29, 78, 216, 0.25), transparent 50%),
    linear-gradient(135deg, var(--secondary) 0%, #13223d 55%, #163063 100%);
  padding: 96px 0 84px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 46px;
  font-weight: 900;
  color: var(--text-white);
  margin-bottom: 20px;
  line-height: 1.35;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 18px;
  color: #cbd5e1;
  margin-bottom: 32px;
  line-height: 1.9;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.hero-pill:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(96, 165, 250, 0.5);
}

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

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: var(--text-white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-white);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.btn-outline:hover {
  border-color: var(--text-white);
  background: rgba(255, 255, 255, 0.12);
}

.btn-outline-dark {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline-dark:hover {
  background: var(--primary);
  color: var(--text-white);
}

.btn-accent {
  background: var(--accent);
  color: var(--secondary);
  font-weight: 700;
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* ═══ SECTIONS ═══ */
.section {
  padding: 80px 0;
}

.section-muted {
  background: var(--bg-muted);
}

.section-dark {
  background: var(--secondary);
  color: var(--text-white);
}

.page-hero {
  background: linear-gradient(135deg, var(--secondary), #172a4a);
  color: var(--text-white);
  padding: 56px 0;
  text-align: center;
}

.page-hero h1 {
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 12px;
}

.page-hero p {
  color: #cbd5e1;
  max-width: 660px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-header p {
  font-size: 16px;
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto;
}

.section-dark .section-header p {
  color: #94a3b8;
}

/* ═══ SERVICES GRID ═══ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #bfdbfe;
}

.service-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: var(--text-white);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 16px rgba(29, 78, 216, 0.18);
}

.service-card h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}

.service-tagline {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.85;
}

.service-card ul {
  list-style: none;
  margin-top: 16px;
  margin-bottom: 20px;
}

.service-card ul li {
  padding: 5px 0;
  padding-right: 22px;
  font-size: 14px;
  color: var(--text-light);
  position: relative;
}

.service-card ul li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--success);
  font-weight: 800;
}

.service-card-footer {
  margin-top: auto;
  padding-top: 12px;
}

/* ═══ STATS ═══ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 28px;
  text-align: center;
}

.stat-item {
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item h3 {
  font-size: 40px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 6px;
}

.stat-item p {
  font-size: 14px;
  color: #cbd5e1;
}

/* ═══ FILTER BAR ═══ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-chip {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-light);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-chip.active {
  background: var(--primary);
  color: var(--text-white);
  border-color: var(--primary);
}

/* ═══ PROJECTS ═══ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-thumb {
  height: 170px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.project-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.project-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-client {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.project-info h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
}

.project-info p {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 16px;
  flex: 1;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 12px;
  background: #eff6ff;
  color: var(--primary);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* ═══ WORKFLOW & ABOUT ═══ */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.workflow-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eff6ff;
  color: var(--primary);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.workflow-step h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
}

.workflow-step p {
  font-size: 14px;
  color: var(--text-light);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
}

.about-image {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: var(--text-white);
  border-radius: var(--radius);
  height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-shadow: var(--shadow-lg);
}

.about-image span {
  font-size: 14px;
  color: #cbd5e1;
  font-weight: 600;
}

.about-text h2,
.about-text h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 14px;
  line-height: 1.9;
}

/* ═══ CONTACT ═══ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.contact-info-list {
  list-style: none;
}

.contact-info-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.contact-info-list li:last-child {
  border-bottom: none;
}

.contact-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  background: #eff6ff;
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-detail h4 {
  font-weight: 700;
  margin-bottom: 4px;
}

.contact-detail p {
  color: var(--text-light);
  font-size: 14px;
}

/* ═══ FORMS & ALERTS ═══ */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition);
  background: var(--bg-card);
  color: var(--text);
  direction: rtl;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

textarea.form-control {
  min-height: 128px;
  resize: vertical;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
  font-size: 14px;
  font-weight: 500;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ═══ FOOTER ═══ */
.footer {
  background: var(--secondary);
  color: #94a3b8;
  padding: 64px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-about p {
  font-size: 14px;
  line-height: 1.85;
  margin-top: 14px;
}

.footer-col h4 {
  color: var(--text-white);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 9px;
  font-size: 14px;
}

.footer-col ul li a {
  color: #94a3b8;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--text-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

.footer-admin-link {
  color: #64748b;
  transition: var(--transition);
}

.footer-admin-link:hover {
  color: #cbd5e1;
}

@media (max-width: 820px) {
  .about-content,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 15px;
  }

  .section {
    padding: 52px 0;
  }
}

@media (max-width: 520px) {
  .footer-grid,
  .services-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
}
