/* ---------------------------------------------------------------------------
   Loans For Students — the whole site's CSS, in one file.
   Replaces 16 stylesheets (~102 KB) from Joomla, Helix3, SP Page Builder,
   K2, Bootstrap and two copies of Font Awesome.
   --------------------------------------------------------------------------- */

:root {
  --brand:      #8b2c5d;   /* header, footer, headings */
  --brand-dark: #6f2249;
  --grey:       #757575;   /* the wide footer band */
  --ink:        #333333;
  --ink-soft:   #666666;
  --line:       #e4e4e4;
  --bg-soft:    #f5f5f5;
  --white:      #ffffff;

  --wrap: 1140px;
  --font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; color: var(--brand); margin: 0 0 .6em; }
h1 { font-size: 34px; }
h2 { font-size: 27px; }
h3 { font-size: 20px; }
h4 { font-size: 17px; }
p { margin: 0 0 1.1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 55px 0; }
.section.soft { background: var(--bg-soft); }
.section.brand { background: var(--brand); color: var(--white); }
.section.brand h2, .section.brand h3 { color: var(--white); }
.section.brand a { color: var(--white); text-decoration: underline; }
.lead { font-size: 18px; }
.small { font-size: 13.5px; color: var(--ink-soft); }
.center { text-align: center; }

/* Off-screen until it takes focus, then pinned to the top-left. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--white); color: var(--brand);
  padding: 12px 20px; font-weight: 700; border: 2px solid var(--brand);
}
.skip-link:focus { left: 0; }

/* --- header ------------------------------------------------------------- */
.site-header { background: var(--brand); color: var(--white); }
.site-header .wrap {
  display: flex; align-items: center; gap: 24px;
  min-height: 92px; flex-wrap: wrap;
}
.brandmark { display: block; }
.brandmark img { height: 52px; width: auto; }

/* The burger and its checkbox are hidden on desktop and only appear below the
   breakpoint. The checkbox stays focusable rather than display:none, so the
   menu can be opened from the keyboard. */
.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.burger { display: none; }

.nav { margin-left: auto; display: flex; gap: 26px; flex-wrap: wrap; }
.nav a {
  color: var(--white); text-transform: uppercase; font-size: 13px;
  font-weight: 700; letter-spacing: .04em; padding: 6px 0;
  border-bottom: 3px solid transparent; text-decoration: none;
}
.nav a:hover { border-bottom-color: rgba(255,255,255,.55); }
.nav a.on { border-bottom-color: var(--white); }

