/*
 * Forextests: new test flow design (header, home hero, test cards, test page bar, footer line).
 * Loads after style.css and responsive.css. The quiz screens themselves are styled by the
 * "Quiz screens styling" WPCode snippet.
 */

:root {
  --ft-navy: #0B2D5C;
  --ft-blue: #0B4EA2;
  --ft-green: #00B37E;
  --ft-green-hover: #00A070;
  --ft-green-soft: #E3F5EE;
  --ft-green-text: #00684A;
  --ft-bg: #F4F7FB;
  --ft-row: #F1F5FA;
  --ft-line: #E3EAF3;
  --ft-line-strong: #C9D4E3;
  --ft-muted: #4F607A;
}

body {
  background: var(--ft-bg);
  color: var(--ft-navy);
}

.ft-header,
.ft-hero,
.ft-tests,
.ft-test-bar,
.ft-leaderboard {
  font-family: "Poppins", sans-serif;
}

/* ---------- Shared pieces ---------- */
.ft-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ft-green);
  color: var(--ft-navy) !important;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}
.ft-pill:hover,
.ft-pill:focus-visible {
  background: var(--ft-green-hover);
  color: var(--ft-navy) !important;
}
.ft-pill--lg {
  padding: 18px 32px;
  font-size: 16px;
  letter-spacing: 0.08em;
}

.ft-link {
  color: var(--ft-blue);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 4px;
}
.ft-link:hover {
  color: var(--ft-navy);
}

.ft-badge {
  display: inline-block;
  align-self: flex-start;
  background: var(--ft-green-soft);
  color: var(--ft-green-text);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ft-kicker {
  display: block;
  margin: 0;
  color: var(--ft-blue);
  font-family: "Poppins", sans-serif;
  font-size: 12px !important;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ft-kicker--muted {
  color: var(--ft-muted);
}

/* Arabic lines (Modern Standard Arabic), shown under the English headline */
.ft-ar {
  margin: 0;
  font-family: "Cairo", sans-serif;
  font-weight: 800;
  color: #00875F;
  direction: rtl;
  text-align: right;
}
.ft-hero__ar {
  font-size: 34px;
  line-height: 1.3;
}
.ft-tests__ar {
  font-size: 24px;
  line-height: 1.3;
}

/* ---------- Header ---------- */
header.header.ft-header {
  position: relative;
  z-index: 100;
  padding: 0;
  background: #FFFFFF;
  border-bottom: 1px solid var(--ft-line);
  box-shadow: none;
}
.ft-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}
.ft-header__logo img {
  display: block;
  width: 130px;
  height: auto;
}
.ft-header__nav {
  flex: 1;
  display: flex;
  justify-content: center;
}
.ft-header__menu {
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ft-header__menu li {
  margin: 0;
}
.ft-header__menu a {
  color: var(--ft-navy);
  font-size: 15px;
  font-weight: 500;
}
.ft-header__menu a:hover,
.ft-header__menu .current-menu-item > a {
  color: var(--ft-green-text);
}
.ft-header__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.ft-hello {
  color: var(--ft-navy);
  font-size: 15px;
  font-weight: 600;
}
.ft-hello:hover {
  color: var(--ft-green-text);
}

/* ---------- Home hero ---------- */
.ft-hero {
  padding: 48px 0 24px;
}
.ft-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.ft-hero__content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ft-hero__title {
  margin: 0;
  color: var(--ft-navy);
  font-size: 56px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.ft-hero__meta {
  margin: 0;
  color: var(--ft-muted);
  font-size: 17px;
  line-height: 1.5;
}
.ft-hero__content .ft-pill {
  align-self: flex-start;
  margin-top: 8px;
}

.ft-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  background: #FFFFFF;
  border: 1px solid var(--ft-line);
  border-radius: 20px;
}
.ft-board__title {
  margin: 0;
  color: var(--ft-navy);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}
.ft-board__sub {
  margin: 0;
  color: var(--ft-muted);
  font-size: 14px;
}
.ft-board__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.ft-board__list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  background: var(--ft-row);
  border-radius: 10px;
  color: var(--ft-navy);
  font-size: 14px;
  font-weight: 600;
}
.ft-board__list li.is-empty {
  color: var(--ft-muted);
  font-weight: 400;
}
.ft-board__link {
  color: var(--ft-blue);
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Test cards (home + /quiz-list/) ---------- */
.ft-tests {
  padding: 24px 0 48px;
  background: transparent;
}
.ft-tests--page {
  padding-top: 48px;
}
.ft-tests--page .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ft-tests__heading {
  margin: 0;
  color: var(--ft-navy);
  font-size: 44px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.ft-tests__intro {
  margin: 8px 0 0;
  color: var(--ft-muted);
  font-size: 15px;
}
.ft-tests__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 16px;
}
.ft-test-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
  background: #FFFFFF;
  border: 1px solid var(--ft-line);
  border-radius: 16px;
}
.ft-test-card__title {
  margin: 0 0 6px;
  color: var(--ft-navy);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}
.ft-test-card__meta {
  margin: 0;
  color: var(--ft-muted);
  font-size: 14px;
}
.ft-test-card .ft-pill {
  margin-top: auto;
}

/* ---------- Test page bar ---------- */
.ft-test-bar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--ft-line);
}
.ft-test-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}
.ft-test-bar__title {
  margin: 0;
  color: var(--ft-navy);
  font-size: 17px !important;
  font-weight: 700;
  line-height: 1.3;
}
.ft-test-bar__note {
  color: var(--ft-muted);
  font-size: 13px;
}

/* ---------- Leaderboard section + footer line ---------- */
.ft-leaderboard {
  padding: 48px 0;
  scroll-margin-top: 20px;
}
.ft-disclaimer-line {
  margin: 0 0 6px;
  opacity: 0.8;
}

/* ---------- Tablet and mobile ---------- */
@media (max-width: 992px) {
  .ft-header__nav,
  .ft-header__actions {
    display: none;
  }
  .ft-header__inner {
    min-height: 64px;
  }
  .ft-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .ft-hero__title {
    font-size: 40px;
  }
  .ft-tests__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .ft-test-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
  }
  .ft-test-card__title {
    font-size: 15px;
    margin-bottom: 2px;
  }
  .ft-test-card__meta {
    font-size: 12px;
  }
  .ft-test-card .ft-pill {
    margin-top: 0;
    padding: 12px 16px;
    font-size: 13px;
    letter-spacing: 0.04em;
  }
}

@media (max-width: 600px) {
  .ft-hero {
    padding-top: 22px;
  }
  .ft-hero__title {
    font-size: 30px;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }
  .ft-hero__meta {
    font-size: 13px;
  }
  .ft-badge {
    font-size: 11px;
    padding: 7px 12px;
  }
  .ft-hero__content .ft-pill {
    align-self: stretch;
  }
  .ft-board {
    padding: 16px;
    border-radius: 14px;
  }
  .ft-board__title {
    font-size: 15px;
  }
  .ft-board__sub {
    font-size: 12px;
  }
  .ft-tests__heading {
    font-size: 28px;
  }
  .ft-hero__ar {
    font-size: 21px;
  }
  .ft-tests__ar {
    font-size: 19px;
  }
}
