/* ============================================================
   SehaPlus — Premium Header Styles
   RTL · Arabic Medical Magazine
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --sp-primary: #0EA5E9;
  --sp-primary-dark: #0284C7;
  --sp-primary-light: rgba(14, 165, 233, 0.10);
  --sp-secondary: #10B981;
  --sp-secondary-light: rgba(16, 185, 129, 0.10);
  --sp-accent: #F59E0B;
  --sp-accent-light: rgba(245, 158, 11, 0.12);
  --sp-danger: #EF4444;
  --sp-danger-light: rgba(239, 68, 68, 0.10);
  --sp-text: #0F172A;
  --sp-text-muted: #64748B;
  --sp-text-light: #94A3B8;
  --sp-bg: #F8FAFC;
  --sp-white: #FFFFFF;
  --sp-border: rgba(15, 23, 42, 0.08);
  --sp-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --sp-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.05);
  --sp-shadow-lg: 0 10px 40px rgba(15, 23, 42, 0.12), 0 4px 16px rgba(15, 23, 42, 0.07);
  --sp-radius-sm: 8px;
  --sp-radius: 12px;
  --sp-radius-lg: 16px;
  --sp-radius-xl: 20px;
  --sp-radius-pill: 100px;
  --sp-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --sp-header-height: 148px; /* utility(40) + main(72) + strip(36) */
  --sp-main-row-height: 72px;
  --sp-shrink-height: 60px;
}

/* ── Base Reset ─────────────────────────────────────────────── */
.sp-header *,
.sp-header *::before,
.sp-header *::after {
  box-sizing: border-box;
}

/* ── Wrapper ────────────────────────────────────────────────── */
.sp-header {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  z-index: 9999;
  transition: box-shadow var(--sp-transition), background var(--sp-transition);
  font-family: 'Cairo', 'Tajawal', system-ui, sans-serif;
  direction: rtl;
}

.sp-header--scrolled {
  box-shadow: var(--sp-shadow-md);
}

.sp-header--scrolled .sp-header__utility {
  height: 0;
  overflow: hidden;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.sp-header--scrolled .sp-header__strip {
  display: none;
}

/* ── Push content below the fixed header ───────────────────── */
/*
  Target <main id="content"> directly — body padding-top can be
  wiped out by WP core / plugin resets, margin-top on the exact
  element cannot.
*/
body {
  padding-top: 0 !important;
}

main#content {
  padding-top: var(--sp-header-height) !important;
}

/* ── WordPress admin bar integration ───────────────────────── */
/*
  WP already does  html { margin-top: 32px !important }
  which shifts the whole document down below the fixed admin bar.
  We only need to move .sp-header itself down so it sits under the
  admin bar — no extra padding on main#content needed.
*/
body.admin-bar .sp-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .sp-header {
    top: 46px;
  }
}

@media screen and (max-width: 600px) {
  body.admin-bar .sp-header {
    top: 0;
  }
}

.sp-header--scrolled ~ .site-content,
body.header-scrolled {
  /* no extra shift needed — strip hides */
}

/* ============================================================
   1 · UTILITY BAR
   ============================================================ */
.sp-header__utility {
  background: var(--sp-text);
  color: rgba(255, 255, 255, 0.85);
  height: 40px;
  transition: height var(--sp-transition), opacity var(--sp-transition), padding var(--sp-transition);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.sp-header__utility .sp-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}

/* Trust badge */
.sp-util-trust {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.sp-util-trust__dot {
  width: 6px;
  height: 6px;
  background: var(--sp-secondary);
  border-radius: 50%;
  animation: sp-pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes sp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(1.4); }
}

/* Date ticker */
.sp-util-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

.sp-util-ticker__icon {
  font-size: 11px;
  opacity: 0.7;
}

/* Utility Links */
.sp-util-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sp-util-links a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--sp-radius-pill);
  transition: all var(--sp-transition);
  white-space: nowrap;
}

