/* ==========================================================================
   Ktby Layout & Design Alignment CSS
   Matches seoktby structure for Term, Subject, and File templates.
   ========================================================================== */

/* ── Container & Width ── */
.platform-container,
.page-body {
  max-width: 1280px;
  width: calc(100% - 32px);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.page-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 30px;
}

/* ── Breadcrumbs ── */
.breadcrumbs {
  max-width: 1280px;
  width: 100%;
  margin: 6px auto -2px;
  font-size: 11px;
  color: #64748b;
  direction: rtl;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.breadcrumbs::-webkit-scrollbar {
  display: none;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  align-items: center;
  gap: 5px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumbs li {
  flex-shrink: 0;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  color: #94a3b8;
  font-size: 10px;
  margin: 0 1px;
}

.breadcrumbs a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  font-size: 11px;
  transition: color 0.15s;
}

.breadcrumbs a:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

.breadcrumbs li[aria-current="page"] {
  color: #475569;
  font-weight: 600;
  font-size: 11px;
}

/* ── Card Section ── */
.card-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  box-sizing: border-box;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Content Split Line ── */
.content-split {
  width: 100%;
  max-width: 1280px;
  margin: 2px auto;
  height: 1px;
  background: linear-gradient(to left, transparent 0%, #e2e8f0 18%, #e2e8f0 82%, transparent 100%);
  flex-shrink: 0;
}

/* ── Grade Hero & Term Hero ── */
.grade-hero {
  position: relative;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 55%, #ede9fe 100%);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.04);
}

.grade-hero-content {
  padding: 6px 14px;
  position: relative;
  z-index: 1;
}

.grade-hero-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.35;
}

.grade-hero-title svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.grade-hero-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.grade-hero-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.grade-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  background: #ffffff;
  padding: 3px 12px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.grade-stat-num {
  font-size: 0.85rem;
  font-weight: 800;
  color: #1d4ed8;
}

.grade-stat-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
}

.grade-stat-sep {
  width: 1px;
  height: 14px;
  background: #cbd5e1;
}

.term-switch-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.term-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 20px;
  text-decoration: none;
  background: #ffffff;
  color: #2563eb;
  border: 1.5px solid rgba(37, 99, 235, 0.28);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.16s ease-in-out;
}

.term-switch-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.22);
}

/* ── Simple Grades & Subject Grid ── */
.simple-grades-grid,
.cards-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  padding: 6px 0;
}

@media (max-width: 1100px) {

  .simple-grades-grid,
  .cards-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 860px) {

  .simple-grades-grid,
  .cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {

  .simple-grades-grid,
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ── Unified Boxed Card for Files & Materials ── */
.sg-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  height: 100%;
  box-sizing: border-box;
}

.sg-card:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.sg-card-img {
  flex: none;
  width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
  overflow: hidden;
  box-sizing: border-box;
}

.sg-card-img .card-img-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-sizing: border-box;
}

.sg-card-img img.card-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.sg-card-body {
  padding: 10px 8px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  background: #ffffff;
}

.sg-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.45;
  transition: color 0.15s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sg-card:hover .sg-name {
  color: #2563eb;
}

/* Ribbon badge on thumbnail */
.ribbon {
  position: absolute;
  top: 9px;
  right: -24px;
  transform: rotate(45deg);
  width: 95px;
  text-align: center;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  z-index: 2;
  letter-spacing: -0.2px;
}

/* ── Subject Card (school-kw / Ktby Style with bottom button) ── */
.sg-card--subject {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  box-sizing: border-box;
}

.sg-card--subject:hover {
  border-color: #0d9488;
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.14);
  transform: translateY(-3px);
}

.sg-subj-icon-wrap {
  flex: none;
  width: 100%;
  aspect-ratio: 16 / 12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #ffffff;
  overflow: hidden;
  box-sizing: border-box;
}

.sg-subj-icon-wrap img.card-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.sg-subj-icon-wrap svg {
  width: 76px;
  height: 76px;
}

.sg-subj-name {
  font-size: 15px;
  font-weight: 800;
  color: #0f766e;
  text-align: center;
  padding: 2px 8px 10px;
  margin: 0;
}

.sg-subj-btn {
  background: #009688;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 8px 10px;
  width: 100%;
  box-sizing: border-box;
  transition: background 0.15s;
  line-height: 1.35;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
}

.sg-card--subject:hover .sg-subj-btn {
  background: #00796b;
}

@media (max-width: 640px) {
  .sg-subj-icon-wrap {
    padding: 6px 10px;
  }

  .sg-subj-btn {
    font-size: 12px;
    padding: 6px 8px;
    min-height: 46px;
  }
}

/* ── Latest Files List (Exact seoktby style & typography) ── */
.latest-files-section {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  max-width: 100%;
}

.latest-files {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
}

.latest-files__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.latest-files__title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.latest-files__title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  flex-shrink: 0;
}

.latest-files__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.latest-files__all {
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  flex-shrink: 0;
}

.latest-files__all:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

.latest-files__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  justify-content: center;
}

.lf-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
  min-width: 0;
  box-sizing: border-box;
}

.lf-card:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.lf-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  flex-shrink: 0;
  background: transparent;
  width: auto;
  height: auto;
}

.lf-card__text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.lf-card__title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lf-card__subject {
  color: #2563eb;
}

