/* =========================================
   فونت و پایه
========================================= */
@import url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css");

:root {
  --primary: #0b3b5c;
  --primary-light: #1e6d9a;
  --accent: #f1c40f;
  --bg: #f5f8fa;
  --text: #1a2b3c;
  --text-muted: #7a8b99;
  --white: #ffffff;
  --border: #eef2f5;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  margin: 0;
  padding: 0;
  direction: rtl;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
}
a {
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
img {
  max-width: 100%;
  display: block;
}
button,
input {
  font-family: inherit;
}
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================
   هدر بالا
========================================= */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.head-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-logo img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.brand-title h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 2px;
  line-height: 1.4;
}
.brand-title p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* بخش اکشن‌های هدر */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* دکمه انتخاب استان و شهر */
.location-btn {
  background: #f0f5f9;
  color: var(--primary);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: 0.25s;
}
.location-btn:hover {
  background: #e0eaf2;
  border-color: var(--primary-light);
}
.location-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* دکمه ورود */
.login-btn {
  background: var(--primary);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(11, 59, 92, 0.15);
  transition: 0.25s;
  border: none;
  cursor: pointer;
}
.login-btn:hover {
  background: #072a42;
  transform: translateY(-1px);
}
.login-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* =========================================
   منوی ناوبری (بدون اسکرول)
========================================= */
.main-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 99;
}
.nav-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap; /* اجازه می‌دهد منو به خط بعد برود */
  overflow-x: visible; /* اسکرول را حذف کردیم */
}
.menu-items {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap; /* زیر آیتم‌ها هم در صورت نیاز به خط بعد می‌روند */
}
.menu-items > li {
  position: relative;
}
.menu-items > li > a,
.menu-items > li > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 16px 18px;
  font-size: 0.9rem;
  color: #2c3e50;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: 0.2s;
}
.menu-items > li > a:hover,
.menu-items > li > button:hover {
  color: var(--primary-light);
}
.menu-items > li > a.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
  font-weight: 700;
}
.home-icon {
  color: var(--accent);
  font-size: 1.1rem;
}

/* زیرمنو */
.has-sub .submenu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  min-width: 220px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 12px 12px;
  border: 1px solid var(--border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: 0.2s;
  z-index: 100;
}
.has-sub:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.has-sub .submenu li a,
.has-sub .submenu li button {
  display: block;
  width: 100%;
  text-align: right;
  padding: 12px 18px;
  font-size: 0.85rem;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.has-sub .submenu li a:hover,
.has-sub .submenu li button:hover {
  background: #f0f5f9;
  color: var(--primary-light);
}
.mobile-toggle {
  display: none;
}

/* =========================================
   مودال انتخاب استان و شهر
========================================= */
.location-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.location-modal-overlay.active {
  display: flex;
}
.location-modal-box {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: modalFadeIn 0.3s ease;
}
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.location-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: #f8fbfd;
}
.location-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--primary);
}
.close-location-modal {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0 5px;
  transition: 0.2s;
}
.close-location-modal:hover {
  color: #e74c3c;
}
.location-modal-body {
  padding: 24px;
}
.location-modal-body .form-group {
  margin-bottom: 20px;
}
.location-modal-body label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.location-modal-body select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d0dbe4;
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.location-modal-body select:focus {
  border-color: var(--primary-light);
}
.location-modal-body select:disabled {
  background: #f4f7f9;
  cursor: not-allowed;
}
.save-location-btn {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.25s;
  margin-top: 10px;
}
.save-location-btn:hover {
  background: #072a42;
}

