/* ── Fonts ─────────────────────────────────────────────────── */
@font-face{font-family:'Estedad';src:url('../../website/fonts/Estedad/woff2/Estedad-Regular.woff2') format('woff2');font-weight:400;font-display:swap;}
@font-face{font-family:'Estedad';src:url('../../website/fonts/Estedad/woff2/Estedad-Medium.woff2') format('woff2');font-weight:500;font-display:swap;}
@font-face{font-family:'Estedad';src:url('../../website/fonts/Estedad/woff2/Estedad-SemiBold.woff2') format('woff2');font-weight:600;font-display:swap;}
@font-face{font-family:'Estedad';src:url('../../website/fonts/Estedad/woff2/Estedad-Bold.woff2') format('woff2');font-weight:700;font-display:swap;}
@font-face{font-family:'Estedad';src:url('../../website/fonts/Estedad/woff2/Estedad-ExtraBold.woff2') format('woff2');font-weight:800;font-display:swap;}
@font-face{font-family:'Estedad';src:url('../../website/fonts/Estedad/woff2/Estedad-Black.woff2') format('woff2');font-weight:900;font-display:swap;}

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --c-page: #FAFDFC;
  --c-surface: #FFFFFF;
  --c-subtle: #F5F9FA;
  --c-border: #EAF1F4;
  --c-text: #011825;
  --c-text2: #275066;
  --c-muted: #648293;
  --c-green: #06BA63;
  --c-green2: #07654F;
  --c-green-deep: #02381E;
  --c-green-soft: #F0FAF5;
  --c-hero: #002A32;
  --c-star: #FAB848;
  --c-nav: rgba(250, 253, 252, 0.88);
  --c-footer: #F0F6F8;
  --shadow: 0 2px 8px rgba(0, 0, 0, .06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .08);
  --radius: 14px;
}

:root.dark {
  --c-page: #02161B;
  --c-surface: #072530;
  --c-subtle: #04202A;
  --c-border: rgba(255, 255, 255, 0.09);
  --c-text: #E9F4F6;
  --c-text2: #A9C6D0;
  --c-muted: #6E92A0;
  --c-green: #15C97B;
  --c-green2: #0FA868;
  --c-green-deep: #063A26;
  --c-green-soft: rgba(21, 201, 123, 0.13);
  --c-hero: #03222A;
  --c-star: #FAB848;
  --c-nav: rgba(2, 22, 27, 0.88);
  --c-footer: #03202A;
  --shadow: 0 4px 14px rgba(0, 0, 0, .32);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, .45);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { direction: rtl; scroll-behavior: smooth; }
body { font-family: 'Estedad', system-ui, sans-serif; background: var(--c-page); color: var(--c-text); min-height: 100vh; line-height: 1.7; }
::selection { background: rgba(6, 186, 99, .2); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ── Utilities ─────────────────────────────────────────────── */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Animations ────────────────────────────────────────────── */
@keyframes ck-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ck-pop  { from { opacity: 0; transform: scale(.94); }       to { opacity: 1; transform: scale(1); } }
@keyframes ck-fadein { from { opacity: 0; } to { opacity: 1; } }

/* ── Page Transitions (SPA navigator) ─────────────────────── */
#ck-blog-nav-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2.5px;
  background: var(--c-green);
  z-index: 9999;
  transform-origin: right;
  transform: scaleX(0);
  opacity: 0;
  transition: transform .5s cubic-bezier(.1,.5,.2,1), opacity .2s;
  pointer-events: none;
}
html[data-blog-nav] #ck-blog-nav-bar {
  transform: scaleX(0.82);
  opacity: 1;
}
#main-content {
  transition: opacity .15s ease;
}
html[data-blog-nav] #main-content {
  opacity: 0;
}
html.ck-page-in #main-content {
  animation: ck-fadein .2s ease forwards;
}

/* ── Header / Nav ──────────────────────────────────────────── */
.ck-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-nav);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--c-border);
}

