@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ==========================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ========================================== */
:root {
  /* Light Theme Colors (Default) */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --primary: #006980; /* Unified with landing page's --primary */
  --primary-rgb: 0, 105, 128;
  --primary-hover: #004d5e;
  --primary-light: #e8f4f7;
  
  --accent: #00c4e0; /* Unified with landing page's --accent */
  --accent-rgb: 0, 196, 224;
  --accent-hover: #008fa8;
  --accent-light: #f0f7f9;
  
  --border: #e2e8f0;
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.6);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-en: 'Plus Jakarta Sans', sans-serif;
  --font-ar: 'Cairo', sans-serif;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  --container-width: 1200px;
}

/* Dark Theme Colors */
body[data-theme="dark"] {
  --bg-primary: #090d16;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  --primary: #00c4e0;
  --primary-rgb: 0, 196, 224;
  --primary-hover: #008fa8;
  --primary-light: rgba(0, 196, 224, 0.15);
  
  --accent: #00c4e0;
  --accent-rgb: 0, 196, 224;
  --accent-hover: #008fa8;
  --accent-light: rgba(0, 196, 224, 0.15);
  
  --border: #1f2937;
  --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 8px 15px -10px rgba(0, 0, 0, 0.3);
  --glass-bg: rgba(17, 24, 39, 0.85);
  --glass-border: rgba(255, 255, 255, 0.05);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* offset for sticky header */
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-en);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Dynamically adjust font based on active language */
html[lang="ar"] body {
  font-family: var(--font-ar);
}

/* ==========================================
   LANGUAGE DISPLAY CONTROLLER
   ========================================== */
html[lang="en"] [lang="ar"] {
  display: none !important;
}
html[lang="ar"] [lang="en"] {
  display: none !important;
}

/* Ensure icons, flex items, and list items inherit correct flow layout */
[lang="en"], [lang="ar"] {
  display: block;
}

span[lang="en"], span[lang="ar"],
a[lang="en"], a[lang="ar"],
strong[lang="en"], strong[lang="ar"],
time[lang="en"], time[lang="ar"],
i[lang="en"], i[lang="ar"] {
  display: inline-block;
}

/* ==========================================
   BACKGROUND BLOB GRAPHICS
   ========================================== */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  mix-blend-mode: multiply;
  animation: float-blob 20s infinite alternate;
  transition: opacity var(--transition-normal);
}

body[data-theme="dark"] .blob {
  opacity: 0.06;
  mix-blend-mode: screen;
}

.blob-1 {
  top: -10%;
  right: -5%;
  background: radial-gradient(circle, var(--primary) 0%, rgba(255,255,255,0) 80%);
}

.blob-2 {
  bottom: -10%;
  left: -5%;
  background: radial-gradient(circle, var(--accent) 0%, rgba(255,255,255,0) 80%);
  animation-delay: -10s;
}

@keyframes float-blob {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 30px) scale(1.1); }
  100% { transform: translate(-30px, -50px) scale(0.9); }
}

/* ==========================================
   TYPOGRAPHY UTILITIES
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--primary-hover);
}

/* ==========================================
   HEADER SECTION
   ========================================== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  transition: padding var(--transition-normal), background var(--transition-normal), border var(--transition-normal);
  padding: 1.25rem 2rem;
}

header.scrolled {
  padding: 0.75rem 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  position: relative;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 10px rgba(0, 105, 128, 0.3);
  position: relative;
  overflow: hidden;
}

/* Soap bubble animation on brand icon */
.brand-icon::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.3) 50%, transparent 55%);
  transform: rotate(45deg);
  animation: shine 4s infinite linear;
}

@keyframes shine {
  0% { transform: translate(-100%, -100%) rotate(45deg); }
  100% { transform: translate(100%, 100%) rotate(45deg); }
}

.brand-name {
  background: linear-gradient(to right, var(--text-primary), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-en);
}

html[lang="ar"] .brand-name {
  font-family: var(--font-ar);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Quick Action Buttons */
.btn-action {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-action:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-action svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Theme Toggle Customizations */
.btn-theme svg {
  transition: transform var(--transition-slow);
}
.btn-theme:hover svg {
  transform: rotate(45deg);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  padding: 5rem 2rem 3rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0, 105, 128, 0.1);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0% { box-shadow: 0 0 0 0 rgba(0, 105, 128, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 105, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 105, 128, 0); }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html[lang="ar"] .hero h1 {
  font-size: 3.25rem;
  letter-spacing: 0;
  line-height: 1.4;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* Search bar styling */
.search-container {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.search-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.4rem 0.5rem 0.4rem 1.25rem;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-normal);
}

/* Handle layout direction for search bar padding-inline */
.search-wrapper {
  padding-inline-start: 1.25rem;
  padding-inline-end: 0.5rem;
}

.search-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 105, 128, 0.15);
  transform: translateY(-2px);
}

