/* Khadamaty blog — shared styles (design language of /landing) */
:root {
  --primary: #cc3333;
  --primary-dark: #a32626;
  --ink: #1c1310;
  --ink-soft: #3c2d28;
  --muted: #7c685f;
  --page: #fffcf9;
  --cream: #faf2ec;
  --card: #ffffff;
  --border: #f0ddd5;
  --tint: #fdeceb;
  --gold: #f0a232;
  --green: #1e9e5a;
  --shadow-sm: 0 2px 10px rgba(60, 25, 18, .06);
  --shadow-md: 0 14px 40px rgba(60, 25, 18, .12);
  --radius: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.8;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--tint); color: var(--primary-dark); }

.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary {
  background: linear-gradient(135deg, #e04040, var(--primary-dark));
  color: #fff;
  box-shadow: 0 10px 26px rgba(204, 51, 51, .35);
}
.btn.outline { border-color: var(--border); background: #fff; color: var(--ink); }

/* ---------- nav ---------- */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 252, 249, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 900; font-size: 20px; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: var(--shadow-sm); }
.nav-links { display: flex; gap: 24px; font-weight: 700; font-size: 15px; color: var(--ink-soft); }
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); }
.nav-actions .btn { min-height: 42px; padding: 0 18px; font-size: 14px; border-radius: 12px; }

/* ---------- blog home ---------- */
.blog-head { padding: 64px 0 16px; max-width: 760px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 8px;
}
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--primary); }
.blog-head h1 { margin: 0; font-size: clamp(32px, 4.5vw, 52px); font-weight: 900; line-height: 1.25; }
.blog-head p { margin: 12px 0 0; color: var(--muted); font-size: 17px; font-weight: 600; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 36px 0 80px;
}
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--cream); }
.post-card .post-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.post-chip {
  align-self: flex-start;
  background: var(--tint);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 10px;
}
.post-card h2 { margin: 0 0 8px; font-size: 20px; font-weight: 900; line-height: 1.5; }
.post-card p { margin: 0 0 14px; color: var(--muted); font-size: 14px; font-weight: 600; flex: 1; }
.post-meta { display: flex; gap: 14px; color: var(--muted); font-size: 12.5px; font-weight: 700; }

/* ---------- article ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 7px; padding: 22px 0 0; color: var(--muted); font-size: 13.5px; font-weight: 700; }
.crumbs a:hover { color: var(--primary); }
.crumbs span[aria-hidden] { opacity: .55; }

.article-wrap { max-width: 800px; margin: 0 auto; padding: 18px 0 30px; }
.article-head h1 { margin: 10px 0 0; font-size: clamp(28px, 4vw, 42px); font-weight: 900; line-height: 1.4; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 14px; color: var(--muted); font-size: 13.5px; font-weight: 700; }
.article-meta .post-chip { margin: 0; }

.article-hero {
  margin: 24px 0 8px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.article-hero img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; background: var(--cream); }

.prose { font-size: 16.5px; font-weight: 600; color: var(--ink-soft); }
.prose .lead { font-size: 18px; color: var(--ink-soft); }
.prose h2 {
  margin: 38px 0 10px;
  font-size: 25px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.45;
  padding-inline-start: 14px;
  border-inline-start: 4px solid var(--primary);
}
.prose h3 { margin: 26px 0 8px; font-size: 19px; font-weight: 900; color: var(--ink); }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-inline-start: 22px; }
.prose li { margin-bottom: 7px; }
.prose li strong, .prose p strong { color: var(--ink); }
.prose a { color: var(--primary-dark); font-weight: 800; text-decoration: underline; text-decoration-color: rgba(204,51,51,.35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--primary); }

.callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--cream);
  border: 1px solid #eddccf;
  border-radius: 16px;
  padding: 16px 18px;
  margin: 20px 0;
  font-size: 15px;
}
.callout .c-icon {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 12px;
  background: var(--tint);
  display: grid; place-items: center;
}
.callout .c-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--primary); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.callout p { margin: 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; margin: 14px 0 8px; }
details {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
details[open] { border-color: #ecc7bc; }
summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  font-weight: 900;
  font-size: 16.5px;
  padding: 15px 20px;
}
summary::-webkit-details-marker { display: none; }
summary .faq-x {
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 50%;
  background: var(--tint);
  display: grid; place-items: center;
  color: var(--primary);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  transition: transform .25s ease;
}
details[open] summary .faq-x { transform: rotate(45deg); }
details .faq-a { margin: 0; padding: 0 20px 17px; color: var(--muted); font-size: 15px; font-weight: 600; }

/* ---------- CTA card ---------- */
.cta-card {
  position: relative;
  border-radius: 24px;
  background: radial-gradient(640px 280px at 85% -20%, rgba(204, 51, 51, .55), transparent 60%), var(--ink);
  color: #fff;
  padding: 34px 32px;
  margin: 42px 0 10px;
  overflow: hidden;
}
.cta-card h2 { margin: 0 0 6px; font-size: 24px; font-weight: 900; border: none; padding: 0; color: #fff; }
.cta-card p { margin: 0 0 18px; color: rgba(255, 245, 240, .88); font-size: 15.5px; font-weight: 600; }
.cta-card .stores { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-card .btn.store {
  background: #fff;
  color: var(--ink);
  min-height: 54px;
  border-radius: 14px;
  padding: 8px 20px;
  text-align: start;
}
.cta-card .btn.store svg { width: 22px; height: 22px; flex: 0 0 22px; fill: var(--ink); }
.cta-card .btn.store .store-text { display: flex; flex-direction: column; line-height: 1.25; }
.cta-card .btn.store .store-text small { font-size: 10.5px; font-weight: 600; opacity: .75; }
.cta-card .btn.store .store-text strong { font-size: 15px; font-weight: 800; }

/* ---------- related ---------- */
.related { margin: 36px 0 60px; }
.related h2 { font-size: 22px; font-weight: 900; margin: 0 0 16px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.related-card {
  display: flex;
  gap: 13px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.related-card img { width: 86px; height: 64px; flex: 0 0 86px; object-fit: cover; border-radius: 11px; background: var(--cream); }
.related-card strong { font-size: 14.5px; font-weight: 900; line-height: 1.5; }

/* ---------- footer ---------- */
footer.site { background: #fff; border-top: 1px solid var(--border); padding: 36px 0 24px; margin-top: 30px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 14px; font-weight: 700; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { width: 100%; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .blog-head { padding-top: 40px; }
  .posts-grid { grid-template-columns: 1fr; padding-bottom: 56px; }
  .related-grid { grid-template-columns: 1fr; }
  .prose { font-size: 16px; }
  .cta-card { padding: 26px 22px; }
  .cta-card .stores .btn { flex: 1 1 46%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .post-card, .related-card { transition: none; }
}
