/* ============================================================
   Rayatavan — corporate site stylesheet (EN + FA)
   ============================================================ */
:root {
  --red: #f9a825;          /* brand amber (from logo) */
  --red-dark: #d98f00;
  --amber-text: #b47a00;   /* darker amber for small text on white */
  --blue: #3a72b8;         /* CV banner blue, used for tags */
  --navy: #262a56;         /* brand navy (from logo) */
  --ink: #23263f;
  --gray: #5b6472;
  --line: #e4e7ec;
  --bg-soft: #f5f6f8;
  --white: #ffffff;
  --max-w: 1180px;
  --font-en: "Segoe UI", Arial, Helvetica, sans-serif;
  --font-fa: "Vazirmatn", Tahoma, "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-en);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
}

html[dir="rtl"] body { font-family: var(--font-fa); }

img, svg { max-width: 100%; display: block; }

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--navy);
  white-space: nowrap;
}

.brand .emblem {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
}

.brand span { color: var(--amber-text); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.main-nav a:hover { color: var(--amber-text); border-color: var(--red); }

.lang-switch {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  transition: background .2s, color .2s;
  white-space: nowrap;
}

.lang-switch:hover { background: var(--navy); color: var(--white); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  margin: 4px 0;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  background: linear-gradient(115deg, #14172e 0%, #262a56 55%, #333870 100%);
  overflow: hidden;
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.hero-inner {
  position: relative;
  padding: 110px 0 120px;
  max-width: 640px;
}

html[dir="rtl"] .hero-inner { max-width: 680px; }

.hero .kicker {
  display: inline-block;
  color: var(--navy);
  background: var(--red);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  margin-bottom: 22px;
}

html[dir="rtl"] .hero .kicker { letter-spacing: 0; }

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.1rem;
  color: #c6cede;
  margin-bottom: 36px;
}

.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 30px;
  border-radius: 4px;
  transition: background .2s, color .2s, border-color .2s;
}

.btn-red { background: var(--red); color: var(--navy); }
.btn-red:hover { background: var(--red-dark); }

.btn-ghost {
  border: 1px solid rgba(255,255,255,.45);
  color: var(--white);
  margin-inline-start: 12px;
}
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,.1); }

/* ---------- Stats bar ---------- */
.stats {
  background: var(--navy);
  color: var(--white);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}

.stat {
  padding: 34px 12px;
  border-inline-start: 1px solid rgba(255,255,255,.08);
}

.stat:first-child { border-inline-start: none; }

.stat .num {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--white);
}

.stat .num em { color: var(--red); font-style: normal; }

.stat .label {
  font-size: 0.85rem;
  color: #9aa4b5;
  margin-top: 4px;
}

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section.soft { background: var(--bg-soft); }

.section-head { max-width: 720px; margin-bottom: 52px; }

.section-head .tag {
  color: var(--blue);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

html[dir="rtl"] .section-head .tag { letter-spacing: 0; font-size: 0.9rem; }

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--navy);
  margin: 10px 0 14px;
  line-height: 1.25;
}

.section-head p { color: var(--gray); }

/* ---------- Services ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  padding: 34px 28px;
  transition: box-shadow .25s, transform .25s;
}

.card:hover {
  box-shadow: 0 14px 34px rgba(16, 24, 40, .1);
  transform: translateY(-4px);
}

.card .icon {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
  color: var(--navy);
}

.card h3 {
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.card p { font-size: 0.95rem; color: var(--gray); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--navy);
  margin: 10px 0 18px;
  line-height: 1.25;
}

.about-text p { color: var(--gray); margin-bottom: 16px; }

.about-list { list-style: none; margin-top: 22px; }

.about-list li {
  position: relative;
  padding-inline-start: 30px;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--ink);
}

.about-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 7px;
  width: 14px;
  height: 14px;
  background: var(--red);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

html[dir="rtl"] .about-list li::before {
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.about-art {
  background: var(--navy);
  border-radius: 6px;
  overflow: hidden;
}

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.project {
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project .thumb {
  height: 190px;
  background: linear-gradient(130deg, #1b1e3d, #333870);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.85);
}

.project .thumb svg { width: 84px; height: 84px; }

.project .body { padding: 26px 24px 30px; }

.project .meta {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

html[dir="rtl"] .project .meta { letter-spacing: 0; font-size: 0.85rem; }

.project h3 { color: var(--navy); font-size: 1.1rem; margin: 8px 0 8px; }

.project p { font-size: 0.92rem; color: var(--gray); }

/* ---------- Clients ---------- */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.client {
  background: var(--white);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--red);
  padding: 20px 22px;
}

.client strong { display: block; color: var(--navy); font-size: 1rem; }
.client span { color: var(--gray); font-size: 0.88rem; }

/* ---------- Leadership ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.member {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  padding: 30px 26px;
  text-align: center;
}

.member .avatar {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 2px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}

.member .avatar svg { width: 36px; height: 36px; }

.member h3 { color: var(--navy); font-size: 1.05rem; }
.member .role { color: var(--amber-text); font-weight: 700; font-size: 0.85rem; margin: 4px 0 10px; }
.member p { color: var(--gray); font-size: 0.88rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}

.contact-info h3 { color: var(--navy); margin-bottom: 18px; font-size: 1.2rem; }

.contact-item {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.contact-item .ci-icon {
  width: 42px;
  height: 42px;
  flex: none;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}

.contact-item .ci-icon svg { width: 20px; height: 20px; }

.contact-item strong { display: block; color: var(--navy); font-size: 0.95rem; }
.contact-item span { color: var(--gray); font-size: 0.92rem; direction: ltr; unicode-bidi: embed; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 36px 32px;
  border-radius: 6px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
}

.contact-form .field { margin-bottom: 18px; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 11px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--bg-soft);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--red);
  outline-offset: -1px;
  background: var(--white);
}

.contact-form button {
  border: none;
  cursor: pointer;
  font: inherit;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #9aa4b5;
  padding: 60px 0 0;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.site-footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
}

.site-footer .brand { color: var(--white); margin-bottom: 14px; }
.site-footer .brand span { color: var(--red); }
.site-footer .brand .emblem { background: var(--white); }

.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.site-footer a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .main-nav {
    position: absolute;
    top: 68px;
    inset-inline: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 24px;
    gap: 16px;
    display: none;
  }

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

  .nav-toggle { display: block; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-inline-start: none; }
  .stat { border-top: 1px solid rgba(255,255,255,.08); }
  .stat:nth-child(-n+2) { border-top: none; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-inner { padding: 80px 0 90px; }
}
