@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --green-dark:   #1a4d2e;
  --green-main:   #1e6b3c;
  --green-mid:    #2d8653;
  --green-light:  #3aaa6a;
  --green-pale:   #edf7f1;
  --green-border: #c5e4d0;
  --white:        #ffffff;
  --off-white:    #f7faf8;
  --gray-100:     #f3f4f6;
  --gray-200:     #e5e7eb;
  --gray-400:     #9ca3af;
  --gray-600:     #6b7280;
  --text-main:    #1a2e1f;
  --text-sub:     #4b6358;
  --shadow-sm:    0 1px 4px rgba(0,0,0,.06);
  --shadow-md:    0 4px 20px rgba(30,107,60,.10);
  --shadow-lg:    0 8px 40px rgba(30,107,60,.14);
  --radius-sm:    10px;
  --radius-md:    16px;
  --radius-lg:    22px;
  --radius-full:  999px;
  --transition:   0.25s cubic-bezier(.4,0,.2,1);
  --font-fa:      'Vazirmatn', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-fa); direction: rtl; background: var(--off-white); color: var(--text-main); line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.site-wrapper { width: 100%; max-width: 1200px; margin: 0 auto; background: var(--white); min-height: 100vh; }

/* ═══ هدر ═══ */

.hero {
  background: #ffffff;
  display: grid;
  grid-template-columns: 420px 1fr;
  align-items: stretch;
  min-height: 580px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--green-border);
}

.hero-image-col {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow: hidden;
}

.profile-image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

.profile-bg-circle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58,170,106,.4) 0%, rgba(58,170,106,.15) 55%, transparent 75%);
  z-index: 0;
  filter: blur(30px);
  pointer-events: none;
}

.profile-image {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 1;
  width: 463px;
  height: 112%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.hero-info-col {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 40px 120px 40px;
  background: transparent;
}

.hero-logo { margin-bottom: 20px; display: flex; justify-content: flex-start; }
.hero-logo img { height: 80px; filter: none; }

.hero-name {
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.2;
  text-align: right;
}

.hero-title {
  font-size: 1.2rem;
  color: var(--text-sub);
  margin-bottom: 14px;
  text-align: right;
}

.agent-code {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--green-pale);
  border: 2px solid var(--green-border);
  border-radius: var(--radius-full);
  padding: 10px 28px;
  color: var(--green-dark);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
  width: fit-content;
}

.hero-quote {
 background: var(--green-pale);
    border-right: 5px solid var(--green-main);
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
    color: var(--text-main);
    font-size: 1.1rem;
    line-height: 1.9;
    font-weight: 500;
    margin-bottom: 0px;
    width: 150%;
}

.hero-save-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--green-main);
  border: 5px solid #ffffff;
  border-radius: var(--radius-md);
  padding: 18px 32px;
  color: #fff;
  font-family: var(--font-fa);
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  justify-content: center;
  margin: 0 16px 16px 16px;
  width: calc(100% - 32px);
}

.hero-save-btn:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hero-save-btn svg { width: 32px; height: 32px; flex-shrink: 0; }
.hero-save-btn .btn-sub { font-size: 0.9rem; font-weight: 400; opacity: .8; display: block; }

.save-contact-section { display: none; }

/* ═══ لینک‌های ارتباطی ═══ */
.contact-links { padding: 32px 40px; background: var(--white); border-bottom: 1px solid var(--green-border); }

.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--white);
  border: 1.5px solid var(--green-border);
  border-radius: var(--radius-md);
  padding: 22px 16px;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-main);
  text-align: center;
}

.contact-card:hover { border-color: var(--green-main); background: var(--green-pale); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.contact-card .cc-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--green-pale); display: flex; align-items: center; justify-content: center; }
.contact-card .cc-icon svg { width: 24px; height: 24px; color: var(--green-main); }
.contact-card .cc-label { font-size: .9rem; font-weight: 700; }
.contact-card .cc-sub { font-size: .75rem; color: var(--text-sub); }

/* ═══ عنوان بخش‌ها ═══ */
.section-title { display: flex; align-items: center; gap: 12px; font-size: 1.15rem; font-weight: 800; color: var(--text-main); margin-bottom: 28px; }
.section-title::after { content: ''; height: 2px; flex: 1; background: linear-gradient(90deg, var(--green-border), transparent); }
.section-title svg { color: var(--green-main); width: 22px; height: 22px; }

