/* ============================================================
   Islamic Estate Calculator — Main Stylesheet
   Design System: Navy + Deep Green + Gold Authority Theme
   Fonts: Inter
   ============================================================ */

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

/* --- Design Tokens --- */
:root {
  --navy:           #0b1f3a;
  --deep-green:     #0c2b26;
  --rich-green:     #1a5c4e;
  --accent-green:   #2a8a72;
  --light-green:    #3aaf93;
  --gold:           #c5a632;
  --gold-light:     #d4af37;
  --gold-pale:      #fdf8e8;

  --bg:             #f9faf8;
  --bg-muted:       #eef6f3;
  --foreground:     #0d1f35;
  --muted-fg:       #3d5c55;

  --primary:        #2a8a72;
  --primary-dark:   #1a5c4e;
  --primary-fg:     #ffffff;

  --secondary:      #c5a632;
  --secondary-fg:   #0b1f3a;

  --card-bg:        #ffffff;
  --card-border:    #cce5df;
  --border:         #daeee9;
  --input-border:   #c5ddd8;

  --destructive:    #dc2626;
  --destructive-fg: #ffffff;
  --success:        #16a34a;

  --radius-sm:      4px;
  --radius:         8px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      28px;

  --shadow-sm:      0 1px 3px rgba(10,28,53,0.08), 0 1px 2px rgba(10,28,53,0.04);
  --shadow:         0 4px 12px rgba(10,28,53,0.10), 0 2px 4px rgba(10,28,53,0.06);
  --shadow-md:      0 8px 24px rgba(10,28,53,0.12), 0 4px 8px rgba(10,28,53,0.08);
  --shadow-lg:      0 16px 48px rgba(10,28,53,0.16), 0 8px 16px rgba(10,28,53,0.08);

  --transition:     all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--foreground);
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, sans-serif;
  line-height: 1.15;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.35rem, 3vw, 1.875rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.375rem); font-weight: 600; }
