/*
Theme Name: Glen College
Theme URI: https://glenagrihub.co.za
Author: Ditsoane Trading and Projects
Description: Custom theme for Glen College of Agriculture, styled after the Glen College Portal concept design (glen-agri-grow.base44.app). Homepage-first build.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: glen-college
*/

/* ============================
   Design tokens
============================ */
:root {
  --navy-900: #0d1c3f;
  --navy-800: #16275a;
  --navy-700: #1e3a8a;
  --green-600: #3f8c3a;
  --green-700: #2f6b2b;
  --gold-500: #d4a13d;
  --gold-300: #f0c674;
  --gray-50: #f8f9fb;
  --gray-100: #f1f3f6;
  --gray-200: #e6e9ef;
  --gray-500: #6b7280;
  --gray-600: #5b6472;
  --white: #ffffff;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 20px rgba(13, 28, 63, 0.06);
  --shadow-card-hover: 0 10px 30px rgba(13, 28, 63, 0.12);
  --container-w: 1200px;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ============================
   Reset / base
============================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 800; line-height: 1.15; color: var(--navy-900); }
p { margin: 0 0 1em; color: var(--gray-600); }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section--tight { padding: 64px 0; }
.section--alt { background: var(--gray-50); }
.section--navy {
  background: var(--navy-700);
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.04) 25%, transparent 25%),
    linear-gradient(225deg, rgba(255,255,255,0.04) 25%, transparent 25%);
  background-size: 40px 40px;
  color: var(--white);
}
.section--navy h2, .section--navy p { color: var(--white); }
.section--navy p { color: rgba(255,255,255,0.8); }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 12px;
}
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 38px); }
.section-head p { font-size: 17px; }

/* ============================
   Buttons
============================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-600); color: var(--white); }
.btn-primary:hover { background: var(--green-700); box-shadow: var(--shadow-card-hover); }
.btn-outline {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
}
.btn-outline:hover { background: rgba(255,255,255,0.18); }
.btn-outline-light { background: transparent; color: var(--navy-900); border-color: var(--gray-200); }
.btn-outline-light:hover { background: var(--gray-50); }

/* ============================
   Header
============================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--gray-200);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.site-branding { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--navy-900); }
.site-branding img { height: 36px; width: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 6px; }
.primary-nav a {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  color: var(--navy-900);
}
.primary-nav a:hover, .primary-nav .current-menu-item a { background: var(--gray-100); color: var(--green-700); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
}
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--navy-900); margin: 5px 0; }

/* ============================
   Hero
============================ */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  color: var(--white);
  background: linear-gradient(120deg, rgba(13,28,63,0.92) 10%, rgba(13,28,63,0.55) 55%, rgba(13,28,63,0.35) 100%), var(--navy-900);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: url('assets/images/hero-farm.jpg') center/cover no-repeat;
  opacity: 0.55;
  z-index: -1;
}
.hero__content { max-width: 720px; padding: 90px 0; }
.hero__badge {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--gold-500);
  color: var(--gold-300);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(36px, 5.5vw, 58px);
  color: var(--white);
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--gold-500); }
.hero p.lede { font-size: 19px; color: rgba(255,255,255,0.85); max-width: 560px; margin-bottom: 32px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============================
   Two-column feature (Who We Are / Heritage)
============================ */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.feature-split__media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}
.feature-split__media.is-placeholder {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy-700), var(--green-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.75);
  font-weight: 600;
  box-shadow: var(--shadow-card);
}
.feature-split h2 { font-size: clamp(26px, 3.5vw, 34px); }
.feature-split .actions { display: flex; align-items: center; gap: 20px; margin-top: 20px; flex-wrap: wrap; }
.feature-split .read-more { font-weight: 700; color: var(--green-700); }
.feature-split.reverse { grid-template-columns: 1fr 1fr; }
.feature-split.reverse .feature-split__media { order: 2; }
.feature-split.reverse .feature-split__text { order: 1; }

/* ============================
   Card grids (intro cards / values / disciplines)
============================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }

.icon-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.icon-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.icon-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.icon-card__icon svg { width: 24px; height: 24px; }
.icon-card h3 { font-size: 18px; margin-bottom: 8px; }
.icon-card p { font-size: 15px; margin-bottom: 0; }

.icon-bg-green { background: #e6f2e5; color: var(--green-700); }
.icon-bg-navy { background: #e6eaf5; color: var(--navy-700); }
.icon-bg-gold { background: #faf0dc; color: var(--gold-500); }

.discipline-card {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  border: 1px solid var(--gray-200);
}
.discipline-card h3 { font-size: 19px; margin-bottom: 10px; }
.discipline-card p { font-size: 15px; }
.discipline-card a.card-link { font-weight: 700; color: var(--green-700); display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }

/* ============================
   Stats band
============================ */
.stats-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
.stats-band .stat-num { font-size: clamp(34px, 5vw, 52px); font-weight: 800; color: var(--gold-500); }
.stats-band .stat-label { font-size: 15px; color: rgba(255,255,255,0.8); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

/* ============================
   FAQ
============================ */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  padding: 6px 22px;
  background: var(--white);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 0;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--navy-900);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  color: var(--green-600);
  font-weight: 400;
  margin-left: 12px;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 18px; margin: 0; font-size: 15px; }