.sp-util-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
}

/* Emergency link */
.sp-util-emergency {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5 !important;
  padding: 3px 10px !important;
  border-radius: var(--sp-radius-pill) !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  transition: all var(--sp-transition) !important;
}

.sp-util-emergency:hover {
  background: rgba(239, 68, 68, 0.28) !important;
  color: #FECACA !important;
  text-decoration: none !important;
}

.sp-util-emergency__icon {
  font-size: 10px;
  animation: sp-beat 1.5s ease infinite;
}

@keyframes sp-beat {
  0%, 100% { transform: scale(1); }
  30%       { transform: scale(1.25); }
}

/* ============================================================
   2 · MAIN HEADER ROW
   ============================================================ */
.sp-header__main {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid var(--sp-border);
  height: var(--sp-main-row-height);
  transition: height var(--sp-transition), background var(--sp-transition);
}

.sp-header--scrolled .sp-header__main {
  height: var(--sp-shrink-height);
  background: rgba(255, 255, 255, 0.98);
}

.sp-header__main .sp-container {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 16px;
  flex-wrap: nowrap;
  overflow: hidden;
}

/* ── Brand ─────────────────────────────────────────────────── */
.sp-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity var(--sp-transition);
}

.sp-brand:hover {
  opacity: 0.88;
  text-decoration: none;
}

.sp-brand__icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--sp-primary) 0%, var(--sp-secondary) 100%);
  border-radius: var(--sp-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.28);
  transition: transform var(--sp-transition), box-shadow var(--sp-transition);
  position: relative;
  overflow: hidden;
}

.sp-brand__icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.22) 0%, transparent 60%);
  border-radius: inherit;
}

.sp-brand:hover .sp-brand__icon {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.36);
}

.sp-brand__icon svg {
  width: 26px;
  height: 26px;
  color: #ffffff;
  position: relative;
  z-index: 1;
}

.sp-header--scrolled .sp-brand__icon {
  width: 40px;
  height: 40px;
}

.sp-brand__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sp-brand__name {
  font-family: 'Lalezar', 'Cairo', sans-serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--sp-text);
  line-height: 1;
  background: linear-gradient(135deg, var(--sp-primary) 0%, #0EA5E9 60%, var(--sp-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
  filter: drop-shadow(0 1px 4px rgba(5,150,105,.25));
  animation: logo-shimmer 4s linear infinite;
  transition: font-size var(--sp-transition), filter var(--sp-transition);
}

@keyframes logo-shimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.sp-brand:hover .sp-brand__name {
  filter: drop-shadow(0 2px 8px rgba(5,150,105,.45));
  letter-spacing: 1.5px;
}

.sp-header--scrolled .sp-brand__name {
  font-size: 24px;
}

.sp-brand__tagline {
  font-size: 10.5px;
  color: var(--sp-text-muted);
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: opacity var(--sp-transition);
}

.sp-header--scrolled .sp-brand__tagline {
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* ── Primary Navigation ─────────────────────────────────────── */
.sp-nav {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-nav__list {
  display: flex;
  align-items: center;
  gap: 1px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.sp-nav__item {
  position: relative;
}

.sp-nav__link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sp-text);
  text-decoration: none;
  border-radius: var(--sp-radius);
  transition: all var(--sp-transition);
  white-space: nowrap;
  position: relative;
}

.sp-nav__link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  inset-inline-start: 14px;
  inset-inline-end: 14px;
  height: 2px;
  border-radius: 1px;
  background: var(--sp-primary);
  transform: scaleX(0);
  transition: transform var(--sp-transition);
}

.sp-nav__link:hover,
.sp-nav__item.current-menu-item > .sp-nav__link {
  background: var(--sp-primary-light);
  color: var(--sp-primary);
  text-decoration: none;
}

.sp-nav__link:hover::after,
.sp-nav__item.current-menu-item > .sp-nav__link::after {
  transform: scaleX(1);
}