/* ═══ خدمات ═══ */
.services-section { padding: 40px; background: var(--off-white); border-bottom: 1px solid var(--green-border); }
.services-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.service-item { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 12px; border-radius: var(--radius-md); background: var(--white); border: 1.5px solid var(--green-border); transition: var(--transition); }
.service-item:hover { background: var(--green-pale); border-color: var(--green-main); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.service-icon { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; color: var(--green-main); }
.service-icon svg { width: 48px; height: 48px; }
.service-name { font-size: .85rem; font-weight: 700; text-align: center; line-height: 1.4; }

/* ═══ بنر ═══ */
.quote-banner { background: linear-gradient(135deg, #1a4d2e 0%, #1a5c2e 100%); padding: 48px 40px; color: var(--white); }
.quote-banner-inner { max-width: 900px; }
.quote-banner-text { font-size: 1.1rem; line-height: 2; font-weight: 500; margin-bottom: 28px; }
.quote-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 24px; }
.quote-feature { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: rgba(255,255,255,.85); }
.quote-feature svg { width: 20px; height: 20px; color: #6ee09a; flex-shrink: 0; }

/* ═══ دفتر ═══ */
.office-section { padding: 40px; background: var(--white); border-bottom: 1px solid var(--green-border); }
.office-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.office-info-item { display: flex; align-items: flex-start; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--gray-100); }
.office-info-item:last-child { border-bottom: none; }
.oii-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--green-pale); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--green-main); }
.oii-icon svg { width: 20px; height: 20px; }
.oii-label { font-size: .78rem; color: var(--text-sub); margin-bottom: 3px; }
.oii-value { font-size: .95rem; font-weight: 600; direction: ltr; text-align: right; unicode-bidi: bidi-override; }
.office-map { height: 260px; border-radius: var(--radius-md); overflow: hidden; border: 1.5px solid var(--green-border); }
.office-map iframe { width: 100%; height: 100%; border: none; }
.btn-navigate { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--green-main); color: var(--white); border-radius: 0 0 var(--radius-md) var(--radius-md); text-decoration: none; transition: var(--transition); margin-top: -4px; }
.btn-navigate:hover { background: var(--green-dark); }
.btn-navigate-title { font-size: .95rem; font-weight: 700; }
.btn-navigate-sub { font-size: .75rem; opacity: .8; }
.btn-navigate svg { width: 22px; height: 22px; transform: rotate(180deg); }

