*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: inherit
}

html {
  direction: rtl;
  scroll-behavior: smooth;
  font-family: "IBM Plex Sans Arabic", sans-serif
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--color-text);
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, var(--color-primary-glow), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 20%, var(--color-secondary-glow), transparent 50%),
    var(--color-bg);
  transition: background var(--dur-med) ease, color var(--dur-med) ease
}

button,
input,
select,
textarea,
option,
optgroup {
  font: inherit;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  color: inherit
}

h1, h2, h3, h4, h5, h6,
.nav-link,
.site-logo,
.stat-value,
.page-title,
.btn {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700
}

h1, h2, h3, h4, h5, h6,
.nav-link,
.site-logo,
.stat-value,
.page-title {
  color: var(--color-text)
}

.fa,
.fas,
.far,
.fab,
.fa-solid,
.fa-regular,
.fa-brands,
.fa-classic {
  font-family: var(--fa-style-family, "Font Awesome 6 Free") !important
}

.fa-brands { font-family: "Font Awesome 6 Brands" !important }

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--dur-fast) ease
}

a:hover { color: var(--color-accent) }

ul { list-style: none }

h1 { font-size: var(--fs-h1); line-height: 1.3 }
h2 { font-size: var(--fs-h2); line-height: 1.35 }
h3 { font-size: var(--fs-h3); line-height: 1.4 }

.container {
  width: min(100% - 1.75rem, var(--container));
  margin-inline: auto
}

.site-header {
  position: sticky;
  top: 0.85rem;
  z-index: 100;
  width: min(100% - 1.75rem, var(--container));
  margin: 0.85rem auto 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  transition: background var(--dur-med) ease, border-color var(--dur-med) ease
}

.site-header .container {
  width: 100%;
  margin: 0
}

.header-inner {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.7rem 1.1rem
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-h3);
  font-weight: 700;
  color: var(--color-text);
  cursor: default;
  user-select: none
}

.site-logo-img {
  display: block;
  width: auto;
  height: var(--logo-height);
  object-fit: contain
}

.logo-mark { display: none }

.nav-toggle {
  display: none;
  position: relative;
  width: 3.1rem;
  height: 3.1rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.3s ease
}

.nav-toggle span {
  display: block;
  position: absolute;
  right: 50%;
  top: 50%;
  width: 1.55rem;
  height: 2.5px;
  margin: 0;
  border: none;
  border-radius: 1px;
  background: var(--color-text);
  transform: translate(50%, -50%);
  transition: transform 0.3s ease
}

.nav-toggle span:first-child { transform: translate(50%, calc(-50% - 5px)) }
.nav-toggle span:last-child { transform: translate(50%, calc(-50% + 5px)) }
.nav-toggle.is-open span:first-child { transform: translate(50%, -50%) translateY(0) rotate(45deg) }
.nav-toggle.is-open span:last-child { transform: translate(50%, -50%) translateY(0) rotate(-45deg) }

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 1.8vw, 1.6rem)
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.4vw, 1.35rem)
}

.nav-link {
  display: inline-block;
  padding: 0.4rem 0.45rem;
  color: var(--color-text);
  font-size: var(--fs-nav);
  font-weight: 700;
  transition: color var(--dur-fast) ease, transform var(--dur-fast) ease
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #000000;
  transform: translateY(-1px)
}

.nav-link.is-active { color: var(--color-primary) }

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link:focus-visible {
  color: #FFFFFF
}

[data-theme="dark"] .nav-link.is-active { color: #5EE0B8 }

.nav-actions a,
.nav-actions .btn { font-weight: 700 }

.site-main {
  flex: 1;
  width: 100%;
  padding-block: var(--space-2)
}

.site-footer {
  width: min(100% - 1.75rem, var(--container));
  margin: var(--space-5) auto var(--space-3);
  padding: var(--space-5) var(--space-4) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: 1.75rem;
  background: var(--footer-bg);
  box-shadow: var(--shadow-soft)
}

.site-footer .container {
  width: 100%;
  margin: 0
}

.footer-grid {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-4)
}

.footer-col h3 {
  margin-bottom: var(--space-2);
  font-size: var(--fs-h3);
  color: var(--color-text)
}

