:root {
  --primary-color: #0f2744;
  --primary-dark: #0a192c;
  --primary-light: #1e3a5f;
  --accent-color: #059669;
  --accent-hover: #047857;
  --gold-color: #d97706;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-alt: #f1f5f9;
  --border-color: #e2e8f0;
  --border-dark: #cbd5e1;
  --button-bg-color: #059669;
  --button-text-color: #ffffff;
  --title-font: system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
  --body-font: system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
  --container-max: 1200px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --radius: 8px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-style: normal !important;
}

em, i, cite, address, dfn, var {
  font-style: normal !important;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--body-font);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100vw;
}

a {
  color: inherit;
  text-decoration: none !important;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover, a:focus, a:active {
  text-decoration: none !important;
}

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

.site-container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

.main-content {
  flex: 1 0 auto;
  padding-top: 24px;
  padding-bottom: 48px;
}

.site-header {
  background-color: var(--primary-dark);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: contain;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-title span {
  color: #10b981;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #e2e8f0;
  border-radius: var(--radius);
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #e2e8f0;
  border-radius: var(--radius);
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-item.has-dropdown {
  position: relative;
}

.nav-item-btn-group {
  display: inline-flex;
  align-items: center;
  background-color: transparent;
  border-radius: var(--radius);
  transition: background-color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}

.nav-item-btn-group:hover,
.nav-item.has-dropdown.menu-is-open .nav-item-btn-group {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-link-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #e2e8f0;
  padding: 8px 12px 8px 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.nav-link-btn:hover,
.nav-item.has-dropdown.menu-is-open .nav-link-btn {
  color: #ffffff;
}

.nav-dropdown-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  transition: all 0.2s ease;
}

.nav-dropdown-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.nav-dropdown-toggle-btn .icon-toggle-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.nav-dropdown-toggle-btn .icon-toggle-close {
  display: none;
  align-items: center;
  justify-content: center;
}

/* When dropdown is open: show close button with distinct indicator */
.nav-item.has-dropdown.menu-is-open .nav-dropdown-toggle-btn {
  background-color: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.nav-item.has-dropdown.menu-is-open .nav-dropdown-toggle-btn:hover {
  background-color: rgba(239, 68, 68, 0.35);
  color: #ffffff;
}

.nav-item.has-dropdown.menu-is-open .icon-toggle-open {
  display: none;
}

.nav-item.has-dropdown.menu-is-open .icon-toggle-close {
  display: inline-flex;
}

/* Dropdown menu opens strictly by clicking toggle or main category button, not by outside clicks */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background-color: var(--primary-color);
  min-width: 220px;
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
  z-index: 1050;
}

.nav-item.has-dropdown.menu-is-open > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-link {
  display: block;
  padding: 10px 18px;
  font-size: 0.875rem;
  color: #cbd5e1;
  transition: background-color 0.15s, color 0.15s, padding-right 0.15s;
}

.dropdown-link:hover,
.dropdown-link:focus {
  background-color: rgba(255, 255, 255, 0.1);
  color: #10b981;
  padding-right: 22px;
}

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

.header-search-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 4px 10px;
  transition: border-color 0.2s, background-color 0.2s;
}

.header-search-form:focus-within {
  border-color: #10b981;
  background-color: rgba(255, 255, 255, 0.12);
}

.header-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.875rem;
  width: 170px;
  font-family: inherit;
}

.header-search-input::placeholder {
  color: #94a3b8;
}

.header-search-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search-btn:hover {
  color: #10b981;
}

#menu-toggle {
  display: none;
}

.menu-toggle-label {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  cursor: pointer;
  padding: 2px;
  z-index: 1020;
}

.menu-toggle-label span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

#menu-toggle:checked + .menu-toggle-label span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#menu-toggle:checked + .menu-toggle-label span:nth-child(2) {
  opacity: 0;
}

#menu-toggle:checked + .menu-toggle-label span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(10, 25, 44, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.mobile-drawer {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  height: 100vh;
  background-color: var(--primary-dark);
  color: #ffffff;
  z-index: 2000;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background-color: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-search-form {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 2px 8px;
  transition: all 0.2s ease;
}

.drawer-search-form:focus-within {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--accent-color);
}

.drawer-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.9rem;
  padding: 6px 4px;
  font-family: inherit;
  width: 100%;
}

