/* =============================================
   ZAKAT CALCULATOR WEBSITE — GLOBAL STYLES
   ============================================= */

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

:root {
  --gold: #C9A84C;
  --gold-light: #F0D68A;
  --gold-dark: #8B6914;
  --green: #1A5C3A;
  --green-light: #2D7A52;
  --green-mid: #3D9B6A;
  --cream: #FAF6EE;
  --cream-dark: #F0E8D5;
  --white: #FFFFFF;
  --text: #1C1810;
  --text-muted: #5A5040;
  --text-light: #8A7A60;
  --border: rgba(201,168,76,0.25);
  --shadow: 0 4px 24px rgba(26,92,58,0.08);
  --shadow-md: 0 8px 40px rgba(26,92,58,0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-mid); }

/* ===== NAVIGATION ===== */
nav {
  background: var(--green);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  font-family: 'Amiri', serif;
  font-size: 1.3rem;
  color: var(--gold-light);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo span { color: #fff; }
.nav-links { display: flex; gap: 4px; align-items: center; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.8);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,0.1);
  color: var(--gold-light);
}
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; transition: 0.3s; }

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 60%, #2A8A5A 100%);
  position: relative;
  overflow: hidden;
}
.site-header::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(201,168,76,0.1);
}
.site-header::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -40px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
.bismillah {
  font-family: 'Amiri', serif;
  font-size: 1.8rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
}
.site-header h1 {
  font-family: 'Amiri', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
.site-header h1 em { color: var(--gold-light); font-style: normal; }
.site-header p {
  color: rgba(255,255,255,0.78);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 1.25rem;
}
.breadcrumb {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: 1rem;
}
.breadcrumb a { color: var(--gold-light); }

/* ===== AD SLOTS ===== */
.ad-slot {
  background: var(--cream-dark);
  border: 1.5px dashed rgba(201,168,76,0.4);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.07em;
  text-align: center;
}
.ad-728 { height: 90px; width: 100%; max-width: 728px; margin: 0 auto; }
.ad-336 { height: 280px; width: 100%; max-width: 336px; margin: 0 auto; }
.ad-wrap { padding: 1.25rem 0; text-align: center; }

/* ===== PAGE WRAP ===== */
.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}
.content-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.card-title {
  font-family: 'Amiri', serif;
  font-size: 1.15rem;
  color: var(--green);
  margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 10px;
}
.card-title::before {
  content: '';
  width: 4px; height: 20px;
  background: var(--gold);
  border-radius: 2px; flex-shrink: 0;
}

/* ===== FIELDS ===== */
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.field input, .field select, .field textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--cream);
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(61,155,106,0.12);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 120px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600;
  cursor: pointer; border: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.15); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-light); color: #fff; }
.btn-gold { background: var(--gold); color: var(--text); }
.btn-gold:hover { background: var(--gold-light); }

/* ===== RESULT METRICS ===== */
.metrics-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin-bottom: 1.25rem; }
.metric-card { background: var(--cream); border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.metric-card.zakat-card { background: linear-gradient(135deg, var(--green), var(--green-light)); border-color: var(--green-dark); }
.metric-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-light); margin-bottom: 4px; }
.zakat-card .metric-label { color: rgba(255,255,255,0.7); }
.metric-value { font-family: 'Amiri', serif; font-size: 1.55rem; color: var(--text); font-weight: 700; }
.zakat-card .metric-value { color: var(--gold-light); }