/* --- hero --------------------------------------------------------------- */
.hero {
  background: #cfd8c8 url("../img/hero.jpg") center/cover no-repeat;
  padding: 70px 0 90px;
}
.hero-card {
  background: rgba(255, 255, 255, .88);
  padding: 34px 38px;
  max-width: 560px;
  margin-left: auto;             /* card sits right of centre, as now */
}
.hero-card h1 { margin-bottom: .35em; }
.hero-card p { font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 1.4em; }

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-block; background: var(--brand); color: var(--white);
  padding: 12px 26px; font-weight: 700; font-size: 15px; border: 0;
  border-radius: 2px; cursor: pointer; text-decoration: none;
  font-family: inherit;
}
.btn:hover { background: var(--brand-dark); color: var(--white); text-decoration: none; }
.btn.on-brand { background: var(--white); color: var(--brand); }
.btn.on-brand:hover { background: #f0e6ec; }
.btn.big { padding: 15px 34px; font-size: 17px; }

/* --- representative example -------------------------------------------- */
.rep-example {
  background: var(--white); border: 1px solid var(--line);
  padding: 18px 22px; font-size: 13px; line-height: 1.6; color: var(--ink-soft);
  max-width: 560px; margin-left: auto;
}

/* --- grids -------------------------------------------------------------- */
.cols { display: grid; gap: 34px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; }

/* Feature: icon left, text right */
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .ico { flex: 0 0 42px; }
.feature .ico img { width: 42px; }
/* The icon PNGs are brand purple, drawn for light backgrounds. On the purple
   band they would disappear, so knock them through to white rather than ship
   and maintain a second set of files. */
.section.brand .feature .ico img { filter: brightness(0) invert(1); }
.feature h3 { margin-bottom: .3em; font-size: 18px; }
.feature p { margin: 0; font-size: 15px; }

/* --- steps -------------------------------------------------------------- */
.steps { counter-reset: step; }
.step { display: flex; gap: 18px; margin-bottom: 26px; align-items: flex-start; }
.step::before {
  counter-increment: step; content: counter(step);
  flex: 0 0 42px; height: 42px; border-radius: 50%;
  background: var(--brand); color: var(--white);
  font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.section.brand .step::before { background: var(--white); color: var(--brand); }
.step h3 { margin-bottom: .2em; }
.step p { margin: 0; }

/* --- timeline (About us) ------------------------------------------------ */
.timeline { border-left: 3px solid var(--line); padding-left: 26px; margin: 0; }
.timeline li { list-style: none; margin-bottom: 26px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -35px; top: 6px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--brand); border: 3px solid var(--white);
}
.timeline .when { font-size: 13px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; }
.timeline h3 { margin: .2em 0 .2em; font-size: 18px; }
.timeline p { margin: 0; }

/* --- layout blocks ------------------------------------------------------ */
/* Mix these freely. Pages are plain PHP files, so no page has to look like
   any other — see public/_kit.php for a rendered reference (dev only). */

/* Compact hero for inner pages, as an alternative to the grey title band. */
.hero-sm {
  background: var(--brand); color: var(--white); padding: 54px 0;
}
.hero-sm.photo {
  background: var(--brand-dark) center/cover no-repeat;
  position: relative;
}
.hero-sm.photo::before {
  content: ""; position: absolute; inset: 0; background: rgba(90, 25, 60, .72);
}
.hero-sm .wrap { position: relative; }
.hero-sm h1 { color: var(--white); margin-bottom: .3em; }
.hero-sm p { font-size: 18px; margin: 0; max-width: 60ch; }

/* Content with a sidebar. */
.with-aside { display: grid; grid-template-columns: 1fr 300px; gap: 44px; align-items: start; }
.aside-box {
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 22px; position: sticky; top: 20px;
}
.aside-box h3 { font-size: 16px; }
.aside-box p:last-child { margin-bottom: 0; }

/* Cards. */
.card-item {
  background: var(--white); border: 1px solid var(--line);
  padding: 24px; height: 100%;
}
.card-item h3 { margin-bottom: .4em; }
.card-item p:last-child { margin-bottom: 0; }
.card-item.lift { box-shadow: 0 2px 10px rgba(0, 0, 0, .06); border-color: transparent; }

/* Image beside text, alternating. */
.media { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.media.flip > *:first-child { order: 2; }
.media img { width: 100%; }

/* Pull quote / testimonial. */
.quote {
  border-left: 4px solid var(--brand); padding: 6px 0 6px 22px;
  font-size: 19px; line-height: 1.6; color: var(--ink);
}
.quote cite { display: block; margin-top: 12px; font-size: 14px; font-style: normal; color: var(--ink-soft); }
.testimonial { display: flex; gap: 18px; align-items: flex-start; }
.testimonial img { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; flex: 0 0 74px; }

/* FAQ — <details>, so it opens with no JavaScript. */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 16px 32px 16px 0; font-weight: 700; color: var(--brand);
  list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 14px;
  font-size: 22px; font-weight: 400; line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq .answer { padding: 0 0 18px; }
.faq .answer p:last-child { margin-bottom: 0; }

/* Call to action band. */
.cta { background: var(--brand); color: var(--white); padding: 44px 0; text-align: center; }
.cta h2 { color: var(--white); margin-bottom: .4em; }
.cta p { max-width: 60ch; margin: 0 auto 1.4em; }

/* Key figures. */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; text-align: center; }
.stat-row .n { font-size: 38px; font-weight: 700; color: var(--brand); line-height: 1.1; }
.section.brand .stat-row .n { color: var(--white); }
.stat-row .k { font-size: 14px; color: var(--ink-soft); }
.section.brand .stat-row .k { color: rgba(255, 255, 255, .85); }

@media (max-width: 900px) {
  .with-aside, .media { grid-template-columns: 1fr; gap: 28px; }
  .media.flip > *:first-child { order: 0; }
  .aside-box { position: static; }
}

/* --- footer ------------------------------------------------------------- */
.site-foot { background: var(--grey); color: var(--white); padding: 42px 0; font-size: 14.5px; }
.site-foot h4 { color: var(--white); font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
.site-foot a { color: var(--white); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 7px; }
.legal-bar { background: var(--brand); color: var(--white); padding: 22px 0; font-size: 12.5px; line-height: 1.65; }
.legal-bar a { color: var(--white); text-decoration: underline; }

/* --- page title band ---------------------------------------------------- */
.page-title { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 34px 0; }
.page-title h1 { margin: 0; }

/* --- forms -------------------------------------------------------------- */
.form-card { background: var(--white); border: 1px solid var(--line); padding: 28px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 5px; color: var(--ink); }
.field .hint { font-weight: 400; color: var(--ink-soft); font-size: 12.5px; }
input[type=text], input[type=email], input[type=tel], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; font-size: 15px; font-family: inherit;
  border: 1px solid #ccc; border-radius: 2px; background: var(--white); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.field.error input, .field.error select, .field.error textarea { border-color: #c0392b; background: #fdf3f2; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.row2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.dob { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.consent input { margin-top: 6px; }
.consent label { font-size: 14px; line-height: 1.6; }

.notice { padding: 13px 16px; margin-bottom: 22px; border-radius: 2px; font-size: 14.5px; }
.notice.err { background: #fdecea; color: #a32b1c; border: 1px solid #f3c4bd; }
.notice.info { background: #eef4fb; color: #23527c; border: 1px solid #c9dcf0; }

.progress-steps { display: flex; gap: 10px; margin-bottom: 26px; font-size: 13px; }
.progress-steps span {
  flex: 1; text-align: center; padding: 9px; background: var(--bg-soft);
  border-bottom: 3px solid var(--line); color: var(--ink-soft); font-weight: 700;
}
.progress-steps span.on { background: var(--white); border-bottom-color: var(--brand); color: var(--brand); }

/* --- responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 30px; }
  .hero-card { margin: 0; max-width: none; }
  .rep-example { margin: 18px 0 0; max-width: none; }
}
/* --- burger menu -------------------------------------------------------- */
/* 5 items plus the logo stop fitting well before phone width, so the menu
   collapses at tablet size rather than waiting for 620px. */
@media (max-width: 860px) {
  .site-header .wrap { min-height: 74px; }

  .burger {
    display: block; margin-left: auto; cursor: pointer;
    padding: 10px 4px; -webkit-tap-highlight-color: transparent;
  }
  .burger span {
    display: block; width: 26px; height: 3px; background: var(--white);
    border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
  }
  .burger span + span { margin-top: 5px; }

  /* Focus ring, since the checkbox itself is invisible. */
  .nav-toggle:focus-visible + .burger span { box-shadow: 0 0 0 2px rgba(255,255,255,.9); }

  /* Open state: cross. */
  .nav-toggle:checked + .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle:checked + .burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked + .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .nav {
    display: none; width: 100%; margin-left: 0;
    flex-direction: column; gap: 0;
    border-top: 1px solid rgba(255, 255, 255, .25);
  }
  .nav-toggle:checked ~ .nav { display: flex; }

  .nav a {
    padding: 13px 2px; font-size: 14px; border-bottom: 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
  }
  .nav a:first-child { border-top: 0; }
  .nav a:hover { border-bottom: 0; text-decoration: underline; }
  .nav a.on { border-bottom: 0; text-decoration: underline; }
}

@media (max-width: 620px) {
  h1 { font-size: 27px; }
  h2 { font-size: 22px; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .row3, .row2 { grid-template-columns: 1fr; }
  .site-header .wrap { min-height: 0; padding-top: 12px; padding-bottom: 12px; }
  .brandmark img { height: 42px; }
  .hero { padding: 40px 0 50px; }
  .hero-card { padding: 24px 22px; }
  .section { padding: 38px 0; }
}

/* Student News articles */
.article-date { text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--brand); margin: 0 0 1em; }
.article-photo { display: block; max-width: 100%; height: auto; margin: 0 0 1.5em; border-radius: 6px; }
.article h2, .article h3 { margin: 1.4em 0 .5em; }
.article-nav { display: flex; justify-content: space-between; gap: 20px; margin: 2.5em 0 1.5em; padding-top: 1.2em; border-top: 1px solid var(--line); }
.article-nav .next { margin-left: auto; text-align: right; }

/* Application form: step list, buttons, waiting screen */
.apply-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 0 0 22px; font-size: 13px; color: var(--ink-soft); }
.apply-steps li span { display: inline-block; width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; background: var(--line); color: var(--ink); font-weight: 700; margin-right: 4px; }
.apply-steps li.on { color: var(--brand); font-weight: 700; }
.apply-steps li.on span, .apply-steps li.done span { background: var(--brand); color: #fff; }
.apply-count { margin: 0 0 .2em; text-transform: uppercase; letter-spacing: .05em; }
.form-nav { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; margin-top: 14px; }
.btn-back { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; padding: 10px 0; }
.btn-back:hover { text-decoration: underline; }
.pay-weekend { color: #a32b1c; font-size: 13px; margin: 6px 0 0; }
.pay-switched { color: var(--brand); font-size: 13px; margin: 6px 0 0; }
.field .hint { display: block; margin-top: 4px; }
.field label .hint { display: inline; margin-top: 0; }
.lfs-wait { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.lfs-wait[hidden] { display: none; }
.lfs-wait-box { background: #fff; max-width: 420px; padding: 28px; border-radius: 6px; text-align: center; border-top: 5px solid var(--brand); }
.lfs-wait-title { font-size: 19px; font-weight: 700; color: var(--brand); margin: 0 0 .6em; }
@media (max-width: 640px) { .row2, .row3 { grid-template-columns: 1fr; } }