.search-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline-end: 0.75rem;
}

.search-icon svg {
  width: 20px;
  height: 20px;
}

.search-input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1rem;
  width: 100%;
  outline: none;
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.btn-search-clear {
  background: var(--bg-tertiary);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  margin-inline-end: 0.5rem;
}

.btn-search-clear.visible {
  opacity: 1;
  visibility: visible;
}

.btn-search-clear:hover {
  background: var(--border);
  color: var(--text-primary);
}

/* ==========================================
   MAIN LAYOUT & GRID SYSTEM
   ========================================== */
.main-wrapper {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem 6rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ==========================================
   SIDEBAR TABLE OF CONTENTS (TOC)
   ========================================== */
.sidebar {
  position: sticky;
  top: 100px; /* aligns with header padding offset */
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding-inline-end: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: var(--radius-full);
}

.toc-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  padding-inline-start: 1rem;
}

html[lang="ar"] .toc-title {
  letter-spacing: 0;
  font-size: 0.9rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-inline-start: 2px solid var(--border);
  padding-inline-start: 0;
}

.toc-item a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  border-inline-start: 2px solid transparent;
  margin-inline-start: -2px; /* overlap structural list border */
  transition: all var(--transition-fast);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: start;
}

html[lang="ar"] .toc-item a {
  font-size: 0.95rem;
}

.toc-item.active a {
  color: var(--primary);
  font-weight: 700;
  border-inline-start-color: var(--primary);
  background: linear-gradient(to right, var(--primary-light), transparent);
}

html[lang="ar"] .toc-item.active a {
  background: linear-gradient(to left, var(--primary-light), transparent);
}

/* ==========================================
   CONTENT CARDS
   ========================================== */
.content-area {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.policy-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  scroll-margin-top: 110px; /* space above scrolled item */
}

.policy-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 105, 128, 0.3);
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.08), 0 10px 20px -10px rgba(0, 0, 0, 0.05);
}

body[data-theme="dark"] .policy-card:hover {
  border-color: rgba(0, 196, 224, 0.4);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

/* Highlight search matched card */
.policy-card.search-match {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 196, 224, 0.2);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.card-icon-wrapper {
  width: 52px;
  height: 52px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.policy-card:hover .card-icon-wrapper {
  background: var(--primary);
  color: white;
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 5px 15px rgba(0, 105, 128, 0.3);
}

.card-icon-wrapper svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.card-title-number {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
  letter-spacing: 0.05em;
  text-align: start;
}

.policy-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: start;
}

html[lang="ar"] .policy-card h2 {
  font-size: 1.6rem;
  letter-spacing: 0;
}

.card-content {
  color: var(--text-secondary);
  font-size: 1.05rem;
  text-align: start;
}

.card-content p {
  margin-bottom: 1.25rem;
}

.card-content p:last-child {
  margin-bottom: 0;
}

/* Bullet list formatting */
.policy-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

.policy-list li {
  position: relative;
  padding-inline-start: 1.75rem;
  font-weight: 500;
}

/* Modern list indicators */
.policy-list li::before {
  content: "";
  position: absolute;
  top: 0.6rem;
  left: 0.5rem;
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  transition: transform var(--transition-fast);
}

/* RTL adjustment for bullets */
html[lang="ar"] .policy-list li::before {
  left: auto;
  right: 0.5rem;
}

/* CSS Logical Properties handle placing inline offsets */
.policy-list li {
  padding-inline-start: 1.75rem;
}
.policy-list li::before {
  left: auto;
  right: auto;
  inset-inline-start: 0.5rem;
}

.policy-list li:hover::before {
  transform: scale(1.5);
  background-color: var(--primary);
}

/* Contact Info Styling Cards */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.contact-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  text-align: start;
}

.contact-item:hover {
  border-color: var(--primary);
  background: var(--bg-secondary);
  transform: translateY(-2px);
}

.contact-item-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.contact-item-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.contact-item-value a {
  color: var(--text-primary);
}
.contact-item-value a:hover {
  color: var(--primary);
}

