/* =========================================================
   Chemistry@BGS — A Level landing page prototype
   v4: simplified grouped layout
   ========================================================= */

.alevel-page {
  --alevel-red: #c7222a;
  --alevel-gold: #d7aa24;

  --inorganic: #276f86;
  --inorganic-dark: #19586c;
  --inorganic-soft: #edf6f8;
  --inorganic-line: #c8e0e6;

  --organic: #73518a;
  --organic-dark: #5c3d71;
  --organic-soft: #f6f0f8;
  --organic-line: #dfcfe6;

  background: linear-gradient(180deg, #f8f9fb 0, #ffffff 330px);
}


/* ---------- Current navigation ---------- */



/* ---------- Main shell ---------- */

.alevel-shell {
  width: min(1480px, calc(100% - 56px));
  margin: 0 auto;
  padding: 44px 0 80px;
}


/* ---------- Intro ---------- */

.alevel-intro {
  padding: 0 4px 30px;
}

.alevel-eyebrow {
  margin: 12px 0 0;

  color: var(--alevel-red);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.alevel-intro h2 {
  margin: 0;

  color: #292b2f;
  font-size: clamp(2.4rem, 4vw, 4.15rem);
  line-height: 1;
  letter-spacing: -0.04em;
}



/* ---------- A Level tools ---------- */

.alevel-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;

  margin-bottom: 28px;
}

.alevel-tool,
.alevel-tool:visited {
  display: flex;
  align-items: center;
  gap: 12px;

  min-width: 0;
  min-height: 70px;

  padding: 15px 18px;

  color: #34383e;
  background: #ffffff;

  border: 1px solid #dde2e7;
  border-radius: 14px;

  box-shadow: 0 3px 12px rgba(35, 41, 48, 0.04);

  text-decoration: none;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.alevel-tool:hover {
  transform: translateY(-2px);

  border-color: #cfd5dc;

  box-shadow: 0 7px 18px rgba(35, 41, 48, 0.08);
}

.alevel-tool__icon {
  display: grid;
  place-items: center;

  flex: 0 0 auto;

  width: 38px;
  height: 38px;

  color: #59616d;
  background: #f3f5f7;

  border-radius: 10px;

  font-size: 1.15rem;
  line-height: 1;
}

.alevel-tool__label {
  min-width: 0;

  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
}

.alevel-tool--test,
.alevel-tool--test:visited {
  color: #ffffff;
  background: var(--alevel-red);
  border-color: var(--alevel-red);
}

.alevel-tool--test .alevel-tool__icon {
  color: var(--alevel-red);
  background: #ffffff;
}

.alevel-tool--test:hover {
  color: #ffffff;
  background: #a91d24;
  border-color: #a91d24;
}


/* ---------- Year layout ---------- */


.year-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

.year-column {
  min-width: 0;

  padding: 30px;

  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e0e4e8;
  border-top: 5px solid var(--alevel-gold);
  border-radius: 22px;

  box-shadow: 0 10px 34px rgba(37, 42, 49, 0.06);
}

.year-heading {
  padding: 0 4px 24px;
}

.year-heading h3 {
  margin: 0;

  color: #2e3034;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1;
}


/* ---------- Strand panels ---------- */

.strand-panel {
  padding: 20px;

  border: 1px solid;
  border-radius: 17px;
}

.strand-panel + .strand-panel {
  margin-top: 20px;
}

.strand-panel--inorganic {
  background: var(--inorganic-soft);
  border-color: var(--inorganic-line);
}

.strand-panel--organic {
  background: var(--organic-soft);
  border-color: var(--organic-line);
}

.strand-label {
  margin: 0 0 14px;

  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.strand-panel--inorganic .strand-label {
  color: var(--inorganic-dark);
}

.strand-panel--organic .strand-label {
  color: var(--organic-dark);
}


/* ---------- Topic cards ---------- */

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

.topic-card {
  display: flex;
  align-items: center;

  min-width: 0;
  min-height: 88px;

  padding: 16px 18px;

  background: #ffffff;
  border: 1px solid rgba(30, 38, 48, 0.09);
  border-radius: 12px;

  box-shadow: 0 3px 10px rgba(24, 31, 40, 0.035);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.topic-card:hover {
  transform: translateY(-2px);

  box-shadow: 0 7px 18px rgba(24, 31, 40, 0.08);
}

.topic-card h5 {
  margin: 0;

  color: #34383e;
  font-size: 0.98rem;
  line-height: 1.34;
}


/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .alevel-shell {
    width: min(100% - 32px, 980px);
  }

  .year-grid {
    grid-template-columns: 1fr;
  }

  .topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .alevel-shell {
    width: min(100% - 24px, 720px);
    padding-top: 30px;
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .alevel-shell {
    width: calc(100% - 18px);
  }

  .year-column {
    padding: 16px;
    border-radius: 16px;
  }

  .year-heading {
    padding-bottom: 18px;
  }

  .strand-panel {
    padding: 15px;
    border-radius: 13px;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .topic-card {
    min-height: 0;
  }
}


/* ---------- A Level tools: responsive ---------- */

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

@media (max-width: 520px) {
  .alevel-tools {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .alevel-tool {
    min-height: 62px;
  }
}

/* Make A Level utility buttons more compact */
.alevel-tool,
.alevel-tool:visited {
  min-height: 58px;
  padding: 10px 14px;
  gap: 10px;
}

.alevel-tool__icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 1rem;
}

.alevel-tool__label {
  font-size: 0.94rem;
}

a.topic-card,
  a.topic-card:visited {
    color: inherit;
    text-decoration: none;
  }