/* =================================================
   AIEG WEBSITE STYLESHEET
   African Institute for Ethical Governance
   ================================================= */

/* =================================================
   COLOR PALETTE & DESIGN TOKENS
   ================================================= */

:root {
  /* Brand colours */
  --africa-gold:   #F4A300;
  --africa-red:    #C0392B;   /* darkened from #D64541 for WCAG AA contrast */
  --africa-green:  #00695C;   /* darkened from #00897B for WCAG AA contrast */
  --africa-earth:  #6D4C41;

  /* Neutrals */
  --dark:   #1F2933;
  --text:   #333333;          /* darkened from #444 for AA on white */
  --light:  #F5F7F9;
  --white:  #ffffff;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;
}


/* =================================================
   GLOBAL RESET
   ================================================= */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--light);
  color: var(--text);
  line-height: 1.6;
}


/* =================================================
   TYPOGRAPHY
   ================================================= */

h1, h2, h3, h4 {
  margin-bottom: 16px;
  line-height: 1.2;
}

h1 { font-size: 44px; }
h2 { font-size: 32px; }
h3 { font-size: 22px; }

p { margin-bottom: 12px; }

@media (max-width: 600px) {
  h1 { font-size: 30px; }
  h2 { font-size: 26px; }
  h3 { font-size: 20px; }
  p  { font-size: 15px; }
}


/* =================================================
   LAYOUT CONTAINER
   ================================================= */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section {
  padding: var(--space-xl) var(--space-lg);
}

@media (max-width: 600px) {
  .container { width: 92%; }
  section    { padding: 60px 0; }
}


/* =================================================
   SKIP LINK (accessibility landmark)
   ================================================= */

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--africa-green);
  color: #fff;
  padding: 10px 18px;
  font-weight: 600;
  z-index: 9999;
  border-radius: 0 0 6px 0;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}


/* =================================================
   HEADER / NAVIGATION
   ================================================= */

header {
  background: var(--white);
  border-bottom: 3px solid var(--africa-green);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 10px 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 70px;
  width: auto;
}

/* NAV LINKS */

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-links a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--africa-red);
}

/* HAMBURGER */

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--dark);
  display: block;
  transition: 0.3s;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 900px) {
  .hamburger { display: flex; }

  .nav-links {
    position: absolute;
    top: 93px;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 25px 0;
    display: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  }

  .nav-links li { width: 100%; text-align: center; }

  .nav-links a {
    display: block;
    padding: 10px 0;
    font-size: 18px;
  }

  .nav-links.active { display: flex; }
}


/* =================================================
   HERO SECTION
   ================================================= */

.hero {
  min-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 80px 20px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.72)),
    url("../images/governance-bg.webp") center / cover no-repeat;
  margin-bottom: 0;
}

.hero-content { max-width: 750px; }

.hero h1 {
  color: var(--africa-gold);
  margin-bottom: 20px;
}

.hero p {
  font-size: 18px;
  opacity: 0.95;
}

/* Reveal animation */
.reveal-text {
  opacity: 0;
  transform: translateY(30px);
  animation: revealText 1s ease forwards;
}
.reveal-text.delay { animation-delay: 0.5s; }

@keyframes revealText {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .hero { min-height: clamp(380px, 60vh, 600px); }
  .hero h1 { font-size: 32px; }
  .hero p  { font-size: 16px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 26px; }
  .hero p  { font-size: 15px; }
}


/* =================================================
   SECTION TITLE
   ================================================= */

.section-title {
  text-align: center;
  margin-bottom: 50px;
  color: var(--africa-green);
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--africa-gold);
  margin: 12px auto 0;
  border-radius: 2px;
}


/* =================================================
   BUTTONS
   ================================================= */

.btn-primary {
  display: inline-block;
  background: var(--africa-red);
  color: var(--white);
  padding: 12px 26px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--africa-green);
  outline: 3px solid var(--africa-gold);
  outline-offset: 2px;
}