/* ═══ مطالب ═══ */
.posts-section { padding: 40px; background: var(--off-white); border-bottom: 1px solid var(--green-border); }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }
.post-card { display: flex; flex-direction: column; background: var(--white); border: 1.5px solid var(--green-border); border-radius: var(--radius-md); overflow: hidden; transition: var(--transition); text-decoration: none; color: inherit; }
.post-card:hover { border-color: var(--green-main); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.post-card-img { width: 100%; height: 160px; object-fit: cover; background: var(--green-pale); }
.post-card-body { padding: 16px; flex: 1; }
.post-card-title { font-size: .95rem; font-weight: 700; line-height: 1.5; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-meta { font-size: .75rem; color: var(--text-sub); }
.btn-archive { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 28px; background: transparent; border: 1.5px solid var(--green-main); border-radius: var(--radius-md); color: var(--green-main); font-size: .9rem; font-weight: 600; font-family: var(--font-fa); cursor: pointer; transition: var(--transition); text-decoration: none; }
.btn-archive:hover { background: var(--green-main); color: var(--white); }

/* ═══ فوتر ═══ */
.site-footer { background: linear-gradient(135deg, #1a4d2e, #0f2d1e); padding: 40px; color: var(--white); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-logo img { height: 40px; filter: brightness(0) invert(1) opacity(.9); }
.footer-code { font-size: .9rem; color: rgba(255,255,255,.7); }
.footer-copyright { font-size: .8rem; color: rgba(255,255,255,.4); }

/* ═══ آرشیو ═══ */
.page-header { background: linear-gradient(135deg, #1a4d2e, #1e6b3c); padding: 40px; color: var(--white); }
.page-header h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 6px; }
.page-header p { font-size: .9rem; opacity: .8; }
.archive-list { padding: 32px 40px; }
.archive-post-card { display: flex; gap: 20px; align-items: flex-start; padding: 20px; background: var(--white); border: 1.5px solid var(--green-border); border-radius: var(--radius-md); margin-bottom: 16px; text-decoration: none; color: inherit; transition: var(--transition); }
.archive-post-card:hover { border-color: var(--green-main); box-shadow: var(--shadow-md); }
.archive-post-img { width: 120px; height: 100px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; background: var(--green-pale); }
.archive-post-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.5; }
.archive-post-excerpt { font-size: .85rem; color: var(--text-sub); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.archive-post-meta { font-size: .75rem; color: var(--gray-400); margin-top: 8px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 24px 40px; }
.page-btn { width: 40px; height: 40px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--green-border); background: var(--white); color: var(--text-main); font-size: .9rem; font-weight: 600; text-decoration: none; transition: var(--transition); font-family: var(--font-fa); }
.page-btn:hover, .page-btn.active { background: var(--green-main); border-color: var(--green-main); color: var(--white); }

/* ═══ مقاله ═══ */
.post-single { padding: 32px 40px; max-width: 860px; }
.post-single-img { width: 100%; border-radius: var(--radius-md); margin-bottom: 24px; object-fit: cover; max-height: 400px; }
.post-single-title { font-size: 1.6rem; font-weight: 800; line-height: 1.4; margin-bottom: 12px; }
.post-single-meta { display: flex; gap: 20px; font-size: .82rem; color: var(--text-sub); padding-bottom: 20px; border-bottom: 1.5px solid var(--green-border); margin-bottom: 28px; flex-wrap: wrap; }
.post-single-meta span { display: flex; align-items: center; gap: 5px; }
.post-content { font-size: .95rem; line-height: 2.1; }
.post-content h2 { font-size: 1.2rem; font-weight: 700; margin: 28px 0 14px; color: var(--green-dark); }
.post-content p { margin-bottom: 18px; }
.post-content img { border-radius: var(--radius-md); margin: 20px 0; width: 100%; }
.post-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .88rem; }
.post-content table th, .post-content table td { border: 1px solid var(--green-border); padding: 12px 14px; text-align: right; }
.post-content table th { background: var(--green-pale); font-weight: 700; }
.post-content pre { background: #1a2e1f; color: #a8dfc0; border-radius: var(--radius-sm); padding: 20px; overflow-x: auto; font-size: .85rem; margin: 20px 0; direction: ltr; text-align: left; }
.post-content code { font-family: 'Courier New', monospace; font-size: .85em; background: var(--green-pale); padding: 2px 7px; border-radius: 4px; color: var(--green-dark); }
.post-content pre code { background: none; padding: 0; color: inherit; }

/* ═══ ریسپانسیو ═══ */
@media (max-width: 900px) {
  .hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
    position: relative;
  }
  .hero-image-col {
    order: 1;
    height: 340px;
    overflow: hidden;
    position: relative;
  }
  .profile-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }
  .profile-bg-circle {
    width: 220px;
    height: 220px;
  }
  .hero-info-col {
    order: 2;
    padding: 24px 20px 20px;
    align-items: flex-end;
    text-align: right;
    position: static;
  }
  .hero-logo { justify-content: flex-end; margin-bottom: 12px; }
  .hero-logo img { height: 52px; }
  .hero-name { font-size: 2rem; }
  .hero-title { font-size: 0.95rem; }
  .agent-code { font-size: 0.95rem; padding: 8px 18px; }
  .hero-quote { font-size: 0.9rem; width: 100%; margin-bottom: 16px; }
  .hero-save-btn {
    position: static;
    width: 100%;
    margin: 0 0 0 0;
    font-size: 1.1rem;
    padding: 16px 20px;
    border-radius: var(--radius-md);
  }
  .contact-links { padding: 24px 20px; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .services-section { padding: 28px 20px; }
  .services-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .quote-banner { padding: 32px 20px; }
  .quote-features { grid-template-columns: repeat(2, 1fr); }
  .office-section { padding: 28px 20px; }
  .office-inner { grid-template-columns: 1fr; }
  .posts-section { padding: 28px 20px; }
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer { padding: 28px 20px; flex-direction: column; text-align: center; }
  .archive-list { padding: 20px; }
  .post-single { padding: 20px; }
  .page-header { padding: 28px 20px; }
}

@media (max-width: 540px) {
  .hero-image-col { height: 280px; }
  .hero-name { font-size: 1.7rem; }
  .services-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .service-item { padding: 16px 8px; }
  .service-icon svg { width: 36px; height: 36px; }
  .posts-grid { grid-template-columns: 1fr; }
  .archive-post-img { width: 80px; height: 70px; }
}