/* ============================
   Testimonials
============================ */
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-card);
}
.testimonial-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--navy-700); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; flex-shrink: 0;
}
.testimonial-card h4 { margin: 0 0 4px; font-size: 16px; }
.testimonial-card a { font-weight: 700; color: var(--green-700); font-size: 14px; }

/* ============================
   Contact
============================ */
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.contact-info-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  padding: 22px;
}
.contact-info-item .label { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold-300); font-weight: 700; margin-bottom: 6px; }
.contact-info-item .value { color: var(--white); font-weight: 600; }

/* ============================
   Footer
============================ */
.site-footer { background: var(--navy-700); color: rgba(255,255,255,0.85); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 64px 0 40px;
}
.footer-col h5 { color: var(--gold-500); font-size: 15px; font-weight: 700; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.04em; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--white); margin-bottom: 14px; }
.footer-brand img { height: 32px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a:hover { color: var(--gold-300); }
.footer-col .contact-line { display: flex; gap: 10px; margin-bottom: 12px; font-size: 14.5px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: rgba(255,255,255,0.6);
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================
   Inner page hero (About / Admissions / Programmes / Contact / Discipline)
============================ */
.inner-hero {
  padding: 80px 0;
  text-align: center;
}
.inner-hero .eyebrow { color: var(--gold-500); }
.inner-hero h1 { font-size: clamp(32px, 5vw, 46px); }
.inner-hero p.lede { max-width: 620px; margin: 0 auto; font-size: 17px; }
.discipline-hero .icon-card__icon { margin: 0 auto 18px; width: 64px; height: 64px; background: rgba(255,255,255,0.12); color: var(--gold-300); }
.discipline-hero .icon-card__icon svg { width: 30px; height: 30px; }

/* ============================
   Timeline (About page)
============================ */
.timeline { position: relative; max-width: 900px; margin: 0 auto; }
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
  transform: translateX(-50%);
}
.timeline-item { position: relative; width: 50%; padding: 0 40px 40px; }
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }
.timeline-item::after {
  content: '';
  position: absolute;
  top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--navy-700);
}
.timeline-item:nth-child(odd)::after { right: -6px; }
.timeline-item:nth-child(even)::after { left: -6px; }
.timeline-card {
  display: inline-block;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
  text-align: left;
}
.timeline-card .year { color: var(--navy-700); font-weight: 800; font-size: 18px; }
.timeline-card p { margin: 4px 0 0; font-size: 14.5px; }
@media (max-width: 700px) {
  .timeline::before { left: 8px; }
  .timeline-item, .timeline-item:nth-child(odd), .timeline-item:nth-child(even) {
    width: 100%; left: 0; text-align: left; padding: 0 0 32px 34px;
  }
  .timeline-item:nth-child(odd)::after, .timeline-item:nth-child(even)::after { left: 2px; }
}

/* ============================
   Criteria / checklist
============================ */
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
  color: var(--navy-900);
  font-weight: 500;
}
.check-list li:last-child { border-bottom: none; }
.check-list svg { width: 20px; height: 20px; color: var(--green-600); flex-shrink: 0; margin-top: 2px; }
.callout {
  background: #faf0dc;
  border: 1px solid var(--gold-500);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 14.5px;
  color: var(--navy-900);
  margin-top: 16px;
}

/* ============================
   NSC rating scale
============================ */
.rating-scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.rating-scale .rating-item { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 14px 8px; text-align: center; }
.rating-scale .rating-item .lvl { font-weight: 800; color: var(--navy-900); font-size: 15px; }
.rating-scale .rating-item .pct { font-size: 13px; color: var(--gray-500); }
@media (max-width: 700px) { .rating-scale { grid-template-columns: repeat(3, 1fr); } }

/* ============================
   Fees table
============================ */
.fees-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--gray-200); }
.fees-table th, .fees-table td { padding: 14px 20px; text-align: left; font-size: 15px; }
.fees-table th { background: var(--navy-700); color: var(--white); font-weight: 700; }
.fees-table tr:nth-child(even) { background: var(--gray-50); }
.fees-table td:last-child { font-weight: 700; color: var(--navy-900); text-align: right; }