.sp-nav__arrow {
  width: 12px;
  height: 12px;
  transition: transform var(--sp-transition);
  opacity: 0.55;
  flex-shrink: 0;
}

.sp-nav__item:hover > .sp-nav__link .sp-nav__arrow {
  transform: rotate(180deg);
  opacity: 0.9;
}

/* ── Dropdown ───────────────────────────────────────────────── */
.sp-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-lg);
  box-shadow: var(--sp-shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--sp-transition), transform var(--sp-transition), visibility var(--sp-transition);
  z-index: 100;
}

.sp-nav__item:hover > .sp-dropdown,
.sp-nav__item:focus-within > .sp-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sp-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--sp-radius);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sp-text);
  text-decoration: none;
  transition: all var(--sp-transition);
}

.sp-dropdown__item:hover {
  background: var(--sp-primary-light);
  color: var(--sp-primary);
  text-decoration: none;
}

.sp-dropdown__icon {
  width: 30px;
  height: 30px;
  border-radius: var(--sp-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

/* ── Header Right Controls ──────────────────────────────────── */
.sp-header__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Search ─────────────────────────────────────────────────── */
.sp-search {
  position: relative;
  display: flex;
  align-items: center;
}

.sp-search__btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: var(--sp-radius);
  background: var(--sp-bg);
  color: var(--sp-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--sp-transition);
  flex-shrink: 0;
}

.sp-search__btn:hover {
  background: var(--sp-primary-light);
  color: var(--sp-primary);
}

.sp-search__btn svg {
  width: 17px;
  height: 17px;
}

.sp-search__overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10001;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--sp-transition), visibility var(--sp-transition);
}

.sp-search__overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.sp-search__box {
  width: min(620px, 90vw);
  background: var(--sp-white);
  border-radius: var(--sp-radius-xl);
  box-shadow: var(--sp-shadow-lg);
  overflow: hidden;
  transform: translateY(-16px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sp-search__overlay.is-open .sp-search__box {
  transform: translateY(0) scale(1);
}

.sp-search__form {
  display: flex;
  align-items: center;
  padding: 6px 6px 6px 16px;
  gap: 12px;
  border-bottom: 1px solid var(--sp-border);
}

.sp-search__icon {
  color: var(--sp-primary);
  flex-shrink: 0;
}

.sp-search__icon svg {
  width: 20px;
  height: 20px;
}

.sp-search__input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Cairo', 'Tajawal', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--sp-text);
  background: transparent;
  padding: 12px 0;
  direction: rtl;
}

.sp-search__input::placeholder {
  color: var(--sp-text-light);
}

.sp-search__close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--sp-radius);
  background: var(--sp-bg);
  color: var(--sp-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--sp-transition);
}

.sp-search__close:hover {
  background: var(--sp-danger-light);
  color: var(--sp-danger);
}

.sp-search__close svg {
  width: 16px;
  height: 16px;
}

.sp-search__hints {
  padding: 14px 20px;
}

.sp-search__hints-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--sp-text-light);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
}

.sp-search__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sp-search__tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--sp-bg);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sp-text-muted);
  text-decoration: none;
  transition: all var(--sp-transition);
  cursor: pointer;
}

.sp-search__tag:hover {
  background: var(--sp-primary-light);
  border-color: rgba(14, 165, 233, 0.25);
  color: var(--sp-primary);
  text-decoration: none;
}

/* ── CTA Button ─────────────────────────────────────────────── */
.sp-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--sp-primary) 0%, var(--sp-primary-dark) 100%);
  color: #ffffff !important;
  border-radius: var(--sp-radius);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all var(--sp-transition);
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(14, 165, 233, 0.30);
  border: none;
  cursor: pointer;
}

.sp-header__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.40);
  background: linear-gradient(135deg, var(--sp-primary-dark) 0%, #0369A1 100%);
  text-decoration: none !important;
}