h5 { font-size: 1.05rem; font-weight: 600; }
p  { line-height: 1.8; color: #1a2e40; }

.font-syne    { font-family: 'Inter', sans-serif !important; }
.font-serif   { font-family: 'Inter', sans-serif !important; }
.font-sans    { font-family: 'Inter', sans-serif !important; }
.font-bold    { font-weight: 700; }
.font-semibold{ font-weight: 600; }
.font-medium  { font-weight: 500; }
.text-sm      { font-size: 0.875rem; }
.text-xs      { font-size: 0.75rem; }
.text-lg      { font-size: 1.125rem; }
.text-xl      { font-size: 1.25rem; }
.text-2xl     { font-size: 1.5rem; }
.text-3xl     { font-size: 1.875rem; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.italic       { font-style: italic; }
.uppercase    { text-transform: uppercase; }
.tracking-wide{ letter-spacing: 0.05em; }
.leading-relaxed { line-height: 1.75; }
.leading-tight   { line-height: 1.25; }
.text-balance { text-wrap: balance; }

/* --- Colors --- */
.text-primary     { color: var(--primary); }
.text-secondary   { color: var(--secondary); }
.text-muted       { color: var(--muted-fg); }
.text-white       { color: #ffffff; }
.text-foreground  { color: var(--foreground); }
.text-destructive { color: var(--destructive); }
.text-success     { color: var(--success); }
.text-gold        { color: var(--gold-light); }
.bg-primary       { background-color: var(--primary); }
.bg-muted         { background-color: var(--bg-muted); }
.bg-card          { background-color: var(--card-bg); }
.bg-accent        { background-color: var(--gold-pale); }
.bg-white         { background-color: #ffffff; }

/* --- Layout --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 640px)  { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

.container-sm  { max-width: 800px; margin: 0 auto; padding: 0 1.25rem; }
.container-md  { max-width: 1024px; margin: 0 auto; padding: 0 1.25rem; }

.section-pad   { padding: 5rem 0; }
@media (min-width: 768px)  { .section-pad { padding: 6rem 0; } }
@media (min-width: 1024px) { .section-pad { padding: 7rem 0; } }

.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-center{ justify-content: center; }
.justify-between{justify-content: space-between; }
.justify-end   { justify-content: flex-end; }
.gap-2         { gap: 0.5rem; }
.gap-3         { gap: 0.75rem; }
.gap-4         { gap: 1rem; }
.gap-6         { gap: 1.5rem; }
.gap-8         { gap: 2rem; }
.gap-10        { gap: 2.5rem; }
.gap-12        { gap: 3rem; }
.flex-1        { flex: 1; }
.shrink-0      { flex-shrink: 0; }

.grid          { display: grid; }
.grid-2        { grid-template-columns: 1fr; gap: 1.5rem; }
.grid-3        { grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4        { grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.heir-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .heir-grid { grid-template-columns: repeat(2, 1fr); }
}

.relative  { position: relative; }
.absolute  { position: absolute; }
.fixed     { position: fixed; }
.sticky    { position: sticky; }
.inset-0   { inset: 0; }
.z-10      { z-index: 10; }
.z-50      { z-index: 50; }
.overflow-hidden { overflow: hidden; }
.isolate   { isolation: isolate; }
.pointer-events-none { pointer-events: none; }

.w-full    { width: 100%; }
.h-full    { height: 100%; }
.min-h-screen { min-height: 100dvh; }
.hidden    { display: none; }
.block     { display: block; }
.inline-flex { display: inline-flex; }

.mt-auto   { margin-top: auto; }
.mx-auto   { margin-left: auto; margin-right: auto; }
.mb-2      { margin-bottom: 0.5rem; }
.mb-3      { margin-bottom: 0.75rem; }
.mb-4      { margin-bottom: 1rem; }
.mb-6      { margin-bottom: 1.5rem; }
.mb-8      { margin-bottom: 2rem; }
.mb-10     { margin-bottom: 2.5rem; }
.mb-12     { margin-bottom: 3rem; }
.mt-2      { margin-top: 0.5rem; }
.mt-4      { margin-top: 1rem; }
.mt-6      { margin-top: 1.5rem; }
.mt-8      { margin-top: 2rem; }
.pt-4      { padding-top: 1rem; }
.pt-6      { padding-top: 1.5rem; }
.pt-8      { padding-top: 2rem; }
.pb-4      { padding-bottom: 1rem; }
.pb-8      { padding-bottom: 2rem; }
.p-4       { padding: 1rem; }
.p-6       { padding: 1.5rem; }
.p-8       { padding: 2rem; }
.px-4      { padding-left: 1rem; padding-right: 1rem; }
.px-6      { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2      { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3      { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4      { padding-top: 1rem; padding-bottom: 1rem; }
.py-12     { padding-top: 3rem; padding-bottom: 3rem; }
.py-20     { padding-top: 5rem; padding-bottom: 5rem; }

.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }

/* --- Islamic Gradient Background --- */
.bg-gradient-islamic {
  background: linear-gradient(
    135deg,
    var(--navy) 0%,
    var(--deep-green) 40%,
    var(--rich-green) 75%,
    var(--accent-green) 100%
  );
}

/* --- Glow Decorations --- */
.glow-gold {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(212,175,55,0.18) 0%, transparent 60%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 1;
}
.glow-green {
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(42,138,114,0.25) 0%, transparent 65%);
  filter: blur(70px);
  pointer-events: none;
  z-index: 1;
}

/* --- Glass Panel --- */
.glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.15);
}

/* --- Cards --- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-body  { padding: 1.5rem; }
@media (min-width: 768px) { .card-body { padding: 2rem; } }

.card-primary {
  background: var(--primary);
  color: var(--primary-fg);
  border: none;
}
.card-accent {
  background: var(--gold-pale);
  border: 1px solid rgba(197,166,50,0.2);
}
.card-muted {
  background: var(--bg-muted);
  border: 1px solid var(--border);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-gold {
  background: var(--gold-light);
  color: var(--navy);
  border-color: var(--gold-light);
  font-weight: 700;
}
.btn-gold:hover { background: #b8992e; border-color: #b8992e; box-shadow: 0 4px 16px rgba(212,175,55,0.35); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--primary-fg); }

.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-muted); }

.btn-white {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  border-color: rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
}
.btn-white:hover { background: rgba(255,255,255,0.2); }

.btn-destructive {
  background: var(--destructive);
  color: #fff;
  border-color: var(--destructive);
}
.btn-destructive:hover { background: #b91c1c; }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; border-radius: var(--radius); }
.btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; border-radius: var(--radius-lg); }
.btn-icon { padding: 0.625rem; width: 2.5rem; height: 2.5rem; border-radius: var(--radius); }
.btn-icon-lg { padding: 0.75rem; width: 3rem; height: 3rem; border-radius: var(--radius-md); }
.btn-full { width: 100%; }

/* Icon button variant for heir +/- */
.btn-counter {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-counter:hover { border-color: var(--primary); background: var(--primary); color: #fff; }
.btn-counter:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-counter:active { transform: scale(0.95); }

/* --- Forms --- */
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.label-required::after {
  content: ' *';
  color: var(--destructive);
}

.input {
  width: 100%;
  height: 3.25rem;
  padding: 0 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #0d1f35;
  background: #ffffff;
  border: 2px solid var(--input-border);
  border-radius: var(--radius);
  transition: var(--transition-fast);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(42,138,114,0.15); }
.input::placeholder { color: var(--muted-fg); opacity: 0.7; }
.input.error { border-color: var(--destructive); }
.input.error:focus { box-shadow: 0 0 0 3px rgba(220,38,38,0.15); }
.input:disabled { background: var(--bg-muted); opacity: 0.6; cursor: not-allowed; }

.input-prefix {
  position: relative;
}
.input-prefix .prefix {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-fg);
  font-weight: 500;
  pointer-events: none;
  font-size: 0.9375rem;
}
.input-prefix .input { padding-left: 2.25rem; }

/* Remove number spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

select.input {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a7a73' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  cursor: pointer;
}

.radio-group { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.radio-option { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.radio-option input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--primary);
  cursor: pointer;
}
.radio-option span { font-size: 1rem; font-weight: 500; }

.counter-input {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.counter-input .input {
  width: 4rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.125rem;
  padding: 0 0.5rem;
}

.form-hint { font-size: 0.8125rem; color: var(--muted-fg); margin-top: 0.25rem; }
.form-error { font-size: 0.8125rem; color: var(--destructive); margin-top: 0.25rem; display: flex; align-items: center; gap: 0.25rem; }

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-primary { background: rgba(42,138,114,0.12); color: var(--primary); }
.badge-gold    { background: rgba(197,166,50,0.15); color: #9a7a1a; }
.badge-muted   { background: var(--bg-muted); color: var(--muted-fg); }
.badge-success { background: rgba(22,163,74,0.12); color: var(--success); }
.badge-error   { background: rgba(220,38,38,0.1); color: var(--destructive); }

/* --- Dividers --- */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* --- Alerts --- */
.alert {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid;
  font-size: 0.9375rem;
}
.alert-info    { background: rgba(42,138,114,0.08); border-color: rgba(42,138,114,0.25); color: var(--primary-dark); }
.alert-warn    { background: rgba(197,166,50,0.1);  border-color: rgba(197,166,50,0.3);  color: #7a5e00; }
.alert-error   { background: rgba(220,38,38,0.08);  border-color: rgba(220,38,38,0.25);  color: var(--destructive); }
.alert-success { background: rgba(22,163,74,0.08);  border-color: rgba(22,163,74,0.25);  color: var(--success); }

/* --- Tables --- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg-muted); }
th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-fg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-muted); }
.td-right { text-align: right; font-weight: 700; color: var(--primary); font-size: 1.05rem; }

/* --- Share Fraction Badge --- */
.fraction-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-sm);
  background: rgba(42,138,114,0.1);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
}

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--navy);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  height: 4.5rem;
  transition: var(--transition);
}
#site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.site-logo span { color: var(--gold-light); }
.site-logo:hover { opacity: 0.9; }

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: var(--transition-fast);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold-light); border-bottom-color: var(--gold-light); }
.nav-cta {
  background: var(--gold-light);
  color: var(--navy) !important;
  font-weight: 700 !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: var(--radius) !important;
  border-bottom: none !important;
}
.nav-cta:hover { background: #b8992e !important; }

@media (min-width: 1024px) { .nav-links { display: flex; } }

/* Mobile nav toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.25rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 1024px) { .nav-toggle { display: none; } }

/* Mobile nav drawer */
#mobile-nav {
  display: none;
  position: fixed;
  inset: 4.5rem 0 0 0;
  background: rgba(11,31,58,0.97);
  backdrop-filter: blur(12px);
  z-index: 999;
  padding: 2rem 1.5rem;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}