.drawer-search-input::placeholder {
  color: #94a3b8;
}

.drawer-search-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.drawer-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.drawer-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.drawer-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 0.5px;
  margin: 16px 0 10px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
}

.drawer-item {
  margin-bottom: 6px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #e2e8f0;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.drawer-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #10b981;
}

.drawer-link.home-link {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.25);
  margin-bottom: 10px;
}

/* Mobile Drawer Category Accordion Styles */
.drawer-cat-accordion {
  margin-bottom: 8px;
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: all 0.2s ease;
}

.drawer-cat-accordion.is-expanded {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(16, 185, 129, 0.35);
}

.drawer-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 3px;
}

.drawer-cat-main-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: #f1f5f9;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 12px;
  text-align: right;
  cursor: pointer;
  transition: color 0.2s;
}

.drawer-cat-main-btn:hover,
.drawer-cat-accordion.is-expanded .drawer-cat-main-btn {
  color: #10b981;
}

.drawer-cat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}

.drawer-cat-title {
  flex: 1;
}

.drawer-cat-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 6px;
  flex-shrink: 0;
}

.drawer-cat-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.drawer-cat-toggle-btn .icon-drawer-open {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.drawer-cat-toggle-btn .icon-drawer-close {
  display: none;
  align-items: center;
  justify-content: center;
}

.drawer-cat-accordion.is-expanded .drawer-cat-toggle-btn {
  background-color: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.drawer-cat-accordion.is-expanded .drawer-cat-toggle-btn:hover {
  background-color: rgba(239, 68, 68, 0.32);
  color: #ffffff;
}

.drawer-cat-accordion.is-expanded .icon-drawer-open {
  display: none;
}

.drawer-cat-accordion.is-expanded .icon-drawer-close {
  display: flex;
}

.drawer-sub-menu {
  list-style: none;
  margin: 0;
  padding: 0 10px 10px 10px;
  display: none;
  animation: drawerFadeIn 0.2s ease forwards;
}

.drawer-cat-accordion.is-expanded .drawer-sub-menu {
  display: block;
}

@keyframes drawerFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.drawer-sub-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  color: #cbd5e1;
  font-size: 0.88rem;
  border-radius: 6px;
  text-decoration: none !important;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.drawer-sub-link:hover {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  padding-right: 18px;
}

.drawer-sub-link .sub-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #64748b;
  flex-shrink: 0;
  transition: background 0.15s;
}

.drawer-sub-link:hover .sub-dot {
  background: #10b981;
}

#menu-toggle:checked ~ .drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

#menu-toggle:checked ~ .mobile-drawer {
  transform: translateX(0);
}

.breadcrumbs {
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  gap: 8px;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: "‹";
  margin-right: 8px;
  color: var(--text-light);
  font-weight: bold;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--accent-color);
}

.breadcrumbs .current {
  color: var(--text-main);
  font-weight: 600;
}

.page-header {
  margin-bottom: 32px;
  background-color: var(--bg-card);
  padding: 32px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.page-title {
  font-size: 1.875rem;
  color: var(--primary-dark);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
}

.page-lead {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 820px;
  line-height: 1.7;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}

.article-card {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-dark);
}

.card-img-link {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-alt);
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .card-img {
  transform: scale(1.03);
}

.card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.card-category {
  color: var(--accent-color);
  font-weight: 600;
  background-color: rgba(5, 150, 105, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 8px;
  color: var(--primary-dark);
}

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

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
  flex-grow: 1;
}

.card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.read-more-btn {
  background-color: var(--accent-color);
  color: #ffffff !important;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 4px;
  display: inline-block;
  transition: background-color 0.2s ease;
}

.read-more-btn:hover {
  background-color: var(--accent-hover);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.pagination-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.2s ease;
  cursor: pointer !important;
}

.pagination button,
.pagination a,
.pagination-item.num-btn,
.pagination-item.prev-btn,
.pagination-item.next-btn,
#pagination-container button,
#search-pagination button {
  cursor: pointer !important;
}

.pagination-item:hover {
  background-color: var(--bg-alt);
  border-color: var(--border-dark);
  color: var(--accent-color);
  cursor: pointer !important;
}

.pagination-item.current {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #ffffff;
  cursor: default !important;
}