/* ============================
   Bank detail cards
============================ */
.bank-card { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 24px; }
.bank-card h3 { font-size: 17px; margin-bottom: 12px; }
.bank-card .row { display: flex; justify-content: space-between; font-size: 14.5px; padding: 6px 0; border-bottom: 1px dashed var(--gray-200); }
.bank-card .row:last-child { border-bottom: none; }
.bank-card .row span:first-child { color: var(--gray-500); }
.bank-card .row span:last-child { font-weight: 700; color: var(--navy-900); }

/* ============================
   Eligibility calculator
============================ */
.calc-box { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 32px; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 20px; }
.calc-field label { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--gray-600); margin-bottom: 6px; }
.calc-field select, .calc-field input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--gray-200);
  font-family: var(--font-body); font-size: 15px; background: var(--white); color: var(--navy-900);
}
.calc-result { margin-top: 24px; padding: 20px; border-radius: var(--radius-md); font-weight: 700; text-align: center; display: none; }
.calc-result.is-visible { display: block; }
.calc-result.pass { background: #e6f2e5; color: var(--green-700); border: 1px solid var(--green-600); }
.calc-result.fail { background: #fdeceb; color: #b3261e; border: 1px solid #b3261e; }

/* ============================
   Programme years accordion
============================ */
.year-block { border: 1px solid var(--gray-200); border-radius: var(--radius-md); margin-bottom: 16px; overflow: hidden; }
.year-block summary { cursor: pointer; list-style: none; padding: 22px 26px; display: flex; justify-content: space-between; align-items: center; background: var(--gray-50); font-weight: 700; font-size: 17px; }
.year-block summary::-webkit-details-marker { display: none; }
.year-block summary .count { font-weight: 500; font-size: 14px; color: var(--gray-500); }
.semester-block { padding: 22px 26px; }
.semester-block h4 { font-size: 15px; margin-bottom: 12px; color: var(--green-700); text-transform: uppercase; letter-spacing: 0.03em; }
.module-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--gray-200); }
.module-row:last-child { border-bottom: none; }
.module-row .num { width: 26px; height: 26px; border-radius: 50%; background: var(--navy-700); color: var(--white); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.module-row .name { flex: 1; font-size: 15px; }
.module-row .code { font-size: 12.5px; color: var(--gray-500); background: var(--gray-100); padding: 3px 8px; border-radius: 6px; }
.module-search { width: 100%; padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid var(--gray-200); font-size: 15px; margin-bottom: 24px; }
.module-row.is-hidden { display: none; }

/* ============================
   Department contact cards
============================ */
.dept-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 22px; }
.dept-card .role { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--green-600); margin-bottom: 6px; }
.dept-card h4 { font-size: 17px; margin-bottom: 8px; }
.dept-card .row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--gray-600); margin-bottom: 4px; }
.dept-card .row svg { width: 15px; height: 15px; color: var(--gray-500); flex-shrink: 0; }

/* ============================
   Simple contact form
============================ */
.contact-form .field { margin-bottom: 18px; }
.contact-form label { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--gray-600); margin-bottom: 6px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--gray-200);
  font-family: var(--font-body); font-size: 15px;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.map-embed { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--gray-200); }
.map-embed iframe { width: 100%; height: 360px; border: 0; display: block; }

/* Placeholder note badges used while real content/images are pending */
.pending-note {
  display: inline-block;
  background: #fdeceb;
  color: #b3261e;
  border: 1px dashed #b3261e;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 13.5px;
  margin-top: 12px;
}

/* ============================
   Responsive
============================ */
@media (max-width: 900px) {
  .primary-nav, .header-actions .btn { display: none; }
  .menu-toggle { display: block; }
  .hero { min-height: 520px; }
  .feature-split, .feature-split.reverse { grid-template-columns: 1fr; }
  .feature-split.reverse .feature-split__media, .feature-split.reverse .feature-split__text { order: unset; }
  .card-grid--3, .card-grid--2, .stats-band { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .fees-table { font-size: 14px; }
  .fees-table th, .fees-table td { padding: 10px 14px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .hero__actions .btn { width: 100%; justify-content: center; }
}

/* Mobile nav panel (JS toggled) */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 76px 0 0 0;
  background: var(--white);
  z-index: 99;
  padding: 24px;
  overflow-y: auto;
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul li { border-bottom: 1px solid var(--gray-200); }
.mobile-nav a { display: block; padding: 16px 4px; font-weight: 700; font-size: 17px; }
.mobile-nav .btn { margin-top: 20px; width: 100%; justify-content: center; }