#mobile-nav.open { display: flex; }
#mobile-nav a {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 1.375rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  padding: 0.875rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-decoration: none;
  transition: var(--transition-fast);
}
#mobile-nav a:hover,
#mobile-nav a.active { color: var(--gold-light); }
#mobile-nav a:last-child { border-bottom: none; }
@media (min-width: 1024px) { #mobile-nav { display: none !important; } }

/* Page offset for fixed header */
.page-content { padding-top: 4.5rem; }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  padding: 3.5rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-brand .site-logo { font-size: 1.375rem; margin-bottom: 1rem; display: block; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; color: rgba(255,255,255,0.6); max-width: 280px; }
.footer-heading {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-light);
  margin-bottom: 1rem;
}
.footer-links a {
  display: block;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  padding: 0.35rem 0;
  transition: var(--transition-fast);
  text-decoration: none;
}
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}
.footer-copyright { font-size: 0.875rem; color: rgba(255,255,255,0.5); }
.footer-disclaimer {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
  max-width: 700px;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.footer-disclaimer strong { color: rgba(255,255,255,0.6); }

.social-links { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.social-link {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  text-decoration: none;
}
.social-link:hover { background: var(--gold-light); color: var(--navy); }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100dvh - 4.5rem);
  display: flex;
  align-items: center;
  padding: 3.5rem 0;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
}
.hero .container {
  width: 100%;
  position: relative;
  z-index: 2;
}
.hero-compass { display: none !important; }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  width: 100%;
}
@media (min-width: 768px) { .hero-content { max-width: 740px; } }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 99px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}
.hero-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-light);
  flex-shrink: 0;
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%,100%  { opacity:1; transform: scale(1); }
  50%      { opacity:0.7; transform: scale(1.2); }
}
.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.75rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}
.hero h1 .highlight { color: var(--gold-light); }
.hero-desc {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: rgba(255,255,255,0.72);
  line-height: 1.75;
  max-width: 580px;
  margin-bottom: 2.25rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  font-weight: 500;
}
.trust-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--gold-light);
}