/* ===== NISAB BANNER ===== */
.nisab-banner { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 10px; margin-bottom: 1.25rem; }
.nisab-banner .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.banner-eligible { background: #E8F5EE; color: #1A5C3A; border: 1px solid #A8D5BC; }
.banner-eligible .dot { background: #2D7A52; }
.banner-ineligible { background: #FFF8E7; color: #7A5C00; border: 1px solid #E5CC6A; }
.banner-ineligible .dot { background: #C9A84C; }
.banner-empty { background: #F5F5F5; color: #888; border: 1px solid #E0E0E0; }
.banner-empty .dot { background: #bbb; }

/* ===== BREAKDOWN TABLE ===== */
.breakdown-table { width: 100%; }
.breakdown-table tr { border-bottom: 1px solid rgba(201,168,76,0.1); }
.breakdown-table td { padding: 7px 0; font-size: 13px; }
.breakdown-table td:last-child { text-align: right; font-weight: 500; }
.breakdown-table td:first-child { color: var(--text-muted); }
.breakdown-table tr.total-row td { font-weight: 700; font-size: 14px; color: var(--green); border-top: 2px solid var(--border); padding-top: 10px; }

/* ===== BLOG CARDS ===== */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.blog-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s, box-shadow 0.2s; }
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.blog-card-img { height: 180px; background: linear-gradient(135deg, var(--green) 0%, var(--green-mid) 100%); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.blog-card-body { padding: 1.25rem; }
.blog-tag { display: inline-block; background: rgba(26,92,58,0.08); color: var(--green); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 4px; margin-bottom: 8px; }
.blog-card-body h3 { font-family: 'Amiri', serif; font-size: 1.1rem; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.blog-card-body p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.blog-meta { font-size: 11px; color: var(--text-light); display: flex; gap: 12px; }
.blog-card-body a.read-more { font-size: 13px; font-weight: 600; color: var(--green); display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; }

/* ===== PROSE CONTENT ===== */
.prose h2 { font-family: 'Amiri', serif; font-size: 1.5rem; color: var(--green); margin: 2rem 0 0.75rem; }
.prose h3 { font-family: 'Amiri', serif; font-size: 1.2rem; color: var(--green-light); margin: 1.5rem 0 0.5rem; }
.prose p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.8; }
.prose ul, .prose ol { margin: 0.75rem 0 1rem 1.5rem; color: var(--text-muted); }
.prose li { margin-bottom: 6px; line-height: 1.7; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--green); font-weight: 500; }
.prose blockquote { border-left: 4px solid var(--gold); padding: 1rem 1.25rem; background: var(--cream); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.25rem 0; font-style: italic; color: var(--text-muted); }

/* ===== INFO GRID ===== */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1rem; margin-top: 1.5rem; }
.info-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.info-card h3 { font-family: 'Amiri', serif; font-size: 1.05rem; color: var(--green); margin-bottom: 0.5rem; }
.info-card p { font-size: 13px; color: var(--text-muted); line-height: 1.65; }

/* ===== CONTACT FORM ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contact-info-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 1.25rem; }
.contact-icon { width: 42px; height: 42px; background: rgba(26,92,58,0.08); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.contact-info-item h4 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.contact-info-item p { font-size: 13px; color: var(--text-muted); }

/* ===== NISAB NOTE ===== */
.nisab-note { font-size: 12px; color: var(--text-light); margin-top: 1rem; padding: 10px 14px; background: var(--cream); border-radius: var(--radius-sm); border-left: 3px solid var(--gold); line-height: 1.6; }

/* ===== FOOTER ===== */
footer { background: var(--green); color: rgba(255,255,255,0.7); margin-top: 3rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 1.5rem; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-brand { font-family: 'Amiri', serif; font-size: 1.3rem; color: var(--gold-light); margin-bottom: 0.75rem; }
.footer-desc { font-size: 13px; line-height: 1.7; }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.9); margin-bottom: 0.75rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul a { color: rgba(255,255,255,0.65); font-size: 13px; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1rem 1.5rem; max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.footer-bottom a { color: var(--gold-light); }

/* ===== PAGE TITLE SECTION ===== */
.page-hero { background: linear-gradient(135deg, var(--green), var(--green-light)); padding: 2.5rem 1.5rem 2rem; text-align: center; }
.page-hero h1 { font-family: 'Amiri', serif; font-size: 2rem; color: #fff; margin-bottom: 0.5rem; }
.page-hero p { color: rgba(255,255,255,0.75); font-size: 1rem; max-width: 480px; margin: 0 auto; }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
.card { animation: fadeUp 0.4s ease both; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--green); padding: 1rem; }
  .nav-links.open { display: flex; }
  .hamburger { display: block; }
  .field-grid, .settings-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}
@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
}
