/* WalaTool — shared stylesheet (vanilla, no frameworks) */
:root {
  --primary: #0e7c3a;
  --primary-dark: #0a5c2b;
  --primary-light: #e7f5ec;
  --accent: #d97706;
  --text: #1c2420;
  --muted: #5b6660;
  --bg: #f7faf8;
  --card: #ffffff;
  --border: #e2e9e4;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(14, 124, 58, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
}

img { max-width: 100%; height: auto; }

/* ---------- Header ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.brand span { color: var(--accent); }
.main-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.main-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 3rem 1rem;
  text-align: center;
}
.hero h1 { margin: 0 0 0.6rem; font-size: 2rem; letter-spacing: -0.5px; }
.hero p { margin: 0 auto 1.4rem; max-width: 620px; opacity: 0.95; font-size: 1.05rem; }
.hero .cta-row { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid #fff;
}
.btn:hover { background: transparent; color: #fff; }
.btn-outline { background: transparent; color: #fff; }
.btn-outline:hover { background: #fff; color: var(--primary-dark); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
  cursor: pointer;
  font-size: 1.05rem;
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

/* ---------- Layout ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 1rem; }
.section { padding: 2.5rem 0; }
.section h2 { font-size: 1.6rem; margin: 0 0 1rem; color: var(--primary-dark); }
.section h3 { font-size: 1.2rem; margin: 1.6rem 0 0.6rem; color: var(--primary-dark); }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
  margin-top: 1.2rem;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
a.tool-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(14,124,58,0.14); }
.tool-card .icon { font-size: 2rem; }
.tool-card h3 { margin: 0; color: var(--primary-dark); font-size: 1.15rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.95rem; flex: 1; }
.tool-card .go { color: var(--primary); font-weight: 700; font-size: 0.95rem; }
.tool-card.soon { opacity: 0.55; cursor: not-allowed; background: #f1f4f2; }
.tool-card.soon .badge {
  align-self: flex-start;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- Calculator ---------- */
.calc-wrap {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 860px) {
  .calc-wrap { grid-template-columns: 1fr 1fr; align-items: start; }
}
.calc-form, .calc-result {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.35rem; font-size: 0.95rem; }
.field input, .field select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}
.field .hint { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
.radio-row { display: flex; gap: 1rem; margin-bottom: 1rem; }
.radio-row label { font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 0.4rem; }

.calc-result h2 { margin-top: 0; font-size: 1.3rem; }
.result-big {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0.4rem 0 1rem;
}
.result-rows { list-style: none; padding: 0; margin: 0; }
.result-rows li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.97rem;
}
.result-rows li:last-child { border-bottom: none; }
.result-rows .val { font-weight: 700; }
.note {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 0.8rem 1rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.93rem;
  margin: 1.2rem 0;
}
.warn {
  background: #fef3c7;
  border-left: 4px solid var(--accent);
  padding: 0.8rem 1rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.93rem;
  margin: 1.2rem 0;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 1rem 0; }
table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}
table.data th, table.data td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data th { background: var(--primary); color: #fff; }
table.data tr:last-child td { border-bottom: none; }
table.data tr.hl td { background: var(--primary-light); font-weight: 700; }

/* ---------- Content / FAQ ---------- */
.prose { max-width: 780px; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem 1.2rem; padding: 0; }
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 0.8rem;
  box-shadow: var(--shadow);
}
.faq summary { font-weight: 700; cursor: pointer; color: var(--primary-dark); }
.faq summary::-webkit-details-marker { color: var(--primary); }
.faq details p { margin: 0.6rem 0 0; color: var(--text); }

/* ---------- Footer ---------- */
.site-footer {
  background: #10231a;
  color: #cbd5d1;
  margin-top: 3rem;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.2rem 1rem 1.2rem;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
}
.site-footer h4 { color: #fff; margin: 0 0 0.6rem; font-size: 1rem; }
.site-footer a { color: #9fe0b8; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 0.4rem; font-size: 0.93rem; }
.footer-bottom {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem;
  border-top: 1px solid #24382d;
  font-size: 0.85rem;
  color: #8fa098;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 0.88rem; color: var(--muted); margin: 1.2rem 0 0; }
.breadcrumb a { color: var(--primary); text-decoration: none; }

.page-title { margin: 0.4rem 0 0.4rem; font-size: 1.9rem; color: var(--primary-dark); letter-spacing: -0.5px; }
.page-sub { color: var(--muted); margin: 0 0 1.6rem; max-width: 720px; }

/* ---------- Zakat design refresh (2026-10-25) ---------- */
.calc-result.has-result { border-top: 4px solid var(--primary); }
.btn-small { padding: 0.45rem 0.9rem; font-size: 0.9rem; }