.ck-nav__inner {
  max-width: 1240px;
  margin: 0 auto;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(16px, 4vw, 32px);
}

.ck-nav__logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; text-decoration: none; }
.ck-nav__logo img { height: 32px; width: auto; transition: opacity .2s; }
:root.dark .ck-nav__logo img { filter: brightness(0) invert(1); }

.ck-nav__badge {
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: var(--c-green);
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

.ck-nav__links { display: flex; align-items: center; gap: 2px; margin-right: 8px; }
.ck-nav__links a {
  padding: 6px 13px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text2);
  transition: background .15s, color .15s;
}
.ck-nav__links a:hover { background: var(--c-subtle); color: var(--c-text); }
.ck-nav__links a.active { color: var(--c-green); }

.ck-nav__spacer { flex: 1; min-width: 0; }

.ck-nav__search {
  height: 42px;
  max-width: 300px;
  width: 100%;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  cursor: text;
  transition: border .18s;
}
.ck-nav__search:focus-within { border-color: var(--c-green); }
.ck-nav__search input { border: none; background: none; outline: none; font-size: 13.5px; color: var(--c-text); width: 100%; }
.ck-nav__search input::placeholder { color: var(--c-muted); }

.ck-nav__icon-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s, border .18s;
  cursor: pointer;
}
.ck-nav__icon-btn:hover { background: var(--c-subtle); }

.ck-nav__login {
  flex-shrink: 0;
  height: 42px;
  padding: 0 18px;
  border-radius: 11px;
  background: var(--c-green);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: opacity .18s;
}
.ck-nav__login:hover { opacity: .88; }

.ck-nav__mobile-toggle {
  display: none;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text2);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ck-nav__mobile-menu {
  display: none;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  padding: 12px 20px 16px;
}
.ck-nav__mobile-menu.open { display: block; }
.ck-nav__mobile-menu a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-border);
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text2);
}
.ck-nav__mobile-menu a:last-child { border-bottom: none; }

/* ── Mobile search icon button ──────────────────────────────── */
.ck-nav__search-btn { display: none; }

/* ── Mobile search panel ────────────────────────────────────── */
.ck-mobile-search-panel {
  display: none;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  padding: 12px 16px;
}
.ck-mobile-search-panel.open { display: block; }
.ck-mobile-search-panel form {
  display: flex;
  gap: 8px;
}
.ck-mobile-search-panel input[type="search"] {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--c-border);
  border-radius: 11px;
  background: var(--c-subtle);
  color: var(--c-text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}
.ck-mobile-search-panel input[type="search"]:focus { border-color: var(--c-green); }
.ck-mobile-search-panel button[type="submit"] {
  height: 44px;
  padding: 0 18px;
  border-radius: 11px;
  background: var(--c-green);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .ck-nav__links, .ck-nav__search { display: none; }
  .ck-nav__mobile-toggle { display: flex; }
  .ck-nav__login { display: none; }
  .ck-nav__search-btn { display: flex; }
}

/* ── Footer ────────────────────────────────────────────────── */
.ck-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  margin-top: 20px;
}

.ck-footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px clamp(16px, 4vw, 32px) 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.ck-footer__brand { display: flex; align-items: center; gap: 10px; }
.ck-footer__brand-text-title { font-size: 15px; font-weight: 800; color: var(--c-text); }
.ck-footer__brand-text-sub { font-size: 11px; color: var(--c-muted); }

.ck-footer__links { display: flex; gap: 24px; flex-wrap: wrap; }
.ck-footer__links a { font-size: 13.5px; color: var(--c-text2); transition: color .16s; }
.ck-footer__links a:hover { color: var(--c-green); }

.ck-footer__copy { font-size: 11.5px; color: var(--c-muted); margin: 0; max-width: 280px; line-height: 1.7; }

@media (max-width: 640px) {
  .ck-footer__inner { flex-direction: column; align-items: flex-start; gap: 18px; }
}

