/* =============================================
   صفحه اصلی
   ============================================= */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}


/* ---------------------------------------------
   سربرگ
   --------------------------------------------- */

.hero {
  position: relative;
  display: grid;
}

.hero-img {
  grid-area: 1 / 1;
  width: 100%;
  height: clamp(320px, 46vw, 620px);
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0 0 var(--r-xl) var(--r-xl);
}

/* کارت سربرگ روی عکس می‌نشیند، پس رنگ‌هایش از توکن‌های
   اختصاصی hero می‌آید تا در تم تیره هم خوانا بماند. */
.hero-card {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  width: min(680px, 86%);
  padding: clamp(20px, 3vw, 34px);
  border-radius: var(--r-xl);
  text-align: center;
  margin-top: calc(var(--header-h) / 2);
  background-image: linear-gradient(
    150deg,
    var(--hero-tint-a) 0%,
    var(--hero-tint-b) 50%,
    var(--hero-tint-a) 100%
  );
  border-color: var(--hero-rim);
  color: var(--hero-text);
}

.hero-card h1 {
  margin: 0 0 10px;
  font-size: clamp(21pt, 3.6vw, 30pt);
  line-height: 1.35;
  color: var(--hero-text);
}

.hero-lead {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: clamp(12pt, 1.7vw, 15pt);
  color: var(--hero-accent);
}

.hero-card p {
  margin: 0;
  font-size: clamp(11pt, 1.4vw, 13.5pt);
  line-height: 1.95;
  color: var(--hero-text-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.hero-btn {
  padding: 10px 26px;
  border-radius: var(--r-pill);
  font-size: 12.5pt;
  font-weight: 700;
  color: var(--hero-text);
  text-decoration: none;
  background-image: linear-gradient(
    150deg,
    var(--hero-tint-a) 0%,
    var(--hero-tint-b) 55%,
    var(--hero-tint-a) 100%
  );
  border-color: var(--hero-rim);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.hero-btn:hover {
  transform: translateY(-2px);
}


/* ---------------------------------------------
   حوزه‌های کاری
   --------------------------------------------- */

.services {
  width: min(1200px, 92%);
  margin: 0 auto 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.service-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-xl);
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.service-card:hover {
  transform: translateY(-4px);
}

.service-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
  /* شعاع هم‌مرکز: شعاع بیرونی منهای فاصله */
  border-radius: calc(var(--r-xl) - 8px);
  margin: 8px 8px 0;
  width: calc(100% - 16px);
}

.service-card-body {
  padding: 1rem 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-card-body h3 {
  margin: 0 0 8px;
  font-size: 14.5pt;
  line-height: 1.5;
}

.service-card-body p {
  margin: 0 0 14px;
  font-size: 11.5pt;
  line-height: 1.85;
  color: var(--text-2);
}

.feature-more {
  margin-top: auto;
  font-size: 11pt;
  font-weight: 700;
  color: var(--accent);
}


/* ---------------------------------------------
   کارفرمایان
   --------------------------------------------- */

.employers {
  width: min(1200px, 92%);
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.employer-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 1.2rem 0.9rem;
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.employer-card:hover {
  transform: translateY(-4px);
}

.employer-card img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}

.employer-card p {
  margin: 0;
  font-size: 11.5pt;
  line-height: 1.6;
  font-weight: 700;
}


@media (max-width: 860px) {
  /* روی صفحه‌های باریک کارت بلندتر از تصویر می‌شود و زیر هدر
     می‌رود؛ پس به‌جای هم‌پوشانی، زیر تصویر می‌نشیند. */
  .hero {
    display: block;
  }

  .hero-img {
    height: clamp(200px, 46vw, 300px);
    border-radius: 0 0 var(--r-lg) var(--r-lg);
  }

  .hero-card {
    width: 92%;
    margin: -42px auto 0;
  }
}

@media (max-width: 720px) {

  .service-card img {
    height: 170px;
  }

  .employers {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 0.7rem;
  }

  .employer-card img {
    width: 62px;
    height: 62px;
  }

  .employer-card p {
    font-size: 10pt;
  }
}
