@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
  --green-900: #0a2e22;
  --green-800: #0d3d2e;
  --green-700: #114b39;
  --gold: #c9a961;
  --gold-light: #e0c98f;
  --white: #ffffff;
  --off-white: #f9f9f7;
  --border: #e8e4d8;
  --text: #1a1a1a;
  --text-soft: #5a5750;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  margin: 0;
  background: var(--off-white);
  color: var(--text);
  line-height: 1.8;
}
a { color: var(--green-700); text-decoration: none; transition: .2s; }
a:hover { color: var(--gold); }

.text-green { color: var(--green-700); font-weight: 700; }
.text-red { color: #d9534f; font-weight: 700; }

/* TOPBAR & LOGO */
.topbar {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; gap: 20px; flex-wrap: wrap;
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo-text-wrapper { display: flex; flex-direction: column; text-align: right; }
.logo-title { font-size: 1.4rem; font-weight: 900; color: var(--green-900); line-height: 1.2; letter-spacing: -0.5px; }
.logo-subtitle { font-size: 0.75rem; color: var(--gold); font-weight: 700; letter-spacing: 2px; }

.brand-logo-image {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex: 0 0 auto;
}

.topbar nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar nav a { color: var(--text); font-weight: 500; font-size: .92rem; padding: 8px 12px; border-radius: 6px; }
.topbar nav a:hover { background: var(--off-white); color: var(--green-700); }
.btn-outline { border: 1.5px solid var(--green-700); color: var(--green-700); font-weight: 700; padding: 6px 16px; border-radius: 8px; }
.btn-outline:hover { background: var(--green-700); color: #fff; }

main { max-width: 1280px; margin: 0 auto; padding: 0 32px 80px; }

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  color: #fff; border-radius: 24px; padding: 80px 40px;
  text-align: center; margin: 32px 0 64px;
  box-shadow: 0 20px 40px rgba(10,46,34,.2);
}
.hero-inner { max-width: 800px; margin: 0 auto; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin: 0 0 16px; line-height: 1.4; }
.hero .grad { color: var(--gold); }
.hero .lead { font-size: 1.1rem; color: rgba(255,255,255,.85); margin-bottom: 32px; }
.hero-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: 10px; font-weight: 700;
  border: none; cursor: pointer; transition: .3s; font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--gold), #b8944d); color: var(--green-900); box-shadow: 0 4px 15px rgba(201,169,97,.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(201,169,97,.6); color: var(--green-900); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-outline-dark { background: transparent; color: var(--green-900); border: 1.5px solid var(--green-900); }
.btn-outline-dark:hover { background: var(--green-900); color: #fff; }
.btn-sm { padding: 8px 20px; font-size: .85rem; }

/* SECTIONS */
.section { margin-bottom: 80px; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-title { font-size: 2rem; color: var(--green-900); margin: 0 0 10px; font-weight: 800; }
.section-sub { color: var(--text-soft); margin: 0; }

/* رفع مشکل پنهان شدن عنوان زیر هدر شناور */
section[id] {
  scroll-margin-top: 100px;
}

/* SERVICES */
.svc-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.svc { background: #fff; padding: 32px; border-radius: 16px; border: 1px solid var(--border); transition: .3s; text-align: center; }
.svc:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,.06); border-color: var(--gold); }

/* استایل آیکون‌های جدید کارت‌های خدمات */
.svc-img-ico {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 16px;
  display: inline-block;
}

.svc h3 { margin: 0 0 10px; color: var(--green-900); font-size: 1.1rem; }
.svc p { margin: 0; color: var(--text-soft); font-size: .92rem; line-height: 1.8; }

/* PORTFOLIO */
.pf-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); }
.portfolio-card { background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); }
.pf-thumb { position: relative; aspect-ratio: 16/9; cursor: pointer; }
.pf-thumb-bg { position: absolute; inset: 0; background: linear-gradient(135deg, var(--green-800), var(--green-900)); }
.pf-thumb-bg.alt { background: linear-gradient(135deg, #1a4a38, #0a2e22); }
.pf-thumb-overlay { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 12px; }
.pf-play { width: 60px; height: 60px; border-radius: 50%; background: var(--gold); color: var(--green-900); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.pf-hint { color: #fff; font-weight: 600; }
.pf-video { display: none; aspect-ratio: 16/9; background: #000; }
.pf-video.active { display: block; }
.pf-video iframe, .pf-video > div { width: 100% !important; height: 100% !important; }
.pf-body { padding: 24px; text-align: center; }
.pf-tag { display: inline-block; background: #e8f0eb; color: var(--green-800); padding: 4px 12px; border-radius: 6px; font-size: .8rem; font-weight: 700; margin-bottom: 12px; }
.pf-body h3 { margin: 0 0 16px; font-size: 1.1rem; color: var(--green-900); }

/* ABOUT US */
.about-box { background: #fff; padding: 40px; border-radius: 16px; border: 1px solid var(--border); text-align: center; max-width: 800px; margin: 0 auto; }
.about-box p { font-size: 1.05rem; color: var(--text-soft); line-height: 2; text-align: justify; }

/* EDUCATION & DONATE */
.edu-box { background: linear-gradient(135deg, #fff, var(--off-white)); padding: 40px; border-radius: 16px; border: 1px solid var(--gold); text-align: center; }
.edu-box p { font-size: 1.05rem; color: var(--text-soft); margin-bottom: 24px; text-align: justify; }
.edu-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* CONTACT */
.contact-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.contact-card { 
  background: #fff; padding: 30px 20px; border-radius: 16px; border: 1px solid var(--border); 
  text-align: center; transition: .3s; display: flex; flex-direction: column; 
  align-items: center; justify-content: center; text-decoration: none; color: inherit;
}
.contact-card:hover { transform: translateY(-5px); border-color: var(--green-700); box-shadow: 0 10px 30px rgba(10,46,34,.08); }

.contact-card .custom-social-icon { 
  margin-bottom: 16px; 
  height: 60px;
  width: 60px;
  object-fit: contain;
}

.contact-card h3 { margin: 0 0 10px; font-size: 1.1rem; color: var(--green-900); font-weight: 800; }
.contact-card p { margin: 0; color: var(--text-soft); font-size: .85rem; font-weight: 500; line-height: 1.6; }

/* MODAL */
.modal { display: none; position: fixed; inset: 0; background: rgba(10,46,34,.8); z-index: 1000; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: #fff; padding: 40px; border-radius: 20px; max-width: 500px; width: 100%; position: relative; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.close { position: absolute; top: 16px; left: 20px; font-size: 1.5rem; cursor: pointer; color: #999; }
.close:hover { color: #333; }
.modal-title { color: var(--green-900); margin-top: 0; }
.modal-text { color: var(--text-soft); font-size: 1rem; line-height: 1.8; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

.warning-alert {
  background-color: #fff3cd; color: #856404; border: 1px solid #ffeeba;
  padding: 12px; border-radius: 8px; margin-bottom: 20px;
  font-weight: bold; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* FOOTER */
.site-footer { background: var(--green-900); color: rgba(255,255,255,.7); margin-top: 40px; padding: 40px 20px 20px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 20px; }
.footer-col { flex: 1; min-width: 250px; }
.footer-col h4 { color: #fff; font-size: 1rem; margin: 0 0 15px; font-weight: 700; }
.footer-col p { color: rgba(255,255,255,0.7); font-size: 0.9rem; margin: 0 0 10px; line-height: 1.8; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 30px; padding-top: 20px; text-align: center; font-size: .85rem; color: rgba(255,255,255,.5); }

/* RESPONSIVE */
@media (max-width: 992px) {
  .footer-inner { flex-direction: column; }
}
@media (max-width: 768px) {
  .topbar-inner { padding: 14px 16px; justify-content: center; text-align: center; flex-direction: column; }
  .topbar nav { justify-content: center; margin-top: 10px; }
  .logo { justify-content: center; }
  .logo-text-wrapper { text-align: center; }
  .brand-logo-image { width: 40px; height: 40px; }
  main { padding: 0 16px 60px; }
  .hero { padding: 40px 16px; border-radius: 16px; margin: 16px 0 40px; }
  .hero h1 { font-size: 1.8rem; }
  .hero .lead { font-size: 1rem; }
  .pf-grid { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: 1fr; }
  .edu-box, .about-box { padding: 24px; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .contact-card { padding: 20px 12px; }
  .contact-card .custom-social-icon { height: 45px; width: 45px; margin-bottom: 10px; }
  .contact-card h3 { font-size: .95rem; }
  .contact-card p { font-size: .75rem; }
  .footer-inner { padding: 20px 0; text-align: center; }
  .modal-content { padding: 24px; }
}