.pagination-item.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.article-container {
  max-width: 900px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  background-color: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 36px 32px;
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
}

.article-container .page-header {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 0 20px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.article-header {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
}

.article-meta-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.badge-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.12), rgba(6, 95, 70, 0.08));
  color: var(--accent-color) !important;
  font-weight: 700;
  font-size: 0.84rem;
  border: 1px solid rgba(5, 150, 105, 0.25);
  box-shadow: 0 1px 2px rgba(5, 150, 105, 0.05);
  transition: all 0.2s ease;
  text-decoration: none !important;
}

.badge-category:hover {
  background: var(--accent-color);
  color: #ffffff !important;
  border-color: var(--accent-color);
  box-shadow: 0 2px 5px rgba(5, 150, 105, 0.25);
  transform: translateY(-1px);
}

.badge-category svg {
  flex-shrink: 0;
}

.meta-divider {
  color: var(--border-dark);
  font-size: 0.875rem;
  user-select: none;
}

.meta-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.meta-date svg {
  color: var(--text-light);
  flex-shrink: 0;
}

.internal-article-link {
  color: var(--accent-color);
  font-weight: 600;
  text-decoration: underline !important;
  text-decoration-color: rgba(5, 150, 105, 0.4) !important;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.internal-article-link:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover) !important;
  background-color: rgba(5, 150, 105, 0.06);
  border-radius: 2px;
}

.article-title {
  font-size: 2.125rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.35;
  margin-bottom: 14px;
}

.article-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-meta-bar .badge {
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--accent-color);
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 4px;
}

.article-featured-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 28px;
  background-color: var(--bg-alt);
}

.article-body {
  font-size: 1.125rem;
  line-height: 1.95;
  color: #334155;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.article-body p {
  margin-bottom: 24px;
  line-height: 1.95;
  text-align: justify;
  text-justify: inter-word;
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 38px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: break-word;
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-top: 28px;
  margin-bottom: 14px;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: break-word;
}

.article-body ul,
.article-body ol {
  margin-bottom: 24px;
  padding-right: 28px;
  padding-left: 0;
}

.article-body li {
  margin-bottom: 10px;
  line-height: 1.85;
}

.article-body blockquote {
  margin: 28px 0;
  padding: 18px 24px;
  background-color: var(--bg-alt);
  border-right: 4px solid var(--accent-color);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--primary-dark);
  font-size: 1.05rem;
  line-height: 1.9;
  overflow-wrap: break-word;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.9375rem;
  background: #ffffff;
  border: none;
}

.table-wrapper,
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 28px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.table-wrapper table,
.table-responsive table,
.comparison-table {
  width: 100%;
  margin: 0;
  min-width: 480px;
  border: none;
}

.article-body th,
.article-body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  text-align: right;
  line-height: 1.6;
}

.article-body th {
  background-color: var(--bg-alt);
  color: var(--primary-dark);
  font-weight: 700;
}

.article-body tr:last-child td {
  border-bottom: none;
}

.article-body .callout-box {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 28px 0;
  color: #166534;
  line-height: 1.85;
  overflow-wrap: break-word;
}