.btn {
  display: inline-block;
  padding: 10px 15px;
  background: var(--africa-gold);
  color: var(--dark);
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  margin-top: auto;
  transition: background 0.3s;
}

.btn:hover,
.btn:focus-visible {
  background: #d4900a;
  outline: 3px solid var(--africa-green);
  outline-offset: 2px;
}


/* =================================================
   CARDS (generic)
   ================================================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.card {
  background: var(--white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s;
}

.card:hover { transform: translateY(-6px); border-top: 4px solid var(--africa-red); }

.card img { width: 100%; border-radius: 8px; margin-bottom: 20px; }

@media (max-width: 1200px) {
  .card-grid,
  .services-grid,
  .courses-grid,
  .partnership-grid,
  .contact-info-grid { grid-template-columns: repeat(2, 1fr); }

  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .card-grid,
  .team-grid,
  .services-grid,
  .courses-grid,
  .partnership-grid,
  .contact-info-grid,
  .custom-grid,
  .form-row { grid-template-columns: 1fr; }
}


/* =================================================
   TEAM / LEADERSHIP
   ================================================= */

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.team-card {
  background: var(--white);
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s;
}

.team-card:hover { transform: translateY(-6px); }

.team-card img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
}

.team-card .title {
  font-weight: 600;
  margin-bottom: 10px;
  color: #555;
}

.linkedin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 20px;
  color: #0a66c2;
  text-decoration: none;
}