/* --- Hero fade-in animation --- */
.hero-content > * {
  opacity: 0;
  transform: translateY(24px);
  animation: fade-up 0.65s ease forwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.15s; }
.hero-content > *:nth-child(3) { animation-delay: 0.25s; }
.hero-content > *:nth-child(4) { animation-delay: 0.35s; }
.hero-content > *:nth-child(5) { animation-delay: 0.45s; }
@keyframes fade-up {
  to { opacity:1; transform: translateY(0); }
}

/* ============================================================
   QURAN SECTION
   ============================================================ */
.quran-card {
  background: var(--card-bg);
  border: 2px solid rgba(42,138,114,0.12);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}
@media (min-width: 768px) { .quran-card { padding: 3.5rem; } }
.arabic-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  line-height: 2;
  color: var(--primary);
  text-align: right;
  direction: rtl;
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.verse-translation {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: rgba(10,28,53,0.85);
  font-style: italic;
  border-left: 3px solid var(--gold-light);
  padding-left: 1.25rem;
  margin: 1.25rem 0;
}
.verse-ref {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-top: 0.75rem;
}

/* ============================================================
   HOW IT WORKS / STEP CARDS
   ============================================================ */
.step-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.step-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.step-icon-wrap {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-md);
  background: rgba(42,138,114,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  transition: var(--transition);
}
.step-card:hover .step-icon-wrap { transform: translateY(-4px); }
.step-icon-wrap svg { width: 2rem; height: 2rem; color: var(--primary); }
.step-number {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.step-card h3 { font-family: 'Inter', sans-serif; font-size: 1.125rem; margin-bottom: 0.625rem; }
.step-card p { font-size: 0.9rem; color: var(--muted-fg); line-height: 1.7; }

/* ============================================================
   WHO FOR SECTION
   ============================================================ */
.who-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.who-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.who-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  background: rgba(42,138,114,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.who-icon svg { width: 1.5rem; height: 1.5rem; color: var(--primary); }
.who-card h4 { font-family: 'Inter', sans-serif; font-size: 1.0625rem; margin-bottom: 0.5rem; }
.who-card p { font-size: 0.875rem; color: var(--muted-fg); line-height: 1.7; }

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-item {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--foreground);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: var(--transition-fast);
}
.faq-question:hover { color: var(--primary); }
.faq-chevron {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--muted-fg);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-answer-inner {
  padding-bottom: 1.25rem;
  font-size: 0.9375rem;
  color: #2a4040;
  line-height: 1.75;
}
.faq-item.open .faq-answer { max-height: 600px; }

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter-box {
  background: var(--gold-pale);
  border: 1px solid rgba(197,166,50,0.2);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 56rem;
  margin: 0 auto;
}
@media (min-width: 768px) { .newsletter-box { padding: 3rem; } }
.newsletter-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}
@media (min-width: 768px) {
  .newsletter-inner { flex-direction: row; text-align: left; }
}
.newsletter-icon-wrap {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(197,166,50,0.2);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.newsletter-form { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.newsletter-form .input { flex: 1; min-width: 200px; }
.newsletter-msg {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.newsletter-msg.success { color: var(--success); }
.newsletter-msg.error   { color: var(--destructive); }

/* ============================================================
   CALCULATOR PAGE
   ============================================================ */
.calc-hero {
  padding: 3rem 0 2rem;
  text-align: center;
}
.calc-hero-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-md);
  background: rgba(197,166,50,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.calc-hero-icon svg { width: 2rem; height: 2rem; color: var(--secondary); }

/* Progress Steps */
.step-nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 2rem 1rem;
  margin-bottom: 1.5rem;
  min-height: 80px;
}
.step-track {
  position: absolute;
  left: 2rem;
  right: 2rem;
  top: 2.25rem;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  z-index: 0;
}
.step-track-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
}
.step-dot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}
.step-dot-circle {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  border: 2px solid rgba(255,255,255,0.25);
  transition: var(--transition);
  flex-shrink: 0;
}
.step-dot.active .step-dot-circle {
  background: var(--gold-light);
  color: var(--navy);
  border-color: var(--gold-light);
  box-shadow: 0 0 0 4px rgba(197,166,50,0.25);
}
.step-dot.done .step-dot-circle {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.step-dot-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  display: none;
  margin-top: 0.25rem;
}
@media (min-width: 480px) { .step-dot-label { display: block; } }
.step-dot.active .step-dot-label { color: var(--gold-light); font-weight: 700; }
.step-dot.done .step-dot-label   { color: rgba(255,255,255,0.7); }

