/* ==========================================================================
   دست همدلی کینستا - Hamdeli Kinsta Charity Platform
   Design System & Stylesheet Matching Image 2 Mockup (Pixel-Perfect)
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
  --primary: #0ea58a;
  --primary-hover: #0b8a73;
  --primary-light: rgba(14, 165, 138, 0.12);
  --primary-glow: rgba(14, 165, 138, 0.28);
  --primary-dark: #09594b;

  --accent: #10b981;
  --accent-soft: #ecfdf5;

  --bg-page: #f8faf9;
  --bg-card: #ffffff;
  --bg-dark-hero: #13221c;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --text-white: #ffffff;

  --border-subtle: #f1f5f9;
  --border-light: #e2e8f0;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-float: 0 20px 45px -10px rgba(15, 23, 42, 0.09);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  --font-family: "Vazirmatn", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  --container-max: 1140px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@property --progress-val {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  direction: rtl;
  text-align: right;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-page);
  color: var(--text-main);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-feature-settings: "ss01", "ss02";
  background-color: var(--bg-page);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ==========================================================================
   Hero Section - Contained, Proportional, Matching Mockup 100%
   ========================================================================== */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #0e1817 0%, #15221b 45%, #2a3124 100%);
  padding-top: 16px;
  padding-bottom: 75px;
  overflow: hidden;
}

.hero-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

/* Top Navigation Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse; /* Logo on Left, Badge on Right */
  padding-block: 8px 24px;
}

.brand-logo {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-white);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
}

.brand-logo span {
  color: #ffffff;
}

.nav-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--text-white);
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.nav-pill-badge:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

/* Hero Body - Photo with hands on left & text on right */
.hero-body {
  position: relative;
  min-height: 490px;
  background-color: #15221b;
  background-image: url('../images/hero-clean.png');
  background-repeat: no-repeat;
  background-position: center left;
  background-size: cover;
  border-radius: var(--radius-xl);
  display: grid;
  grid-template-columns: 530px 1fr; /* RTL: Col 1 (Right): Content 530px, Col 2 (Left): Open space showing hands */
  align-items: center;
  padding: 44px 44px 44px 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  gap: 12px;
  z-index: 5;
}

.hero-eyebrow {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fde047;
  letter-spacing: 0.5px;
}

.hero-main-title {
  font-size: 3.3rem;
  font-weight: 900;
  line-height: 1.22;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.hero-highlight-green {
  color: #38ef7d;
  display: inline-block;
}

.hero-description {
  font-size: 1.02rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.94);
  max-width: 480px;
  margin: 4px 0 14px 0;
  font-weight: 400;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #10b981;
  color: #ffffff;
  padding: 13px 34px;
  border-radius: var(--radius-pill);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  box-shadow: 0 10px 25px -3px rgba(16, 185, 129, 0.45);
  transition: var(--transition);
}

.hero-cta-btn:hover {
  background: #059669;
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -4px rgba(16, 185, 129, 0.6);
}

.hero-hands-space {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   Floating Main Stats & Donations Card
   ========================================================================== */
.main-stats-section {
  position: relative;
  margin-top: -55px;
  z-index: 20;
  margin-bottom: 60px;
}

.stats-card-main {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  border: 1px solid var(--border-light);
  padding: 36px 44px;
  display: grid;
  grid-template-columns: 1fr 1.32fr; /* Col 1 (Right): Recent Donations, Col 2 (Left): Progress & Metrics */
  gap: 44px;
  align-items: stretch;
}

/* Right Column: Recent Donations */
.donations-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.donations-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.donations-title {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.donations-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
}

.donation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  transition: var(--transition);
}

.donor-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.donor-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.donor-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.donation-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.donation-amount {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 100px;
  text-align: left;
}

.donation-time {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-subtle);
  min-width: 65px;
  text-align: left;
}

.donations-footer {
  margin-top: 18px;
  text-align: left;
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--primary);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  transition: var(--transition);
}

.view-all-btn:hover {
  color: var(--primary-hover);
  transform: translateX(-4px);
}

.view-all-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* Left Column: Progress & Metrics */
.metrics-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  border-right: 1px solid var(--border-subtle);
  padding-right: 40px;
}

.goal-progress-header {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-direction: row-reverse; /* Ring on Left, Amount on Right */
}

/* Modern Progress Ring */
.ring-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

