/*
 * ═══════════════════════════════════════════════════════════════
 *  KTIN — KALAHARI TECHNICAL INSTITUTE OF NAMIBIA
 *  Shared Stylesheet  |  ktin-shared.css
 *  Version: 1.0
 *
 *  PURPOSE:
 *  This single file is the source of truth for the entire KTIN website.
 *  Fonts, design tokens (colours, spacing), nav, footer, and base
 *  component styles all live here. Every page links to this file.
 *
 *  HOW TO USE:
 *  Every HTML page links this file using a path relative to its own
 *  location. Examples:
 *    - index.html            → href="assets/css/ktin-shared.css"
 *    - instructors/          → href="../assets/css/ktin-shared.css"
 *    - courses/electrical/   → href="../../assets/css/ktin-shared.css"
 *    - portal/               → href="../assets/css/ktin-shared.css"
 *    - portal/dashboard/     → href="../../assets/css/ktin-shared.css"
 *
 *  HOW TO CHANGE FONTS:
 *  1. Add your new .woff2 files to assets/fonts/
 *  2. Update the @font-face blocks below with the new filenames
 *  3. Update the font-family references in the :root block
 *  The change will automatically apply to every page on the site.
 *
 *  HOW TO CHANGE COLOURS:
 *  Update the values in the :root { } block below. Done.
 * ═══════════════════════════════════════════════════════════════
 */

/* ─────────────────────────────────────────────
   FONTS
   Paths here are relative to THIS CSS FILE,
   which lives at assets/css/ktin-shared.css
   So fonts are one folder up: ../fonts/
   ───────────────────────────────────────────── */