/* ── Card cover gradients (Tailwind can't generate dynamic gradients) ─── */
.ck-cover-c1 { background-image: linear-gradient(135deg, #1A4A5A 0%, rgba(6,186,99,.6) 100%); }
.ck-cover-c2 { background-image: linear-gradient(135deg, #2C4A2E 0%, rgba(6,186,99,.6) 100%); }
.ck-cover-c3 { background-image: linear-gradient(135deg, #4A2C1A 0%, rgba(6,186,99,.6) 100%); }
.ck-cover-c4 { background-image: linear-gradient(135deg, #2A1A4A 0%, rgba(6,186,99,.6) 100%); }
.ck-cover-c5 { background-image: linear-gradient(135deg, #3A1A2A 0%, rgba(6,186,99,.6) 100%); }
.ck-cover-c6 { background-image: linear-gradient(135deg, #1A3A4A 0%, rgba(6,186,99,.6) 100%); }
.ck-cover-c7 { background-image: linear-gradient(135deg, #4A3A1A 0%, rgba(6,186,99,.6) 100%); }
.ck-cover-c8 { background-image: linear-gradient(135deg, #1B3A4B 0%, rgba(6,186,99,.6) 100%); }

/* ── Featured cover hero gradient (uses CSS vars — can't do in Tailwind) ── */
.ck-cover-hero {
  background-image: linear-gradient(135deg, var(--c-hero) 0%, var(--c-green2) 100%);
}

/* ── Backdrop blur (vendor prefix needed) ──────────────────── */
.ck-backdrop { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.ck-nav-blur { backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); }

/* ── Animation utilities ────────────────────────────────────── */
.ck-anim-fade { animation: ck-fade .25s ease; }
.ck-anim-pop  { animation: ck-pop .28s ease; }

/* ── Instagram gradient ─────────────────────────────────────── */
.ck-instagram-btn { background: linear-gradient(105deg, #FCB045 0%, #FD1D1D 48%, #833AB4 100%); }

/* ── Mag Body: article content styles ──────────────────────── */
.mag-body { font-size: 17px; line-height: 2; color: var(--c-text2); overflow-x: hidden; }
.mag-body h2, .mag-body h3 { color: var(--c-text); margin: 1.6em 0 .6em; font-weight: 800; }
.mag-body h2 { font-size: 22px; }
.mag-body h3 { font-size: 18px; }
.mag-body p { margin-bottom: 1.4em; }
.mag-body img { border-radius: 16px; margin: 1.5em 0; width: 100%; max-width: 100%; }
.mag-body blockquote { border-right: 4px solid var(--c-green); padding: 16px 20px; color: var(--c-muted); background: var(--c-green-soft); border-radius: 0 14px 14px 0; margin: 1.5em 0; }
.mag-body a { color: var(--c-green); text-decoration: underline; }
.mag-body ul, .mag-body ol { padding-right: 24px; margin-bottom: 1.4em; }
.mag-body li { margin-bottom: .5em; }
.mag-body pre, .mag-body code { font-family: monospace; background: var(--c-subtle); border-radius: 8px; padding: 2px 6px; font-size: 14px; }
.mag-body pre { padding: 16px; overflow-x: auto; max-width: 100%; }
.mag-body table { width: 100%; overflow-x: auto; display: block; }

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .mag-body { font-size: 15px; line-height: 1.95; }
  .mag-body h2 { font-size: 18px; }
  .mag-body h3 { font-size: 16px; }
  .mag-body p { margin-bottom: 1.1em; }
  .mag-body blockquote { padding: 12px 14px; font-size: 14px; }
  .mag-body img { border-radius: 12px; margin: 1em 0; }

  .ck-footer__inner { padding: 28px 20px 20px; }
  .ck-footer__copy { max-width: 100%; }
}

audio, canvas, embed, iframe, img, object, svg, video {
    display: block;
    vertical-align: middle;
    width: 100%;
}
