:root {
  --fc-ink: #172033;
  --fc-muted: #667085;
  --fc-line: rgba(31, 41, 55, 0.1);
  --fc-primary: #7357ff;
  --fc-secondary: #1dc9a4;
  --fc-bg: #f7f8fc;
  --fc-card: #fff;
  --fc-shadow: 0 18px 50px rgba(40, 35, 94, 0.11);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body.foundation-collection {
  margin: 0;
  min-height: 100vh;
  font-family: "Cairo", sans-serif;
  color: var(--fc-ink);
  background:
    radial-gradient(
      circle at 8% 12%,
      rgba(115, 87, 255, 0.13),
      transparent 24rem
    ),
    radial-gradient(
      circle at 90% 18%,
      rgba(29, 201, 164, 0.13),
      transparent 22rem
    ),
    var(--fc-bg);
}
a {
  color: inherit;
}
.fc-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 248, 252, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--fc-line);
}
.fc-container {
  width: min(1160px, calc(100% - 32px));
  margin: auto;
}
.fc-nav-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.fc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
}
.fc-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--fc-primary), #b45aff);
  box-shadow: 0 10px 25px rgba(115, 87, 255, 0.28);
}
.fc-actions {
  display: flex;
  gap: 9px;
  align-items: center;
}
.fc-link {
  padding: 10px 15px;
  border-radius: 13px;
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 800;
  border: 1px solid var(--fc-line);
  background: rgba(255, 255, 255, 0.7);
}
.fc-link.primary {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, var(--fc-primary), #a44cff);
}
.fc-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  padding: 48px 0 28px;
}
.fc-hero-main,
.fc-hero-side {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--fc-shadow);
}
.fc-hero-main {
  padding: clamp(28px, 5vw, 58px);
  color: #fff;
  background: linear-gradient(135deg, #33208f, #7357ff 55%, #b04ef4);
}
.fc-hero-main:after {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  left: -120px;
  bottom: -180px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
}
.fc-eyebrow {
  display: inline-flex;
  padding: 7px 13px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 0.78rem;
  font-weight: 800;
}
.fc-hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.25;
  margin: 18px 0 14px;
}
.fc-hero h1 span {
  color: #ffe27a;
}
.fc-hero p {
  position: relative;
  z-index: 1;
  max-width: 650px;
  line-height: 2;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.86);
}
.fc-hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
  position: relative;
  z-index: 1;
}
.fc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 17px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 900;
  font-size: 0.86rem;
}
.fc-btn.light {
  color: #33208f;
  background: #fff;
}
.fc-btn.ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
}
.fc-hero-side {
  padding: 26px;
  background: #fff;
}
.fc-side-label {
  color: var(--fc-primary);
  font-size: 0.78rem;
  font-weight: 900;
}
.fc-hero-side h2 {
  font-size: 1.55rem;
  margin: 10px 0 18px;
}
.fc-road {
  display: grid;
  gap: 10px;
}
.fc-road-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 17px;
  background: #f5f4ff;
}
.fc-road-item b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #fff;
  background: var(--fc-primary);
  font-size: 0.78rem;
}
.fc-road-item span {
  font-weight: 800;
  font-size: 0.86rem;
}
.fc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 22px 0 15px;
}
.fc-toolbar h2 {
  margin: 0;
  font-size: 1.55rem;
}
.fc-toolbar p {
  margin: 5px 0 0;
  color: var(--fc-muted);
  font-size: 0.83rem;
}
.fc-search {
  width: min(320px, 100%);
  padding: 13px 16px;
  border: 1px solid var(--fc-line);
  border-radius: 14px;
  background: #fff;
  outline: 0;
  font-family: inherit;
}
.fc-search:focus {
  border-color: var(--fc-primary);
  box-shadow: 0 0 0 4px rgba(115, 87, 255, 0.11);
}
.fc-tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 10px;
}
.fc-tab {
  border: 1px solid var(--fc-line);
  background: #fff;
  border-radius: 99px;
  padding: 8px 14px;
  font-family: inherit;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.fc-tab.active {
  color: #fff;
  border-color: var(--fc-primary);
  background: var(--fc-primary);
}
.fc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 15px;
  margin: 14px 0 44px;
}
.fc-card {
  position: relative;
  padding: 21px;
  border: 1px solid var(--fc-line);
  border-radius: 23px;
  background: var(--fc-card);
  box-shadow: 0 8px 22px rgba(30, 30, 70, 0.04);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.fc-card:hover {
  transform: translateY(-5px);
  border-color: rgba(115, 87, 255, 0.35);
  box-shadow: var(--fc-shadow);
}
.fc-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.fc-number {
  color: var(--fc-primary);
  font-weight: 900;
  font-size: 0.78rem;
}
.fc-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--fc-primary), #b45aff);
  font-size: 1.25rem;
}
.fc-card h3 {
  margin: 17px 0 6px;
  font-size: 1.08rem;
}
.fc-card p {
  min-height: 48px;
  margin: 0 0 16px;
  color: var(--fc-muted);
  font-size: 0.82rem;
  line-height: 1.8;
}
.fc-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--fc-muted);
  font-size: 0.73rem;
  font-weight: 800;
}
.fc-start {
  border: 0;
  border-radius: 11px;
  padding: 9px 12px;
  color: #fff;
  background: var(--fc-ink);
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}
.fc-empty {
  display: none;
  text-align: center;
  padding: 40px;
  color: var(--fc-muted);
}
.fc-empty.show {
  display: block;
}
.fc-footer {
  padding: 25px 0 40px;
  color: var(--fc-muted);
  font-size: 0.8rem;
}
.fc-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}
.fc-modal.hidden {
  display: none;
}
.fc-dialog {
  width: min(410px, 100%);
  padding: 28px;
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
  text-align: center;
}
.fc-dialog-icon {
  font-size: 2rem;
}
.fc-dialog h3 {
  margin: 10px 0 4px;
}
.fc-dialog p {
  color: var(--fc-muted);
  font-size: 0.82rem;
}
.fc-code {
  width: 100%;
  padding: 14px;
  border: 2px solid #edf0f5;
  border-radius: 14px;
  text-align: center;
  font: 900 1.3rem Cairo;
  outline: 0;
}
.fc-code:focus {
  border-color: var(--fc-primary);
}
.fc-dialog-actions {
  display: flex;
  gap: 9px;
  margin-top: 14px;
}
.fc-dialog-actions button {
  flex: 1;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}