/* =========================================
   اسلایدر (Hero) - بدون تغییر
========================================= */
.hero {
  position: relative;
  background: #f0f7fc;
  overflow: hidden;
  direction: rtl;
}
.hero-slider {
  position: relative;
  width: 100%;
  height: 480px;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.6s ease-in-out,
    visibility 0.6s ease-in-out;
  display: flex;
  align-items: center;
}
.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}
.hero-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(240, 247, 252, 0.95) 0%,
    rgba(240, 247, 252, 0.8) 45%,
    rgba(240, 247, 252, 0) 100%
  );
  z-index: 1;
}
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 40px;
  position: relative;
  z-index: 2;
}
.hero-content {
  flex: 1;
  max-width: 600px;
  color: var(--primary);
}
.hero-content h2 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 20px;
  color: #073660;
}
.hero-content p {
  font-size: 1.2rem;
  color: var(--primary-light);
  margin: 0 0 30px;
  opacity: 0.9;
}
.gold-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--primary);
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(241, 196, 15, 0.4);
  transition: all 0.3s ease;
  text-decoration: none;
}
.gold-btn:hover {
  background: #f39c12;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(241, 196, 15, 0.5);
}
.hero-dots {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}
.hero-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(11, 59, 92, 0.3);
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}
.hero-dots button.on,
.hero-dots button:hover {
  background: var(--primary-light);
  transform: scale(1.2);
}

/* =========================================
   کارت‌های خدمات (Feature Grid)
========================================= */
.main-content {
  margin-top: -40px;
  position: relative;
  z-index: 5;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}
.feature-card {
  background: var(--white);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 8px 30px rgba(11, 59, 92, 0.1);
  border: 1px solid var(--border);
  transition: 0.25s;
  cursor: pointer;
  text-align: right;
  width: 100%;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(11, 59, 92, 0.15);
}
.feature-icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #eaf4fa;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
}
.feature-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.feature-text {
  flex: 1;
}
.feature-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.feature-text small {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.circle-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  font-size: 1.2rem;
  transition: 0.2s;
}
.feature-card:hover .circle-arrow {
  background: var(--primary-light);
  color: var(--white);
  border-color: var(--primary-light);
}

/* =========================================
   استعلام گواهینامه
========================================= */
.verify-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(90deg, #0b3b5c 0%, #1e6d9a 100%);
  border-radius: 16px;
  padding: 24px 32px;
  color: var(--white);
  box-shadow: 0 10px 30px rgba(11, 59, 92, 0.2);
  position: relative;
  overflow: hidden;
  margin-bottom: 48px;
}
.verify-medal {
  background: var(--white);
  color: var(--primary);
  padding: 10px 15px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px dashed var(--accent);
}
.verify-medal::before {
  content: "✦";
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 5px;
}
.verify-copy {
  flex: 1;
}
.verify-copy h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 700;
}
.verify-copy p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.85;
}
.verify-action {
  background: var(--white);
  color: var(--primary);
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.2s;
}
.verify-action:hover {
  background: var(--accent);
  color: var(--primary);
}
.verify-action b {
  font-size: 1.2rem;
}

