/* =========================================================
   Infograf+ — Main Styles
   ========================================================= */

:root {
  --accent: #635bff;
  --accent-dark: #5149e8;
  --accent-light: #eeedff;

  --text: #171725;
  --text-secondary: #666675;
  --text-light: #9292a0;

  --background: #f8f8fb;
  --surface: #ffffff;
  --surface-soft: #f4f4f8;
  --border: #e8e8ef;

  --success: #22a06b;

  --shadow-sm: 0 4px 16px rgba(20, 20, 40, 0.05);
  --shadow-md: 0 12px 35px rgba(20, 20, 40, 0.08);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;

  --max-width: 1180px;
}


/* =========================================================
   Reset
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;

  background: var(--background);
  color: var(--text);

  font-family: "Cairo", sans-serif;
  line-height: 1.7;

  direction: rtl;
}

body,
button,
input,
textarea,
select {
  font-family: "Cairo", sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: #fff;
}


/* =========================================================
   Accessibility
   ========================================================= */

.visually-hidden {
  position: absolute;

  width: 1px;
  height: 1px;

  padding: 0;
  margin: -1px;

  overflow: hidden;

  clip: rect(0, 0, 0, 0);

  white-space: nowrap;

  border: 0;
}


/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: sticky;

  top: 0;

  z-index: 100;

  background: rgba(255, 255, 255, 0.94);

  border-bottom: 1px solid rgba(232, 232, 239, 0.85);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  width: min(
    var(--max-width),
    calc(100% - 40px)
  );

  min-height: 74px;

  margin: 0 auto;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 30px;
}


/* =========================================================
   Brand
   ========================================================= */

.brand {
  display: inline-flex;

  align-items: center;

  direction: ltr;

  font-size: 25px;

  font-weight: 800;

  letter-spacing: -0.8px;

  white-space: nowrap;
}

.brand-name {
  color: var(--text);
}

.brand-plus {
  margin-left: 2px;
}


/* =========================================================
   Header Action Group
   ========================================================= */

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  direction: ltr;
}

.facebook-header-link {
  width: 44px;
  height: 44px;

  flex-shrink: 0;

  display: grid;

  place-items: center;

  border-radius: 13px;

  background: var(--surface-soft);

  color: var(--text);

  text-decoration: none;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.facebook-header-link:hover {
  background: var(--accent-light);

  color: var(--accent);

  transform: translateY(-2px);
}

.facebook-header-link svg {
  width: 21px;
  height: 21px;

  display: block;

  fill: currentColor;
}

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

  .header-actions {
    position: static;
    transform: none;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    z-index: auto;
    gap: 5px;
    flex-shrink: 1;
  }

  .header-actions .instagram-header-link,
  .header-actions .facebook-header-link,
  .header-actions .tiktok-header-link,
  .header-actions .notification-header-button,
  .header-actions .search-button,
  .header-actions .theme-toggle {
    width: 40px;
    height: 40px;
    margin: 0;
    flex: 0 0 40px;
    border-radius: 11px;
  }

  .header-actions .facebook-header-link {
    display: grid;
    place-items: center;
    background: var(--surface-soft);
    color: var(--text);
    text-decoration: none;
  }

  .header-actions .facebook-header-link svg {
    width: 19px;
    height: 19px;
    display: block;
    fill: currentColor;
  }

  .header-actions .notification-header-wrap {
    position: relative;
    display: block;
    flex: 0 0 40px;
  }

  .footer-links {
    gap: 8px 14px;
  }

  @media (max-width: 380px) {
    .header-inner {
      gap: 6px;
    }

    .brand {
      font-size: 18px;
      letter-spacing: -0.6px;
      flex-shrink: 1;
      min-width: 0;
    }

    .header-actions {
      gap: 2px;
      flex-shrink: 0;
    }

    .header-actions .instagram-header-link,
    .header-actions .facebook-header-link,
    .header-actions .tiktok-header-link,
    .header-actions .notification-header-button,
    .header-actions .search-button,
    .header-actions .theme-toggle {
      width: 32px;
      height: 32px;
      flex-basis: 32px;
      border-radius: 9px;
    }

    .header-actions .notification-header-wrap {
      flex-basis: 32px;
    }

    .header-actions .instagram-header-link svg,
    .header-actions .facebook-header-link svg,
    .header-actions .tiktok-header-link svg,
    .header-actions .notification-header-button svg,
    .header-actions .theme-toggle svg {
      width: 17px;
      height: 17px;
    }

    .header-actions .search-icon {
      font-size: 20px;
    }
  }
}

/* =========================================================
   Desktop Navigation
   ========================================================= */

.desktop-navigation {
  display: flex;

  align-items: center;

  gap: 8px;

  margin-right: auto;
  margin-left: auto;
}