.sp-header__cta svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ── Hamburger ──────────────────────────────────────────────── */
.sp-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: var(--sp-bg);
  border: none;
  border-radius: var(--sp-radius);
  cursor: pointer;
  transition: all var(--sp-transition);
  padding: 0;
}

.sp-hamburger:hover {
  background: var(--sp-primary-light);
}

.sp-hamburger__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--sp-text);
  border-radius: 2px;
  transition: all var(--sp-transition);
  transform-origin: center;
}

.sp-hamburger.is-open .sp-hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.sp-hamburger.is-open .sp-hamburger__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.sp-hamburger.is-open .sp-hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   3 · CATEGORY STRIP
   ============================================================ */
.sp-header__strip {
  background: rgba(248, 250, 252, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sp-border);
  height: 44px;
  overflow: hidden;
  transition: height var(--sp-transition), opacity var(--sp-transition);
}

.sp-header__strip .sp-container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sp-header__strip .sp-container::-webkit-scrollbar {
  display: none;
}

.sp-strip__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--sp-text-light);
  white-space: nowrap;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.sp-strip__pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sp-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  background: var(--sp-white);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sp-text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--sp-transition);
  box-shadow: var(--sp-shadow-sm);
}

.sp-pill:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.10);
}

.sp-pill--red:hover   { background: #FEF2F2; border-color: #FECACA; color: #DC2626; }
.sp-pill--blue:hover  { background: #EFF6FF; border-color: #BFDBFE; color: #2563EB; }
.sp-pill--green:hover { background: #F0FDF4; border-color: #BBF7D0; color: #16A34A; }
.sp-pill--amber:hover { background: #FFFBEB; border-color: #FDE68A; color: #D97706; }
.sp-pill--sky:hover   { background: #F0F9FF; border-color: #BAE6FD; color: #0284C7; }
.sp-pill--purple:hover{ background: #FAF5FF; border-color: #DDD6FE; color: #7C3AED; }
.sp-pill--pink:hover  { background: #FDF2F8; border-color: #FBCFE8; color: #DB2777; }
.sp-pill--cyan:hover  { background: #ECFEFF; border-color: #A5F3FC; color: #0891B2; }

.sp-pill__emoji {
  font-size: 13px;
  line-height: 1;
}

.sp-strip__trending {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
  flex-shrink: 0;
}

.sp-strip__trending-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--sp-accent);
  white-space: nowrap;
}

.sp-strip__trending-label svg {
  width: 12px;
  height: 12px;
}

.sp-strip__trend-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--sp-text-muted);
  background: var(--sp-accent-light);
  border-radius: var(--sp-radius-pill);
  padding: 3px 9px;
  text-decoration: none;
  transition: all var(--sp-transition);
  white-space: nowrap;
}

.sp-strip__trend-tag:hover {
  background: var(--sp-accent);
  color: #fff;
  text-decoration: none;
}

/* ============================================================
   4 · MOBILE DRAWER
   ============================================================ */
.sp-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--sp-transition), visibility var(--sp-transition);
}

.sp-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.sp-drawer {
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  width: min(340px, 88vw);
  height: 100dvh;
  background: var(--sp-white);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 40px rgba(15, 23, 42, 0.16);
  /* LTR: drawer at right edge, hide by pushing right */
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* RTL: drawer anchored at left edge, hide by pushing left */
[dir="rtl"] .sp-drawer {
  inset-inline-end: 0;
  transform: translateX(-100%);
}

.sp-drawer.is-open {
  transform: translateX(0) !important;
}

.sp-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--sp-border);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(16, 185, 129, 0.04));
  flex-shrink: 0;
}

.sp-drawer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sp-drawer__brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--sp-primary), var(--sp-secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(14, 165, 233, 0.25);
}

