.site-shell-header,
.site-shell-footer {
  position: sticky;
  z-index: 80;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.site-shell-header {
  top: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 118px;
}

.site-shell-footer {
  position: relative;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  margin-top: 32px;
  background: #0f172a;
  color: #f8fafc;
}

.shell-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 6%;
  display: grid;
  gap: 16px;
}

.site-shell-header .shell-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.shell-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.shell-brand,
.shell-home-link,
.shell-nav a {
  text-decoration: none;
  color: #111827;
  font-weight: 600;
}

.shell-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.shell-brand-logo {
  width: auto;
  height: 44px;
  max-width: 132px;
  object-fit: contain;
}

.shell-brand-logo.is-hidden {
  display: none;
}

.shell-brand-text {
  font-size: 1rem;
  letter-spacing: 0.12em;
}

.shell-brand-text.is-hidden {
  display: none;
}

.shell-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 18px;
  row-gap: 0;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.shell-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 0;
  white-space: nowrap;
  font-size: 0.9rem;
  color: #4b5563;
}

.shell-nav a.is-active,
.shell-nav a:hover,
.shell-home-link:hover {
  color: #2d62ff;
}

.shell-lang-switcher {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(148,163,184,0.35);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.shell-nav-toggle {
  display: none;
  border: 1px solid rgba(148,163,184,0.35);
  background: #ffffff;
  color: #111827;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.shell-nav-backdrop {
  display: none;
}

.shell-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  align-items: start;
  gap: 32px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.site-shell-footer .shell-brand,
.site-shell-footer .shell-footer-socials a,
.site-shell-footer .shell-footer-top {
  color: #f8fafc;
}

.shell-footer-brand,
.shell-footer-meta {
  display: grid;
  gap: 8px;
}

.shell-footer-brand {
  max-width: 420px;
}

.shell-footer-tagline,
.shell-footer-meta p {
  margin: 0;
  color: rgba(248, 250, 252, 0.78);
  font-size: 0.92rem;
  line-height: 1.6;
}

.shell-footer-meta {
  justify-self: start;
}

.shell-footer-socials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.shell-footer-socials a,
.shell-footer-top {
  text-decoration: none;
  font-weight: 600;
}

.shell-footer-social-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  transition: color 0.2s ease, transform 0.2s ease;
}

.shell-footer-social-card:hover {
  transform: translateX(2px);
}

.shell-footer-social-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.14);
  color: #93c5fd;
  flex: 0 0 auto;
}

.shell-footer-social-icon svg {
  width: 16px;
  height: 16px;
}

.shell-footer-social-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-footer-side {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.shell-footer-socials a:hover,
.shell-footer-top:hover {
  color: #60a5fa;
}

.shell-footer-top {
  color: rgba(248, 250, 252, 0.9);
}

@media (max-width: 900px) {
  .shell-inner {
    gap: 12px;
  }

  .site-shell-header .shell-inner {
    display: grid;
    width: 100%;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .shell-header-actions {
    margin-left: auto;
  }

  .shell-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .shell-nav {
    display: none;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 4px;
  }

  .shell-nav.is-open {
    display: grid;
  }

  .shell-nav a {
    min-height: 0;
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }

  .shell-footer-inner {
    grid-template-columns: 1fr;
  }

  .shell-lang-switcher {
    margin-left: 0;
  }

.shell-footer-socials {
  width: 100%;
  grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .site-shell-header .shell-inner {
    gap: 10px;
  }

  .shell-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .shell-lang-switcher {
    order: 1;
  }

  .shell-nav-toggle {
    order: 2;
  }

  .shell-footer-socials {
    grid-template-columns: 1fr;
  }
}

.blog-hero,
.blog-listing,
.blog-article {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.blog-hero .section-inner,
.blog-listing .section-inner,
.blog-article .section-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 6%;
}

.blog-hero .section-inner {
  padding-top: 28px;
  padding-bottom: 28px;
}

.blog-title {
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 12ch;
}

.blog-subtitle {
  max-width: 66ch;
  font-size: 1.05rem;
  color: #64748b;
  margin-top: 18px;
}

.blog-search {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.blog-search-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.blog-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto auto;
  gap: 12px;
  align-items: end;
}

.blog-search-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  font: inherit;
  color: #0f172a;
}

.blog-search-button {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  background: #2d62ff;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.blog-sort-field {
  display: grid;
  gap: 8px;
}

.blog-sort-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.blog-sort-select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  font: inherit;
  color: #0f172a;
}

.blog-search-reset {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #475467;
  font-weight: 700;
  background: #fff;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.blog-card {
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.08);
}

.blog-card-media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  padding: 18px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.blog-card-body {
  padding: 22px;
  display: grid;
  gap: 12px;
}

.blog-card-meta {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.blog-card-title {
  font-size: 1.3rem;
  line-height: 1.2;
}

.blog-card-excerpt {
  color: #667085;
}

.blog-empty {
  color: #667085;
  font-size: 1rem;
}

.blog-card-link {
  color: #2d62ff;
  font-weight: 700;
}

.blog-article-header {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.blog-article-media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border-radius: 30px;
  overflow: hidden;
  margin-bottom: 28px;
  padding: 28px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
}

.blog-article-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.blog-article-body {
  max-width: 760px;
  font-size: 1.05rem;
  line-height: 1.9;
}

.blog-article-body h2,
.blog-article-body h3 {
  margin: 2rem 0 0.8rem;
  line-height: 1.2;
}

.blog-article-body p,
.blog-article-body ul,
.blog-article-body ol,
.blog-article-body blockquote {
  margin: 0 0 1rem;
}

.blog-article-body blockquote {
  border-left: 4px solid #2d62ff;
  padding-left: 18px;
  color: #475467;
}

.blog-article-body a {
  color: #2d62ff;
  text-decoration: underline;
}

body.lang-ar .blog-hero,
body.lang-ar .blog-listing,
body.lang-ar .blog-article {
  text-align: right;
}

body.lang-ar .blog-article-body {
  direction: rtl;
  text-align: right;
}

@media (max-width: 980px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-search-row {
    grid-template-columns: 1fr;
  }

  .blog-card-media {
    padding: 14px;
  }

  .blog-article-media {
    padding: 16px;
    border-radius: 24px;
  }

  .blog-hero .section-inner,
  .blog-listing .section-inner,
  .blog-article .section-inner {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .blog-hero .section-inner {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}
