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

:root {
  --pink: #f9579a;
  --pink-dark: #e03d82;
  --dark: #1a1a2e;
  --text: #2d2d3e;
  --muted: #6b7280;
  --bg: #f7f1ec;
}

body {
  font-family: 'Heebo', sans-serif;
  background: #f7f1ec;
  color: var(--text);
  direction: rtl;
}

/* ── NAVBAR ── */
#navbar-root {
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  overflow: hidden;
  background: #f7f1ec;
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-inner {
  width: 100%;
  max-width: 1300px;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.navbar-logo img {
  height: 63px;
  width: auto;
  display: block;
  position: relative;
  top: 6px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.navbar-links a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}

.navbar-links a:hover {
  color: var(--pink);
}

.navbar-links a.active {
  color: var(--pink);
  font-weight: 700;
}

.btn-download {
  background: var(--pink);
  color: #fff !important;
  padding: 0.55rem 1.4rem;
  border-radius: 50px;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  transition: background 0.2s;
}

.btn-download:hover {
  background: var(--pink-dark) !important;
}

/* ── FOOTER ── */
.footer {
  background: #f3c860;
  direction: rtl;
  padding: 3.5rem 2.5rem 1.5rem;
  border-radius: 32px 32px 0 0;
  position: relative;
  overflow: hidden;
}

.footer-mascot {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: -4%;
  width: 420px;
  opacity: 0.2;
  pointer-events: none;
  user-select: none;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.footer-logo {
  height: 52px;
  width: auto;
  display: block;
  margin-bottom: 0.3rem;
}

.footer-tagline {
  font-size: 0.78rem;
  color: #312f37;
  line-height: 1.7;
  opacity: 0.65;
  max-width: 260px;
}

.footer-brand {
  flex: 1;
  min-width: 180px;
}

.footer-col {
  min-width: 120px;
}

.footer-col-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #312f37;
  opacity: 0.55;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: #312f37;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-col a:hover {
  opacity: 1;
}

.footer-social-col {
  min-width: 200px;
}

.footer-social-text {
  font-size: 0.82rem;
  color: #312f37;
  opacity: 0.7;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-socials {
  display: flex;
  gap: 0.65rem;
}

.footer-socials a {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(49, 47, 55, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #312f37;
  text-decoration: none;
  transition: background 0.2s;
}

.footer-socials a:hover {
  background: rgba(49, 47, 55, 0.22);
}

.footer-divider {
  height: 1px;
  background: rgba(49, 47, 55, 0.15);
  margin: 2.5rem 0 1.25rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #312f37;
  opacity: 0.6;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-a11y-link {
  display: none;
  background: rgba(49, 47, 55, 0.1);
  border: none;
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #312f37;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.footer-a11y-link:hover {
  background: rgba(49, 47, 55, 0.18);
}

@media (max-width: 768px) {
  .footer-a11y-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
  }
}

.footer-mobile-links {
  display: none;
}

.footer-mobile-links a {
  text-decoration: none;
  color: #312f37;
  opacity: 0.65;
  font-size: 0.72rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.footer-mobile-links a:hover {
  opacity: 1;
}

.footer-mobile-sep {
  opacity: 0.35;
  font-size: 0.72rem;
}

/* ── DECORATIVE BG ── */
.decorative-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.decorative-bg svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── A11Y WIDGET ── */
#a11y-fab {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 56px;
  background: #312f37;
  color: #f7f1ec;
  border: none;
  border-radius: 0 14px 14px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 2px 4px 20px rgba(49, 47, 55, 0.22);
  transition: background 0.2s, width 0.25s ease;
  overflow: hidden;
}

#a11y-fab:hover {
  background: #1a1820;
}

#a11y-fab.collapsed {
  width: 20px;
}

#a11y-fab .a11y-arrow {
  display: none;
  font-size: 0.9rem;
}

#a11y-fab.collapsed .a11y-arrow {
  display: flex;
}

#a11y-fab.collapsed .a11y-icon {
  display: none;
}

#a11y-fab .a11y-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 10px;
  height: 10px;
  background: #4ade80;
  border-radius: 50%;
  border: 2px solid #312f37;
  display: none;
}

#a11y-fab .a11y-dot.show {
  display: block;
}

#a11y-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

#a11y-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

#a11y-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: #fff;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  direction: rtl;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 4px 0 40px rgba(49, 47, 55, 0.18);
}

#a11y-panel.open {
  transform: translateX(0);
}

.a11y-header {
  flex-shrink: 0;
  background: #312f37;
  color: #f7f1ec;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.a11y-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.a11y-header h2 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: #f7f1ec;
}

.a11y-header p {
  font-size: 0.78rem;
  opacity: 0.75;
  margin: 0.1rem 0 0;
  color: #f7f1ec;
}