/* Calculator Card */
.calc-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  min-height: 400px;
}
@media (min-width: 768px) { .calc-card { padding: 2.5rem; } }

/* Calculator sections */
.calc-section-title {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.calc-section-title svg { width: 1.25rem; height: 1.25rem; color: var(--secondary); }

/* Step fade animation */
.step-panel {
  animation: step-in 0.4s ease both;
}
@keyframes step-in {
  from { opacity:0; transform: translateY(16px); }
  to   { opacity:1; transform: translateY(0); }
}

/* Asset inputs */
.asset-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.asset-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
}
.asset-label svg { width: 1rem; height: 1rem; color: var(--primary); }

/* Heir cards */
.heir-category {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.heir-category-header {
  background: rgba(42,138,114,0.06);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--primary);
}
.heir-category-header svg { width: 1.25rem; height: 1.25rem; color: var(--secondary); }
.heir-category-body { padding: 1.5rem; }

.heir-item {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.heir-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.heir-name-en { font-size: 1.0625rem; font-weight: 600; color: var(--foreground); }
.heir-name-ar {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--muted-fg);
  background: var(--bg-muted);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-sm);
  direction: rtl;
}
.heir-names-section {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.heir-name-required {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #d97706;
  margin-bottom: 0.5rem;
}
.heir-name-required svg { width: 0.875rem; height: 0.875rem; }
.input-required {
  border-color: #fbbf24;
}
.input-required:focus { box-shadow: 0 0 0 3px rgba(251,191,36,0.2); }

/* Deductions */
.deduction-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.deduction-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.625rem;
}
.wasiyyah-warning {
  font-size: 0.8125rem;
  color: var(--destructive);
  margin-top: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Results */
.results-header-card {
  background: var(--primary);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.results-header-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.results-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (min-width: 768px) { .results-meta { grid-template-columns: repeat(4, 1fr); } }
.results-meta-item { }
.results-meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.results-meta-label svg { width: 0.875rem; height: 0.875rem; }
.results-meta-value { font-size: 1.125rem; font-weight: 700; font-family: 'Inter', sans-serif; }
@media (min-width: 768px) {
  .results-meta-item:not(:first-child) {
    border-left: 1px solid rgba(255,255,255,0.15);
    padding-left: 1.25rem;
  }
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) { .summary-cards { grid-template-columns: repeat(3, 1fr); } }

.summary-card {
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid;
}
.summary-card-total    { background: var(--card-bg); border-color: var(--border); }
.summary-card-deduct   { background: rgba(220,38,38,0.05); border-color: rgba(220,38,38,0.2); }
.summary-card-net      { background: rgba(197,166,50,0.08); border-color: rgba(197,166,50,0.25); }
.summary-card-label    { font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.375rem; display: flex; align-items: center; gap: 0.375rem; }
.summary-card-total .summary-card-label  { color: var(--muted-fg); }
.summary-card-deduct .summary-card-label { color: var(--destructive); }
.summary-card-net .summary-card-label    { color: #7a5e00; }
.summary-card-amount { font-size: 1.625rem; font-weight: 700; }
.summary-card-total .summary-card-amount  { color: var(--foreground); }
.summary-card-deduct .summary-card-amount { color: var(--destructive); }
.summary-card-net .summary-card-amount    { color: #7a5e00; }

/* Calculation explanation */
.calc-trace {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.8;
}
.calc-trace h5 { font-family: 'Inter', sans-serif; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--primary); margin-bottom: 0.75rem; }
.trace-step { padding: 0.25rem 0; border-bottom: 1px solid var(--border); color: var(--muted-fg); }
.trace-step:last-child { border-bottom: none; }
.trace-step strong { color: var(--foreground); }

/* Download button */
.download-pdf-btn {
  background: var(--primary-dark);
  color: #ffffff;
  padding: 1rem 2.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.download-pdf-btn:hover { background: var(--deep-green); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.download-pdf-btn:active { transform: scale(0.98); }
.download-pdf-btn svg { width: 1.25rem; height: 1.25rem; }

/* Calculator navigation */
.calc-nav {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
}
@media (min-width: 640px) { .calc-nav { flex-direction: row; justify-content: space-between; align-items: center; } }

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  width: 100%;
  max-width: 420px;
  padding: 0 1rem;
}
.toast {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  pointer-events: auto;
  animation: toast-in 0.35s ease both;
}
.toast.fade-out { animation: toast-out 0.3s ease both; }
@keyframes toast-in { from { opacity:0; transform: translateY(-12px) scale(0.95); } to { opacity:1; transform: none; } }
@keyframes toast-out { to { opacity:0; transform: translateY(-8px) scale(0.95); } }
.toast-success { background: #fff; border-left: 4px solid var(--success); color: #166534; }
.toast-error   { background: #fff; border-left: 4px solid var(--destructive); color: var(--destructive); }
.toast-info    { background: #fff; border-left: 4px solid var(--primary); color: var(--primary-dark); }

/* ============================================================
   BLOG PAGES
   ============================================================ */
.blog-hero {
  background: var(--bg-muted);
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
}
.blog-hero h1 { color: var(--foreground); }

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.blog-card-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-muted);
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-cat {
  position: absolute;
  top: 0.875rem;
  left: 0.875rem;
  background: var(--secondary);
  color: var(--secondary-fg);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
}
.blog-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.blog-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--muted-fg);
  margin-bottom: 0.875rem;
}
.blog-card-meta span { display: flex; align-items: center; gap: 0.375rem; }
.blog-card-meta svg  { width: 0.875rem; height: 0.875rem; }
.blog-card h3 { font-size: 1.125rem; margin-bottom: 0.625rem; line-height: 1.35; }
.blog-card p { font-size: 0.875rem; color: #3d5c55; line-height: 1.7; flex: 1; margin-bottom: 1.25rem; }
.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}
.blog-card-author { font-weight: 500; color: var(--foreground); }
.blog-read-more { color: var(--primary); font-weight: 600; display: flex; align-items: center; gap: 0.25rem; }
.blog-card:hover .blog-read-more { color: var(--secondary); }

/* Article page */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .article-layout { grid-template-columns: 1fr 280px; }
}

.article-header { margin-bottom: 2.5rem; }
.article-category {
  display: inline-flex;
  background: rgba(197,166,50,0.12);
  color: #7a5e00;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}
.article-header h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); color: var(--foreground); line-height: 1.2; margin-bottom: 1rem; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.article-meta span { display: flex; align-items: center; gap: 0.375rem; }
.article-meta svg { width: 0.875rem; height: 0.875rem; }

.article-featured-img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2.5rem;
}

.article-body { font-size: 1.0625rem; line-height: 1.9; color: #0d1f35; }
.article-body h2 { font-size: 1.625rem; margin: 2.25rem 0 0.875rem; color: var(--foreground); }
.article-body h3 { font-size: 1.25rem; margin: 1.75rem 0 0.75rem; color: var(--primary); }
.article-body p  { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { margin: 1rem 0 1.25rem 1.5rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 0.5rem; line-height: 1.7; }
.article-body strong { font-weight: 700; color: var(--foreground); }
.article-body em { font-style: italic; }
.article-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--secondary); }

.quran-box {
  background: rgba(42,138,114,0.06);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.5rem 1.75rem;
  margin: 1.75rem 0;
}
.quran-box .arabic { font-family: Georgia, 'Times New Roman', serif; font-size: 1.375rem; line-height: 2; direction: rtl; text-align: right; color: var(--primary); margin-bottom: 1rem; }
.quran-box .translation { font-style: italic; color: rgba(10,28,53,0.8); font-size: 1rem; line-height: 1.75; }

/* Article sidebar */
.article-sidebar .card { padding: 1.5rem; position: sticky; top: 6rem; }
.toc-title { font-family: 'Inter', sans-serif; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-fg); margin-bottom: 0.875rem; display: flex; align-items: center; gap: 0.5rem; }
.toc-list { display: flex; flex-direction: column; gap: 0.25rem; }
.toc-link { font-size: 0.875rem; color: var(--muted-fg); padding: 0.25rem 0; text-decoration: none; transition: var(--transition-fast); display: block; border-left: 2px solid transparent; padding-left: 0.625rem; }
.toc-link:hover, .toc-link.active { color: var(--secondary); border-left-color: var(--secondary); }
.toc-link.level-3 { padding-left: 1.5rem; }

/* Author bio */
.author-bio {
  background: rgba(42,138,114,0.05);
  border: 1px solid rgba(42,138,114,0.12);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}
@media (min-width: 640px) { .author-bio { flex-direction: row; text-align: left; } }
.author-avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: rgba(42,138,114,0.15);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.author-by { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--secondary); margin-bottom: 0.25rem; }
.author-name { font-size: 1.25rem; font-family: 'Inter', sans-serif; font-weight: 600; margin-bottom: 0.5rem; }
.author-desc { font-size: 0.9rem; color: var(--muted-fg); line-height: 1.7; }