@font-face {
  font-family: 'Syne';
  src: url('../fonts/Syne-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Syne';
  src: url('../fonts/Syne-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Syne';
  src: url('../fonts/Syne-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Syne';
  src: url('../fonts/Syne-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-LightItalic.woff2') format('woff2');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ─────────────────────────────────────────────
   DESIGN TOKENS
   Change a value here → changes everywhere.
   ───────────────────────────────────────────── */
:root {
  /* Colours */
  --teal:       #2A7A6F;
  --teal-dark:  #1d5a52;
  --teal-deep:  #0e3530;
  --ice:        #B8DEE0;
  --ice-soft:   rgba(184, 222, 224, 0.18);
  --ice-mid:    rgba(184, 222, 224, 0.45);
  --ice-faint:  rgba(184, 222, 224, 0.06);
  --white:      #f5fafa;
  --off:        #e8f4f4;
  --sand:       #D4956A;
  --sand-pale:  #F5E6D3;
  --ochre:      #C4853A;
  --dune:       #8B5E3C;
  --dune-deep:  #3D2010;

  /* Aliases used by portal pages (kept for compatibility) */
  --accent:      var(--teal);
  --accent-dark: var(--teal-dark);
  --accent-deep: var(--teal-deep);
  --bg-deep:     var(--teal-deep);

  /* Typography */
  --font-heading: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Spacing scale */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  5rem;

  /* Border radius */
  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-pill: 100px;
}

/* ─────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--teal-deep);
  overflow-x: hidden;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; }

/* ─────────────────────────────────────────────
   PROGRESS BAR
   ───────────────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--ice));
  z-index: 9999;
  border-radius: 0 2px 2px 0;
  transition: width .1s linear;
}

/* ─────────────────────────────────────────────
   NAVIGATION
   ───────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(36, 36, 36, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(184, 222, 224, .12);
  transition: background .4s, padding .4s;
  box-sizing: border-box;
  width: 100%;
}
nav.scrolled {
  background: rgba(20, 20, 20, 0.99);
  padding: .7rem 2.5rem;
}
.nav-logo { display: flex; align-items: center; gap: .7rem; }
.nav-logo img { height: 42px; width: auto; display: block; }
.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  font-size: .85rem;
  color: rgba(184, 222, 224, .8);
  text-decoration: none;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: color .25s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--ice);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s;
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-links a:hover { color: var(--ice); }
.nav-cta {
  background: var(--ice) !important;
  color: var(--teal-dark) !important;
  padding: .5rem 1.2rem;
  border-radius: var(--radius-pill);
  font-weight: 600 !important;
}
.nav-cta::after { display: none !important; }
.nav-right { display: flex; align-items: center; gap: .75rem; }
.portal-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-heading);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ice);
  text-decoration: none;
  border: 1.5px solid var(--ice-mid);
  padding: .42rem 1rem;
  border-radius: var(--radius-pill);
  transition: background .2s, border-color .2s;
  white-space: nowrap;
}
.portal-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.portal-btn:hover { background: var(--ice-soft); border-color: var(--ice); }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  margin-right: .35rem;
}
.hamburger span { width: 24px; height: 2px; background: var(--ice); border-radius: 2px; }

/* ─────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────── */
.btn-primary {
  background: var(--ice);
  color: var(--teal-dark);
  padding: .85rem 2rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .04em;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  display: inline-block;
  white-space: nowrap;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(184, 222, 224, .35);
}
.btn-ghost {
  border: 1.5px solid rgba(42, 122, 111, .35);
  color: var(--teal);
  padding: .85rem 2rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .04em;
  text-decoration: none;
  transition: background .2s, border-color .2s;
  display: inline-block;
}
.btn-ghost:hover { background: var(--ice-soft); border-color: var(--teal); }
.btn-ghost-light {
  border: 1.5px solid var(--ice-mid);
  color: var(--ice);
  padding: .85rem 2rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .04em;
  text-decoration: none;
  transition: background .2s;
  display: inline-block;
  white-space: nowrap;
}
.btn-ghost-light:hover { background: var(--ice-soft); }

/* ─────────────────────────────────────────────
   SECTION LABELS (reusable across all pages)
   ───────────────────────────────────────────── */
.section-label {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .8rem;
  display: block;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--teal-dark);
  line-height: 1.1;
}
.section-title span { color: var(--teal); }
.reveal { opacity: 0; }

/* ─────────────────────────────────────────────
   PAGE HERO BANNER
   Used on inner pages: instructors, courses, etc.
   ───────────────────────────────────────────── */
.page-hero {
  position: relative;
  padding: 10rem 2.5rem 5rem;
  background: var(--teal-deep);
  overflow: hidden;
  text-align: center;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(184,222,224,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184,222,224,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.page-hero-inner { position: relative; z-index: 2; max-width: 700px; margin: 0 auto; }
.page-hero-badge {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ice);
  border: 1px solid var(--ice-mid);
  padding: .35rem 1rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1.4rem;
}
.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
}
.page-hero h1 span { color: var(--ice); }
.page-hero p {
  font-size: 1rem;
  color: rgba(184, 222, 224, .75);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto;
}

/* Dune wave divider */
.dune-divider { line-height: 0; margin: 0; }
.dune-divider svg { display: block; width: 100%; }

/* ─────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────── */
footer {
  background: #1e1e1e;
  padding: 3rem 2.5rem 2rem;
  border-top: 1px solid rgba(184, 222, 224, .1);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand p {
  font-size: .85rem;
  color: rgba(184, 222, 224, .5);
  margin-top: 1rem;
  line-height: 1.6;
  max-width: 280px;
}
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: .8rem;
  font-weight: 700;
  color: var(--ice);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-col ul li a {
  font-size: .85rem;
  color: rgba(184, 222, 224, .5);
  text-decoration: none;
  transition: color .2s;
}
.footer-col ul li a:hover { color: var(--ice); }
.footer-bottom {
  max-width: 1100px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(184, 222, 224, .08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.footer-bottom p { font-size: .75rem; color: rgba(184, 222, 224, .3); }
.nta-badge {
  font-size: .7rem;
  color: rgba(184, 222, 224, .4);
  border: 1px solid rgba(184, 222, 224, .15);
  padding: .3rem .8rem;
  border-radius: var(--radius-pill);
}
.footer-credit {
  background: var(--teal-deep);
  border-top: 1px solid rgba(184, 222, 224, .08);
  padding: .6rem 2.5rem;
  text-align: center;
}
.footer-credit p { font-size: .72rem; color: rgba(184, 222, 224, .4); }
.wa-link { color: #25D366; text-decoration: none; margin-left: .25rem; transition: opacity .2s; }
.wa-link:hover { opacity: .75; }

/* ─────────────────────────────────────────────
   MOBILE — shared responsive rules
   ───────────────────────────────────────────── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(14, 53, 48, .97);
    backdrop-filter: blur(20px);
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--ice-mid);
    z-index: 99;
  }
  .page-hero { padding: 8rem 1.5rem 4rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .btn-primary, .btn-ghost, .btn-ghost-light { padding: .75rem 1.5rem; }
}
