/* ==========================================================================
   Level x Subject pages (the 16 pages such as "GCSE Maths", "Nat 5 Physics").
   Design ported from gradeleap-gcse-maths.html.

   Every class is prefixed "gl-" and every variable "--gl-" so nothing here
   can clash with style.css. The header and footer are NOT styled here: they
   come from the shared includes and use the normal site stylesheet.
   ========================================================================== */

.gl-main{
  --gl-navy:#0B3B2E;
  --gl-teal:#0B3B2E;
  --gl-teal-light:#DFF3E4;
  --gl-teal-dark:#082B21;
  --gl-g50:#FAFBFC;
  --gl-g100:#F5F6F8;
  --gl-g200:#E8EAED;
  --gl-g400:#9AA0AB;
  --gl-g600:#5F6778;
  --gl-g800:#2D3341;
  --gl-card:#fff;
  --gl-soft:#EEF7F0;
  --gl-fd:'Fraunces',Georgia,serif;
  --gl-fb:'DM Sans',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  --gl-fn:'Space Grotesk','DM Sans',sans-serif;
  --gl-sh:0 4px 18px rgba(10,26,27,.08);
  --gl-r:14px;
  --gl-rl:20px;

  background:var(--gl-g100);
  color:var(--gl-g800);
  font-family:var(--gl-fb);
  line-height:1.6;
  padding:20px 0 8px;
}
/* grey page background runs straight into the footer (no white gap) */
.gl-main + footer{margin-top:0}

/* zero-specificity reset, so any class below (or the editor) always wins */
:where(.gl-sec) :is(h1,h2,h3,p,ul,figure){margin:0;padding:0}
:where(.gl-sec) :is(h1,h2,h3){font-family:var(--gl-fd);font-weight:700;letter-spacing:normal;line-height:1.6}

.gl-wrap{max-width:1440px;margin:0 auto;padding:0 20px}

/* ---------- card shell ---------- */
.gl-card{
  background:var(--gl-card);
  border:1px solid var(--gl-g200);
  border-radius:var(--gl-rl);
  box-shadow:0 4px 18px rgba(10,26,27,.08),0 1px 3px rgba(10,26,27,.04);
  margin-bottom:22px;
  overflow:hidden;
}
.gl-pi{padding:52px 44px}
.gl-alt{background:var(--gl-g50)}

/* ---------- section headings ---------- */
.gl-sec-head{text-align:center;max-width:820px;margin:0 auto 40px}
.gl-t-sec{font-size:28px;line-height:1.25;color:var(--gl-navy);margin-bottom:10px;position:relative;padding-bottom:14px}
.gl-t-sec:after{content:'';display:block;width:48px;height:3px;border-radius:3px;background:var(--gl-teal);margin:12px auto 0}
.gl-t-sub{font-size:15.5px;color:var(--gl-g600);max-width:680px;margin:0 auto}

/* ---------- badge ---------- */
.gl-badge{
  display:inline-flex;align-items:center;gap:7px;
  background:var(--gl-soft);color:var(--gl-teal);
  font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  padding:6px 14px;border-radius:100px;width:fit-content;
}
.gl-dot{width:7px;height:7px;border-radius:50%;background:var(--gl-teal);animation:gl-bleep .9s ease-in-out infinite;flex-shrink:0}
@keyframes gl-bleep{50%{transform:scale(1.2);opacity:.8}}

/* ---------- buttons ---------- */
.gl-btn{
  display:inline-flex;align-items:center;gap:9px;
  padding:15px 30px;border-radius:10px;
  font-size:15.5px;font-weight:600;text-decoration:none;cursor:pointer;
  border:none;transition:.25s;font-family:var(--gl-fb);
  background:var(--gl-teal);color:#fff;box-shadow:0 4px 12px rgba(11,59,46,.22);
}
.gl-btn:hover{background:var(--gl-teal-dark);transform:translateY(-2px)}

/* ---------- hero ---------- */
.gl-hero{display:grid;grid-template-columns:1fr 1fr;min-height:500px}
.gl-hc{padding:52px 44px;display:flex;flex-direction:column;justify-content:center}
.gl-hc h1{font-size:36px;color:var(--gl-navy);line-height:1.2;margin:16px 0 18px}
.gl-hc h1 em{color:var(--gl-teal);font-style:normal}
.gl-lead{font-size:15.5px;color:var(--gl-g600);max-width:500px;margin-bottom:14px}

.gl-pts{list-style:none;margin:6px 0 18px;max-width:500px}
.gl-pts li{font-size:14.5px;color:var(--gl-g800);padding:8px 0 8px 32px;position:relative;border-bottom:1px solid var(--gl-g200)}
.gl-pts li:last-child{border:0}
.gl-pts li:before{
  content:'✓';position:absolute;left:0;top:8px;width:20px;height:20px;
  background:var(--gl-teal-light);color:var(--gl-teal);border-radius:50%;
  font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;
}

.gl-mini{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;max-width:500px;margin:0 0 22px}
.gl-mini > div{
  background:linear-gradient(135deg,var(--gl-g50),var(--gl-soft));
  border:1px solid var(--gl-g200);border-radius:var(--gl-r);
  padding:16px 10px;text-align:center;
}
.gl-mini b{display:block;font-family:var(--gl-fn);font-size:26px;color:var(--gl-teal);line-height:1}
.gl-mini span{display:block;font-size:12px;color:var(--gl-g600);margin-top:6px}

.gl-cred{
  background:linear-gradient(135deg,var(--gl-g50),var(--gl-soft));
  border-left:3px solid var(--gl-teal);
  border-radius:0 var(--gl-r) var(--gl-r) 0;
  padding:13px 17px;font-size:13.5px;margin:10px 0 22px;max-width:500px;
}
.gl-cred strong{color:var(--gl-navy)}
.gl-ctas{display:flex;gap:14px;flex-wrap:wrap;align-items:center}