.a11y-close-btn {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  color: #f7f1ec;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: background 0.15s;
}

.a11y-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.a11y-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.a11y-font-card {
  background: #f7f4f1;
  border-radius: 14px;
  border: 1.5px solid #e8e0d8;
  padding: 1rem;
}

.a11y-font-card-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.a11y-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(49, 47, 55, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.a11y-font-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #312f37;
  margin: 0;
}

.a11y-font-card .sub {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0.1rem 0 0;
}

.a11y-font-btns {
  display: flex;
  gap: 0.4rem;
}

.a11y-font-btns button {
  flex: 1;
  padding: 0.55rem 0.2rem;
  background: #e8e0d8;
  border: none;
  border-radius: 9px;
  color: #312f37;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.a11y-font-btns button.fs-active,
.a11y-font-btns button:hover:not(:disabled) {
  background: #312f37;
  color: #f7f1ec;
}

.a11y-font-btns button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.a11y-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: #f7f4f1;
  border-radius: 14px;
  border: 1.5px solid #e8e0d8;
  cursor: pointer;
  text-align: right;
  transition: border-color 0.15s, background 0.15s;
}

.a11y-toggle.on {
  background: rgba(49, 47, 55, 0.05);
  border-color: #312f37;
}

.a11y-toggle:hover {
  border-color: rgba(49, 47, 55, 0.4);
}

.a11y-toggle-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(49, 47, 55, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.a11y-toggle.on .a11y-toggle-icon {
  background: #312f37;
}

.a11y-toggle-text {
  flex: 1;
}

.a11y-toggle-text h3 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #312f37;
  margin: 0;
}

.a11y-toggle-text p {
  font-size: 0.74rem;
  color: #6b7280;
  margin: 0.1rem 0 0;
}

.a11y-switch {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  flex-shrink: 0;
  background: #d1c9bf;
  transition: background 0.2s;
}

.a11y-switch.on {
  background: #312f37;
}

.a11y-switch-knob {
  position: absolute;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: left 0.2s;
  left: calc(100% - 23px);
}

.a11y-switch.on .a11y-switch-knob {
  left: 3px;
}

.a11y-reset-btn {
  width: 100%;
  padding: 0.75rem;
  background: #f0ebe4;
  border: none;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #312f37;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.15s;
  font-family: inherit;
  margin-top: 0.25rem;
}

.a11y-reset-btn:hover {
  background: #e5ddd4;
}

.a11y-statement {
  padding: 1rem;
  background: #f7f4f1;
  border-radius: 12px;
  text-align: center;
}

.a11y-statement p {
  font-size: 0.76rem;
  color: #6b7280;
  margin: 0 0 0.3rem;
  line-height: 1.6;
}

.a11y-statement small {
  font-size: 0.7rem;
  color: #9ca3af;
}

#a11y-reading-guide {
  position: fixed;
  left: 0;
  right: 0;
  height: 48px;
  pointer-events: none;
  z-index: 9998;
  border-top: 2px solid rgba(49, 47, 55, 0.2);
  border-bottom: 2px solid rgba(49, 47, 55, 0.2);
  background: rgba(49, 47, 55, 0.04);
  display: none;
}

#a11y-reading-guide.show {
  display: block;
}

.accessibility-high-contrast {
  filter: contrast(1.4) !important;
}

.accessibility-high-contrast * {
  border-color: currentColor !important;
}

.accessibility-grayscale {
  filter: grayscale(100%) !important;
}

.accessibility-high-contrast.accessibility-grayscale {
  filter: contrast(1.4) grayscale(100%) !important;
}

.accessibility-highlight-links a {
  background: yellow !important;
  color: #000 !important;
  text-decoration: underline !important;
  padding: 2px 4px !important;
}

.accessibility-readable-font,
.accessibility-readable-font * {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: 0.02em !important;
}

.accessibility-text-spacing {
  letter-spacing: 0.12em !important;
  word-spacing: 0.32em !important;
}

.accessibility-text-spacing p,
.accessibility-text-spacing li,
.accessibility-text-spacing span,
.accessibility-text-spacing div {
  line-height: 2 !important;
}

.accessibility-stop-animations *,
.accessibility-stop-animations *::before,
.accessibility-stop-animations *::after {
  animation: none !important;
  transition: none !important;
}

.accessibility-large-cursor,
.accessibility-large-cursor * {
  cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="black" stroke="white" stroke-width="1" d="M5.5 3.21V20.8l4.86-4.86h8.43L5.5 3.21z"/></svg>') 0 0, auto !important;
}

#a11y-fab,
#a11y-panel,
#a11y-panel * {
  font-size: 1rem !important;
}