/* Dynamic No Results banner for Search */
.no-results {
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.no-results svg {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
}

.no-results h3 {
  font-size: 1.5rem;
}

.no-results p {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0;
}

/* ==========================================
   FOOTER SECTION
   ========================================== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
  margin-top: auto;
  transition: background-color var(--transition-normal), border var(--transition-normal);
}

.footer-container {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-brand .brand {
  font-size: 1.75rem;
}

.footer-brand p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}

.footer-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width var(--transition-fast);
}

html[lang="ar"] .footer-links a::after {
  left: auto;
  right: 0;
}

/* Dynamic slider underline using CSS logical coordinates */
.footer-links a::after {
  left: auto;
  right: auto;
  inset-inline-start: 0;
  width: 0;
}

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

.footer-links a:hover::after {
  width: 100%;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.copyright {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.social-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.social-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ==========================================
   SCROLL TO TOP BUTTON
   ========================================== */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 105, 128, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  z-index: 90;
}

/* Align scroll to top on left for RTL users */
html[lang="ar"] .scroll-to-top {
  right: auto;
  left: 2rem;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 105, 128, 0.4);
}

.scroll-to-top svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform var(--transition-fast);
}

.scroll-to-top:hover svg {
  transform: translateY(-2px);
}

/* ==========================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================== */

/* Tablet Layout (Large screen adjustments) */
@media (max-width: 1024px) {
  .main-wrapper {
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    padding: 0 1.5rem 4rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
}

/* Mobile & Small Tablets */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  
  header.scrolled {
    padding: 0.75rem 1rem;
  }
  
  .brand {
    font-size: 1.25rem;
  }
  
  .brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  
  .brand-icon svg {
    width: 18px;
    height: 18px;
  }
  
  .hero {
    padding: 3rem 1rem 2rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  html[lang="ar"] .hero h1 {
    font-size: 2.25rem;
  }
  
  .hero p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
  }
  
  /* Stack grid on mobile */
  .main-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem 3rem;
  }
  
  /* Transform sticky TOC to a horizontal chip scroller on mobile */
  .sidebar {
    position: sticky;
    top: 70px; /* adjusted for mobile header height */
    z-index: 80;
    max-height: none;
    overflow-y: visible;
    overflow-x: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    margin: 0 -1rem; /* stretch full width */
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  
  .sidebar::-webkit-scrollbar {
    display: none; /* hide horizontal scrollbar */
  }
  
  .toc-title {
    display: none; /* hide title in mobile horizontal layout */
  }
  
  .toc-list {
    flex-direction: row;
    border-inline-start: none;
    gap: 0.5rem;
    padding: 0;
  }
  
  .toc-item a {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    font-size: 0.85rem;
    border-inline-start: 1px solid var(--border);
    margin: 0;
  }
  
  .toc-item.active a {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
  }
  
  .policy-card {
    padding: 1.75rem 1.5rem;
    border-radius: var(--radius-md);
  }
  
  .card-header {
    gap: 1rem;
    margin-bottom: 1.25rem;
  }
  
  .card-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
  }
  
  .card-icon-wrapper svg {
    width: 22px;
    height: 22px;
  }
  
  .policy-card h2 {
    font-size: 1.25rem;
  }
  
  html[lang="ar"] .policy-card h2 {
    font-size: 1.35rem;
  }
  
  .card-content {
    font-size: 0.95rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  footer {
    padding: 3rem 1rem 1.5rem;
  }
  
  .footer-container {
    gap: 2rem;
  }
  
  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  
  .footer-bottom {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 1rem;
    padding-top: 1.5rem;
  }
}

/* ==========================================
   PRINT MEDIA CUSTOM STYLING
   ========================================== */
@media print {
  body {
    background: white !important;
    color: black !important;
    font-size: 11pt;
  }
  
  header,
  .sidebar,
  .glow-bg,
  .search-container,
  .scroll-to-top,
  .footer-links,
  .social-links,
  .footer-top,
  .footer-bottom {
    display: none !important;
  }
  
  .main-wrapper {
    grid-template-columns: 1fr !important;
    padding: 0 !important;
  }
  
  .hero {
    padding: 2rem 0 !important;
  }
  
  .hero h1 {
    font-size: 24pt !important;
    color: black !important;
    -webkit-text-fill-color: black !important;
    background: none !important;
  }
  
  .policy-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 2rem !important;
    page-break-inside: avoid;
  }
  
  .card-icon-wrapper {
    display: none !important;
  }
  
  .card-title-number {
    color: black !important;
  }
  
  .policy-list li::before {
    background-color: black !important;
  }
  
  .contact-item {
    border: 1px solid #ccc !important;
    background: none !important;
  }
  
  footer {
    border-top: 1px solid #ccc !important;
    margin-top: 3rem !important;
    padding: 1rem 0 0 !important;
  }
  
  footer::after {
    content: "© Ghimar Laundry Platform - All rights reserved.";
    font-size: 9pt;
    color: #666;
  }
}