/* hero right-hand side: Google rating + 3 images */
.gl-hi{
  background:linear-gradient(135deg,var(--gl-g50),var(--gl-soft));
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:32px 24px;
}
.gl-revs{width:100%;max-width:400px;display:flex;flex-direction:column;gap:11px}
.gl-rh{
  display:flex;gap:12px;justify-content:center;align-items:center;
  margin-bottom:4px;font-size:12px;font-weight:600;color:var(--gl-g600);
}
.gl-stars{color:#FBBC04;font-size:13px;letter-spacing:2px}
.gl-rimg{
  position:relative;height:238px;overflow:hidden;
  background:var(--gl-card);border:1px solid var(--gl-g200);
  border-radius:var(--gl-r);box-shadow:0 4px 18px rgba(10,26,27,.08);
}
.gl-rimg img{width:100%;height:100%;object-fit:cover;display:block;border-radius:calc(var(--gl-r) - 1px)}

/* trust bar */
.gl-trust{
  display:flex;justify-content:center;gap:40px;padding:20px 28px;
  background:var(--gl-g50);border-top:1px solid var(--gl-g200);
  flex-wrap:wrap;font-size:13px;color:var(--gl-g600);font-weight:500;
}
.gl-trust i{
  display:inline-flex;width:20px;height:20px;background:var(--gl-teal);color:#fff;
  border-radius:50%;align-items:center;justify-content:center;
  font-size:10px;font-style:normal;margin-right:8px;
}

/* ---------- feature cards ---------- */
.gl-fg{display:grid;grid-template-columns:1fr 1fr;gap:22px;max-width:980px;margin:0 auto}
.gl-feat{
  background:var(--gl-card);border:1px solid var(--gl-g200);border-radius:var(--gl-r);
  box-shadow:0 4px 18px rgba(10,26,27,.08);
  padding:26px;display:flex;gap:16px;align-items:flex-start;
}
.gl-fi{width:42px;height:42px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:19px;flex-shrink:0}
.gl-feat h3{font-family:var(--gl-fb);font-size:15.5px;color:var(--gl-navy);margin-bottom:5px;line-height:1.6}
.gl-feat p{font-size:13.5px;color:var(--gl-g600)}

/* ---------- topic image gallery (add / remove images in edit mode) ---------- */
.gl-gal{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;max-width:1000px;margin:0 auto}
.gl-gal figure{
  margin:0;background:var(--gl-card);border:1px solid var(--gl-g200);
  border-radius:var(--gl-r);box-shadow:0 4px 18px rgba(10,26,27,.08);overflow:hidden;
}
.gl-im{position:relative;aspect-ratio:4/3;background:var(--gl-teal-light);overflow:hidden}
.gl-im img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;border-radius:calc(var(--gl-r) - 1px)}
/* the "+ Add image" tile takes the same shape as an image */
.gl-gal .repeat-add-btn{aspect-ratio:4/3;min-height:0;padding:1rem;border-radius:var(--gl-r);font-size:.95rem}
/* make the red remove button easy to hit on top of an image */
.gl-gal .repeat-delete-btn{top:8px;right:8px}

/* ---------- closing CTA ---------- */
.gl-cta{text-align:center;padding:60px 44px;background:linear-gradient(135deg,#0B3B2E,#14573F);color:#fff}
.gl-cta h2{font-size:30px;margin-bottom:12px;color:#fff;line-height:1.6}
.gl-cta p{opacity:.82;max-width:580px;margin:0 auto 30px}
.gl-cta .gl-btn{background:#fff;color:#0B3B2E}
.gl-tpts{margin-top:22px;display:flex;gap:28px;justify-content:center;font-size:13px;opacity:.75;flex-wrap:wrap}

/* ---------- sticky "free assessment" bar (appears after the hero) ---------- */
.gl-sticky{
  position:fixed;bottom:0;left:0;right:0;z-index:999;
  background:var(--gl-card);border-top:1px solid var(--gl-g200);
  box-shadow:0 -4px 20px rgba(0,0,0,.08);
  padding:12px 20px calc(12px + env(safe-area-inset-bottom,0px));
  display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap;
  transform:translateY(100%);transition:transform .4s;
  font-family:var(--gl-fb);
}
.gl-sticky.show{transform:none}
.gl-sticky .gl-st{font-size:14px;font-weight:600;color:var(--gl-navy)}
.gl-sticky .gl-sb{
  background:var(--gl-teal);color:#fff;padding:11px 24px;border-radius:8px;
  font-size:13px;font-weight:600;text-decoration:none;
}
/* lift the WhatsApp bubble so it never sits on top of the bar */
body.gl-bar-on .wa-btn{bottom:86px;transition:bottom .4s}
/* while editing, the bar is a normal block so its text can be edited */
body.editing .gl-sticky{position:static;transform:none;box-shadow:none}
body.editing.gl-bar-on .wa-btn{bottom:24px}

/* ---------- responsive ---------- */
@media(max-width:880px){
  .gl-hero,.gl-fg{grid-template-columns:1fr}
  .gl-hc,.gl-pi{padding:32px 20px}
  .gl-hc h1{font-size:28px}
  .gl-gal{grid-template-columns:1fr 1fr}
  .gl-cta{padding:44px 20px}
}
@media(max-width:520px){
  .gl-wrap{padding:0 12px}
  .gl-mini b{font-size:20px}
  .gl-trust{gap:14px 24px}
  .gl-gal{gap:12px}
}