.linkedin:hover { color: #004182; }

@media (max-width: 600px) {
  .team-card { padding: 20px; }
  .team-card img { width: 120px; height: 120px; }
}

/* Bio truncation */
.bio {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
}

.bio.expanded { -webkit-line-clamp: unset; }

.read-more {
  background: var(--africa-red);
  color: var(--white);
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  margin-top: 10px;
  font-family: inherit;
  transition: background 0.3s;
}

.read-more:hover { background: var(--africa-green); }


/* =================================================
   SERVICES GRID
   ================================================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 40px;
}

.service-card {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s;
}

.service-card:hover { transform: translateY(-5px); }

.service-category-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
}

.service-column h2 {
  color: var(--africa-green);
  margin-bottom: 20px;
  text-align: center;
}


/* =================================================
   COURSES
   ================================================= */

.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.course-column {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.course-category-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

/* ACCORDION */

.accordion { border-top: 1px solid #eee; }

.accordion-header {
  width: 100%;
  background: var(--white);
  border: none;
  text-align: left;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: var(--dark);
  font-family: inherit;
  transition: background 0.3s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.accordion-header:hover,
.accordion-header.active { background: var(--light); color: var(--africa-green); }

.accordion-header .hint {
  font-weight: 400;
  font-size: 12px;
  color: #888;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  visibility: hidden;        /* belt-and-suspenders: truly removes from paint */
  transition: max-height 0.4s ease, visibility 0s 0.4s;
  padding: 0 20px;
}

.accordion-header.active + .accordion-content {
  visibility: visible;
  transition: max-height 0.4s ease, visibility 0s 0s;
}

.accordion-content > * { padding: 4px 0; }

.accordion-content h3 {
  margin-top: 14px;
  font-size: 16px;
  color: var(--africa-green);
}

/* CUSTOM PROGRAMS */

.custom-programs { background: var(--light); }

.custom-title {
  text-align: center;
  color: var(--africa-green);
  margin-bottom: 40px;
  font-size: 26px;
}

.custom-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.custom-column {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* MODAL */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  overflow-y: auto;
}

.modal[aria-hidden="false"] { display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; }

.modal-box {
  background: var(--white);
  padding: 30px;
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 10px;
  position: relative;
}

.close-modal {
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 28px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--dark);
  line-height: 1;
  font-family: inherit;
}

.close-modal:hover { color: var(--africa-red); }


/* =================================================
   PARTNERSHIPS
   ================================================= */

.partnership-details { background: var(--light); }

.partnership-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.partnership-card {
  background: var(--white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.partnership-card h3 {
  color: var(--africa-green);
  margin-bottom: 14px;
}

.partnership-card ul { padding-left: 18px; }

.partnership-card li { margin-bottom: 6px; }


/* =================================================
   RESOURCES
   ================================================= */

.resource-tabs {
  text-align: center;
  margin: 20px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.resource-tabs button {
  padding: 10px 20px;
  border: 2px solid var(--africa-green);
  background: var(--white);
  color: var(--africa-green);
  cursor: pointer;
  border-radius: 5px;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.3s, color 0.3s;
}

.resource-tabs button:hover,
.resource-tabs button.active {
  background: var(--africa-green);
  color: var(--white);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
  align-items: stretch;
}

.resource-item {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.resource-item img { width: 100%; border-radius: 8px; }
.resource-item h3  { margin-bottom: 10px; }
.resource-item p   { margin-bottom: 15px; }


/* =================================================
   CORE VALUES WHEEL
   ================================================= */

.core-values-wheel {
  display: flex;
  justify-content: center;
  margin: 40px auto;
  padding: 0 15px;
}

.wheel-container {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.wheel-container img {
  width: 100%;
  height: auto;
  display: block;
}

.hotspot {
  position: absolute;
  width: 22%;
  height: 22%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.hotspot:hover { background: rgba(0, 0, 0, 0.1); }

/* Wheel positions */
.integrity      { top: 18%; left: 50%; }
.accountability { top: 32%; left: 78%; }
.innovation     { top: 68%; left: 78%; }
.ownership      { top: 82%; left: 50%; }
.professionalism{ top: 68%; left: 22%; }
.ubuntu         { top: 32%; left: 22%; }

@media (max-width: 480px) {
  .hotspot { width: 26%; height: 26%; }
}

.core-values-wheel img { transition: transform 0.3s ease; }
.core-values-wheel img:hover { transform: scale(1.02); }

@media (max-width: 768px) {
  .core-values-wheel { margin: 30px auto; }
  .wheel-container   { max-width: 400px; }
}

@media (max-width: 480px) {
  .wheel-container { max-width: 100%; }
}


/* =================================================
   CONTACT FORM
   ================================================= */

.contact-form {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--africa-green);
  outline: 2px solid var(--africa-green);
  outline-offset: 1px;
}

.contact-form textarea { resize: vertical; }

.form-message {
  margin-top: 4px;
  color: #166534;
  opacity: 0;
  transition: opacity 0.5s;
}

.form-message.show { opacity: 1; }

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .contact-form input,
  .contact-form textarea { font-size: 16px; padding: 16px; }
}


/* =================================================
   CONTACT INFO
   ================================================= */

.contact-info { background: #f7f9fc; }

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.contact-card {
  background: var(--white);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.contact-card h3 {
  color: var(--africa-green);
  margin-bottom: 10px;
}


/* =================================================
   MAP
   ================================================= */

.map-container {
  width: 100%;
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 600px) {
  .map-container { height: 300px; }
}


/* =================================================
   FOOTER
   ================================================= */

.footer {
  background: #0f172a;
  color: #e5e7eb;
  padding: 50px 20px 20px;
  border-top: 4px solid var(--africa-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-col h3,
.footer-col h4 {
  margin-bottom: 15px;
  color: var(--white);
}

.footer-col p {
  font-size: 14px;
  line-height: 1.7;
  color: #d1d5db;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 8px; }

.footer-col ul li a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-col ul li a:hover { color: var(--white); }

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 16px;
  color: var(--white);
  background: #1877F2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transition: transform 0.3s, opacity 0.3s;
  text-decoration: none;
}

.social-icons a:hover { transform: translateY(-3px); opacity: 0.85; }

.footer-bottom {
  text-align: center;
  border-top: 1px solid #1f2937;
  margin-top: 30px;
  padding-top: 15px;
  font-size: 13px;
  color: #9ca3af;
}