/* =========================================
   بخش‌های عمومی
========================================= */
.section {
  margin-bottom: 48px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.section-heading h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  position: relative;
  padding-bottom: 10px;
}
.section-heading h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 55px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}
.carousel-controls {
  display: flex;
  gap: 8px;
}
.carousel-controls button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--primary-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: 0.2s;
}
.carousel-controls button:hover {
  background: var(--primary-light);
  color: var(--white);
  border-color: var(--primary-light);
}
.all-link {
  color: var(--primary-light);
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* =========================================
   کارت‌های دوره
========================================= */
.course-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.course-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: row-reverse;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(11, 59, 92, 0.06);
  transition: 0.25s;
}
.course-card:hover {
  box-shadow: 0 12px 28px rgba(11, 59, 92, 0.12);
  transform: translateY(-2px);
}
.course-card img {
  width: 180px;
  flex-shrink: 0;
  object-fit: cover;
}
.course-info {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.course-status {
  background: #27ae60;
  color: var(--white);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  align-self: flex-start;
  margin-bottom: 10px;
}
.course-info h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--primary);
  font-weight: 700;
}
.course-info small {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: block;
}
.course-info a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  color: var(--primary-light);
  border: 1px solid var(--primary-light);
  padding: 8px 18px;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 700;
  align-self: flex-start;
  transition: 0.2s;
}
.course-info a:hover {
  background: var(--primary-light);
  color: var(--white);
}
.small-hint {
  text-align: left;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* =========================================
   هیئت مدیره
========================================= */
.agents-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #eaf4fa;
  border: 1px solid #d6e8f2;
  border-radius: 16px;
  padding: 20px 28px;
  margin-bottom: 48px;
  transition: 0.25s;
}
.agents-bar:hover {
  box-shadow: 0 8px 20px rgba(30, 109, 154, 0.1);
}
.agents-symbol {
  font-size: 1.5rem;
  color: var(--primary-light);
  letter-spacing: 4px;
}
.agents-text {
  flex: 1;
}
.agents-text strong {
  display: block;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 4px;
}
.agents-text small {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.agents-cta {
  background: var(--white);
  color: var(--primary-light);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.iran-icon {
  color: var(--accent);
  font-size: 1.5rem;
}

/* =========================================
   اخبار
========================================= */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.news-list-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.2s;
}
.news-list-item:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(30, 109, 154, 0.08);
}
.news-list-item h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 400;
}
.news-list-item time {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: #f0f5f9;
  padding: 4px 10px;
  border-radius: 6px;
}

/* =========================================
   خدمات پایین
========================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 12px;
  text-align: center;
  transition: 0.25s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.service-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 8px 20px rgba(30, 109, 154, 0.12);
  transform: translateY(-3px);
}
.service-card svg {
  width: 32px;
  height: 32px;
  color: var(--primary-light);
  stroke-width: 1.5;
  fill: none;
  stroke: currentColor;
}
.service-card strong {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
}

/* =========================================
   فوتر
========================================= */
.site-footer {
  background: var(--primary);
  color: var(--white);
  padding: 50px 0 0;
}
.site-footer h2 {
  text-align: center;
  font-size: 1.3rem;
  margin: 0 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.footer-grid h3 {
  font-size: 1rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
  margin: 0 0 15px;
}
.footer-grid h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.footer-grid a {
  color: #a8c0d0;
  font-size: 0.85rem;
  display: inline-block;
}
.footer-grid a:hover {
  color: var(--white);
  padding-right: 6px;
}
.copyright {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px 24px;
  font-size: 0.8rem;
  color: #a8c0d0;
  margin-top: 40px;
}

/* =========================================
   ریسپانسیو
========================================= */
@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
  .course-track {
    grid-template-columns: 1fr 1fr;
  }
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-content h2 {
    font-size: 2.2rem;
  }
}
@media (max-width: 768px) {
  .head-top {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .brand-title h1 {
    font-size: 1.1rem;
  }
  .header-actions {
    flex-direction: column;
    width: 100%;
  }
  .location-btn,
  .login-btn {
    width: 100%;
    justify-content: center;
  }

  .menu-items {
    display: none;
    flex-direction: column;
    width: 100%;
  }
  .menu-items.open {
    display: flex;
  }
  .mobile-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    padding: 15px 0;
    cursor: pointer;
  }
  .has-sub .submenu {
    position: static;
    box-shadow: none;
    border: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    padding-right: 20px;
  }
  .has-sub.open .submenu {
    display: block;
  }

  .hero-slider {
    height: 420px;
  }
  .hero-slide::after {
    background: linear-gradient(
      0deg,
      rgba(240, 247, 252, 0.95) 0%,
      rgba(240, 247, 252, 0.7) 60%,
      rgba(240, 247, 252, 0.2) 100%
    );
  }
  .hero-inner {
    justify-content: center;
    text-align: center;
  }
  .hero-content h2 {
    font-size: 1.8rem;
  }
  .hero-content p {
    font-size: 1rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
  .course-track {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-grid h3::after {
    right: 50%;
    transform: translateX(50%);
  }
  .verify-banner {
    flex-direction: column;
    text-align: center;
  }
}