/* Share buttons */
.share-wrap { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.share-label { font-size: 0.875rem; font-weight: 500; color: var(--muted-fg); }
.share-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  color: var(--muted-fg);
}
.share-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(42,138,114,0.06); }
.share-btn svg { width: 1rem; height: 1rem; }

/* ============================================================
   STATIC PAGES (Privacy, Terms, Contact)
   ============================================================ */
.static-page { padding: 4rem 0 6rem; }
.static-page h1 { margin-bottom: 0.5rem; }
.static-page .last-updated { font-size: 0.875rem; color: var(--muted-fg); margin-bottom: 2.5rem; }
.prose h2 { font-size: 1.375rem; margin: 2rem 0 0.75rem; color: var(--foreground); }
.prose h3 { font-size: 1.125rem; margin: 1.5rem 0 0.5rem; color: var(--primary); }
.prose p  { margin-bottom: 1rem; color: rgba(10,28,53,0.82); font-size: 0.9875rem; line-height: 1.8; }
.prose ul, .prose ol { margin: 0.75rem 0 1rem 1.5rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.375rem; font-size: 0.9875rem; line-height: 1.7; color: rgba(10,28,53,0.82); }
.prose a  { color: var(--primary); text-decoration: underline; }

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 768px) { .contact-grid { grid-template-columns: 3fr 2fr; } }
.contact-info-item { display: flex; gap: 0.875rem; align-items: flex-start; margin-bottom: 1.5rem; }
.contact-info-icon { width: 2.5rem; height: 2.5rem; background: rgba(42,138,114,0.1); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-info-icon svg { width: 1.25rem; height: 1.25rem; color: var(--primary); }

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--secondary);
  margin-bottom: 0.875rem;
}
.section-tag::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--secondary);
}
.section-title { text-align: center; max-width: 680px; margin: 0 auto 3.5rem; }
.section-title h2 { font-family: 'Inter', sans-serif; margin-bottom: 0.875rem; }
.section-title p { font-size: 1.0625rem; color: var(--muted-fg); line-height: 1.75; }