.fc-confirm {
  color: #fff;
  background: var(--fc-primary);
}
.fc-cancel {
  color: #fff;
  background: #252a36;
}
.theme-toggle-btn {
  position: fixed !important;
  bottom: 24px !important;
  left: 24px !important;
  width: 52px !important;
  height: 52px !important;
  border: 0 !important;
  border-radius: 50% !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--fc-primary), #b45aff) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16) !important;
  cursor: pointer;
  z-index: 25;
}
body.dark-mode.foundation-collection {
  --fc-bg: #0e1424;
  --fc-ink: #f3f5fa;
  --fc-muted: #a5aec0;
  --fc-card: #182237;
  --fc-line: rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(
      circle at 8% 12%,
      rgba(115, 87, 255, 0.18),
      transparent 24rem
    ),
    var(--fc-bg);
}
body.dark-mode .fc-nav {
  background: rgba(14, 20, 36, 0.82);
}
body.dark-mode .fc-hero-side,
body.dark-mode .fc-card,
body.dark-mode .fc-search,
body.dark-mode .fc-tab,
body.dark-mode .fc-dialog {
  background: var(--fc-card);
  color: var(--fc-ink);
}
body.dark-mode .fc-road-item {
  background: #202b45;
}
body.dark-mode .fc-code {
  background: #0e1424;
  color: #fff;
  border-color: #33405a;
}
@media (max-width: 780px) {
  .fc-nav-inner,
  .fc-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .fc-actions {
    flex-wrap: wrap;
  }
  .fc-hero {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }
  .fc-hero-side {
    display: none;
  }
  .fc-toolbar {
    gap: 12px;
  }
  .fc-search {
    width: 100%;
  }
  .fc-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.fc-card-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.fc-explain {
  padding: 8px 10px;
  border: 1px solid rgba(115, 87, 255, 0.2);
  border-radius: 10px;
  color: var(--fc-primary);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 900;
}
.fc-explain:hover {
  background: rgba(115, 87, 255, 0.08);
}

/* Dark mode overrides for the collection pages: keep the hero accent and readable controls. */
body.dark-mode.foundation-collection .fc-hero-main {
  background: linear-gradient(135deg, #2b1b78, #5a43c7 55%, #8b3fc1) !important;
  color: #fff !important;
}
body.dark-mode.foundation-collection .fc-hero-main p {
  color: rgba(255, 255, 255, 0.88) !important;
}
body.dark-mode.foundation-collection .fc-hero-side {
  background: #182237 !important;
  color: var(--fc-ink) !important;
  border: 1px solid var(--fc-line);
}
body.dark-mode.foundation-collection .fc-link {
  background: #182237 !important;
  color: var(--fc-ink) !important;
  border-color: #33405a !important;
}
body.dark-mode.foundation-collection .fc-link.primary {
  background: linear-gradient(135deg, var(--fc-primary), #a44cff) !important;
  color: #fff !important;
  border-color: transparent !important;
}
body.dark-mode.foundation-collection .fc-search {
  background: #0e1424 !important;
  color: var(--fc-ink) !important;
  border-color: #33405a !important;
}
body.dark-mode.foundation-collection .fc-search::placeholder {
  color: #8894aa !important;
}
body.dark-mode.foundation-collection .fc-tab {
  background: #182237 !important;
  color: var(--fc-muted) !important;
  border-color: #33405a !important;
}
body.dark-mode.foundation-collection .fc-tab.active {
  background: var(--fc-primary) !important;
  color: #fff !important;
  border-color: var(--fc-primary) !important;
}
body.dark-mode.foundation-collection .fc-card {
  background: #182237 !important;
  color: var(--fc-ink) !important;
  border-color: #33405a !important;
}
body.dark-mode.foundation-collection .fc-card h3 {
  color: #f3f5fa !important;
}
body.dark-mode.foundation-collection .fc-card p {
  color: #a5aec0 !important;
}
body.dark-mode.foundation-collection .fc-start {
  background: #f3f5fa !important;
  color: #182237 !important;
}
body.dark-mode.foundation-collection .fc-explain {
  color: #b9adff !important;
  border-color: rgba(185, 173, 255, 0.45) !important;
}
body.dark-mode.foundation-collection .fc-footer,
body.dark-mode.foundation-collection .fc-footer a {
  color: #a5aec0 !important;
}
body.dark-mode.foundation-collection .fc-dialog {
  background: #182237 !important;
  color: #f3f5fa !important;
  border: 1px solid #33405a;
}
body.dark-mode.foundation-collection .fc-dialog p {
  color: #a5aec0 !important;
}
body.dark-mode.foundation-collection .fc-code {
  background: #0e1424 !important;
  color: #f3f5fa !important;
  border-color: #33405a !important;
}
body.dark-mode.foundation-collection .fc-code::placeholder {
  color: #8894aa !important;
}

.fc-skill-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin-bottom: 14px;
  padding: 6px 10px;
  border: 1px solid rgba(115, 87, 255, 0.18);
  border-radius: 999px;
  color: var(--fc-primary);
  background: rgba(115, 87, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 900;
}
.fc-skill-badge::before {
  content: "مهارة";
  margin-left: 5px;
  opacity: 0.65;
  font-size: 0.65rem;
}
body.dark-mode.foundation-collection .fc-skill-badge {
  color: #c4baff;
  background: rgba(115, 87, 255, 0.18);
  border-color: rgba(196, 186, 255, 0.3);
}

.fc-coming {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px dashed rgba(102, 112, 133, 0.35);
  border-radius: 10px;
  color: var(--fc-muted);
  font-size: 0.7rem;
  font-weight: 800;
}

body.dark-mode.foundation-collection .fc-coming {
  border-color: #52617c;
  color: #a5aec0;
}

.fc-chapter-label {
  min-height: 34px;
  margin: -4px 0 14px;
  color: var(--fc-muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.6;
}

body.dark-mode.foundation-collection .fc-chapter-label {
  color: #a5aec0;
}