.sp-drawer__brand-icon svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.sp-drawer__brand-name {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--sp-primary), var(--sp-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sp-drawer__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--sp-radius);
  background: var(--sp-bg);
  color: var(--sp-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--sp-transition);
}

.sp-drawer__close:hover {
  background: var(--sp-danger-light);
  color: var(--sp-danger);
}

.sp-drawer__close svg {
  width: 16px;
  height: 16px;
}

/* Drawer search */
.sp-drawer__search {
  padding: 14px 20px;
  border-bottom: 1px solid var(--sp-border);
  flex-shrink: 0;
}

.sp-drawer__search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sp-bg);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  padding: 9px 14px;
  transition: border-color var(--sp-transition);
}

.sp-drawer__search-wrap:focus-within {
  border-color: var(--sp-primary);
}

.sp-drawer__search-wrap svg {
  width: 16px;
  height: 16px;
  color: var(--sp-text-light);
  flex-shrink: 0;
}

.sp-drawer__search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Cairo', 'Tajawal', sans-serif;
  font-size: 14px;
  color: var(--sp-text);
  direction: rtl;
}

.sp-drawer__search-input::placeholder {
  color: var(--sp-text-light);
}

/* Drawer navigation */
.sp-drawer__nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
}

.sp-drawer__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sp-drawer__nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--sp-radius);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--sp-text);
  text-decoration: none;
  transition: all var(--sp-transition);
}

.sp-drawer__nav-link:hover,
.sp-drawer__nav-item.current-menu-item > .sp-drawer__nav-link {
  background: var(--sp-primary-light);
  color: var(--sp-primary);
  text-decoration: none;
}

.sp-drawer__nav-link-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-drawer__nav-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--sp-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.sp-drawer__nav-arrow {
  width: 14px;
  height: 14px;
  color: var(--sp-text-light);
  flex-shrink: 0;
}

/* Drawer sub-nav */
.sp-drawer__sub {
  list-style: none;
  margin: 4px 0 4px 16px;
  padding: 0;
  border-inline-start: 2px solid rgba(14, 165, 233, 0.15);
  display: none;
  flex-direction: column;
  gap: 1px;
}

.sp-drawer__sub.is-open {
  display: flex;
}

.sp-drawer__sub-link {
  display: block;
  padding: 9px 14px;
  border-radius: var(--sp-radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-text-muted);
  text-decoration: none;
  transition: all var(--sp-transition);
}

.sp-drawer__sub-link:hover {
  background: var(--sp-primary-light);
  color: var(--sp-primary);
  text-decoration: none;
}

/* Drawer footer */
.sp-drawer__footer {
  padding: 16px 20px;
  border-top: 1px solid var(--sp-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  background: var(--sp-bg);
}

.sp-drawer__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  background: linear-gradient(135deg, var(--sp-primary), var(--sp-primary-dark));
  color: #fff !important;
  border-radius: var(--sp-radius);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all var(--sp-transition);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.30);
}

.sp-drawer__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.40);
  text-decoration: none !important;
}

.sp-drawer__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.sp-drawer__links a {
  font-size: 12px;
  color: var(--sp-text-muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--sp-radius-pill);
  transition: all var(--sp-transition);
}

.sp-drawer__links a:hover {
  background: var(--sp-primary-light);
  color: var(--sp-primary);
  text-decoration: none;
}

/* ============================================================
   5 · CONTAINER HELPER (used inside header)
   ============================================================ */
.sp-container {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 24px;
  width: 100%;
}

/* ============================================================
   6 · RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .sp-nav__link {
    padding: 6px 8px;
    font-size: 12.5px;
  }
  .sp-header__main .sp-container {
    gap: 10px;
  }
}

@media (max-width: 900px) {
  :root {
    --sp-header-height: 120px; /* utility(40) + main(80) — strip hidden */
  }

  .sp-nav,
  .sp-header__cta {
    display: none;
  }

  .sp-hamburger {
    display: flex;
  }

  .sp-header__strip {
    display: none;
  }

  main#content {
    padding-top: 120px !important;
  }
}