.footer-col ul {
  display: grid;
  gap: 0.65rem
}

.footer-col a {
  display: inline-block;
  color: var(--color-text-muted);
  font-size: calc(var(--fs-footer) + 2px);
  font-weight: 500;
  line-height: 1.55
}

.footer-col a:hover { color: var(--color-primary) }

.footer-brand p {
  margin-top: var(--space-2);
  font-size: var(--fs-footer);
  max-width: 22rem;
  color: var(--color-text-muted)
}

.footer-brand .site-logo {
  font-size: clamp(1.9rem, 2.5vw, 2.4rem);
  gap: 0.7rem
}

.footer-brand .site-logo-img {
  height: calc(var(--logo-height) * 1.4)
}

.footer-bottom {
  padding-top: var(--space-3);
  font-size: var(--fs-footer);
  color: var(--color-text-muted);
  text-align: center
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--fs-footer)
}

.alert {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  background: var(--color-primary-light);
  font-size: var(--fs-body);
  color: var(--color-text)
}

.alert-error {
  border-color: var(--color-secondary);
  background: var(--color-error-soft);
  color: var(--color-text)
}

.alert-success {
  border-color: var(--color-primary);
  background: var(--color-primary-light)
}

.muted { color: var(--color-text-muted) }
.section { padding: clamp(2rem, 5vw, 3.75rem) 0 }
.section-head { margin-bottom: clamp(1.25rem, 3vw, 2rem) }
.section-head p {
  margin-top: var(--space-2);
  max-width: 44rem
}

.empty-state {
  padding: var(--space-3) 0;
  border: none;
  border-radius: 0;
  background: transparent;
  text-align: right;
  color: var(--color-text-muted);
  font-size: var(--fs-body)
}

@media screen and (max-width: 321px) {
  :root {
    --fs-body: 14px;
    --fs-small: 13px;
    --fs-h1: 20px;
    --fs-h2: 18px;
    --fs-h3: 16px;
    --fs-nav: 14px;
    --fs-btn: 14px;
    --fs-label: 13px;
    --fs-footer: 13px;
    --fs-badge: 12px;
    --fs-icon-sm: 1rem;
    --fs-icon-md: 1.15rem;
    --fs-icon-lg: 1.45rem;
    --fs-stat: 1.55rem;
    --fs-trust: 1.85rem;
    --logo-height: 2.35rem;
    --space-2: 0.55rem;
    --space-3: 0.9rem;
    --space-4: 1.25rem;
    --space-5: 1.35rem;
    --space-6: 1.75rem
  }
  .container,
  .site-header,
  .site-footer { width: min(100% - 1.35rem, var(--container)) }
  .header-inner { padding: 0.55rem 0.75rem }
  .site-logo {
    font-size: 1.35rem;
    gap: 0.55rem
  }
  .header-inner .site-logo {
    font-size: 1.4rem
  }
  .header-inner .site-logo-img {
    height: 2.45rem
  }
  .site-footer {
    margin: var(--space-4) auto var(--space-3);
    padding: var(--space-4) var(--space-3) var(--space-3);
    border-radius: 1.25rem
  }
  .footer-grid { gap: var(--space-3); margin-bottom: var(--space-3) }
  .footer-brand .site-logo { font-size: 1.35rem }
  .footer-brand .site-logo-img { height: 2.2rem }
  .footer-col h3 {
    margin-bottom: 0.4rem;
    font-size: 0.95rem
  }
  .footer-col ul { gap: 0.28rem }
  .footer-col a { font-size: 0.92rem; line-height: 1.4 }
  .section { padding: 1.55rem 0 }
  .section-head { margin-bottom: 1rem }
  .btn {
    padding: 0.5rem 0.9rem;
    font-size: var(--fs-btn)
  }
}

@media screen and (min-width: 322px) and (max-width: 376px) {
  :root {
    --fs-body: 15px;
    --fs-small: 14px;
    --fs-h1: 24px;
    --fs-h2: 21px;
    --fs-h3: 17px
  }
  .container,
  .site-header,
  .site-footer { width: min(100% - 1.85rem, var(--container)) }
  .section { padding: 1.75rem 0 }
}