.article-body .callout-warning {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 28px 0;
  color: #92400e;
  line-height: 1.85;
  overflow-wrap: break-word;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.tag-badge {
  background-color: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.8125rem;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.related-articles-section {
  margin-top: 48px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 0;
  width: 48px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

/* ==================================================
   Ad Slots - Fully Responsive to Any Ad Size & Viewport
================================================== */
.ad-slot {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 28px auto;
  padding: 0;
  text-align: center;
  clear: both;
  overflow: hidden;
  box-sizing: border-box;
}

.ad-slot:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
}

.ad-slot-header {
  margin: 16px auto 24px auto;
  max-width: var(--container-max);
}

.ad-slot-footer {
  margin: 24px auto 16px auto;
  max-width: var(--container-max);
}

/* Any ad element, iframe, ins, canvas, svg, or image inside ad-slot */
.ad-slot > * {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.ad-slot iframe {
  max-width: 100% !important;
  border: 0;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.ad-slot img {
  max-width: 100% !important;
  height: auto !important;
  margin-left: auto;
  margin-right: auto;
  display: block;
}

/* Google AdSense ins tag support */
.ad-slot ins.adsbygoogle {
  display: block !important;
  max-width: 100% !important;
  margin: 0 auto !important;
}

/* Test Ad Container - Responsive, clean, adapt to any viewport and ad size */
.ad-test-box {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.85) 0%, rgba(241, 245, 249, 0.85) 100%);
  border: 1.5px dashed var(--accent-color);
  border-radius: var(--radius);
  color: #1e293b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  overflow: hidden;
  word-break: break-word;
}

.ad-test-box:hover {
  border-color: var(--accent-hover);
  background: linear-gradient(135deg, #f0fdf4 0%, #e2e8f0 100%);
}

.ad-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  background-color: var(--accent-color);
  color: #ffffff;
  padding: 3px 12px;
  border-radius: 4px;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.ad-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 6px;
  max-width: 100%;
  overflow-wrap: break-word;
  line-height: 1.4;
}

.ad-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  direction: ltr;
  font-weight: 500;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-all;
}

@media screen and (max-width: 640px) {
  .ad-slot {
    margin: 20px auto;
  }
  .ad-test-box {
    padding: 12px 14px;
  }
  .ad-title {
    font-size: 0.9rem;
  }
  .ad-meta {
    font-size: 0.75rem;
  }
}

/* ==================================================
   Suggested Articles From Other Categories (اقرأ أيضاً)
================================================== */
.suggested-articles-section {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 2px solid var(--border-color);
  clear: both;
}

.suggested-articles-section .site-container {
  padding-left: 0;
  padding-right: 0;
  max-width: 100%;
  width: 100%;
}

.suggested-header {
  margin-bottom: 24px;
}

.suggested-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.suggested-section-title svg {
  color: var(--accent-color);
  flex-shrink: 0;
}

.suggested-section-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  display: block;
}

.suggested-articles-section .section-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.suggested-articles-section .section-title::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 0;
  width: 48px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

/* عمودين متناسقين تماماً مع عرض حاوية المقال (800px-900px) */
.suggested-articles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
}

@media screen and (max-width: 640px) {
  .suggested-articles-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

.suggested-card {
  background-color: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  height: 100%;
}

.suggested-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.09);
  border-color: var(--accent-color);
}

.suggested-card-img-link {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: var(--bg-alt);
  overflow: hidden;
}

.suggested-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.suggested-card:hover .suggested-card-img {
  transform: scale(1.04);
}

.suggested-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.suggested-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.suggested-card-cat {
  color: var(--accent-color);
  font-weight: 700;
  background: rgba(5, 150, 105, 0.08);
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 0.78rem;
  line-height: 1.3;
}

.suggested-card-meta time {
  white-space: nowrap;
  font-size: 0.78rem;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.suggested-card-meta time svg {
  color: #94a3b8;
  flex-shrink: 0;
}

.suggested-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.suggested-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.suggested-card-title a:hover {
  color: var(--accent-color);
}

.suggested-card-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0;
  margin-bottom: 14px;
  flex-grow: 1;
}

.suggested-card .card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.suggested-card .read-more-btn {
  background-color: var(--accent-color);
  color: #ffffff !important;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.suggested-card .read-more-btn:hover {
  background-color: var(--accent-hover);
  transform: translateX(-3px);
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.25);
}

.suggested-card .read-more-btn svg {
  transition: transform 0.2s ease;
}

.suggested-card .read-more-btn:hover svg {
  transform: translateX(-2px);
}

.site-footer {
  background-color: var(--primary-dark);
  color: #94a3b8;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9375rem;
}

.footer-top {
  padding: 48px 0 32px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
}

.footer-col-about {
  max-width: 620px;
}

.footer-col-info {
  flex-shrink: 0;
}

.footer-col-about h3,
.footer-col-info h3 {
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-about-text {
  line-height: 1.8;
  color: #94a3b8;
  font-size: 0.9375rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease, padding-right 0.2s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: #10b981;
  padding-right: 4px;
}

.footer-bottom {
  padding: 26px 0 32px;
  background-color: #040913;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  position: relative;
  z-index: 15;
  width: 100%;
}

.footer-bottom-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
}

.footer-copyright-text {
  margin: 0 auto !important;
  text-align: center !important;
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff !important;
  letter-spacing: 0.25px;
  line-height: 1.6;
}