@media (max-width: 640px) {
  :root {
    --sp-header-height: 105px;
    --sp-main-row-height: 65px;
  }

  .sp-header__utility {
    height: 40px;
  }

  .sp-util-ticker,
  .sp-util-trust {
    display: none;
  }

  .sp-brand__tagline {
    display: none;
  }

  .sp-brand__name {
    font-size: 21px;
  }

  .sp-brand__icon {
    width: 40px;
    height: 40px;
  }

  .sp-container {
    padding-inline: 16px;
  }

  main#content {
    padding-top: 105px !important;
  }
}

@media (max-width: 400px) {
  .sp-util-links a:not(.sp-util-emergency) {
    display: none;
  }
}

/* ── Accessibility ──────────────────────────────────────────── */
.sp-header *:focus-visible {
  outline: 2px solid var(--sp-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Skip link ──────────────────────────────────────────────── */
.sp-skip-link {
  position: absolute;
  top: -999px;
  inset-inline-start: 12px;
  background: var(--sp-primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 var(--sp-radius) var(--sp-radius);
  font-weight: 700;
  font-size: 14px;
  z-index: 99999;
  text-decoration: none;
}

.sp-skip-link:focus {
  top: 0;
}

/* ── Body scroll lock ───────────────────────────────────────── */
body.sp-locked {
  overflow: hidden;
}

/* ════════════════════════════════════════════════════════
   MEDICAL TIPS TICKER  .sp-ticker
   ════════════════════════════════════════════════════════ */
.sp-ticker {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1 1 0;
  min-width: 0;
  background: linear-gradient(90deg, rgba(5,150,105,.08) 0%, rgba(14,165,233,.06) 100%);
  border: 1px solid rgba(5,150,105,.2);
  border-radius: 40px;
  padding: 5px 10px 5px 8px;
  overflow: hidden;
  position: relative;
  max-width: 780px;
}

.sp-ticker__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--sp-primary), var(--sp-secondary));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 30px;
  flex-shrink: 0;
  margin-inline-end: 12px;
  letter-spacing: .3px;
}

.sp-ticker__pulse {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  animation: sp-ticker-pulse 1.4s ease-in-out infinite;
}

@keyframes sp-ticker-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

.sp-ticker__track {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  height: 28px;
  overflow: hidden;
}

.sp-ticker__slide {
  display: none;
  align-items: center;
  gap: 8px;
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .35s ease, transform .35s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-ticker__slide.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.sp-ticker__slide.exit {
  display: flex;
  opacity: 0;
  transform: translateY(-10px);
}

.sp-ticker__icon {
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1;
}

.sp-ticker__text {
  font-size: 13px;
  color: #1f2937;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 28px;
}

.sp-ticker__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-inline-start: 10px;
}

.sp-ticker__btn {
  background: rgba(5,150,105,.1);
  border: 1px solid rgba(5,150,105,.25);
  color: #059669;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  padding: 0;
  flex-shrink: 0;
}

.sp-ticker__btn:hover {
  background: rgba(5,150,105,.22);
  color: #047857;
}

.sp-ticker__dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.sp-ticker__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(5,150,105,.2);
  transition: background .25s, transform .25s;
  cursor: pointer;
}

.sp-ticker__dot.on {
  background: var(--sp-primary);
  transform: scale(1.3);
}

/* mobile — hide dots, shrink text */
@media (max-width: 900px) {
  .sp-ticker {
    max-width: none;
    border-radius: 8px;
    margin-top: 4px;
    padding: 5px 8px;
  }
  .sp-ticker__nav { display: none; }
  .sp-ticker__text { font-size: 12px; }
}

@media (max-width: 640px) {
  .sp-ticker__label span { display: none; }
  .sp-ticker__label { padding: 4px 8px; }
}