/* CTA section */
.cta-section {
  position: relative;
  padding: 5rem 0;
  overflow: hidden;
  isolation: isolate;
}
.cta-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.cta-content h2 { color: #ffffff; font-family: 'Inter', sans-serif; margin-bottom: 1rem; }
.cta-content p  { color: rgba(255,255,255,0.75); font-size: 1.0625rem; margin-bottom: 2.25rem; }

/* ============================================================
   MANUAL CALCULATION TABLE (SEO CONTENT)
   ============================================================ */
.formula-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 1.5rem 0;
}
.formula-table th {
  background: var(--primary);
  color: #ffffff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.formula-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.formula-table tbody tr:hover { background: var(--bg-muted); }
.formula-table .formula-cell {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   UTILITY OVERRIDES
   ============================================================ */
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }

.border-top    { border-top: 1px solid var(--border); }
.border-bottom { border-bottom: 1px solid var(--border); }

.rounded     { border-radius: var(--radius); }
.rounded-md  { border-radius: var(--radius-md); }
.rounded-lg  { border-radius: var(--radius-lg); }
.rounded-xl  { border-radius: var(--radius-xl); }
.rounded-full{ border-radius: 9999px; }

.shadow    { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}


/* ── Hero verse card (right column on desktop) ─────────── */
@media (min-width: 1024px) {
  .hero-verse-card {
    display: block !important;
  }
  .hero .container > div[style*="grid"] {
    grid-template-columns: 1fr 420px !important;
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-verse-card {
    display: block !important;
    max-width: 560px;
    margin: 0 auto;
  }
  .hero .container > div[style*="grid"] {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  #site-header, #site-footer, .calc-nav, .download-pdf-btn,
  .newsletter-box, .cta-section { display: none !important; }
  body { font-size: 12pt; color: #000; }
  h1,h2,h3 { page-break-after: avoid; }
  table { page-break-inside: avoid; }
  .page-content { padding-top: 0; }
}