/* ── BACK TO TOP ── */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  background: #312f37;
  color: #f7f1ec;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, bottom 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 16px rgba(49, 47, 55, 0.18);
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#back-to-top:hover {
  background: #1a1820;
  transform: translateY(-3px);
}

#back-to-top.lift-for-footer {
  bottom: 5.5rem;
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 10px;
  transition: background 0.15s;
  flex-shrink: 0;
}

.hamburger:hover {
  background: rgba(49, 47, 55, 0.07);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #312f37;
  border-radius: 2px;
  transition: transform 0.28s cubic-bezier(.4, 0, .2, 1), opacity 0.2s;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── MOBILE MENU ── */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s, visibility 0.28s;
}

.mobile-menu.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(49, 47, 55, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 78vw;
  max-width: 320px;
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 40px rgba(49, 47, 55, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.4, 0, .2, 1);
  overflow-y: auto;
}

.mobile-menu.open .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(49, 47, 55, 0.08);
}

.mobile-menu-head img {
  height: 44px;
  width: auto;
}

.mobile-menu-close {
  width: 36px;
  height: 36px;
  background: rgba(49, 47, 55, 0.06);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  color: #312f37;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.mobile-menu-close:hover {
  background: rgba(49, 47, 55, 0.12);
}

.mobile-links-list {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0;
  flex: 1;
}

.mobile-link {
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #312f37;
  text-decoration: none;
  border-bottom: 1px solid rgba(49, 47, 55, 0.06);
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-link:last-of-type {
  border-bottom: none;
}

.mobile-link:hover {
  background: rgba(49, 47, 55, 0.04);
  color: var(--pink);
}

.mobile-link::after {
  content: '›';
  color: rgba(49, 47, 55, 0.25);
  font-size: 1.2rem;
}

.mobile-menu-dl {
  margin: 1rem 1.25rem;
  padding: 0.9rem 1.5rem;
  background: #312f37;
  color: #f7f1ec !important;
  border-radius: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  display: block;
  transition: background 0.2s;
}

.mobile-menu-dl:hover {
  background: #1a1820;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .navbar-links {
    display: none;
  }

  .navbar {
    overflow: visible;
  }

  .navbar-inner {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    min-height: 64px;
  }

  .navbar-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .navbar-logo img {
    top: 0;
    height: 50px;
  }

  .hamburger {
    position: relative;
    z-index: 1;
  }

  #navbar-root {
    z-index: 300;
  }

  .mobile-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: auto;
    z-index: 200;
    pointer-events: none;
    opacity: 1;
  }

  .mobile-menu.open {
    pointer-events: auto;
  }

  .mobile-menu-backdrop {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(49, 47, 55, 0.18);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.25s;
  }

  .mobile-menu.open .mobile-menu-backdrop {
    opacity: 1;
  }

  .mobile-menu-panel {
    position: relative;
    right: auto;
    top: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-top: 0;
    background: rgba(247, 241, 236, 0.90);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 0 0 22px 22px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-12px) !important;
    transition: max-height 0.36s cubic-bezier(.4, 0, .2, 1), opacity 0.28s ease, transform 0.3s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 10px 30px rgba(49, 47, 55, 0.13);
  }

  .mobile-menu.open .mobile-menu-panel {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0) !important;
  }

  .mobile-menu-head {
    display: none !important;
  }

  /* Ensure hamburger is always on top and reachable */
  .hamburger {
    z-index: 1000 !important;
    position: relative;
  }

  .footer {
    padding: 3rem 2rem 1.5rem;
  }

  .footer-mascot {
    display: none;
  }

  .footer-brand {
    display: none;
  }

  .footer-col {
    display: none;
  }

  .footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem 1.5rem;
  }

  .footer-social-col {
    grid-column: 1 / -1;
    text-align: center;
  }

  .footer-col-label {
    text-align: center;
  }

  .footer-social-text {
    text-align: center;
  }

  .footer-socials {
    gap: 0.5rem;
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    align-items: center;
  }

  .footer-mobile-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.3rem 0.5rem;
    margin-bottom: 0.5rem;
  }

  .footer-mobile-links .footer-a11y-link {
    background: none;
    border-radius: 0;
    padding: 0;
    font-size: 0.72rem;
    font-weight: 500;
    color: #312f37;
    opacity: 0.65;
    transition: opacity 0.2s;
  }

  .footer-mobile-links .footer-a11y-link:hover {
    background: none;
    opacity: 1;
  }

  .footer-made-by {
    display: none;
  }

  .footer-a11y-desktop {
    display: none !important;
  }

  #a11y-fab {
    display: none;
  }
}

@media (max-width: 560px) {
  .footer {
    padding: 2.5rem 1rem 1.5rem;
    border-radius: 20px 20px 0 0;
  }
}

/* ── SPA Page Transitions ── */
#page-content {
  transition: opacity 0.2s ease;
  opacity: 1;
}