.lf-card__sub {
  font-size: 10px;
  color: #64748b;
  margin: 2px 0 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

@media (max-width: 640px) {
  .latest-files {
    padding: 10px 12px;
  }

  .latest-files__title {
    font-size: 13px;
  }

  .latest-files__grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .lf-card {
    padding: 8px 10px;
  }
}

/* ── Subject Hero Banner ── */
.subject-hero-card {
  background: #2563eb;
  background-image: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
  border-radius: 10px;
  padding: 10px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.subject-page-h1 {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 6px;
}

.subject-hero-short {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.88);
  margin: 4px 0 0;
  line-height: 1.45;
}

/* ── Curriculum Index Box (فهرس الدروس) ── */
.curriculum-index-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
}

.index-section-group {
  padding-bottom: 12px;
}

.index-section-group:not(:last-child) {
  border-bottom: 1px dashed #e2e8f0;
  margin-bottom: 12px;
}

.index-section-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.index-section-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
}

.index-section-list {
  list-style: none;
  margin: 0;
  padding: 0 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 6px;
}

.index-section-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
}

.index-section-list li a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.index-section-list li a:hover {
  text-decoration: underline;
}

/* ── File Page: Info Card & Social (Matches other card-section boxes) ── */
.file-info-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px !important;
  padding: 12px 20px !important;
  width: 100% !important;
  margin: 0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03) !important;
  position: relative;
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 0 !important;
}

.file-info-card__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  height: auto !important;
  min-height: 0 !important;
}

.file-info-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
  text-align: right;
  height: auto !important;
  min-height: 0 !important;
}

.file-page-h1 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.35;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  text-align: right;
}

.file-h1-emoji {
  font-size: 15px;
  flex-shrink: 0;
}

.file-hero-short {
  font-size: 11px;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
  max-width: 720px;
  text-align: right;
}

.file-info-social-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
  height: auto !important;
  min-height: 0 !important;
}

.file-social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.file-social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 700;
  color: #0284c7;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: none;
  padding: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.file-social-link:hover {
  opacity: 0.85;
  color: #0369a1;
  text-decoration: none;
}

.file-social-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .file-info-card {
    padding: 10px 14px !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .file-info-card__inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .file-info-title-wrap {
    width: 100% !important;
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    gap: 4px !important;
  }

  .file-info-social-wrap {
    width: 100% !important;
    justify-content: flex-start !important;
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin-top: 4px !important;
  }

  .file-social-links {
    width: 100% !important;
    justify-content: flex-start !important;
    gap: 14px !important;
  }
}

/* ── PDF Viewer Frame ── */
.ktby-pdf-viewer {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #262626;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  height: 800px;
}

.ktby-pdf-viewer iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── File Actions Card (Chips + Buttons + Share) ── */
.file-actions-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px !important;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.file-actions-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.fac-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.15s ease;
}

.chip-link:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #0f172a;
}

.chip-accent {
  background: #dcfce7 !important;
  color: #15803d !important;
  border-color: #bbf7d0 !important;
}

.fac-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease-in-out;
  white-space: nowrap;
}

