/* Tajawal, self-hosted (SIL Open Font License). font-display:optional = no layout shift: if the (preloaded)
   font is not ready in ~100ms the fallback stays for that page view and Tajawal is used from the next one */
@font-face{font-family:"Tajawal";font-style:normal;font-weight:400;font-display:optional;src:url(/assets/fonts/tajawal-400-arabic.woff2) format("woff2");unicode-range:U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1}
@font-face{font-family:"Tajawal";font-style:normal;font-weight:400;font-display:optional;src:url(/assets/fonts/tajawal-400-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Tajawal";font-style:normal;font-weight:500;font-display:optional;src:url(/assets/fonts/tajawal-500-arabic.woff2) format("woff2");unicode-range:U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1}
@font-face{font-family:"Tajawal";font-style:normal;font-weight:500;font-display:optional;src:url(/assets/fonts/tajawal-500-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:"Tajawal";font-style:normal;font-weight:700;font-display:optional;src:url(/assets/fonts/tajawal-700-arabic.woff2) format("woff2");unicode-range:U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1}
@font-face{font-family:"Tajawal";font-style:normal;font-weight:700;font-display:optional;src:url(/assets/fonts/tajawal-700-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

/* ── Reset & Variables ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand: navy + teal taken from the logo; amber as a warm accent */
  --primary: #0f766e; --primary-dark: #115e59; --primary-light: #ccfbf1; --on-primary: #ffffff;
  --accent: #d97706; --accent-dark: #b45309;
  --brand-grad: linear-gradient(135deg, #0b2545 0%, #12345a 55%, #0e4a5c 100%);
  --hero-ink: #5eead4;
  --bg: #f6f8fa; --surface: #ffffff; --surface2: #eef3f6;
  --border: #e1e8ee; --text: #0b2545; --text2: #475569; --text3: #64748b;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(11,37,69,.08); --shadow-sm: 0 2px 8px rgba(11,37,69,.06);
  --header-h: 72px; --font: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
[data-theme="dark"] {
  --primary: #2dd4bf; --primary-dark: #14b8a6; --primary-light: rgba(45,212,191,.14); --on-primary: #042f2e;
  --bg: #0a1220; --surface: #111c2e; --surface2: #0d1727;
  --border: #1f2f45; --text: #e8eef5; --text2: #a3b1c2; --text3: #8292a7;
  --shadow: 0 6px 24px rgba(0,0,0,.45); --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  min-height: 100vh; display: flex; flex-direction: column; line-height: 1.6;
}
main { flex: 1; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ── Icons (inline SVG via icon() in includes/icons.php) ──── */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: middle; flex: none; }
.ic-flag { width: 1.34em; height: 1em; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.1); }
.ic-emoji { width: auto; line-height: 1; }

/* ── Layout ────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  box-shadow: var(--shadow-sm);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 1.5rem; }
.site-logo { font-size: 1.3rem; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.site-logo span { color: var(--text); }

/* Add this new rule for your image */
.logo-img { height: 48px; width: auto; display: block; }
.logo-on-dark { display: none; }
[data-theme="dark"] .logo-on-light { display: none; }
[data-theme="dark"] .logo-on-dark { display: block; }
.main-nav { display: flex; gap: 1.5rem; }
.main-nav a { color: var(--text2); font-weight: 500; font-size: .95rem; transition: color .2s; }
.main-nav a:hover { color: var(--primary); text-decoration: none; }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: .75rem; }
.search-form { display: flex; background: var(--surface2); border: 1px solid var(--border); border-radius: 9999px; overflow: hidden; }
.search-form input { border: none; background: transparent; padding: .4rem .9rem; font-size: .9rem; color: var(--text); width: 180px; outline: none; }
.search-form button { background: none; border: none; padding: .4rem .75rem; cursor: pointer; color: var(--text2); font-size: 1rem; }
.theme-toggle, .lang-btn {
  background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .35rem .7rem; cursor: pointer; font-size: .85rem; color: var(--text2);
  transition: all .2s;
}
.theme-toggle:hover, .lang-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .35rem .7rem; cursor: pointer; font-size: 1.2rem; }
.mobile-nav { display: none; padding: 1rem; flex-direction: column; gap: .5rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.mobile-nav a { display: block; padding: .5rem .75rem; color: var(--text2); font-weight: 500; border-radius: var(--radius-sm); }
.mobile-nav a:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.mobile-nav.open { display: flex; }

/* ── Hero ──────────────────────────────────────────────────── */
/* (hero styles: see "Hero" block at the end of this file) */
.btn-primary { background: #fff; color: #0f766e; padding: .75rem 2rem; border-radius: 9999px; font-weight: 700; border: none; cursor: pointer; transition: all .2s; display: inline-block; }
.btn-primary:hover { background: #ccfbf1; transform: translateY(-2px); text-decoration: none; }
.btn-outline { background: transparent; color: #fff; padding: .75rem 2rem; border-radius: 9999px; font-weight: 700; border: 2px solid rgba(255,255,255,.5); cursor: pointer; transition: all .2s; display: inline-block; }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); text-decoration: none; }

/* ── Sections ──────────────────────────────────────────────── */
.section { padding: 3.5rem 0; }
.section-title { font-size: 1.6rem; font-weight: 700; margin-bottom: .5rem; }
.section-sub { color: var(--text2); margin-bottom: 2rem; }

/* ── Cards Grid ────────────────────────────────────────────── */
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.calc-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; display: flex; align-items: center; gap: 1rem;
  transition: all .2s; cursor: pointer; color: var(--text);
}
.calc-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.calc-card-icon { font-size: 1.6rem; width: 52px; height: 52px; background: var(--primary-light); color: var(--primary); border-radius: var(--radius-sm); display: grid; place-items: center; flex-shrink: 0; }
.calc-card-name { font-weight: 600; font-size: .95rem; }
.calc-card-cat { font-size: .78rem; color: var(--text3); margin-top: .15rem; }

/* ── Category Grid ─────────────────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.cat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem 1rem; text-align: center; transition: all .2s;
}
.cat-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.cat-card-icon { font-size: 1.9rem; width: 64px; height: 64px; margin: 0 auto .75rem; display: grid; place-items: center; background: var(--primary-light); color: var(--primary); border-radius: 18px; }
.cat-card-name { font-weight: 600; color: var(--text); font-size: .95rem; }
.cat-card-count { font-size: .8rem; color: var(--text3); }

/* ── Calculator Hero ───────────────────────────────────────── */
/* Compact so the calculator itself sits above the fold on phones */
.calc-hero { background: var(--brand-grad); color: #fff; padding: 1.5rem 0; text-align: center; }
.calc-hero .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .35rem .75rem; }
.calc-hero-icon { font-size: 1.75rem; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: var(--hero-ink); }
.calc-hero h1 { font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 700; }
.calc-hero p { flex-basis: 100%; opacity: .85; max-width: 600px; margin: 0 auto; font-size: .95rem; }

/* ── Tool Card ─────────────────────────────────────────────── */
.tool-wrapper { padding: 1.5rem 0; }
.tool-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; max-width: 600px; margin: 0 auto; box-shadow: var(--shadow);
}
.calc-field { margin-bottom: 1.25rem; }
.calc-field label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .9rem; color: var(--text2); }
.calc-field input, .calc-field select {
  width: 100%; padding: .65rem 1rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 1rem; font-family: var(--font);
  background: var(--bg); color: var(--text); transition: border-color .2s; outline: none;
}
.calc-field input:focus, .calc-field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.calc-btn {
  width: 100%; padding: .85rem; background: var(--primary); color: var(--on-primary);
  border: none; border-radius: var(--radius-sm); font-size: 1.05rem; font-weight: 700;
  cursor: pointer; transition: all .2s; font-family: var(--font); margin-top: .5rem;
}
.calc-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.calc-result {
  margin-top: 1.5rem; padding: 1.25rem; background: var(--brand-grad);
  border-radius: var(--radius); text-align: center; color: #fff;
}
.result-value { font-size: 1.6rem; font-weight: 700; overflow-wrap: anywhere; }
.result-label { margin-top: .35rem; opacity: .85; font-size: .9rem; }
.calc-note { margin-top: .75rem; font-size: .82rem; color: var(--text3); text-align: center; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1rem; }
.result-actions button, .result-actions a {
  display: inline-flex; align-items: center; gap: .35rem; padding: .45rem 1.1rem;
  border-radius: 9999px; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.15);
  color: #fff; font: 600 .88rem var(--font); cursor: pointer; transition: background .2s;
}
.result-actions button:hover { background: rgba(255,255,255,.28); }
.result-actions .share-wa { background: #25D366; border-color: #25D366; }
.result-actions .share-wa:hover { background: #1ebe5b; text-decoration: none; }

/* ── Ad slots (reserved height prevents layout shift when ads load) ── */
.ad-slot { min-height: 280px; margin: 1rem auto; text-align: center; }

/* ── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb { padding: .75rem 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.breadcrumb li { font-size: .85rem; color: var(--text3); }
.breadcrumb li::after { content: '/'; margin-inline-start: .35rem; }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb a { color: var(--primary); }
.breadcrumb .active { color: var(--text2); }
@media (max-width: 768px) {
  .breadcrumb { padding: .75rem .25rem; }
  .breadcrumb ol { gap: .5rem; }
  .breadcrumb li { font-size: .82rem; line-height: 1.6; }
}

/* ── Article Content ───────────────────────────────────────── */
.article-content {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; margin: 1.5rem 0; line-height: 1.85;
}
.article-content h2 { font-size: 1.3rem; margin: 1.5rem 0 .75rem; color: var(--primary); }
.article-content h3 { font-size: 1.1rem; margin: 1.2rem 0 .6rem; }
.article-content p  { margin-bottom: 1rem; color: var(--text2); }
.article-content ul, .article-content ol { margin-block: .75rem 1rem; margin-inline-start: 1.5rem; color: var(--text2); }
.article-content li { margin-bottom: .35rem; }

/* ── FAQ ───────────────────────────────────────────────────── */
.faq-section { padding: 2rem 0; }
.faq-section h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; }
.faq-list { display: flex; flex-direction: column; gap: .5rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.faq-question {
  width: 100%; text-align: start; padding: 1rem 1.25rem;
  background: none; border: none; font-size: .95rem; font-weight: 600;
  font-family: var(--font); color: var(--text); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-question:hover { background: var(--surface2); }
.faq-arrow { color: var(--primary); font-size: .8rem; }
.faq-answer { display: none; padding: 1rem 1.25rem; color: var(--text2); line-height: 1.75; border-top: 1px solid var(--border); }

/* ── Related ───────────────────────────────────────────────── */
.related-section { padding: 2rem 0; }
.related-section h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
.related-card {
  display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: .88rem; font-weight: 500; transition: all .15s;
}
.related-card:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.related-card .ic { font-size: 1.15rem; color: var(--primary); }

/* ── Blog ──────────────────────────────────────────────────── */
/* (blog styles: see "Blog" block at the end of this file) */

/* ── Page 404 / Not Found ──────────────────────────────────── */
.not-found { text-align: center; padding: 5rem 1rem; }
.not-found h1 { font-size: 5rem; color: var(--primary); }
.not-found p { color: var(--text2); margin: 1rem 0 2rem; }

/* ── Admin ─────────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: calc(100vh - var(--header-h)); }
.admin-sidebar { width: 240px; background: var(--surface); border-inline-end: 1px solid var(--border); padding: 1.5rem 1rem; flex-shrink: 0; }
.admin-sidebar a { display: block; padding: .65rem 1rem; border-radius: var(--radius-sm); color: var(--text2); font-weight: 500; margin-bottom: .25rem; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.admin-main { flex: 1; padding: 2rem; overflow: auto; }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--primary); color: var(--on-primary); border-radius: var(--radius); padding: 1.5rem; text-align: center; }
.stat-num { font-size: 2.5rem; font-weight: 700; }
.stat-label { opacity: .85; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; padding: .75rem 1rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
th { background: var(--surface2); font-weight: 600; color: var(--text2); }
tr:last-child td { border-bottom: none; }
.badge { display: inline-block; padding: .2rem .65rem; border-radius: 9999px; font-size: .75rem; font-weight: 600; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-gray  { background: var(--surface2); color: var(--text2); }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .9rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: .65rem 1rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: .95rem; font-family: var(--font);
  background: var(--bg); color: var(--text); outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }
.btn { padding: .65rem 1.5rem; border-radius: var(--radius-sm); font-weight: 600; cursor: pointer; border: none; font-family: var(--font); font-size: .95rem; transition: all .2s; }
.btn-sm { padding: .4rem .9rem; font-size: .82rem; }
.btn-blue { background: var(--primary); color: var(--on-primary); }
.btn-blue:hover { background: var(--primary-dark); }
.btn-red { background: #ef4444; color: #fff; }
.btn-red:hover { background: #dc2626; }
.alert { padding: .85rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: #0f172a;
  margin-top: auto;
  padding: 3.5rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-logo { display: inline-block; margin-bottom: 1rem; }
.footer-logo img { height: 56px; width: auto; display: block; }
.footer-col h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}
.footer-col h4 {
  font-size: .82rem;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.footer-col p {
  font-size: .9rem;
  color: #94a3b8;
  line-height: 1.8;
  max-width: 260px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.footer-col ul li a {
  font-size: .9rem;
  color: #94a3b8;
  transition: color .2s;
}
.footer-col ul li a:hover {
  color: #60a5fa;
  text-decoration: none;
}
.footer-bottom {
  padding: 1.25rem 0;
  text-align: center;
}
.footer-bottom p {
  font-size: .82rem;
  color: #8292a7;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
  .main-nav, .search-form { display: none; }
  .mobile-nav .search-form { display: flex; margin-bottom: .5rem; }
  .mobile-nav .search-form input { flex: 1; width: auto; padding: .55rem .9rem; font-size: 1rem; }
  .nav-toggle { display: block; }
  :root { --header-h: 64px; }
  .logo-img { height: 40px; }
  .footer-logo img { height: 48px; }
  .tool-wrapper { padding: 1rem 0; }
  .calc-grid { grid-template-columns: 1fr 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; border-inline-end: none; border-bottom: 1px solid var(--border); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .container { padding-inline: 1.5rem; } /* sides only: keep .section vertical padding */
  .breadcrumb { padding: .65rem 0; }
  .breadcrumb ol { gap: .4rem; row-gap: .3rem; }
  .breadcrumb li { font-size: .8rem; }
}
@media (max-width: 480px) {
  .calc-grid { grid-template-columns: 1fr; }
  .hero { padding: 2.5rem 0; }
  .calc-hero { padding: 1rem 0; }
  .calc-hero-icon { font-size: 1.75rem; }
  .calc-hero p { font-size: .88rem; }
  .ad-slot { min-height: 250px; }
  .tool-card { padding: 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .site-footer { padding-top: 2.5rem; }
  .container { padding-inline: 1.25rem; } /* sides only: keep .section vertical padding */
  .footer-col p { max-width: 100%; }
}

/* ── Calculator form extras ────────────────────────────────── */
.field-row { display: flex; gap: .5rem; align-items: stretch; }
.field-row > * { flex: 1; min-width: 0; }
.field-row + .field-row { margin-top: .5rem; }
.calc-field .field-row input, .calc-field .field-row select { width: 100%; }
.add-row, .swap-btn {
  margin-top: .5rem; padding: .5rem 1rem; border-radius: var(--radius-sm); cursor: pointer;
  border: 1.5px dashed var(--border); background: transparent; color: var(--primary); font: 600 .9rem var(--font);
}
.add-row:hover, .swap-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.swap-btn { flex: 0 0 auto; margin-top: 0; border-style: solid; font-size: 1.1rem; }
.result-rows { display: grid; gap: .35rem; margin-top: .85rem; text-align: start; }
.result-rows .rr { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .75rem; border-radius: 8px; background: rgba(255,255,255,.1); font-size: .9rem; }
.result-rows .rr-k { opacity: .85; }
.result-rows .rr-v { font-weight: 700; text-align: end; }
.result-rows .sep { display: none; }
.calc-note a { color: inherit; text-decoration: underline; }
.article-content .updated { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .85rem; color: var(--text3); }
.article-content table { width: 100%; margin: 1rem 0 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.article-content th, .article-content td { padding: .6rem .85rem; font-size: .92rem; }
.contact-textarea { width: 100%; padding: .65rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font); font-size: 1rem; background: var(--bg); color: var(--text); outline: none; }
.contact-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.search-form-lg { display: flex; max-width: 420px; margin: 1.5rem auto 0; }
.search-form-lg input { flex: 1; width: auto; padding: .7rem 1.1rem; font-size: 1rem; }

/* ── Hero: search-first with Islamic star lattice ─────────────── */
.hero { position: relative; overflow: hidden; background: var(--brand-grad); color: #fff; padding: 3.5rem 0 3.75rem; }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.10' stroke-width='1'%3E%3Cpath d='M20 20h24v24H20z'/%3E%3Cpath d='M32 15 49 32 32 49 15 32z'/%3E%3Cpath d='M0 32h15M49 32h15M32 0v15M32 49v15'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 25% 40%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 90% at 25% 40%, #000 0%, transparent 75%);
}
.hero::after {
  content: ''; position: absolute; width: 560px; height: 560px; border-radius: 50%; pointer-events: none;
  top: -220px; inset-inline-end: -140px; background: radial-gradient(circle, rgba(45,212,191,.30), transparent 65%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; align-items: center; }
.hero-eyebrow {
  display: inline-block; padding: .3rem .9rem; margin-bottom: 1rem; border-radius: 999px; font-size: .85rem; font-weight: 500;
  background: rgba(45,212,191,.14); border: 1px solid rgba(45,212,191,.45); color: var(--hero-ink);
}
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; line-height: 1.25; margin-bottom: .85rem; }
.hero h1 .accent { color: var(--hero-ink); }
.hero-sub { font-size: 1.1rem; opacity: .85; max-width: 560px; margin-bottom: 1.75rem; }

.hero-search {
  position: relative; display: flex; align-items: center; max-width: 620px; padding: .4rem;
  background: #fff; border-radius: 16px; box-shadow: 0 18px 40px rgba(0,0,0,.25); transition: box-shadow .2s;
}
.hero-search:focus-within { box-shadow: 0 0 0 4px rgba(45,212,191,.45), 0 18px 40px rgba(0,0,0,.25); }
.hero-search-ic { width: 22px; height: 22px; flex: none; margin-inline: .75rem .25rem; color: #64748b; }
.hero-search input { flex: 1; min-width: 0; padding: .75rem .25rem; border: none; outline: none; background: transparent; color: #0b2545; font: 400 1.05rem var(--font); }
.hero-search input::-webkit-search-cancel-button { display: none; }
.hero-search button { flex: none; padding: .75rem 1.5rem; border: none; border-radius: 12px; background: #0f766e; color: #fff; font: 700 1rem var(--font); cursor: pointer; transition: background .2s; }
.hero-search button:hover { background: #115e59; }
.hero-suggest {
  position: absolute; top: calc(100% + 8px); inset-inline: 0; z-index: 20; padding: .4rem; text-align: start;
  background: #fff; border-radius: 14px; box-shadow: 0 18px 40px rgba(11,37,69,.25);
}
.hero-suggest a { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .65rem .85rem; border-radius: 10px; color: #0b2545; font-weight: 500; }
.hero-suggest a::after { content: '←'; color: #94a3b8; }
[dir="ltr"] .hero-suggest a::after { content: '→'; }
.hero-suggest a:hover, .hero-suggest a.active { background: #ccfbf1; text-decoration: none; }
.hero-suggest .none { padding: .65rem .85rem; color: #64748b; }

.hero-chips { display: flex; flex-wrap: wrap; gap: .5rem; max-width: 640px; margin-top: 1.25rem; }
.hero-chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .85rem; border-radius: 999px; white-space: nowrap;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #e2f5f3; font-size: .88rem; transition: all .2s;
}
.hero-chip .ic { font-size: 1rem; color: var(--hero-ink); }
.hero-chip:hover { background: rgba(255,255,255,.16); border-color: rgba(94,234,212,.6); color: #fff; text-decoration: none; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1.4rem; font-size: .88rem; opacity: .85; }
.hero-trust span { color: var(--hero-ink); font-weight: 700; margin-inline-end: .15rem; }

.today-card {
  padding: 1.5rem; border-radius: 20px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 20px 50px rgba(0,0,0,.2);
}
.today-label { margin-bottom: .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--hero-ink); }
.today-hijri { min-height: 2.1rem; font-size: 1.6rem; font-weight: 700; line-height: 1.3; }
.today-greg { margin-top: .2rem; font-size: .95rem; opacity: .75; }
.today-next {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 3.3rem; margin-top: 1.25rem; padding: .85rem 1rem;
  border-radius: 14px; background: rgba(45,212,191,.12); border: 1px solid rgba(45,212,191,.35); color: #fff; transition: background .2s;
}
.today-next:hover { background: rgba(45,212,191,.2); text-decoration: none; }
.today-next-label { font-size: .92rem; }
.today-next-days { font-weight: 700; color: var(--hero-ink); white-space: nowrap; }
.today-link { display: inline-block; margin-top: 1rem; font-size: .85rem; color: #cbd5e1; }
.today-link:hover { color: #fff; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; } /* minmax(0): the scrolling chip row must not widen the column */
  .today-card { max-width: 620px; }
}
@media (max-width: 600px) {
  .hero { padding: 2rem 0 2.25rem; }
  .hero-sub { font-size: 1rem; margin-bottom: 1.25rem; }
  .hero-search button { padding: .7rem 1.1rem; }
  .hero-search input { font-size: 1rem; }
  /* Chips scroll sideways on phones instead of stacking four rows deep */
  .hero-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -1.25rem; padding-inline: 1.25rem; scrollbar-width: none; }
  .hero-chips::-webkit-scrollbar { display: none; }
  .today-hijri { font-size: 1.35rem; }
}

/* ── Hero: floating maths symbols in Arabic notation (س ص ط جا ٪ ١٢٣) ── */
/* Drawn from data-s via CSS so the symbols aren't page text for search engines */
.hero-math { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.hero-math span {
  position: absolute; left: var(--x); top: var(--y);
  font: 700 var(--s) var(--font); line-height: 1; white-space: nowrap; direction: rtl;
  color: rgba(94, 234, 212, .2); transform: rotate(var(--r));
  animation: hero-float 7s ease-in-out var(--d) infinite alternate;
}
.hero-math span:nth-child(even) { color: rgba(255, 255, 255, .13); animation-duration: 9s; }
.hero-math span::before { content: attr(data-s); }
@keyframes hero-float {
  from { transform: translateY(0) rotate(var(--r)); }
  to   { transform: translateY(-10px) rotate(calc(var(--r) + 4deg)); }
}
@media (prefers-reduced-motion: reduce) { .hero-math span { animation: none; } }
@media (max-width: 900px) {
  .hero-math span:not(.m) { display: none; }
  .hero-math span { color: rgba(94, 234, 212, .14); }
}

/* ── Blog: generated covers (no image files) ───────────────────── */
/* One gradient per category; new posts pick theirs up automatically */
.cover-health     { --cv: linear-gradient(135deg, #0f766e 0%, #14b8a6 60%, #5eead4 100%); }
.cover-financial  { --cv: linear-gradient(135deg, #0b2545 0%, #0e4a5c 55%, #0f766e 100%); }
.cover-math       { --cv: linear-gradient(135deg, #3730a3 0%, #4f46e5 60%, #818cf8 100%); }
.cover-education  { --cv: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 60%, #c4b5fd 100%); }
.cover-date       { --cv: linear-gradient(135deg, #92400e 0%, #d97706 60%, #fbbf24 100%); }
.cover-conversion { --cv: linear-gradient(135deg, #075985 0%, #0284c7 60%, #38bdf8 100%); }
.cover-currency   { --cv: linear-gradient(135deg, #065f46 0%, #059669 60%, #34d399 100%); }
.cover-countdown  { --cv: linear-gradient(135deg, #9d174d 0%, #db2777 60%, #f472b6 100%); }
.cover-technology { --cv: linear-gradient(135deg, #1e293b 0%, #475569 60%, #94a3b8 100%); }

.blog-cover, .post-hero { position: relative; overflow: hidden; background: var(--cv, var(--brand-grad)); }
.blog-cover::before, .post-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.14' stroke-width='1.2'%3E%3Cpath d='M20 20h24v24H20z'/%3E%3Cpath d='M32 15 49 32 32 49 15 32z'/%3E%3Cpath d='M0 32h15M49 32h15M32 0v15M32 49v15'/%3E%3C/g%3E%3C/svg%3E");
}
.blog-cover { display: grid; place-items: center; aspect-ratio: 16 / 8; }
.blog-cover-mark, .post-hero-mark {
  position: absolute; inset-inline-start: -1.25rem; bottom: -2.25rem; color: rgba(255,255,255,.16);
  font-size: 8.5rem; line-height: 1; transform: rotate(-12deg); pointer-events: none;
}
.blog-cover-mark .ic, .post-hero-mark .ic { stroke-width: 1.4; }
.blog-cover-tile {
  position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 20px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); color: #fff; font-size: 2.1rem;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); box-shadow: 0 10px 30px rgba(0,0,0,.18); transition: transform .3s;
}

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; }
.blog-card {
  display: flex; flex-direction: column; overflow: hidden; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: transform .2s, box-shadow .2s;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.blog-card:hover .blog-cover-tile { transform: scale(1.08) rotate(-4deg); }
.blog-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.1rem 1.25rem 1.25rem; }
.blog-card-cat { align-self: flex-start; margin-bottom: .6rem; padding: .15rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; color: var(--primary); background: var(--primary-light); }
.blog-card-title { font-size: 1.05rem; font-weight: 700; line-height: 1.55; margin-bottom: .45rem; }
.blog-card-excerpt { flex: 1; font-size: .88rem; line-height: 1.7; color: var(--text2); }
.blog-card-meta { display: flex; justify-content: space-between; gap: .5rem; margin-top: .9rem; padding-top: .75rem; border-top: 1px solid var(--border); font-size: .78rem; color: var(--text3); }

/* ── Blog post page ── */
.preview-banner { background: #fef3c7; color: #78350f; border-bottom: 1px solid #fcd34d; padding: .6rem 1rem; text-align: center; font-size: .9rem; }
.preview-banner a { color: #78350f; font-weight: 700; text-decoration: underline; margin-inline-start: .5rem; }
.post-hero { color: #fff; padding: .5rem 0 2.75rem; }
.post-hero-mark { font-size: 15rem; bottom: -4rem; inset-inline-start: 2%; }
.post-hero-inner { position: relative; z-index: 1; max-width: 820px; }
.post-hero .breadcrumb a, .post-hero .breadcrumb li, .post-hero .breadcrumb .active { color: rgba(255,255,255,.8); }
.post-hero-cat { display: inline-flex; align-items: center; gap: .4rem; margin: 1rem 0 .85rem; padding: .3rem .85rem; border-radius: 999px; font-size: .85rem; font-weight: 700; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); }
.post-hero h1 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.35; margin-bottom: .85rem; }
.post-hero-meta { display: flex; gap: .5rem; font-size: .9rem; opacity: .85; }
.post-body { max-width: 820px; margin: -1.5rem auto 2rem; position: relative; z-index: 2; }
.post-body > .article-content { margin-top: 0; box-shadow: var(--shadow); }
.post-cta {
  display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; padding: 1.1rem 1.25rem; border-radius: var(--radius);
  background: var(--brand-grad); color: #fff; box-shadow: var(--shadow); transition: transform .2s;
}
.post-cta:hover { transform: translateY(-2px); text-decoration: none; color: #fff; }
.post-cta-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font-size: 1.6rem; background: rgba(255,255,255,.14); color: var(--hero-ink); }
.post-cta-text { flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.post-cta-text span { font-size: .85rem; opacity: .8; }
.post-cta-go { flex: none; padding: .55rem 1.1rem; border-radius: 10px; background: #fff; color: #0f766e; font-weight: 700; }
.post-body .updated { font-size: .85rem; color: var(--text3); }
@media (max-width: 600px) {
  .post-cta { flex-wrap: wrap; }
  .post-cta-go { width: 100%; text-align: center; }
  .post-hero-mark { font-size: 10rem; }
}

/* ── Reference pages (e.g. /ramadan-eid-dates) ─────────────────── */
.ref-next {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 1.5rem; padding: 1.25rem 1.5rem;
  border-radius: var(--radius); background: var(--brand-grad); color: #fff; box-shadow: var(--shadow);
}
.ref-next > div { display: flex; flex-direction: column; gap: .2rem; }
.ref-next-label { font-size: .85rem; color: var(--hero-ink); font-weight: 700; }
.ref-next strong { font-size: 1.4rem; }
.ref-next span:last-child { font-size: .9rem; opacity: .85; }
.ref-next-cta { padding: .65rem 1.2rem; border-radius: 10px; background: #fff; color: #0f766e; font-weight: 700; white-space: nowrap; }
.ref-next-cta:hover { text-decoration: none; background: #ccfbf1; }
.ref-table-wrap { overflow-x: auto; margin-bottom: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ref-table { min-width: 860px; border: 0; }
.ref-table caption { caption-side: bottom; padding: .75rem 1rem; font-size: .82rem; color: var(--text3); text-align: start; }
.ref-table th, .ref-table td { padding: .75rem 1rem; white-space: nowrap; font-size: .9rem; }
.ref-table thead th { background: var(--surface2); color: var(--text); font-weight: 700; }
.ref-table tbody th { color: var(--primary); font-weight: 700; background: inherit; }
.ref-table tbody tr:nth-child(even) { background: var(--surface2); }
.ref-table tr.is-next { background: var(--primary-light) !important; }
.ref-table small { color: var(--text3); }
.ref-cite { margin-top: 2rem; padding: 1.5rem; border: 1.5px dashed var(--border); border-radius: var(--radius); background: var(--surface); }
.ref-cite h2 { font-size: 1.2rem; margin-bottom: .5rem; }
.ref-cite p { color: var(--text2); margin: .5rem 0; }
.ref-cite-box { display: flex; align-items: center; gap: .75rem; margin: .75rem 0; }
.ref-cite-box code { flex: 1; min-width: 0; padding: .65rem .85rem; border-radius: 8px; background: var(--surface2); font-size: .82rem; direction: ltr; text-align: left; overflow-x: auto; white-space: nowrap; }
.resource-links { display: flex; flex-wrap: wrap; gap: .75rem; margin: 0 auto 1.5rem; max-width: 600px; }
.resource-links a { flex: 1 1 260px; display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: .9rem; font-weight: 500; }
.resource-links a .ic { font-size: 1.2rem; color: var(--primary); }
.resource-links a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* ── Widgets page ── */
.widget-card { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.5rem; align-items: start; margin: 1.25rem 0; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.widget-info h2 { font-size: 1.3rem; margin-bottom: .4rem; }
.widget-info p { color: var(--text2); margin-bottom: 1rem; }
.widget-themes { display: inline-flex; gap: .25rem; padding: .25rem; margin-bottom: 1rem; border-radius: 10px; background: var(--surface2); }
.widget-themes button { padding: .4rem 1rem; border: 0; border-radius: 8px; background: transparent; color: var(--text2); font: 600 .9rem var(--font); cursor: pointer; }
.widget-themes button.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }
.widget-code-label { display: block; font-size: .85rem; font-weight: 600; color: var(--text2); margin-bottom: .35rem; }
.widget-code { width: 100%; padding: .75rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font: .78rem/1.5 ui-monospace, Consolas, monospace; resize: vertical; }
.widget-copy { margin-top: .75rem; }
.widget-preview { padding: 1rem; border-radius: var(--radius); background: repeating-conic-gradient(var(--surface2) 0% 25%, var(--bg) 0% 50%) 50% / 20px 20px; text-align: center; }
.widget-preview-label { display: block; margin-bottom: .5rem; font-size: .8rem; color: var(--text3); }
@media (max-width: 900px) { .widget-card { grid-template-columns: minmax(0, 1fr); } }

/* ── Footer on phones: brand on top, two link columns, info links as chips ── */
@media (max-width: 600px) {
  .site-footer { padding-top: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem 1.25rem; padding-bottom: 1.5rem; }
  .footer-brand { grid-column: 1 / -1; text-align: center; padding-bottom: 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08); }
  .footer-brand .footer-logo { margin: 0 auto .6rem; }
  .footer-brand p { max-width: 300px; margin: 0 auto; font-size: .88rem; }
  .footer-col h4 { margin-bottom: .6rem; font-size: .8rem; }
  .footer-col ul { gap: 0; }
  .footer-col ul li a { display: block; padding: .38rem 0; font-size: .92rem; }  /* ~36px tap targets */
  .footer-info { grid-column: 1 / -1; }
  .footer-info ul { flex-direction: row; flex-wrap: wrap; gap: .5rem; }
  .footer-info ul li a { padding: .38rem .8rem; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; font-size: .84rem; }
  .footer-info ul li a:hover { border-color: #60a5fa; }
  .footer-bottom { padding: 1rem 0 1.25rem; }
}

/* ── Related articles (calculator pages) & more articles (posts) ── */
.related-articles { padding: 1.5rem 0 .5rem; }
.related-articles h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; }
.ra-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .75rem; }
.ra-item { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); transition: border-color .2s, transform .2s; }
.ra-item:hover { border-color: var(--primary); transform: translateY(-2px); text-decoration: none; color: var(--text); }
.ra-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--cv, var(--brand-grad)); color: #fff; font-size: 1.3rem; }
.ra-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.ra-text strong { font-size: .95rem; line-height: 1.5; }
.ra-text span { font-size: .8rem; color: var(--text3); }
.post-more { margin: 2rem 0 1rem; }
.post-more h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; }

/* ── Category cards: always two per row on phones (auto-fill dropped to one below ~420px) ── */
@media (max-width: 600px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .cat-card { padding: 1.15rem .5rem; }
  .cat-card-icon { width: 56px; height: 56px; font-size: 1.65rem; margin-bottom: .6rem; }
  .cat-card-name { font-size: .92rem; }
}