body.cookie-banner-visible {
  /* No padding-bottom so footer stays flush with bottom without white gap */
}

.cookie-notice {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 860px;
  margin: 0 auto;
  background-color: #0a192c;
  color: #f1f5f9;
  border-radius: var(--radius);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: var(--shadow-lg);
  padding: 16px 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-text {
  font-size: 0.875rem;
  line-height: 1.6;
  flex: 1;
}

.cookie-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn-accept {
  background-color: var(--accent-color);
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.2s;
}

.cookie-btn-accept:hover {
  background-color: var(--accent-hover);
}

.cookie-btn-link {
  background-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 7px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-block;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.cookie-btn-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff !important;
}

.error-page-wrapper {
  text-align: center;
  padding: 64px 16px;
  background-color: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.error-code {
  font-size: 5rem;
  font-weight: 900;
  color: var(--primary-light);
  line-height: 1;
  margin-bottom: 12px;
}

.error-title {
  font-size: 1.75rem;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

.error-desc {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 28px;
}

.btn-primary {
  display: inline-block;
  background-color: var(--accent-color);
  color: #ffffff;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background-color 0.2s ease;
}

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

.home-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
  color: #ffffff;
  padding: 48px 32px;
  border-radius: var(--radius);
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
}

.home-hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.3;
}

.home-hero-desc {
  font-size: 1.125rem;
  color: #cbd5e1;
  max-width: 800px;
  line-height: 1.8;
  margin-bottom: 0;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.search-result-item {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: border-color 0.2s;
}

.search-result-item:hover {
  border-color: var(--accent-color);
}

.search-result-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.search-result-category {
  font-size: 0.8125rem;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.search-result-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media screen and (max-width: 900px) {
  .header-actions .header-search-form {
    display: none;
  }
  nav.nav-desktop-wrapper,
  .nav-desktop {
    display: none !important;
  }
  .menu-toggle-label {
    display: flex;
  }
  .drawer-backdrop {
    display: none;
  }
  #menu-toggle:checked ~ .drawer-backdrop {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
  }
  .footer-grid {
    flex-direction: column;
    gap: 28px;
  }
  .cookie-notice {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-buttons {
    justify-content: flex-end;
  }
}

@media screen and (min-width: 901px) {
  .drawer-backdrop,
  .mobile-drawer {
    display: none !important;
  }
}

@media screen and (max-width: 600px) {
  .site-container {
    padding-left: 12px;
    padding-right: 12px;
  }
  .page-header {
    padding: 24px 16px;
  }
  .article-container .page-header {
    padding: 0 0 16px 0;
  }
  .page-title {
    font-size: 1.5rem;
  }
  .article-container {
    padding: 20px 14px;
    border-radius: 6px;
  }
  .article-body p {
    text-align: right;
  }
  .article-title {
    font-size: 1.625rem;
  }
  .home-hero {
    padding: 32px 18px;
  }
  .home-hero-title {
    font-size: 1.625rem;
  }
}

@media screen and (max-width: 240px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
  }
  .site-title {
    font-size: 1rem;
  }
  .page-title, .article-title {
    font-size: 1.125rem;
  }
  .article-card {
    border-radius: 4px;
  }
  .pagination-item {
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    font-size: 0.8rem;
  }
  .cookie-notice {
    left: 4px;
    right: 4px;
    bottom: 4px;
    padding: 10px;
  }
  .cookie-text {
    font-size: 0.75rem;
  }
}

.search-warning-toast {
  position: fixed;
  bottom: 24px;
  right: 50%;
  transform: translateX(50%) translateY(100px);
  background: #b91c1c;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  white-space: nowrap;
}

.search-warning-toast.is-visible {
  transform: translateX(50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.search-input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2) !important;
  animation: searchInputShake 0.4s ease-in-out;
}

@keyframes searchInputShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.search-page-form {
  margin: 24px 0;
}

.search-page-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-page-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 1.05rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  font-family: inherit;
  outline: none;
  background-color: var(--bg-card);
  color: var(--text-main);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-page-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent-color);
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.search-page-btn:hover {
  background: var(--accent-hover);
}

.search-page-btn:active {
  transform: scale(0.98);
}

.search-warning-msg {
  color: #dc2626;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 8px;
}