progress.progress-ring {
  --size: 130px;
  --thickness: 12px;
  --track-color: #f1f5f9;
  --fill-color: #0ea58a;
  --value: var(--progress-val, 63);

  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: conic-gradient(
    var(--fill-color) calc(var(--value) * 1%),
    var(--track-color) 0
  );
  mask-image: radial-gradient(
    transparent calc(50% - var(--thickness)),
    black calc(50% - var(--thickness) + 0.5px)
  );
  -webkit-mask-image: radial-gradient(
    transparent calc(50% - var(--thickness)),
    black calc(50% - var(--thickness) + 0.5px)
  );
  transition: --progress-val 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

progress.progress-ring::-webkit-progress-bar { display: none; }
progress.progress-ring::-webkit-progress-value { display: none; }
progress.progress-ring::-moz-progress-bar { display: none; }

.ring-content {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ring-percent {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.ring-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Goal Numbers & Linear Bar */
.goal-amount-box {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}

.goal-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.goal-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
}

.goal-eyebrow-row svg {
  stroke: var(--text-muted);
}

.goal-value {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.goal-value .currency {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-muted);
}

.goal-target-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
}

.linear-progress-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 8px;
  display: flex;
  direction: rtl;
}

.linear-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #0ea58a);
  border-radius: var(--radius-pill);
  width: 63%;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3 Quick Counter Badges with Vertical Dividers */
.quick-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.quick-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding-inline: 12px;
}

.quick-stat-item:not(:first-child) {
  border-right: 1px solid var(--border-subtle);
}

.stat-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: #dcfce7;
  color: #10b981;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
}

.stat-icon-wrapper svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.stat-number {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-desc {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   Section 2: پول‌های شما، کجا خرج می‌شود؟ (4 Pillars of Impact)
   ========================================================================== */
.impact-section {
  padding-block: 20px 60px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 2.15rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 680px;
  margin-inline: auto;
  line-height: 1.75;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.impact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 24px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.impact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: #cbd5e1;
}

.impact-icon-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.impact-icon-badge svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

/* Card Themes */
.card-vulnerable .impact-icon-badge {
  background: #fee2e2;
  color: #ef4444;
}

.card-education .impact-icon-badge {
  background: #e0f2fe;
  color: #0284c7;
}

.card-health .impact-icon-badge {
  background: #dcfce7;
  color: #16a34a;
}

.card-family .impact-icon-badge {
  background: #fef3c7;
  color: #d97706;
}

.impact-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 12px;
}

.impact-card-desc {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-muted);
}

/* ==========================================================================
   Section 3: Callout Banner with Smiling Girl
   ========================================================================== */
.banner-section {
  padding-bottom: 45px;
}

.child-callout-banner {
  background-color: #15221b;
  background-image: url('../images/banner-clean.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius-xl);
  color: var(--text-white);
  padding: 24px 36px;
  display: grid;
  grid-template-columns: 38% 34% 28%; /* In RTL: Col 1 is Right (Girl 38%), Col 2 is Middle (Quote 34%), Col 3 is Left (Kinsta card 28%) */
  align-items: center;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  min-height: 245px;
}

.banner-girl-space {
  width: 100%;
  height: 100%;
}

.banner-middle-part {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: right;
  z-index: 2;
}

.quote-heading {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.4;
  color: #ffffff;
  margin: 0;
}

.highlight-green {
  color: #38ef7d;
}

.quote-lines {
  font-size: 0.95rem;
  line-height: 1.75;
  color: #f1f5f9;
  margin: 0;
  font-weight: 500;
}

.banner-left-space {
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   Section 4: Bottom Motto & Footer
   ========================================================================== */
.bottom-motto-wrapper {
  padding-block: 15px 25px;
}

.motto-divider-line {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-main);
  font-size: 1.25rem;
  font-weight: 800;
}

.motto-divider-line::before,
.motto-divider-line::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.motto-divider-line::before {
  margin-left: 24px;
}

.motto-divider-line::after {
  margin-right: 24px;
}

.motto-text {
  color: #0f172a;
}

.site-footer {
  text-align: center;
  padding-bottom: 40px;
}

.footer-brand {
  font-size: 1.7rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 6px;
}

.footer-motto {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ==========================================================================
   Modal Dialog
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}

.modal-donations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-body {
    grid-template-columns: 1fr;
    padding: 36px 24px;
    background-position: center;
  }
  .hero-hands-space {
    display: none;
  }
  .stats-card-main {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 30px;
  }
  .metrics-col {
    order: 1;
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 30px;
  }
  .donations-col {
    order: 2;
  }
  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .child-callout-banner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
    background-size: cover;
    background-position: center right;
  }
  .banner-girl-space,
  .banner-left-space {
    display: none;
  }
  .banner-middle-part {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .hero-main-title {
    font-size: 2.5rem;
  }
  .hero-description {
    font-size: 0.95rem;
  }
  .goal-progress-header {
    flex-direction: column;
    text-align: center;
  }
  .goal-amount-box {
    align-items: center;
    text-align: center;
  }
  .quick-stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .impact-grid {
    grid-template-columns: 1fr;
  }
}