.file-btn-primary {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.file-btn-primary:hover {
  background: #1d4ed8 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.file-btn-secondary {
  background: #f8fafc !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

.file-btn-secondary:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

/* ── Share Bar (Soft Pastels & Clean Layout) ── */
.file-share-bar {
  width: 100%;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.file-share-bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.file-share-bar__label {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

.file-share-bar__social {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.file-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.file-share-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}

.file-share-btn--wa {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

.file-share-btn--msgr {
  background: #ede9fe;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.file-share-btn--tg {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

.file-share-btn--x {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

.file-share-btn--fb {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.file-share-btn--pin {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.file-share-btn--reddit {
  background: #ffedd5;
  color: #c2410c;
  border-color: #fed7aa;
}

.file-share-btn--copy {
  background: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}

.file-share-btn--copy.is-copied {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

@media (max-width: 768px) {
  .file-actions-card {
    padding: 12px 12px;
  }

  .file-actions-card__top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .fac-chips {
    justify-content: center;
    gap: 5px;
  }

  .fac-chips .chip {
    font-size: 10.5px;
    padding: 3px 8px;
  }

  .fac-btns {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .fac-btns .file-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 10px;
    font-size: 12px;
    justify-content: center;
    text-align: center;
  }

  .file-share-bar__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .file-share-bar__label {
    text-align: center;
    font-size: 11.5px;
  }

  .file-share-bar__social {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }

  .file-share-btn {
    padding: 6px 4px;
    font-size: 11px;
    gap: 4px;
    justify-content: center;
  }

  .file-share-btn svg {
    width: 13px;
    height: 13px;
  }

  .file-share-btn--copy {
    grid-column: 1 / -1;
    padding: 7px 10px;
    font-size: 11.5px;
  }
}

@media (max-width: 480px) {
  .file-share-bar__social {
    grid-template-columns: repeat(3, 1fr);
  }

  .file-share-btn--copy {
    grid-column: 1 / -1;
  }
}

/* ── SEO Box & FAQ ── */
.seo-box-clean {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
}

.seo-box-clean h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 10px;
}

.seo-box-clean p {
  font-size: 0.84rem;
  line-height: 1.85;
  color: #475569;
  margin: 0 0 12px;
}

.seo-box-clean p:last-child {
  margin-bottom: 0;
}


/* ── Body Sitewide Background Matching seoktby ── */
body,
.sabbora-body,
.platform-main {
  background-color: #EFF3F8 !important;
  background-image: repeating-linear-gradient(-45deg,
      transparent,
      transparent 150px,
      rgba(0, 0, 0, 0.015) 150px,
      rgba(0, 0, 0, 0.015) 152px,
      transparent 152px,
      transparent 160px,
      rgba(0, 0, 0, 0.01) 160px,
      rgba(0, 0, 0, 0.01) 161px) !important;
  color: #0f172a;
}

/* ── Typography & Font Colors Matched to seoktby ── */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #0f172a;
  letter-spacing: -0.01em;
}

p,
li,
span {
  color: inherit;
}

/* ── Term Chooser Cards (.tc-card) ── */
.term-chooser-section {
  padding: 16px 20px;
}

.semester-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

@media (max-width: 680px) {
  .semester-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

.tc-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 18px;
  background: color-mix(in srgb, var(--tc-accent, #1d4ed8) 7%, #fff);
  border: 1.5px solid color-mix(in srgb, var(--tc-accent, #1d4ed8) 20%, transparent);
  border-radius: 15px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.tc-card:hover {
  border-color: color-mix(in srgb, var(--tc-accent, #1d4ed8) 55%, transparent);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}

.tc-icon {
  flex-shrink: 0;
  margin-top: 2px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--tc-accent, #1d4ed8) 13%, #fff);
  border: 1px solid color-mix(in srgb, var(--tc-accent, #1d4ed8) 18%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tc-icon-num {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  color: var(--tc-accent, #1d4ed8);
  font-family: Arial, sans-serif;
  user-select: none;
}

.tc-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tc-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--tc-accent, #1d4ed8) 82%, #111);
  margin: 0;
  line-height: 1.25;
}

.tc-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--tc-accent, #1d4ed8) 70%, #333);
  margin: 0;
}

.tc-subjects {
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-cta {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tc-accent, #1d4ed8);
}

.tc-card:hover .tc-cta {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Grade Terms & Subjects Grid (.gts-card) ── */
.grade-terms-subjects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 860px) {
  .grade-terms-subjects-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.gts-card {
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.gts-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.08);
}

/* Term 1 - الأزرق الملكي */
.gts-card--term-1 {
  border: 1.5px solid #2563eb;
}

.gts-card--term-1 .gts-header {
  background: #2563eb;
}

.gts-card--term-1 .gts-title {
  color: #ffffff !important;
}

.gts-card--term-1 .gts-btn {
  background: #2563eb;
  border: 1px solid #1d4ed8;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.15);
}

.gts-card--term-1 .gts-btn:hover {
  background: #1d4ed8 !important;
  border-color: #1e40af;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Term 2 - الأخضر الزمردي */
.gts-card--term-2 {
  border: 1.5px solid #059669;
}

.gts-card--term-2 .gts-header {
  background: #059669;
}

.gts-card--term-2 .gts-title {
  color: #ffffff !important;
}

.gts-card--term-2 .gts-btn {
  background: #059669;
  border: 1px solid #047857;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.15);
}

.gts-card--term-2 .gts-btn:hover {
  background: #047857 !important;
  border-color: #065f46;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

/* Term 3 - البنفسجي */
.gts-card--term-3 {
  border: 1.5px solid #7c3aed;
}

.gts-card--term-3 .gts-header {
  background: #7c3aed;
}

.gts-card--term-3 .gts-title {
  color: #ffffff !important;
}

.gts-card--term-3 .gts-btn {
  background: #7c3aed;
  border: 1px solid #6d28d9;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.15);
}

.gts-card--term-3 .gts-btn:hover {
  background: #6d28d9 !important;
  border-color: #5b21b6;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.gts-header {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.gts-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.gts-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #ffffff;
}

.gts-subtitle {
  margin: 0 0 14px 0;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  color: #475569;
}

.gts-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 640px) {
  .gts-buttons {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
}

.gts-btn {
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.16s ease-in-out;
}

/* ── Global Font System (Tajawal) ── */
body,
button,
input,
select,
textarea,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
li,
label,
strong {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ── Card Bottom Button Strip (Matches Image) ── */
.sg-card-btn-strip {
  background: #00897b;
  color: #ffffff !important;
  font-size: 11.5px;
  font-weight: 700;
  padding: 8px 12px;
  width: 100%;
  box-sizing: border-box;
  transition: background 0.16s ease;
  margin-top: auto;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sg-card-btn-strip svg {
  flex-shrink: 0;
  stroke: #ffffff;
  transition: transform 0.15s ease;
}

.sg-card:hover .sg-card-btn-strip {
  background: #00796b;
}

.sg-card:hover .sg-card-btn-strip svg {
  transform: translateX(-3px);
}

/* ── PDF Viewer Topbar with Fullscreen Toggle ── */
.ktby-pdf-topbar {
  background: #0f172a;
  color: #ffffff;
  padding: 9px 16px;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid #334155;
  border-bottom: none;
}

.ktby-pdf-label {
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f8fafc;
}

.ktby-pdf-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ktby-pdf-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.16s ease;
}

.ktby-pdf-tool-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.ktby-pdf-viewer {
  border-radius: 0 0 12px 12px !important;
  border-top: none !important;
}

/* ── Curriculum Accordions ── */
.curriculum-accordion {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  margin-bottom: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.curriculum-accordion[open] {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05);
}

.curriculum-accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  background: #f8fafc;
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  user-select: none;
  list-style: none;
}

.curriculum-accordion__summary::-webkit-details-marker {
  display: none;
}

.curriculum-accordion__summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.curriculum-accordion__badge {
  font-size: 11px;
  font-weight: 600;
  background: #eff6ff;
  color: #2563eb;
  padding: 2px 8px;
  border-radius: 12px;
}

.curriculum-accordion__chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
  color: #64748b;
}

.curriculum-accordion[open] .curriculum-accordion__chevron {
  transform: rotate(90deg);
}

.curriculum-accordion__body {
  padding: 12px 16px;
  background: #ffffff;
}

/* ── FAQ Section (Google Rich Snippets Accordion) ── */
.faq-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.faq-item[open] {
  border-color: #bfdbfe;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.05);
}

.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  list-style: none;
  user-select: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary-q {
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-summary-q-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.faq-chevron {
  width: 14px;
  height: 14px;
  color: #64748b;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
  transform: rotate(90deg);
}

.faq-answer {
  padding: 12px 16px 14px 44px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #475569;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

/* ── Mobile Layout Hardening & Overflow Protection ── */
html,
body {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

@media (max-width: 768px) {

  .platform-container,
  .page-body {
    width: calc(100% - 16px) !important;
    max-width: 100% !important;
  }

  .compact-footer-row {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 10px !important;
  }

  .footer-right-group,
  .footer-left-group {
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    text-align: center !important;
  }

  .footer-inline-links {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px !important;
  }

  .latest-files-section {
    padding: 14px 12px !important;
  }

  .latest-files__title {
    font-size: 13.5px !important;
  }

  .lf-card {
    padding: 9px 10px !important;
  }

  .lf-card__title {
    font-size: 12px !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.4 !important;
  }
}

/* ── Compact Footer Link & Copyright Font Size ── */
.sabbora-compact-footer .footer-inline-links a,
.sabbora-compact-footer .footer-inline-links span,
.sabbora-compact-footer .footer-copyright {
  font-size: 11px !important;
  color: #94a3b8 !important;
}

.sabbora-compact-footer .footer-inline-links a:hover {
  color: #38bdf8 !important;
}

.sabbora-compact-footer .footer-social-icons .social-icon-btn {
  width: 24px;
  height: 24px;
}

.sabbora-compact-footer .footer-social-icons .social-icon-btn svg {
  width: 12px;
  height: 12px;
}

/* ── Modern Header Enhancements ── */
.platform-header-wrap {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04) !important;
}

.header-quick-badge-wrap {
  display: flex;
  align-items: center;
}

@media (max-width: 680px) {
  .header-quick-badge-wrap {
    display: none;
  }
}

.header-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.16s ease;
}

.header-quick-pill:hover {
  background: #d1fae5;
  color: #065f46;
  transform: translateY(-1px);
}

.hqp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

.header-search-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
}

@media (max-width: 640px) {
  .header-search-label {
    display: none;
  }
}

/* ── Modern Sidebar / Drawer Redesign ── */
.mobile-nav-drawer-modern {
  width: 320px !important;
  max-width: 86vw !important;
  background: #ffffff !important;
  box-shadow: -6px 0 28px rgba(15, 23, 42, 0.18) !important;
  display: flex !important;
  flex-direction: column !important;
  direction: rtl !important;
}

.drawer-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #f1f5f9;
  background: #f8fafc;
}

.drawer-brand-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-logo-text {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.drawer-badge-pill {
  font-size: 10px;
  font-weight: 700;
  color: #0284c7;
  display: inline-block;
}

.drawer-close-square-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-close-square-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.drawer-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  overscroll-behavior: contain;
}

.drawer-section-title {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.4px;
  margin: 14px 0 8px;
  padding-right: 6px;
  border-right: 3px solid #2563eb;
  line-height: 1.3;
}

.drawer-items-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-item-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
  transition: all 0.15s ease;
  position: relative;
}

.drawer-item-link:hover,
.drawer-item-link.active {
  background: #eff6ff;
  color: #2563eb;
  transform: translateX(-2px);
}

.drawer-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drawer-icon--blue {
  background: #eff6ff;
  color: #2563eb;
}

.drawer-icon--green {
  background: #ecfdf5;
  color: #059669;
}

.drawer-icon--red {
  background: #fef2f2;
  color: #dc2626;
}

.drawer-icon--purple {
  background: #f5f3ff;
  color: #7c3aed;
}

.drawer-icon--amber {
  background: #fffbeb;
  color: #d97706;
}

.drawer-badge-hot {
  margin-right: auto;
  font-size: 10px;
  font-weight: 800;
  background: #fee2e2;
  color: #dc2626;
  padding: 2px 7px;
  border-radius: 12px;
  line-height: 1.3;
}

.drawer-grades-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.drawer-grade-tag {
  padding: 6px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
  text-decoration: none;
  transition: all 0.15s ease;
}

.drawer-grade-tag:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.drawer-social-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.drawer-soc-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  flex: 1 1 auto;
  justify-content: center;
}

.drawer-soc-pill--tg {
  background: #e0f2fe;
  color: #0284c7;
}

.drawer-soc-pill--x {
  background: #0f172a;
  color: #ffffff;
}

.drawer-bottom-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 18px;
  border-top: 1px solid #f1f5f9;
  background: #fafafa;
}

.drawer-pill-action {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-decoration: none;
}

.drawer-pill-action:hover {
  color: #2563eb;
}

/* ── Home Top 30 Solutions Section ── */
.home-solutions-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 20px 24px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.home-solutions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.hsh-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hsh-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #059669;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hsh-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.35;
}

.hsh-sub {
  font-size: 11.5px;
  color: #64748b;
  margin: 2px 0 0;
}

.hsh-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.16s ease;
}

.hsh-view-all:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: translateY(-1px);
}

.sg-file-meta-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #0284c7;
  margin-bottom: 4px;
}

.sg-dl-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  margin-top: 6px;
}

.home-solutions-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

@media (max-width: 1100px) {
  .home-solutions-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 860px) {
  .home-solutions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .home-solutions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .home-solutions-section {
    padding: 12px 10px 16px !important;
  }

  .hsh-title {
    font-size: 14px !important;
  }

  .hsh-view-all {
    width: 100% !important;
    justify-content: center !important;
  }
}


/* ── Generic Ktby Buttons ── */
.ktby-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: all 0.16s ease;
  cursor: pointer;
  line-height: 1.35;
}

.ktby-btn--primary {
  background: #2563eb;
  color: #ffffff !important;
  border: 1px solid #1d4ed8;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2);
}

.ktby-btn--primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.ktby-btn--secondary {
  background: #f8fafc;
  color: #334155 !important;
  border: 1px solid #cbd5e1;
}

.ktby-btn--secondary:hover {
  background: #f1f5f9;
  color: #0f172a !important;
}

.ktby-btn--outline {
  background: #ffffff;
  color: #2563eb !important;
  border: 1px solid #bfdbfe;
}

.ktby-btn--outline:hover {
  background: #eff6ff;
  border-color: #60a5fa;
}

/* ── Error 404 Page Styling ── */
.error-404-card {
  max-width: 680px;
  margin: 30px auto;
  text-align: center;
  padding: 42px 24px;
}

.error-404-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.error-code {
  font-size: 64px;
  font-weight: 900;
  color: #2563eb;
  line-height: 1;
  letter-spacing: -1px;
}

.error-icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.error-404-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px;
  line-height: 1.35;
}

.error-404-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 24px;
}

.error-404-search-box {
  max-width: 460px;
  margin: 0 auto 28px;
}

.error-search-form {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: border-color 0.16s ease;
}

.error-search-form:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.error-search-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  padding: 12px 16px;
  font-size: 13.5px;
  font-family: 'Tajawal', sans-serif;
  color: #1e293b;
  background: transparent;
}

.error-search-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  font-family: 'Tajawal', sans-serif;
  transition: background 0.15s ease;
}

.error-search-submit:hover {
  background: #1d4ed8;
}

.error-404-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .error-404-actions {
    flex-direction: column;
    width: 100%;
  }

  .error-404-actions .ktby-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Content-Type Archive Hero & Switcher ── */
.ct-hero-card {
  padding: 22px 24px;
}

.ct-hero-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ct-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ct-hero-text {
  flex: 1;
  min-width: 0;
}

.ct-hero-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ct-hero-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.35;
}

.ct-count-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.ct-hero-desc {
  font-size: 13px;
  color: #64748b;
  margin: 5px 0 0;
  line-height: 1.5;
}

.ct-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ct-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s ease;
}

.ct-pill-btn:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* ── Pagination Styling ── */
.ktby-pagination,
.ct-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ktby-pagination .page-numbers,
.ct-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.ktby-pagination .page-numbers:hover,
.ct-pagination .page-numbers:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.ktby-pagination .page-numbers.current,
.ct-pagination .page-numbers.current {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.ktby-pagination .page-numbers.dots,
.ct-pagination .page-numbers.dots {
  border: none;
  background: transparent;
  color: #94a3b8;
}

/* ── Search Page Styling (Smart Arabic Search) ── */
.search-hero-card {
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  padding: 26px 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
}

.search-hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.search-hero-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.search-hero-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink, #0f172a);
  margin: 0;
  line-height: 1.4;
}

.search-highlight {
  color: var(--blue-grade, #0070ba);
  font-weight: 800;
}

.search-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e0f2fe;
  color: #0284c7;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
}

.search-hero-form-box {
  width: 100%;
  max-width: 650px;
  margin-top: 18px;
}

.search-hero-input-shell {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--line, #cbd5e1);
  border-radius: 999px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
  padding: 4px 6px;
  transition: all 0.2s ease;
}

.search-hero-input-shell:focus-within {
  border-color: var(--blue-grade, #0070ba);
  box-shadow: 0 4px 18px rgba(0, 112, 186, 0.2);
}

.search-results-section {
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 30px;
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
}

@media (max-width: 1024px) {
  .search-results-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .search-results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .search-results-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.search-card {
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
}

.search-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 112, 186, 0.12);
  border-color: var(--blue-grade, #0070ba);
}

.search-card-thumb-wrap {
  position: relative;
  width: 100%;
  height: 125px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #f1f5f9;
}

.search-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform 0.2s ease;
}

.search-card:hover .search-card-thumb {
  transform: scale(1.05);
}

.search-card-fallback-thumb {
  font-size: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  line-height: 1.3;
}

.search-card-body {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.search-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink, #0f172a);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

.search-card:hover .search-card-title {
  color: var(--blue-grade, #0070ba);
}

.search-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted, #64748b);
}

.search-card-subj {
  font-weight: 700;
  color: #2563eb;
}

.search-card-grade {
  font-weight: 600;
}

.search-card-sep {
  color: #cbd5e1;
}

.search-card-footer {
  margin: 0 12px 12px;
  padding: 7px 12px;
  background: #00875a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.search-card:hover .search-card-footer {
  background: var(--blue-grade, #0070ba);
}

.search-pagination {
  display: flex;
  justify-content: center;
  margin-top: 28px;
  width: 100%;
}

.search-pagination .nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.search-pagination a,
.search-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--line, #e2e8f0);
  color: var(--ink, #334155);
  background: #ffffff;
  transition: all 0.15s ease;
}

.search-pagination a:hover {
  border-color: var(--blue-grade, #0070ba);
  color: var(--blue-grade, #0070ba);
  background: #f0f9ff;
}

.search-pagination .current {
  background: var(--blue-grade, #0070ba);
  color: #ffffff;
  border-color: var(--blue-grade, #0070ba);
}

.search-empty-section {
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  padding: 44px 24px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.search-empty-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.search-empty-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink, #0f172a);
  margin: 0 0 10px;
}

.search-empty-desc {
  font-size: 14px;
  color: var(--muted, #64748b);
  max-width: 540px;
  margin: 0 0 24px;
  line-height: 1.7;
}

.search-empty-btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.search-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-grade, #0070ba);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(0, 112, 186, 0.2);
}

.search-btn-primary:hover {
  background: var(--blue-grade-hover, #005a96);
  transform: translateY(-1px);
  color: #ffffff;
}

.search-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: var(--ink, #1e293b);
  border: 1.5px solid var(--line, #cbd5e1);
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s ease;
}

.search-btn-secondary:hover {
  border-color: var(--blue-grade, #0070ba);
  color: var(--blue-grade, #0070ba);
  background: #f8fafc;
}

.search-quick-links-box {
  width: 100%;
  max-width: 720px;
  border-top: 1px dashed var(--line, #e2e8f0);
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.search-quick-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted, #64748b);
}

.search-quick-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.search-quick-pill {
  display: inline-block;
  padding: 6px 14px;
  background: #f1f5f9;
  color: var(--ink, #334155);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
}

.search-quick-pill:hover {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #bae6fd;
  transform: translateY(-1px);
}


/* ── Mobile Header Safety ── */
@media (max-width: 768px) {
  .platform-header-wrap {
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .sabbora-minimal-header {
    padding: 0 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .header-hamburger-btn {
    flex-shrink: 0 !important;
    width: 38px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .header-search-btn {
    flex-shrink: 0 !important;
    width: 38px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .sabbora-center-brand {
    flex: 1 !important;
    text-align: center !important;
    min-width: 0 !important;
  }

  .sabbora-center-brand .logo-word-left {
    font-size: 15px !important;
  }
}


/* ── Mobile 2-Columns Side by Side for Homepage Grades Grid (Matches User Request) ── */
@media (max-width: 640px) {

  .sabbora-grades-grid,
  .sabbora-uae-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .uae-grid-card {
    padding: 6px !important;
    border-radius: 10px !important;
  }

  .card-inner-board {
    min-height: 92px !important;
    padding: 8px 4px !important;
    border-radius: 8px !important;
  }

  .board-main-text {
    font-size: 14.5px !important;
  }

  .board-kicker {
    font-size: 10.5px !important;
  }

  .board-badge-circle {
    width: 20px !important;
    height: 20px !important;
    font-size: 11px !important;
  }

  .card-footer-blue-bar {
    padding: 5px 4px !important;
    margin-top: 5px !important;
  }

  .card-footer-blue-bar span {
    font-size: 11px !important;
  }

  .card-inner-board.board-books svg {
    width: 34px !important;
    height: 34px !important;
  }

  .books-title {
    font-size: 13px !important;
  }
}


/* ── 3-Column Grid for Top Solutions (Matches seoktby Latest Files) ── */
.lf-grid--3col {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

@media (max-width: 1024px) {
  .lf-grid--3col {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .lf-grid--3col {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}

/* ── Single Article Page (Blog / Post - Separated from Education) ── */
.page-body--article {
  max-width: 1280px;
  margin: 0 auto;
}

.article-single-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 26px 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  margin-bottom: 24px;
}

.article-meta-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.article-tag-pill {
  background: #f59e0b;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-block;
  line-height: 1.4;
}

.article-date-meta {
  color: #64748b;
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-single-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.45;
  margin: 0 0 20px;
}

.article-featured-img-wrap {
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  max-height: 440px;
  background: #f8fafc;
}

.article-featured-img {
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: cover;
  display: block;
}

.article-content-body {
  font-size: 15.5px;
  line-height: 1.9;
  color: #334155;
}

.article-content-body p {
  margin: 0 0 16px;
}

.article-content-body h2,
.article-content-body h3 {
  color: #0f172a;
  margin: 24px 0 12px;
  font-weight: 700;
}

.article-share-bar {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-bar-title {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.share-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.art-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
}

.art-share-btn--wa {
  background: #dcfce7;
  color: #15803d;
}

.art-share-btn--wa:hover {
  background: #bbf7d0;
}

.art-share-btn--tg {
  background: #e0f2fe;
  color: #0369a1;
}

.art-share-btn--tg:hover {
  background: #bae6fd;
}

.art-share-btn--x {
  background: #f1f5f9;
  color: #0f172a;
}

.art-share-btn--x:hover {
  background: #e2e8f0;
}

.art-share-btn--copy {
  background: #f1f5f9;
  color: #475569;
}

.art-share-btn--copy:hover {
  background: #e2e8f0;
}

@media (max-width: 640px) {
  .article-single-card {
    padding: 16px 14px;
  }

  .article-single-title {
    font-size: 17.5px;
    line-height: 1.4;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   HEADER ACTIONS LEFT: App Link + Telegram Link + Styled Search Pill
   ══════════════════════════════════════════════════════════════════════ */
.header-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.header-action-pill svg {
  flex-shrink: 0;
}

/* 1. App Pill (تطبيق مدرستي الكويتية - أيقونة فقط) */
.header-app-pill {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 9px;
  flex-shrink: 0;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.header-app-pill:hover {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(22, 163, 74, 0.15);
  text-decoration: none;
}

/* 2. Telegram Pill (قناة التليجرام - أيقونة فقط) */
.header-tg-pill {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 9px;
  flex-shrink: 0;
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.header-tg-pill:hover {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.15);
  text-decoration: none;
}

/* 3. Search Pill (بحث متطور وواضح) */
.header-search-pill {
  height: 36px;
  padding: 0 13px;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

.header-search-pill:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}

.header-search-label {
  font-size: 13px;
  font-weight: 700;
  color: inherit;
}

@media (max-width: 860px) {
  .header-actions-left {
    gap: 6px;
  }

  .header-app-pill,
  .header-tg-pill {
    width: 34px;
    height: 34px;
  }

  .header-search-pill {
    padding: 0 10px;
    height: 34px;
    font-size: 12.5px;
  }
}

@media (max-width: 600px) {
  .header-actions-left {
    gap: 5px;
  }

  .header-app-pill,
  .header-tg-pill {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    display: inline-flex;
  }

  .header-search-pill {
    padding: 0 8px;
    height: 32px;
    border-radius: 7px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .header-actions-left {
    gap: 4px;
  }

  .header-app-pill,
  .header-tg-pill {
    width: 30px;
    height: 30px;
    border-radius: 7px;
  }

  .header-app-pill svg,
  .header-tg-pill svg {
    width: 15px;
    height: 15px;
  }

  .header-search-pill {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 7px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
  }

  .header-search-label {
    display: none;
  }

  .sabbora-center-brand .logo-word-left {
    font-size: 14px !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   APP LANDING PAGE STYLES (تطبيق مدرستي الإماراتية)
   ══════════════════════════════════════════════════════════════════════ */
.page-body--app-landing {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 24px) 30px;
  box-sizing: border-box;
}

/* Hero Box */
.app-landing-hero {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #0f172a 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  padding: 32px 30px !important;
  border: none !important;
}

.app-hero-shape1 {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.app-hero-shape2 {
  position: absolute;
  bottom: -80px;
  left: 5%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.app-hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.app-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.app-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
}

.app-hero-title {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.35;
  color: #ffffff;
  margin: 0 0 12px 0;
}

.app-hero-desc {
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 22px 0;
}

/* Store Buttons Group */
.app-store-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-family: inherit;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  color: #ffffff;
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

.store-btn--pwa {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.store-btn--dark {
  background: #0f172a;
}

.store-btn--glass {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.store-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-btn__text {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.25;
}

.store-btn__sub {
  font-size: 10px;
  opacity: 0.8;
}

.store-btn__name {
  font-size: 13.5px;
  font-weight: 800;
}

/* Telegram callout inside hero */
.app-hero-tg-box {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.app-hero-tg-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 240px;
}

.app-hero-tg-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0284c7;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-hero-tg-right strong {
  display: block;
  font-size: 13px;
  color: #ffffff;
  margin-bottom: 2px;
}

.app-hero-tg-right p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  line-height: 1.4;
}

.app-hero-tg-btn {
  background: #ffffff;
  color: #0369a1;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 7px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.app-hero-tg-btn:hover {
  background: #e0f2fe;
  color: #0284c7;
  text-decoration: none;
}

/* Phone Mockup */
.app-hero-mockup-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-phone-card {
  width: 220px;
  height: 340px;
  background: #0f172a;
  border-radius: 30px;
  padding: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border: 4px solid #334155;
  position: relative;
  transform: rotate(-3deg);
  transition: transform 0.3s ease;
}

.app-phone-card:hover {
  transform: rotate(0deg) scale(1.02);
}

.app-phone-notch {
  width: 60px;
  height: 6px;
  background: #334155;
  border-radius: 4px;
  margin: 0 auto 8px auto;
}

.app-phone-screen {
  background: #ffffff;
  height: 290px;
  border-radius: 20px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.phone-screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

.phone-card-mini {
  padding: 8px 10px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Stats Box */
.app-stats-box {
  padding: 16px 20px !important;
}

.app-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 14px;
}

.app-stat-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1 1 120px;
}

.app-stat-num {
  font-size: 22px;
  font-weight: 900;
  color: #0284c7;
  line-height: 1.2;
}

.app-stat-lbl {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 3px;
  font-weight: 600;
}

.app-stat-divider {
  width: 1px;
  height: 36px;
  background: #e2e8f0;
}

/* Features Grid */
.app-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.app-feature-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.app-feature-item:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
}

.app-feature-ico {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-feature-item h3 {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.app-feature-item p {
  font-size: 12px;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
}

/* PWA Steps Container */
.pwa-steps-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.pwa-step-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
}

.pwa-step-head {
  margin-bottom: 12px;
}

.pwa-step-os-badge {
  display: inline-block;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  font-weight: 800;
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 6px;
}

.pwa-instructions-list {
  padding-right: 18px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .app-hero-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .app-hero-mockup-wrap {
    order: -1;
  }

  .app-phone-card {
    width: 190px;
    height: 280px;
  }

  .app-phone-screen {
    height: 235px;
  }

  .app-hero-title {
    font-size: 20px;
  }

  .app-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pwa-steps-container {
    grid-template-columns: 1fr;
  }

  .app-stat-divider {
    display: none;
  }
}

@media (max-width: 480px) {
  .app-features-grid {
    grid-template-columns: 1fr;
  }

  .store-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   LEGAL DISCLAIMER ALERT BOX (Exact seoktby Clean Flex Layout)
   ══════════════════════════════════════════════════════════════════════ */
.sabbora-disclaimer-box {
  background: #f0f7ff !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 14px !important;
  padding: 16px 20px !important;
  margin: 24px 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
  text-align: right !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.05) !important;
  position: relative !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.disclaimer-icon-wrap {
  position: static !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  background: #dbeafe !important;
  color: #2563eb !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  margin: 2px 0 0 0 !important;
}

.disclaimer-icon-wrap svg {
  width: 22px !important;
  height: 22px !important;
  display: block !important;
}

.disclaimer-content-wrap {
  flex: 1 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: right !important;
}

.disclaimer-header-title {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #1e3a8a !important;
  margin: 0 0 5px 0 !important;
  line-height: 1.4 !important;
  text-align: right !important;
}

.disclaimer-text {
  font-size: 13.5px !important;
  line-height: 1.75 !important;
  color: #334155 !important;
  margin: 0 !important;
  text-align: right !important;
}

.disclaimer-text strong {
  color: #0f172a !important;
  font-weight: 700 !important;
}

.disclaimer-text a {
  color: #2563eb !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
}

.disclaimer-text a:hover {
  color: #1d4ed8 !important;
}

@media (max-width: 640px) {
  .sabbora-disclaimer-box {
    padding: 13px 14px !important;
    gap: 11px !important;
    border-radius: 12px !important;
  }

  .disclaimer-icon-wrap {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
  }

  .disclaimer-icon-wrap svg {
    width: 18px !important;
    height: 18px !important;
  }

  .disclaimer-header-title {
    font-size: 13.5px !important;
    margin-bottom: 3px !important;
  }

  .disclaimer-text {
    font-size: 12px !important;
    line-height: 1.65 !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   APP SEO ARTICLE & GUIDE STYLES
   ══════════════════════════════════════════════════════════════════════ */
.app-seo-article {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 34px 38px !important;
  margin-bottom: 24px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.app-article-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f1f5f9;
}

.app-article-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 12px;
  border: 1px solid #dbeafe;
}

.app-article-title {
  font-size: 22px !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  margin: 0 0 10px 0 !important;
  line-height: 1.45 !important;
}

.app-article-meta {
  font-size: 12.5px;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.app-article-content p {
  font-size: 14.5px;
  line-height: 1.85;
  color: #334155;
  margin-bottom: 16px;
}

.app-article-content .lead-paragraph {
  font-size: 15px;
  line-height: 1.9;
  color: #1e293b;
  background: #f8fafc;
  padding: 18px 22px;
  border-radius: 12px;
  border-right: 4px solid #2563eb;
  margin-bottom: 24px;
}

.app-article-content h3 {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 28px 0 14px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.app-article-highlight-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 22px 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.highlight-box-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.highlight-box-text {
  font-size: 13.5px;
  line-height: 1.75;
  color: #92400e;
}

.highlight-box-text strong {
  display: block;
  font-size: 14px;
  color: #78350f;
  margin-bottom: 4px;
}

.app-stages-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0 24px;
}

.stage-info-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 16px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.stage-info-card:hover {
  border-color: #93c5fd;
  transform: translateY(-2px);
}

.stage-info-icon {
  font-size: 26px;
  margin-bottom: 8px;
}

.stage-info-card h4 {
  font-size: 14.5px;
  font-weight: 800;
  color: #1e3a8a;
  margin: 0 0 8px 0;
}

.stage-info-card p {
  font-size: 12.5px !important;
  line-height: 1.7 !important;
  color: #475569 !important;
  margin: 0 !important;
}

.app-article-checklist {
  list-style: none;
  padding: 0;
  margin: 16px 0 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.app-article-checklist li {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #334155;
  position: relative;
}

.app-article-steps {
  padding-right: 22px;
  margin: 16px 0 24px;
  line-height: 1.85;
  color: #334155;
  font-size: 13.5px;
}

.app-article-steps li {
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .app-seo-article {
    padding: 22px 18px !important;
  }

  .app-article-title {
    font-size: 18px !important;
  }

  .app-stages-overview-grid {
    grid-template-columns: 1fr;
  }

  .app-article-checklist {
    grid-template-columns: 1fr;
  }
}

/* ── Home Articles Grid (Latest Articles - Single Row 5 Items) ── */
.home-articles-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.home-art-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.home-art-card:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
}

.home-art-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.home-art-card__thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: #f1f5f9;
}

.home-art-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.home-art-card:hover .home-art-card__img {
  transform: scale(1.04);
}

.home-art-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: #e2e8f0;
}

.home-art-card__tag {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  line-height: 1.3;
}

.home-art-card__content {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.home-art-card__date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: #64748b;
  margin-bottom: 6px;
}

.home-art-card__title {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}

.home-art-card:hover .home-art-card__title {
  color: #2563eb;
}

.home-art-card__desc {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.home-art-card__footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.home-art-card__cta {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  transition: transform 0.15s ease;
}

.home-art-card:hover .home-art-card__cta {
  transform: translateX(-3px);
}

@media (max-width: 1100px) {
  .home-articles-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
}

@media (max-width: 860px) {
  .home-articles-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .home-articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (max-width: 440px) {
  .home-articles-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}