.nav-link {
  padding: 9px 15px;

  color: var(--text-secondary);

  font-size: 14px;

  font-weight: 600;

  border-radius: 10px;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.nav-link:hover {
  background: var(--accent-light);

  color: var(--accent);
}


/* =========================================================
   Instagram Header Link
   ========================================================= */

.tiktok-header-link {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tiktok-header-link:hover,
.tiktok-header-link:focus-visible {
  background: var(--accent-light);
  color: var(--accent);
  transform: translateY(-2px);
}

.tiktok-header-link svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: currentColor;
}

.instagram-header-link {
  width: 44px;
  height: 44px;

  flex-shrink: 0;

  display: grid;

  place-items: center;

  border-radius: 13px;

  background: var(--surface-soft);

  color: var(--text);

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.instagram-header-link:hover {
  background: var(--accent-light);

  color: var(--accent);

  transform: translateY(-2px);
}

.instagram-header-link svg {
  width: 21px;
  height: 21px;

  display: block;

  fill: none;

  stroke: currentColor;

  stroke-width: 1.8;
}

.instagram-header-link svg circle:last-child {
  fill: currentColor;

  stroke: none;
}


/* =========================================================
   Notification Header Button
   ========================================================= */

.notification-header-button {
  width: 44px;
  height: 44px;
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text);
  transition: background .2s ease, color .2s ease, transform .2s ease;
}

.notification-header-button:hover,
.notification-header-button:focus-visible {
  background: var(--accent-light);
  color: var(--accent);
  transform: translateY(-2px);
}

/* When subscribed, only the bell icon carries the Infograf+ section spectrum. */
.notification-header-button.is-subscribed {
  background: var(--surface-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

.notification-header-button.is-subscribed:hover,
.notification-header-button.is-subscribed:focus-visible {
  background: var(--accent-light);
  color: var(--accent);
  transform: translateY(-2px);
}

.notification-header-button.is-subscribed svg {
  fill: currentColor;
  stroke: none;
  animation: infograf-bell-colors 20s steps(1, end) infinite;
}

@keyframes infograf-bell-colors {
  0%, 9.99% { color: #22A06B; }
  10%, 19.99% { color: #D99A00; }
  20%, 29.99% { color: #0043F7; }
  30%, 39.99% { color: #921E7A; }
  40%, 49.99% { color: #E74F1B; }
  50%, 59.99% { color: #A71C1C; }
  60%, 69.99% { color: #555555; }
  70%, 79.99% { color: #FC8FC5; }
  80%, 89.99% { color: #2A2A2D; }
  90%, 100% { color: #13CBFF; }
}

.notification-header-button svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-status-dot {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .notification-header-button.is-subscribed svg {
    animation: none;
    color: #0043F7;
  }
}

.notification-header-button.is-loading {
  cursor: wait;
  opacity: .7;
}

@media (max-width:700px) {
  .notification-header-button {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }
  .notification-header-button svg { width: 19px; height: 19px; }
  .notification-status-dot { top: 7px; right: 7px; width: 6px; height: 6px; }
}


/* =========================================================
   Search Button
   ========================================================= */

.search-button {
  width: 44px;
  height: 44px;

  display: grid;

  place-items: center;

  border-radius: 13px;

  background: var(--surface-soft);

  color: var(--text);

  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.search-button:hover {
  background: var(--accent-light);

  color: var(--accent);
}

.search-icon {
  font-family: Arial, sans-serif;

  font-size: 25px;

  line-height: 1;
}


/* =========================================================
   Page Wrapper
   ========================================================= */

.page-wrapper {
  min-height: 70vh;
}


/* =========================================================
   Hero
   ========================================================= */

.hero-section {
  width: min(
    var(--max-width),
    calc(100% - 40px)
  );

  margin: 0 auto;

  padding: 60px 0 45px;

  display: grid;

  grid-template-columns:
    minmax(0, 1.05fr)
    minmax(320px, 0.95fr);

  align-items: center;

  gap: 55px;
}

.hero-content {
  max-width: 620px;
}

.hero-badge {
  display: inline-flex;

  align-items: center;

  padding: 7px 13px;

  margin-bottom: 18px;

  border-radius: 100px;

  background: var(--accent-light);

  color: var(--accent);

  font-size: 13px;

  font-weight: 700;

  direction: ltr;
}

.hero-content h1 {
  margin: 0;

  font-size: clamp(
    42px,
    5vw,
    68px
  );

  line-height: 1.12;

  letter-spacing: -2.5px;

  font-weight: 800;
}

.hero-content h1 span {
  color: var(--accent);
}

.hero-content p {
  max-width: 570px;

  margin: 22px 0 0;

  color: var(--text-secondary);

  font-size: 18px;

  line-height: 2;
}

.hero-actions {
  display: flex;

  flex-wrap: wrap;

  gap: 12px;

  margin-top: 26px;
}

.btn {
  min-height: 48px;

  padding: 11px 21px;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  border-radius: 13px;

  font-size: 14px;

  font-weight: 700;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);

  color: #fff;

  box-shadow:
    0 9px 22px
    rgba(99, 91, 255, 0.22);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: var(--surface);

  color: var(--text);

  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);

  color: var(--accent);
}


/* =========================================================
   Hero Visual
   ========================================================= */

.hero-visual {
  min-height: 360px;

  position: relative;

  display: flex;

  align-items: center;

  justify-content: center;
}

.visual-card {
  background: var(--surface);

  border: 1px solid var(--border);

  box-shadow: var(--shadow-md);
}

.visual-card-main {
  width: min(390px, 85%);

  min-height: 275px;

  padding: 24px;

  border-radius: 28px;

  transform: rotate(-3deg);
}

.visual-top {
  display: flex;

  gap: 7px;

  direction: ltr;
}

.visual-top span {
  width: 9px;
  height: 9px;

  border-radius: 50%;

  background: var(--border);
}

.visual-bars {
  height: 155px;

  margin-top: 38px;

  display: flex;

  align-items: end;

  justify-content: center;

  gap: 20px;

  direction: ltr;
}

.visual-bars div {
  width: 34px;

  min-height: 30px;

  border-radius:
    9px 9px 4px 4px;

  background: var(--accent-light);

  position: relative;
}

.visual-bars div:nth-child(2),
.visual-bars div:nth-child(4) {
  background: var(--accent);
}

.visual-line {
  height: 7px;

  width: 65%;

  margin: 20px auto 0;

  border-radius: 100px;

  background: var(--surface-soft);
}

.visual-card-small {
  position: absolute;

  left: 4%;

  bottom: 10px;

  width: 180px;

  padding: 17px;

  border-radius: 19px;

  display: flex;

  align-items: center;

  gap: 10px;

  direction: rtl;

  transform: rotate(4deg);
}

.visual-card-small strong {
  width: 38px;
  height: 38px;

  flex-shrink: 0;

  display: grid;

  place-items: center;

  border-radius: 11px;

  background: var(--accent);

  color: #fff;

  font-size: 25px;

  line-height: 1;
}

.visual-card-small span {
  font-size: 12px;

  font-weight: 700;
}


/* =========================================================
   Home Benefits
   ========================================================= */

.home-benefits {
  width: min(
    var(--max-width),
    calc(100% - 40px)
  );

  margin: 0 auto;

  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 14px;

  padding: 0 0 45px;
}

.home-benefit {
  padding: 20px;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: 18px;

  box-shadow: var(--shadow-sm);
}

.home-benefit-icon {
  width: 42px;
  height: 42px;

  margin-bottom: 13px;

  display: grid;

  place-items: center;

  border-radius: 12px;

  background: var(--accent-light);

  color: var(--accent);

  font-size: 19px;

  font-weight: 800;
}

.home-benefit h3 {
  margin: 0;

  font-size: 15px;
}

.home-benefit p {
  margin: 6px 0 0;

  color: var(--text-secondary);

  font-size: 12px;

  line-height: 1.8;
}


/* =========================================================
   Sections
   ========================================================= */

.categories-section,
.latest-section,
.about-section {
  width: min(
    var(--max-width),
    calc(100% - 40px)
  );

  margin: 0 auto;
}

.categories-section {
  padding: 5px 0 45px;
}

.latest-section {
  padding: 5px 0 55px;
}

.section-heading {
  display: flex;

  align-items: end;

  justify-content: space-between;

  gap: 20px;

  margin-bottom: 22px;
}

.section-kicker {
  display: block;

  margin-bottom: 5px;

  color: var(--accent);

  font-size: 12px;

  font-weight: 800;
}

.section-heading h2 {
  margin: 0;

  font-size: 28px;

  line-height: 1.3;

  letter-spacing: -0.8px;
}

.section-count {
  color: var(--text-light);

  font-size: 13px;
}


/* =========================================================
   Categories
   ========================================================= */

.category-list {
  display: flex;

  gap: 9px;

  overflow-x: auto;

  padding: 4px 2px 12px;

  scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex: 0 0 auto;

  min-height: 42px;

  padding: 8px 17px;

  border-radius: 100px;

  background: var(--surface);

  color: var(--text-secondary);

  border: 1px solid var(--border);

  font-size: 13px;

  font-weight: 700;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.category-chip:hover {
  border-color: var(--accent);

  color: var(--accent);
}

.category-chip.active {
  background: var(--accent);

  border-color: var(--accent);

  color: #fff;
}


/* =========================================================
   Infographic Grid
   ========================================================= */

.infographic-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 24px;

  align-items: start;
}

.infographic-card {
  min-width: 0;

  overflow: hidden;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-sm);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.infographic-card:hover {
  transform: translateY(-5px);

  box-shadow: var(--shadow-md);
}

.infographic-image-link {
  display: block;

  overflow: hidden;

  aspect-ratio: 4 / 3;

  background: var(--surface-soft);
}

.infographic-image-link img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition:
    transform 0.35s ease;
}

.infographic-card:hover
.infographic-image-link img {
  transform: scale(1.035);
}

.image-placeholder {
  width: 100%;
  height: 100%;

  display: grid;

  place-items: center;

  background: var(--accent-light);

  color: var(--accent);

  font-size: 22px;

  font-weight: 800;

  direction: ltr;
}

.infographic-card-content {
  padding: 20px;
}

.card-category {
  display: inline-flex;

  padding: 4px 9px;

  border-radius: 7px;

  background: var(--accent-light);

  color: var(--accent);

  font-size: 11px;

  font-weight: 800;
}

.infographic-card h3 {
  margin: 12px 0 8px;

  font-size: 18px;

  line-height: 1.55;

  letter-spacing: -0.3px;
}

.infographic-card h3 a:hover {
  color: var(--accent);
}

.infographic-card p {
  margin: 0;

  color: var(--text-secondary);

  font-size: 13px;

  line-height: 1.9;

  display: -webkit-box;

  -webkit-line-clamp: 2;

  -webkit-box-orient: vertical;

  overflow: hidden;
}

.card-meta {
  margin-top: 19px;

  padding-top: 14px;

  border-top: 1px solid var(--border);

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 12px;

  color: var(--text-light);

  font-size: 11px;
}

.read-more {
  color: var(--accent);

  font-weight: 700;
}


/* =========================================================
   Featured Card
   ========================================================= */

.featured-card {
  grid-column: span 2;

  display: block;

  min-height: 0;

  overflow: hidden;
}

.featured-card .infographic-image-link {
  width: 100%;

  height: auto;

  aspect-ratio: 4 / 3;
}

.featured-card .infographic-card-content {
  display: block;

  padding: 24px 28px 26px;
}

.featured-card h3 {
  margin-top: 12px;

  font-size: 25px;

  line-height: 1.45;
}

.featured-card p {
  -webkit-line-clamp: 3;

  font-size: 14px;
}

.featured-card .card-meta {
  margin-top: 20px;
}


/* =========================================================
   Empty State
   ========================================================= */

.empty-state {
  padding: 70px 25px;

  text-align: center;

  background: var(--surface);

  border: 1px dashed var(--border);

  border-radius: var(--radius-lg);
}

.empty-icon {
  width: 58px;
  height: 58px;

  margin: 0 auto 15px;

  display: grid;

  place-items: center;

  border-radius: 17px;

  background: var(--accent-light);

  color: var(--accent);

  font-size: 30px;

  font-weight: 700;
}

.empty-state h3 {
  margin: 0;

  font-size: 20px;
}

.empty-state p {
  max-width: 450px;

  margin: 9px auto 0;

  color: var(--text-secondary);

  font-size: 13px;
}


/* =========================================================
   About
   ========================================================= */

.about-section {
  margin-bottom: 55px;

  padding: 35px;

  min-height: 190px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 35px;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: 30px;
}

.about-content {
  max-width: 570px;
}

.about-content h2 {
  margin: 0;

  font-size: 34px;

  line-height: 1.4;

  letter-spacing: -1px;
}

.about-content h2 span {
  color: var(--accent);
}

.about-content p {
  margin: 15px 0 0;

  color: var(--text-secondary);
}

.about-mark {
  padding: 25px;

  color: var(--text);

  font-size: 31px;

  font-weight: 800;

  direction: ltr;

  white-space: nowrap;
}

.about-mark strong {
  color: var(--accent);
}


/* =========================================================
   Search Panel
   ========================================================= */

.search-panel {
  position: fixed;

  inset: 0;

  z-index: 200;

  padding: 30px 20px;

  background:
    rgba(20, 20, 35, 0.45);

  backdrop-filter: blur(8px);

  -webkit-backdrop-filter: blur(8px);
}

.search-panel[hidden] {
  display: none;
}

.search-panel-inner {
  width: min(650px, 100%);

  margin: 50px auto 0;

  padding: 25px;

  background: var(--surface);

  border-radius: 23px;

  box-shadow:
    0 25px 70px
    rgba(0, 0, 0, 0.18);
}

.search-header {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 15px;

  margin-bottom: 18px;
}

.search-header h2 {
  margin: 0;

  font-size: 20px;
}

.close-search {
  width: 40px;
  height: 40px;

  border-radius: 11px;

  background: var(--surface-soft);

  color: var(--text);

  font-size: 25px;
}

.close-search:hover {
  background: var(--accent-light);

  color: var(--accent);
}

#site-search {
  width: 100%;

  min-height: 52px;

  padding: 12px 16px;

  border: 1px solid var(--border);

  border-radius: 13px;

  outline: none;

  background: var(--background);

  color: var(--text);

  font-size: 16px;
}

#site-search:focus {
  border-color: var(--accent);

  box-shadow:
    0 0 0 4px
    var(--accent-light);
}

.search-results {
  max-height: 400px;

  margin-top: 15px;

  overflow-y: auto;
}

.search-result {
  display: block;

  padding: 14px;

  border-bottom:
    1px solid var(--border);
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result:hover {
  background: var(--surface-soft);
}

.search-result strong {
  display: block;

  font-size: 14px;
}

.search-result span {
  color: var(--text-light);

  font-size: 11px;
}

.no-results {
  padding: 30px;

  text-align: center;

  color: var(--text-secondary);

  font-size: 13px;
}


/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  border-top:
    1px solid var(--border);

  background: var(--surface);
}

.footer-inner {
  width: min(
    var(--max-width),
    calc(100% - 40px)
  );

  min-height: 140px;

  margin: 0 auto;

  padding: 30px 0;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 30px;
}

.footer-brand {
  direction: ltr;
}

.footer-brand .brand-name,
.footer-brand .brand-plus {
  font-size: 20px;

  font-weight: 800;
}

.footer-brand p {
  margin: 7px 0 0;

  color: var(--text-light);

  font-size: 11px;

  direction: rtl;

  text-align: left;
}

.footer-info {
  color: var(--text-light);

  font-size: 11px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 13px;
  transition: color .2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text);
}

.site-header .about-header-mobile {
  display: none !important;
  visibility: hidden !important;
}


/* =========================================================
   Mobile Navigation
   ========================================================= */

.mobile-navigation {
  display: none;
}


/* =========================================================
   Infographic Article Page
   ========================================================= */

.infographic-page {
  width: min(
    980px,
    calc(100% - 40px)
  );

  margin: 0 auto;

  padding: 55px 0 85px;
}

.infographic-page-header {
  max-width: 820px;

  margin: 0 auto 30px;

  text-align: center;
}

.infographic-page-category {
  display: inline-flex;

  align-items: center;

  padding: 7px 13px;

  background: var(--accent-light);

  color: var(--accent);

  border-radius: 999px;

  font-size: 12px;

  font-weight: 800;

  text-decoration: none;

  margin-bottom: 18px;
}

.infographic-page-header h1 {
  margin: 0;

  font-size: clamp(
    32px,
    5vw,
    58px
  );

  line-height: 1.25;

  letter-spacing: -1.8px;
}

.infographic-page-description {
  max-width: 700px;

  margin: 17px auto 0;

  color: var(--text-secondary);

  font-size: 17px;

  line-height: 1.9;
}

.infographic-meta {
  display: flex;

  justify-content: center;

  align-items: center;

  flex-wrap: wrap;

  gap: 10px;

  margin-top: 18px;

  color: var(--text-light);

  font-size: 12px;
}

.meta-separator {
  opacity: 0.5;
}


/* =========================================================
   Main Infographic Image
   ========================================================= */

.infographic-main-image {
  position: relative;

  margin: 0 auto;

  max-width: 900px;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: 24px;

  overflow: hidden;

  box-shadow: var(--shadow-md);

  user-select: none;
}

.infographic-main-image img {
  display: block;

  width: 100%;

  height: auto;

  max-height: none;

  object-fit: contain;

  user-select: none;

  -webkit-user-select: none;

  -webkit-user-drag: none;

  pointer-events: auto;
}


/* =========================================================
   Infographic Actions
   ========================================================= */

.infographic-actions {
  display: flex;

  justify-content: center;

  flex-wrap: wrap;

  gap: 10px;

  margin: 24px 0;
}

.infographic-action {
  appearance: none;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  gap: 8px;

  min-height: 44px;

  padding: 0 17px;

  border:
    1px solid var(--border);

  border-radius: 12px;

  background: var(--surface);

  color: var(--text);

  font-family: inherit;

  font-size: 13px;

  font-weight: 700;

  text-decoration: none;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.infographic-action:hover {
  transform: translateY(-2px);

  border-color: var(--accent);

  color: var(--accent);
}

.infographic-action:first-child {
  background: var(--accent);

  border-color: var(--accent);

  color: #ffffff;
}

.infographic-action:first-child:hover {
  background: var(--accent-dark);

  color: #ffffff;
}


/* =========================================================
   Source
   ========================================================= */

.infographic-source {
  display: flex;

  align-items: center;

  justify-content: center;

  gap: 7px;

  max-width: 700px;

  margin: 25px auto 0;

  padding: 14px 18px;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: 14px;

  font-size: 13px;
}

.source-label {
  color: var(--text-light);
}


/* =========================================================
   Extra Content
   ========================================================= */

.infographic-extra-content {
  max-width: 760px;

  margin: 45px auto 0;

  color: var(--text);

  font-size: 16px;

  line-height: 2;
}

.infographic-extra-content h2,
.infographic-extra-content h3 {
  margin-top: 35px;
}

.infographic-extra-content p {
  margin: 14px 0;
}

.infographic-extra-content ul,
.infographic-extra-content ol {
  padding-right: 24px;
}


/* =========================================================
   Related
   ========================================================= */

.related-section {
  margin-top: 75px;

  padding-top: 50px;

  border-top:
    1px solid var(--border);
}

.related-section .infographic-grid {
  margin-top: 25px;
}


/* =========================================================
   Categories Page
   ========================================================= */

.categories-page {
  width: min(
    var(--max-width),
    calc(100% - 40px)
  );

  margin: 0 auto;

  padding: 55px 0 80px;
}

.categories-page-header {
  max-width: 680px;

  margin-bottom: 35px;
}

.categories-page-header h1 {
  margin: 0;

  font-size: clamp(
    35px,
    5vw,
    52px
  );

  line-height: 1.25;

  letter-spacing: -1.5px;
}

.categories-page-header p {
  margin: 13px 0 0;

  color: var(--text-secondary);

  font-size: 16px;
}

.all-categories {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 13px;

  margin-bottom: 60px;
}

.category-card {
  --category-color: var(--accent);

  position: relative;
  min-height: 125px;

  padding: 20px;

  display: flex;

  flex-direction: column;

  align-items: flex-start;

  justify-content: space-between;

  gap: 12px;

  overflow: hidden;

  background: var(--surface);

  border: 1px solid var(--border);

  border-radius: 19px;

  color: var(--text);

  text-align: right;

  box-shadow: var(--shadow-sm);

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: 0;
  left: 20px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--category-color);
  opacity: 0.9;
  transform: scaleX(0.72);
  transform-origin: center;
  transition: transform 0.2s ease, height 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);

  border-color: color-mix(in srgb, var(--category-color) 35%, var(--border));

  box-shadow: 0 9px 24px rgba(20, 20, 40, 0.08);
}

.category-card:hover::after {
  transform: scaleX(1);
  height: 4px;
}

.category-card.active::after {
  background: rgba(255, 255, 255, 0.9);
  transform: scaleX(0.72);
}

.category-card.active {
  background: var(--accent);

  border-color: var(--accent);

  color: #ffffff;
}

.category-card-icon {
  font-family: Arial, sans-serif;
  font-size: 31px;
  line-height: 1;
  font-weight: 800;
  color: var(--category-color, var(--accent)) !important;
  display: inline-block;
  letter-spacing: -2px;
}

.category-card[data-category="العالم"] { --category-color: #0043F7; }
.category-card[data-category="سياسة"] { --category-color: #921E7A; }
.category-card[data-category="اقتصاد ومال"] { --category-color: #D99A00; }
.category-card[data-category="تقنية"] { --category-color: #13CBFF; }
.category-card[data-category="علوم"] { --category-color: #555555; }
.category-card[data-category="صحة"] { --category-color: #22A06B; }
.category-card[data-category="رياضة"] { --category-color: #A71C1C; }
.category-card[data-category="سيارات"] { --category-color: #2A2A2D; }
.category-card[data-category="سفر"] { --category-color: #FC8FC5; }
.category-card[data-category="منوع"] { --category-color: #E74F1B; }

.category-card-name {
  font-size: 14px;

  font-weight: 800;
}

.category-card-count {
  color: var(--text-light);

  font-size: 10px;
}

.category-card.active
.category-card-count {
  color:
    rgba(255, 255, 255, 0.75);
}

.category-results {
  padding-bottom: 30px;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 950px) {
  .hero-section {
    grid-template-columns: 1fr;

    gap: 25px;

    padding-top: 45px;
  }

  .hero-content {
    max-width: 760px;
  }

  .hero-visual {
    min-height: 320px;
  }

  .infographic-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .featured-card {
    grid-column: span 2;

    display: block;
  }

  .featured-card
  .infographic-image-link {
    width: 100%;

    height: auto;

    aspect-ratio: 4 / 3;
  }

  .featured-card
  .infographic-card-content {
    padding: 24px;
  }

  .all-categories {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .home-benefits {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 700px) {
  body {
    padding-bottom: 72px;
  }

  .header-inner {
    width: calc(100% - 28px);

    min-height: 64px;

    gap: 10px;
  }

  .brand {
    font-size: 21px;
  }

  .desktop-navigation {
    display: none;
  }

  .instagram-header-link {
    width: 40px;

    height: 40px;

    border-radius: 12px;
  }

  .instagram-header-link svg {
    width: 19px;

    height: 19px;
  }

  .search-button {
    width: 40px;

    height: 40px;
  }


  /* Home Benefits */

  .home-benefits {
    width: calc(100% - 28px);

    grid-template-columns: 1fr;

    gap: 10px;

    padding-bottom: 30px;
  }

  .home-benefit {
    padding: 17px;
  }


  /* Home */

  .hero-section,
  .categories-section,
  .latest-section,
  .about-section {
    width: calc(100% - 28px);
  }

  .hero-section {
    padding: 38px 0 25px;

    gap: 15px;
  }

  .hero-content h1 {
    font-size:
      clamp(38px, 12vw, 53px);

    letter-spacing: -1.7px;
  }

  .hero-content p {
    margin-top: 16px;

    font-size: 15px;

    line-height: 1.9;
  }

  .hero-actions {
    display: grid;

    grid-template-columns: 1fr;

    margin-top: 22px;
  }

  .btn {
    width: 100%;
  }

  .hero-visual {
    min-height: 270px;
  }

  .visual-card-main {
    width: 82%;

    min-height: 220px;

    padding: 20px;
  }

  .visual-bars {
    height: 115px;

    gap: 12px;

    margin-top: 25px;
  }

  .visual-bars div {
    width: 24px;
  }

  .visual-card-small {
    left: 0;

    bottom: 3px;

    width: 155px;
  }


  /* Sections */

  .categories-section {
    padding-bottom: 28px;
  }

  .latest-section {
    padding-bottom: 45px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .section-heading h2 {
    font-size: 23px;
  }

  .section-count {
    display: none;
  }

  .category-list {
    margin-right: -2px;

    margin-left: -2px;
  }


  /* Cards */

  .infographic-grid {
    grid-template-columns: 1fr;

    gap: 17px;
  }

  .infographic-card {
    border-radius: 21px;
  }

  .infographic-card-content {
    padding: 17px;
  }

  .infographic-card h3 {
    font-size: 17px;
  }

  .featured-card {
    grid-column: auto;

    display: block;

    min-height: 0;
  }

  .featured-card
  .infographic-image-link {
    height: auto;

    aspect-ratio: 4 / 3;
  }

  .featured-card
  .infographic-card-content {
    padding: 20px;
  }

  .featured-card h3 {
    font-size: 21px;
  }


  /* About */

  .about-section {
    margin-bottom: 40px;

    padding: 28px 22px;

    min-height: 0;

    display: block;

    border-radius: 23px;
  }

  .about-content h2 {
    font-size: 27px;
  }

  .about-mark {
    margin-top: 25px;

    padding: 0;

    font-size: 25px;
  }


  /* Footer */

  .site-footer {
    margin-top: 18px;
  }

  .footer-inner {
    width: calc(100% - 28px);
    min-height: 0;
    padding: 34px 20px 34px;
    display: block;
    text-align: center;
    border-radius: 22px 22px 0 0;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-brand .brand-name,
  .footer-brand .brand-plus {
    font-size: 27px;
  }

  .footer-brand p {
    margin: 9px 0 0;
    font-size: 13px;
    text-align: center;
  }

  .footer-links {
    margin-top: 24px;
    display: block;
  }

  .footer-links .footer-nav-primary {
    display: none;
  }

  .footer-secondary-links {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 10px;
  }

  .footer-secondary-links a {
    min-width: 112px;
    padding: 11px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
  }

  .footer-secondary-links a:hover,
  .footer-secondary-links a:focus-visible {
    background: var(--accent-light);
    border-color: var(--accent);
    transform: translateY(-1px);
  }

  .footer-info {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 11px;
  }


  /* Mobile Navigation */

  .mobile-navigation {
    position: fixed;

    right: 10px;

    bottom: 10px;

    left: 10px;

    z-index: 150;

    height: 62px;

    padding: 5px;

    display: grid;

    grid-template-columns:
      repeat(4, 1fr);

    align-items: stretch;

    background:
      rgba(255, 255, 255, 0.96);

    border: 1px solid var(--border);

    border-radius: 19px;

    box-shadow:
      0 10px 35px
      rgba(20, 20, 40, 0.12);

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(18px);
  }

  .mobile-nav-item {
    min-width: 0;

    min-height: 50px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 1px;

    background: transparent;

    color: var(--text-light);

    font-size: 9px;

    font-weight: 700;

    border-radius: 14px;
  }

  .mobile-nav-item:hover,
  .mobile-nav-item:focus {
    background: var(--accent-light);

    color: var(--accent);

    outline: none;
  }

  .mobile-nav-icon {
    font-family: Arial, sans-serif;

    font-size: 20px;

    line-height: 1.1;
  }

  .mobile-search-trigger {
    font-family: inherit;
  }


  /* Search */

  .search-panel {
    padding: 15px;
  }

  .search-panel-inner {
    margin-top: 15px;

    padding: 20px;

    border-radius: 19px;
  }


  /* Infographic Page */

  .infographic-page {
    width: calc(100% - 24px);

    padding: 35px 0 70px;
  }

  .infographic-page-header {
    margin-bottom: 25px;
  }

  .infographic-page-header h1 {
    font-size: 31px;

    letter-spacing: -0.8px;
  }

  .infographic-page-description {
    font-size: 14px;

    line-height: 1.8;
  }

  .infographic-main-image {
    border-radius: 16px;

    box-shadow: var(--shadow-sm);
  }

  .infographic-main-image img {
    width: 100%;

    height: auto;

    max-width: 100%;
  }

  .infographic-actions {
    display: grid;

    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 8px;
  }

  .infographic-action {
    width: 100%;

    padding: 0 10px;

    font-size: 12px;
  }

  .infographic-action:last-child {
    grid-column: 1 / -1;
  }

  .infographic-source {
    flex-direction: column;

    gap: 4px;

    text-align: center;

    padding: 13px;

    font-size: 12px;
  }

  .infographic-extra-content {
    margin-top: 35px;

    font-size: 14px;

    line-height: 1.9;
  }

  .related-section {
    margin-top: 60px;

    padding-top: 40px;
  }


  /* Categories Page */

  .categories-page {
    width: calc(100% - 28px);

    padding: 40px 0 65px;
  }

  .categories-page-header {
    margin-bottom: 28px;
  }

  .categories-page-header h1 {
    font-size: 35px;
  }

  .categories-page-header p {
    font-size: 14px;
  }

  .all-categories {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 10px;

    margin-bottom: 45px;
  }

  .category-card {
    min-height: 105px;

    padding: 16px;

    border-radius: 16px;
  }

  .category-card-icon {
    font-size: 22px;
  }

  .category-card-name {
    font-size: 13px;
  }
}


/* =========================================================
   Very Small Screens
   ========================================================= */

@media (max-width: 380px) {
  .hero-content h1 {
    font-size: 36px;
  }

  .brand {
    font-size: 19px;
  }

  .mobile-navigation {
    right: 6px;

    left: 6px;

    bottom: 6px;
  }
}


/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;

    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;
  }
}


/* =========================================================
   Notification History Dropdown
   ========================================================= */

.notification-header-wrap {
  position: relative;
  flex-shrink: 0;
}

.notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  direction: ltr;
  pointer-events: none;
}

.notification-header-wrap {
  position: relative;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  z-index: 1000;
  width: min(380px, calc(100vw - 28px));
  max-width: calc(100vw - 20px);
  box-sizing: border-box;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg, 0 16px 45px rgba(0,0,0,.14));
}

.notification-panel[hidden] {
  display: none;
}

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.notification-panel-header strong {
  color: var(--text);
  font-size: 14px;
  flex-shrink: 0;
}

.notification-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.notification-mark-read {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.notification-mark-read:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.notification-unsubscribe {
  color: var(--text-muted);
}

.notification-unsubscribe:hover {
  color: var(--text);
}

.notification-list {
  max-height: 430px;
  overflow-y: auto;
}

.notification-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: background .18s ease;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item:hover {
  background: var(--surface-soft);
}

.notification-item.is-unread {
  background: var(--accent-light);
}

.notification-item-dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: transparent;
}

.notification-item.is-unread .notification-item-dot {
  background: var(--accent);
}

.notification-item-content {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.notification-item-content strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.notification-item-content > span {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.55;
}

.notification-item-content time {
  color: var(--text-light);
  font-size: 9px;
  direction: ltr;
  text-align: right;
}

.notification-empty {
  padding: 32px 18px;
  color: var(--text-light);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 700px) {
  .notification-panel {
    position: fixed;
    top: 66px;
    right: 14px;
    left: 14px;
    transform: none;
    width: auto;
    max-width: none;
  }
}


/* =========================================================
   Latest Infographics Ticker
   ========================================================= */

.latest-ticker {
  width: 100%;
  margin: 0;
  padding: 8px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.latest-ticker-inner {
  width: min(1400px, calc(100% - 32px));
  min-height: 44px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}

.latest-ticker-label {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 11px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.latest-ticker-label-plus {
  font-size: 21px;
  line-height: 1;
  font-weight: 800;
}

.latest-ticker-window {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  direction: ltr;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}

.latest-ticker-track {
  width: max-content;
  min-width: max-content;
  display: flex;
  direction: ltr;
  align-items: center;
  gap: 0;
  animation: infografTicker 360s linear infinite;
  will-change: transform;
}

.latest-ticker-item {
  direction: rtl;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 10px;
  transition: background .18s ease, transform .18s ease;
}

.latest-ticker-item-plus {
  color: var(--ticker-category-color);
  font-family: Arial, sans-serif;
  font-size: 25px;
  font-weight: 800;
  line-height: .8;
}

.latest-ticker-item-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.latest-ticker-item:hover,
.latest-ticker-item:focus-visible {
  background: var(--surface-soft);
  transform: translateY(-1px);
  outline: none;
}

.latest-ticker-separator {
  flex: 0 0 auto;
  padding: 0 4px;
  color: var(--text-light);
  font-size: 13px;
}

.latest-ticker-window:hover .latest-ticker-track,
.latest-ticker-window:focus-within .latest-ticker-track {
  animation-play-state: paused;
}

@keyframes infografTicker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 700px) {
  .latest-ticker {
    padding: 6px 0;
  }

  .latest-ticker-inner {
    width: calc(100% - 20px);
    min-height: 40px;
    gap: 8px;
  }

  .latest-ticker-label {
    min-height: 31px;
    padding: 0 9px;
    gap: 5px;
    border-radius: 9px;
    font-size: 10px;
  }

  .latest-ticker-label-plus {
    font-size: 18px;
  }

  .latest-ticker-track {
    animation-duration: 300s;
  }

  .latest-ticker-item {
    gap: 6px;
    padding: 6px 7px;
  }

  .latest-ticker-item-plus {
    font-size: 22px;
  }

  .latest-ticker-item-title {
    direction: rtl;
    unicode-bidi: plaintext;
    font-size: 10px;
  }

  .latest-ticker-separator {
    padding: 0 2px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .latest-ticker-track {
    animation: none;
    transform: none;
  }

  .latest-ticker-window {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* Random infographic action in hero */
.random-hero-button{border:1px solid var(--border);background:var(--surface);color:var(--text);gap:8px;cursor:pointer}
.random-hero-button span{color:var(--accent);font-family:Arial,sans-serif;font-size:20px;font-weight:900;line-height:1}
.random-hero-button:hover,.random-hero-button:focus-visible{border-color:var(--accent);background:var(--accent-light);color:var(--accent);outline:none;transform:translateY(-1px)}
