/* ===== فونت و پایه ===== */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
  --green: #3a7d44;
  --green-light: #5aab66;
  --green-dark: #2a5c32;
  --orange: #f5a623;
  --orange-dark: #e08c10;
  --dark: #1a1a1a;
  --gray: #f5f5f5;
  --gray-mid: #e0e0e0;
  --white: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --shadow: 0 4px 20px rgba(0,0,0,0.1);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.18);
  --radius: 16px;
  --radius-sm: 8px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  direction: rtl;
  background: var(--white);
  color: var(--text);
  line-height: 1.7;
}

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

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

/* ===== هدر ===== */
header {
  background: var(--white);
  box-shadow: 0 2px 15px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 75px;
}

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

.logo img {
  height: 58px;
  width: auto;
}

.logo-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.4;
}

.logo-text span {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-light);
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a {
  padding: 8px 18px;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.3s;
}

nav a:hover,
nav a.active {
  background: var(--green);
  color: var(--white);
}

.nav-contact-btn {
  background: var(--orange) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
}

.nav-contact-btn:hover {
  background: var(--orange-dark) !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2.5px;
  background: var(--dark);
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== هیرو ===== */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 50%, var(--green-light) 100%);
  padding: 80px 20px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 40%;
  height: 120%;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 750px;
  margin: 0 auto;
}

.hero-logo {
  width: 120px;
  height: auto;
  margin: 0 auto 24px;
  filter: drop-shadow(0 4px 15px rgba(0,0,0,0.3));
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.hero-btns-top {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.btn-exam-full {
  width: 100%;
  justify-content: center;
}

.btn {
  padding: 14px 32px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Vazirmatn', sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(245,166,35,0.4);
}

.btn-primary:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,166,35,0.5);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.7);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-exam {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
  backdrop-filter: blur(6px);
}

.btn-exam:hover {
  background: rgba(255,255,255,0.28);
  border-color: var(--white);
  transform: translateY(-2px);
}

/* ===== بخش ها ===== */
.section {
  padding: 70px 20px;
}

.section-gray {
  background: var(--gray);
}

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

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 10px;
}

.section-title p {
  color: var(--text-light);
  font-size: 1rem;
}

.section-title .line {
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, var(--green), var(--orange));
  border-radius: 2px;
  margin: 14px auto 0;
}

/* ===== کارت محصولات ===== */
.products-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.product-card {
  flex: 1 1 320px;
  max-width: 380px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.35s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.product-img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  background: #f8f8f8;
  padding: 12px;
  transition: transform 0.4s;
}

.product-card:hover .product-img {
  transform: scale(1.06);
}

.product-img-wrap {
  overflow: hidden;
  position: relative;
}

.product-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--orange);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.product-body {
  padding: 22px;
}

.product-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.product-body p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  padding: 0 22px 22px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.btn-more {
  background: var(--green);
  color: var(--white);
  padding: 9px 22px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Vazirmatn', sans-serif;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

/* ===== دکمه مشاهده همه ===== */
.show-all-wrap {
  text-align: center;
  margin-top: 45px;
}

/* ===== مودال محصول ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 820px;
  width: 100%;
  margin: auto;
  overflow: hidden;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: var(--white);
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  font-family: 'Vazirmatn', sans-serif;
}

.modal-close:hover {
  background: rgba(255,255,255,0.35);
}

/* اسلایدر */
.slider-wrap {
  position: relative;
  background: #111;
}

.slider-track {
  display: flex;
  transition: transform 0.45s ease;
}

.slider-slide {
  min-width: 100%;
}

.slider-slide img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  color: var(--white);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Vazirmatn', sans-serif;
}

.slider-btn:hover {
  background: rgba(0,0,0,0.8);
}

.slider-btn.prev { right: 12px; }
.slider-btn.next { left: 12px; }

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 12px;
  background: #111;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.slider-dot.active {
  background: var(--orange);
  width: 22px;
  border-radius: 4px;
}

/* محتوای مودال */
.modal-content {
  padding: 28px;
}

.modal-desc {
  font-size: 0.97rem;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 24px;
}

.modal-phone {
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  border: 1.5px solid var(--green-light);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 0.95rem;
  color: var(--green-dark);
  font-weight: 600;
}

.modal-phone .icon {
  font-size: 1.3rem;
}

/* PDF دانلود */
.pdf-section {
  border-top: 1.5px solid var(--gray-mid);
  padding-top: 22px;
}

.pdf-section h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
}

.pdf-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pdf-btn {
  flex: 1 1 140px;
  max-width: 160px;
}

.pdf-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--gray);
  border: 1.5px solid var(--gray-mid);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  color: var(--text);
  font-family: 'Vazirmatn', sans-serif;
}

.pdf-btn:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(58,125,68,0.3);
}

.pdf-btn .pdf-icon {
  font-size: 1.8rem;
}

.pdf-btn .pdf-label {
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

/* ===== درباره ما ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-img {
  display: none;
}

.about-text h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 18px;
}

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

.about-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-dark);
}

.feature-item::before {
  content: '✓';
  width: 22px;
  height: 22px;
  background: var(--green);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* ===== تماس ===== */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
  flex: 1 1 260px;
  max-width: 320px;
}

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

.contact-icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
}

.contact-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.contact-card p, .contact-card a {
  color: var(--text-light);
  font-size: 0.93rem;
  line-height: 1.8;
  display: block;
}

.contact-card a:hover {
  color: var(--green);
}

/* ===== فوتر ===== */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.75);
  padding: 40px 20px 20px;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo {
  height: 60px;
  width: auto;
  margin: 0 auto 16px;
  opacity: 0.85;
}

.footer-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.footer-copy {
  font-size: 0.82rem;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ===== صفحه تماس ===== */
.page-hero {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: var(--white);
  padding: 55px 20px;
  text-align: center;
}

.page-hero h1 {
  font-size: 2rem;
  font-weight: 800;
}

.page-hero p {
  opacity: 0.85;
  margin-top: 8px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.88rem;
  opacity: 0.8;
}

.breadcrumb a:hover { text-decoration: underline; }

/* ===== صفحه محصولات ===== */
.products-page-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.products-page-grid .product-card {
  flex: 1 1 300px;
  max-width: 360px;
}

/* ===== موبایل ===== */
@media (max-width: 768px) {
  nav {
    display: none;
    position: absolute;
    top: 75px;
    right: 0;
    left: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    gap: 6px;
  }

  nav.open {
    display: flex;
  }

  nav a {
    width: 100%;
    text-align: center;
    padding: 12px;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 1.7rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .products-grid .product-card {
    flex-basis: 100%;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .modal-box {
    margin: 0;
    border-radius: var(--radius) var(--radius) 0 0;
  }
}

@media (max-width: 480px) {
  .header-inner {
    height: 65px;
  }

  .logo img {
    height: 46px;
  }

  .hero {
    padding: 55px 16px;
  }

  .section {
    padding: 50px 16px;
  }

  .pdf-btn {
    flex: 1 1 30%;
    max-width: 32%;
  }
}