@media screen and (min-width: 322px) and (max-width: 394px) {
  :root {
    --fs-h1: 24px;
    --fs-h2: 21px;
    --fs-h3: 17px
  }
  .container,
  .site-header,
  .site-footer { width: min(100% - 2rem, var(--container)) }
}

@media screen and (min-width: 394px) {
  :root {
    --fs-body: 16px;
    --fs-small: 15px;
    --fs-h1: 26px;
    --fs-h2: 22px;
    --fs-h3: 18px;
    --fs-nav: 15px
  }
  .footer-grid { grid-template-columns: 1fr 1fr }
}

@media screen and (min-width: 767px) {
  :root {
    --fs-body: 16px;
    --fs-small: 15px;
    --fs-h1: 30px;
    --fs-h2: 24px;
    --fs-h3: 18px;
    --fs-nav: 15px;
    --logo-height: 2.55rem
  }
  .footer-grid { grid-template-columns: repeat(4, 1fr) }
}

@media screen and (min-width: 1023px) {
  :root {
    --fs-body: 17px;
    --fs-small: 15px;
    --fs-h1: 32px;
    --fs-h2: 26px;
    --fs-h3: 19px;
    --fs-nav: 16px;
    --fs-btn: 15px;
    --container: 1080px;
    --logo-height: 2.65rem
  }
}

@media screen and (min-width: 1439px) {
  :root {
    --fs-body: 17px;
    --fs-small: 16px;
    --fs-h1: 34px;
    --fs-h2: 28px;
    --fs-h3: 20px;
    --fs-nav: 16px;
    --container: 1180px;
    --logo-height: 2.75rem
  }
}

@media screen and (max-width: 766px) {
  .site-header {
    top: 0.55rem;
    margin-top: 0.55rem;
    border-radius: 1.35rem;
    background: var(--color-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none
  }
  .header-inner { padding: 0.6rem 0.95rem }
  .nav-toggle { display: block }
  .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: 1.25rem;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: none;
    -webkit-backdrop-filter: none
  }
  .main-nav.is-open { display: flex }
  .header-inner .site-logo {
    font-size: 1.45rem;
    gap: 0.6rem
  }
  .header-inner .site-logo-img {
    height: 2.6rem
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2)
  }
  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: var(--space-2)
  }
  .main-nav > .theme-toggle,
  .nav-actions .theme-toggle,
  .nav-actions .btn {
    width: 100%;
    min-height: 2.55rem;
    height: auto;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-button)
  }
  .main-nav > .theme-toggle .theme-toggle-text,
  .nav-actions .theme-toggle .theme-toggle-text { display: inline }
  .site-footer {
    margin-bottom: var(--space-2);
    border-radius: 1.35rem;
    padding: var(--space-3) var(--space-3) var(--space-2);
    background: var(--color-primary-light);
    opacity: 1
  }
  .footer-grid {
    gap: 0.85rem 1rem;
    margin-bottom: var(--space-2)
  }
  .footer-col h3 { margin-bottom: 0.35rem }
  .footer-col ul { gap: 0.22rem }
  .footer-col a {
    font-size: 0.95rem;
    line-height: 1.35
  }
  .footer-brand p {
    margin-top: 0.4rem;
    font-size: 0.85rem
  }
  .page-banner,
  .page-hero-soft,
  .hero-v2,
  .specialist-cta {
    background: var(--color-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none
  }
  .footer-bottom { padding-top: var(--space-2) }
}

@media screen and (min-width: 322px) and (max-width: 766px) {
  .container,
  .site-header,
  .site-footer { width: min(100% - 2.15rem, var(--container)) }
  .page-banner,
  .page-hero-soft,
  .hero-v2,
  .specialist-cta {
    width: min(100% - 2.15rem, var(--container))
  }
  .page-banner {
    padding: var(--space-4) 1rem var(--space-2)
  }
  .section .container {
    width: min(100% - 2.15rem, var(--container))
  }
  .cat-circles-page {
    gap: 1.5rem;
    padding-inline: 0.15rem
  }
}
