/* ============================================================
   CSS 18.08 — Final project, step 8 of 9: Footer
   ============================================================
   We build ONE real page — the Salem College home page —
   one section at a time. Each step's files contain the WHOLE page
   so far; the part added in this step is marked  ★ NEW .

   This step uses ideas from lesson(s): 12.
   Open the HTML in the browser, read the ★ NEW part here, then
   open the next step.
   ============================================================ */

/* ------------------------------------------------------------
   1. BASE — variables (lesson 16) + a mini reset (lessons 06, 15)
   ------------------------------------------------------------ */

/* All the colours and sizes of the site, in ONE place */
:root {
  --brand: #2D62EF;          /* college blue           */
  --brand-dark: #1A47C2;     /* blue for hover         */
  --accent: #FFAF04;         /* amber highlights       */
  --success: #1F9D55;        /* green                  */
  --navy: #0F1B3D;           /* header and footer      */
  --ink: #1A1A1A;            /* normal text            */
  --muted: #525252;          /* grey text              */
  --line: #E4E4E4;           /* borders                */
  --soft: #F4F6FB;           /* light section background */
  --radius: 12px;            /* corner roundness       */
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* Mini reset */
* {
  box-sizing: border-box;    /* width includes padding and border (lesson 06) */
}

body {
  margin: 0;                 /* no white edge around the page */
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.6;
}

img {
  max-width: 100%;           /* images never stick out (lesson 15) */
  height: auto;
}

/* A centred column for the content of every section */
.container {
  max-width: 1100px;
  margin: 0 auto;            /* centre (lesson 06) */
  padding: 0 20px;
}

.section {
  padding: 64px 0;           /* space above and below each section */
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);   /* lesson 15 */
  margin: 0 0 8px;
}

.section-sub {
  color: var(--muted);
  margin: 0 0 28px;
}

/* Try it: change --brand to #1F9D55 — later steps will turn green everywhere. */


/* ------------------------------------------------------------
   2. NAVBAR — flexbox (lesson 12) + mobile-first (lesson 15)
   ------------------------------------------------------------ */
.site-header {
  background-color: var(--navy);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

/* Phone: the links take a full row under the logo */
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  order: 3;                  /* after the button, on its own row (lesson 11) */
  width: 100%;
}

.nav-links a {
  color: #DDE3F0;
  text-decoration: none;
  font-weight: 600;
}

.nav-links a:hover {
  color: #FFFFFF;
}

/* Laptop: everything in one row, links pushed right */
@media (min-width: 800px) {
  .nav-links {
    order: 0;
    width: auto;
    margin-left: auto;       /* push to the right (lesson 12) */
  }
}

/* Buttons — used in the navbar and later sections */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;      /* pill (lesson 07) */
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;   /* lesson 16 */
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-accent  { background-color: var(--accent); color: var(--navy); }
.btn-primary { background-color: var(--brand);  color: #FFFFFF; }
.btn-primary:hover { background-color: var(--brand-dark); }


/* ------------------------------------------------------------
   3. HERO — picture + dark fade (lesson 07), fluid title (lesson 15)
   ------------------------------------------------------------ */
.hero {
  color: #FFFFFF;
  background-image:
    linear-gradient(to right, rgba(15, 27, 61, 0.92) 30%, rgba(15, 27, 61, 0.25)),
    url("../assets/campus.svg");
  background-size: cover;
  background-position: center;
  min-height: 70vh;          /* 70% of the window height (lesson 04) */
  display: flex;
  align-items: center;       /* text in the middle, top to bottom (lesson 11) */
}

.hero-inner {
  width: 100%;
}

.hero-tag {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0;
}

.hero-title {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  line-height: 1.1;
  margin: 10px 0;
}

.hero-text {
  font-size: 1.2rem;
  max-width: 480px;
  margin: 0 0 24px;
}

.btn-light {
  color: #FFFFFF;
  border-color: #FFFFFF;
  margin-left: 8px;
}


/* ------------------------------------------------------------
   4. STATS — auto-fit grid (lesson 13), overlap with negative margin
   ------------------------------------------------------------ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: -48px;         /* pull the row UP over the hero */
  position: relative;        /* so it sits on top of the hero (lesson 10) */
}

.stat {
  background-color: #FFFFFF;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  color: var(--muted);
}

.stat b {
  display: block;
  font-size: 2rem;
  color: var(--navy);
}


/* ------------------------------------------------------------
   5. COURSES — grid outside, flexbox inside (lessons 13, 12),
      NEW badge (lesson 10), hover lift (lesson 16)
   ------------------------------------------------------------ */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.course-card {
  position: relative;        /* frame for the NEW badge */
  display: flex;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: #FFFFFF;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.course-card h3 { margin: 0 0 6px; }
.course-card p  { margin: 0 0 10px; color: var(--muted); }

.course-card .course-fee {
  margin-top: auto;          /* fee + link pushed to the bottom (lesson 12) */
  color: var(--success);
  font-weight: 700;
}

.course-link {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background-color: #E54B4F;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 999px;
}


/* ------------------------------------------------------------
   6. FEES — table styling (lesson 17), zebra + hover (lesson 09)
   ------------------------------------------------------------ */
.section-soft {
  background-color: var(--soft);
}

.table-box {
  overflow-x: auto;          /* only the table scrolls on a phone */
  background-color: #FFFFFF;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.fees {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

.fees th,
.fees td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.fees th {
  background-color: var(--navy);
  color: #FFFFFF;
}

.fees .num { text-align: right; }
.fees tbody tr:nth-child(even) { background-color: #FAFBFD; }
.fees tbody tr:hover { background-color: #FFF6E0; }
.fees td:last-child { font-weight: 700; color: var(--success); }


/* ------------------------------------------------------------
   7. ADMISSION FORM — 2 columns from 900px (lessons 13, 15),
      form styling + validation (lesson 17)
   ------------------------------------------------------------ */
.apply-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 900px) {
  .apply-grid {
    grid-template-columns: 1fr 420px;
    align-items: start;
  }
}

.ticks {
  list-style: none;
  padding: 0;
}

.ticks li::before {
  content: "✓ ";
  color: var(--success);
  font-weight: 700;
}

.form-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-card label {
  display: block;
  font-weight: 700;
  margin: 12px 0 6px;
}

.form-card input,
.form-card select {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
}

.form-card input:focus,
.form-card select:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(45, 98, 239, 0.25);
}

.form-card input:user-invalid { border-color: #E54B4F; background-color: #FDECEC; }
.form-card input:user-valid   { border-color: var(--success); }

.form-card .btn {
  width: 100%;
  margin-top: 20px;
  border-radius: 8px;
}


/* ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
   ★ NEW IN STEP 08 — everything below this line until the next
   ★ section is what this step adds.
   ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ */
/* ------------------------------------------------------------
   8. FOOTER — flex columns that wrap + space-between bar (lesson 12)
   ------------------------------------------------------------ */
.site-footer {
  background-color: var(--navy);
  color: #C9CEDC;
  padding: 48px 0 16px;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-cols > div {
  flex: 1 1 200px;
}

.footer-cols h4 {
  color: #FFFFFF;
  margin: 0 0 8px;
}

.footer-cols p { margin: 0; }

.footer-cols a {
  display: block;
  color: #C9CEDC;
  text-decoration: none;
}

.footer-cols a:hover { color: #FFFFFF; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 32px;
  padding-top: 14px;
  border-top: 1px solid #2A3A66;
  font-size: 14px;
}

.footer-bottom a { color: #C9CEDC; }
