:root {
  --brand: #27a89b;
  --accent: #d8ebe9;
  --primary: #2b6adf;
  --primary-hover: #1f4fa5;
  --surface: #ffffff;
  --page: #f1f1f1;
  --text: #17202a;
  --muted: #5f6b76;
  --focus: #ffbf47;
  --radius: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--brand);
  color: var(--text);
  font-family: "Tajawal", Arial, sans-serif;
}

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

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: #000;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.account-bar {
  display: flex;
  min-height: 48px;
  padding: 8px 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #fff;
  color: #17202a;
  font-family: "Tajawal", Arial, sans-serif;
  font-size: 0.95rem;
}
.account-bar form { margin: 0; }
.account-bar a { color: #174ea6; font-weight: 700; text-decoration: none; }
.account-bar bdi { font-weight: 700; }
.account-bar button {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

@media (max-width: 600px) {
  .account-bar {
    padding: 8px 10px;
    gap: 6px;
    font-size: 0.78rem;
  }

  .account-bar button,
  .account-bar a[href="admin-users.php"] {
    padding: 6px 10px !important;
    font-size: 0.78rem !important;
    min-height: auto !important;
  }
}

/* ===== Shared site header and navigation (matches games.css) ===== */

.scroll-left {
  min-height: 30px;
  overflow: hidden;
  position: relative;
  background: var(--brand);
}

.scroll-left p {
  min-width: max-content;
  margin: 0;
  padding-inline: 1rem;
  color: #fff;
  line-height: 30px;
  text-align: center;
  animation: marquee 35s linear infinite;
}

.scroll-left .fa,
#logo .fa {
  display: inline-block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  line-height: 1;
}

.scroll-left .fa {
  margin-inline: 4px;
  color: red;
}

@keyframes marquee {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

#logo {
  width: 100%;
  padding: 8px 16px;
  background: var(--accent);
  text-align: center;
}

#logo h1 {
  margin: 0;
  color: #050505;
  font-family: "Tajawal", Arial, sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.7rem);
  font-weight: 800;
  line-height: 1.4;
}

.pich {
  width: 100%;
  padding: 0;
}

.pich img {
  display: block;
  width: 100%;
  height: auto;
}

.section-inner {
  width: min(100% - 32px, 1100px);
  margin-inline: auto;
}

.nav {
  width: 100%;
  background: var(--brand);
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav li {
  margin: 0;
}

.nav a {
  display: flex;
  min-height: 54px;
  padding: 6px 10px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #050505;
  font-family: "Tajawal", Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.nav a .fa {
  display: inline-block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 17px;
  line-height: 1;
}

.nav a.active,
.nav a[aria-current="page"] {
  background: var(--accent);
  color: #050505;
}

.nav a:hover:not(.active) {
  color: #ffd18e;
}

@media (max-width: 600px) {
  .section-inner {
    width: min(100% - 20px, 1100px);
  }

  .nav ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
  }

  .nav li {
    border: 1px solid rgba(255, 255, 255, 0.15);
  }

  .nav a {
    min-height: 48px;
    padding: 6px 4px;
    gap: 6px;
    font-size: 0.82rem;
    white-space: normal;
    line-height: 1.3;
  }

  .nav a .fa {
    font-size: 16px;
  }
}

/* ===== End shared site header and navigation ===== */

.gg {
  min-height: 60vh;
  background: var(--page);
}

.main {
  width: min(100% - 32px, 1100px);
  margin-inline: auto;
  padding-block: 24px 48px;
}

.main h2 {
  margin-bottom: 14px;
  color: #0f2a4a;
  text-align: center;
  font-weight: 900;
}

.section-intro {
  max-width: 820px;
  margin: 18px auto 34px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.9;
  text-align: center;
}

/* ===== أنواع صعوبات التعلّم ===== */

.domain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 900px) {
  .domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .domain-grid {
    grid-template-columns: 1fr;
  }
}

.domain-card {
  border: 1px solid #e4e7eb;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 16px rgb(0 0 0 / 7%);
  padding: 24px 22px;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.domain-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgb(0 0 0 / 12%);
}

.domain-card .num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent);
  color: #0f2a4a;
  font-weight: 800;
  font-size: 17px;
}

.domain-card h3 {
  margin-bottom: 8px;
  color: #0f2a4a;
  font-size: 18px;
}

.domain-card p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.8;
}

/* ===== شريط أداة الرصد ISOF ===== */

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding: 30px 28px;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
}

.cta-band .cta-text {
  flex: 1 1 320px;
}

.cta-band h3 {
  margin-bottom: 8px;
  font-size: 1.3rem;
}

.cta-band p {
  margin: 0;
  max-width: 60ch;
  color: #eaf7f5;
  font-size: 0.95rem;
  line-height: 1.8;
}

.cta-band .button {
  display: inline-flex;
  min-height: 54px;
  padding: 10px 26px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgb(0 0 0 / 15%);
  transition: transform 160ms ease, background-color 160ms ease;
}

.cta-band .button:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .cta-band {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== نصائح للأهل والمعلمين ===== */

.tips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}

@media (max-width: 760px) {
  .tips-grid {
    grid-template-columns: 1fr;
  }
}

.tips-card {
  border: 1px solid #e4e7eb;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 16px rgb(0 0 0 / 7%);
  padding: 26px 24px;
}

.tips-card h3 {
  margin-bottom: 14px;
  color: #0f2a4a;
  font-size: 1.2rem;
}

.tips-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tips-card li {
  position: relative;
  margin-bottom: 10px;
  padding-inline-start: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.tips-card li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* ===== أسئلة شائعة ===== */

.faq-list {
  max-width: 900px;
  margin: 32px auto 0;
}

.faq-item {
  margin-bottom: 12px;
  border: 1px solid #e4e7eb;
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.faq-q {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: 0;
  background: none;
  color: #0f2a4a;
  font: inherit;
  font-weight: 700;
  text-align: right;
  cursor: pointer;
}

.faq-q .icon {
  font-size: 20px;
  color: var(--primary);
  transition: transform 200ms ease;
}

.faq-q[aria-expanded="true"] .icon {
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  padding: 0 18px;
  transition: max-height 250ms ease;
}

.faq-a p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.8;
}

a:focus-visible,
button:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
}

/* ===== Footer (matches games.css) ===== */

.footer {
  padding: 20px 0;
  background: var(--brand);
  color: #fff;
  text-align: center;
}

.footer p {
  margin-bottom: 8px;
}

.footer .fa {
  display: inline-grid;
  width: 42px;
  height: 42px;
  margin: 5px 2px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  text-decoration: none;
}

.fa-facebook { background: #3b5998; }
.fa-twitter { background: #1d9bf0; }
.fa-google { background: #dd4b39; }
.fa-linkedin { background: #0077b5; }
.fa-youtube { background: #b00000; }
.fa-instagram { background: #6f2dbd; }

@media (max-width: 600px) {
  .section-inner,
  .main {
    width: min(100% - 20px, 1100px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll-left p {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
