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

:root {
  --color-primary: #0c3d6e;
  --color-primary-dark: #082a4d;
  --color-primary-light: #1a5a96;
  --color-accent: #c9a227;
  --color-accent-dark: #a8861f;
  --color-bg: #f4f6f9;
  --color-surface: #ffffff;
  --color-text: #1e2a3a;
  --color-text-muted: #5a6578;
  --color-border: #d8dee8;
  --color-success: #1a7a4c;
  --shadow-sm: 0 1px 3px rgba(12, 61, 110, 0.08);
  --shadow-md: 0 4px 16px rgba(12, 61, 110, 0.12);
  --shadow-lg: 0 8px 32px rgba(12, 61, 110, 0.16);
  --radius: 4px;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background-color: var(--color-bg);
  direction: rtl;
  text-align: right;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-accent);
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Top Bar ===== */
.top-bar {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8125rem;
  padding: 0.4rem 0;
  border-bottom: 2px solid var(--color-accent);
}

.top-bar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar__date {
  opacity: 0.9;
}

.top-bar__links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.top-bar__links a {
  color: rgba(255, 255, 255, 0.85);
}

.top-bar__links a:hover {
  color: var(--color-accent);
}

/* ===== Header ===== */
.site-header {
  background: var(--color-surface);
  border-bottom: 3px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-brand__emblem {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.site-brand__text {
  display: flex;
  flex-direction: column;
  padding-right: 1.5rem;
}

.site-brand__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.4;
}

.site-brand__subtitle {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.main-nav {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.main-nav a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--color-primary);
  color: #fff;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-primary-light) 100%);
  color: #fff;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/images/pattern.svg') repeat;
  background-size: 56px 56px;
  opacity: 0.08;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(201, 162, 39, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__content {
  max-width: 640px;
  text-align: center;
  margin: 0 auto;
}

.hero__title {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 1rem;
}

.hero__desc {
  font-size: 1.0625rem;
  opacity: 0.92;
  margin-bottom: 2rem;
  line-height: 1.9;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== Landing (full-height hero) ===== */
.landing-page {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
}

.hero--full {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 2rem 0;
}

.hero--full::before {
  background-image: url('../assets/images/landing-pattern.svg');
  background-size: 72px 62px;
  opacity: 0.09;
}

.hero--full::after {
  background: radial-gradient(ellipse at 50% 50%, rgba(201, 162, 39, 0.08) 0%, transparent 70%);
}

.hero--full .hero__inner {
  width: 100%;
  min-height: 100%;
}

.hero--full .hero__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.hero--full .hero__desc {
  font-size: clamp(1rem, 2vw, 1.125rem);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: 1.0625rem;
}

.btn__icon {
  width: 20px;
  height: 20px;
}

/* ===== Section ===== */
.section {
  padding: 4rem 0;
}

.section--alt {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.section__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 0.75rem auto 0;
}

.section__subtitle {
  color: var(--color-text-muted);
  font-size: 1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--color-text);
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-right: 4px solid var(--color-primary);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
}

.stat-card__number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-card__label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card__icon svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

.service-card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}

.service-card__desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ===== Registration CTA ===== */
.register-cta {
  background: linear-gradient(to left, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}

.register-cta__title {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.register-cta__desc {
  font-size: 1.0625rem;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.9;
}

.register-cta__steps {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.register-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
}

.register-step__num {
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  color: var(--color-primary-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* ===== News ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.news-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.news-card:hover {
  box-shadow: var(--shadow-md);
}

.news-card__date {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  font-weight: 500;
}

.news-card__body {
  padding: 1.25rem;
}

.news-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.news-card__excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 3rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-brand__desc {
  font-size: 0.875rem;
  line-height: 1.8;
  opacity: 0.8;
}

.footer-col__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.875rem;
  margin-bottom: 0.625rem;
  opacity: 0.85;
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  fill: var(--color-accent);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-bottom {
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.8125rem;
  opacity: 0.65;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .news-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .hero__title {
    font-size: 1.625rem;
  }

  .services-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

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

  .register-cta__steps {
    flex-direction: column;
    align-items: center;
  }
}
