/* ============================================
   Africa Rising Agriculture, Education & Trade Festival
   Shared stylesheet
   ============================================ */

:root {
  --color-green-900: #113321;
  --color-green-700: #1a5c34;
  --color-green-600: #237a43;
  --color-green-500: #2f9954;
  --color-green-100: #e7f3ea;
  --color-orange-600: #d9791f;
  --color-orange-500: #f0932b;
  --color-orange-100: #fdf1e2;
  --color-ink: #1c2420;
  --color-ink-light: #4b564f;
  --color-bg: #ffffff;
  --color-bg-alt: #f6f8f4;
  --color-border: #e1e6df;
  --shadow-sm: 0 1px 3px rgba(17, 51, 33, 0.08);
  --shadow-md: 0 8px 24px rgba(17, 51, 33, 0.12);
  --radius: 10px;
  --font-base: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Noto Serif", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(24px, 7vw, 120px);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--color-green-900);
  line-height: 1.25;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 16px; color: var(--color-ink-light); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-orange-600);
  margin-bottom: 10px;
}

.lede {
  font-size: 1.15rem;
  color: var(--color-ink-light);
  max-width: 720px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--color-orange-600);
  color: #fff;
}
.btn-primary:hover { background: var(--color-orange-500); }

.btn-outline {
  background: transparent;
  border-color: #ffffffaa;
  color: #fff;
}
.btn-outline:hover { background: #ffffff1a; border-color: #fff; }

.btn-green {
  background: var(--color-green-700);
  color: #fff;
}
.btn-green:hover { background: var(--color-green-600); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

/* ============ Header / Nav ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(6px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(24px, 7vw, 120px);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--color-green-900);
  font-size: 1.05rem;
  line-height: 1.15;
  flex-shrink: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-green-600), var(--color-green-900));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.brand > span:last-child {
  font-family: var(--font-serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55vw;
}

.brand small {
  display: block;
  font-family: var(--font-base);
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--color-ink-light);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-ink);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--color-green-100);
  color: var(--color-green-700);
}

.nav-links a.nav-cta {
  margin-left: 6px;
  color: #fff;
}

.nav-links a.nav-cta:hover {
  background: var(--color-green-600);
  color: #fff;
}

/* Dropdown nav groups (About / Participate / Resources) */
.nav-item {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-ink);
  background: none;
  border: none;
  cursor: pointer;
}

.nav-dropdown-toggle .caret {
  font-size: 0.6rem;
  transition: transform 0.15s ease;
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active-parent,
.nav-item.open .nav-dropdown-toggle {
  background: var(--color-green-100);
  color: var(--color-green-700);
}

.nav-item.open .nav-dropdown-toggle .caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  flex-direction: column;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  padding: 8px;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
}

.nav-item.open .nav-dropdown-menu {
  display: flex;
}

.nav-dropdown-menu a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-ink);
  white-space: nowrap;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a[aria-current="page"] {
  background: var(--color-green-100);
  color: var(--color-green-700);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2.5px;
  background: var(--color-green-900);
  border-radius: 2px;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  color: #fff;
  padding: 90px 0 70px;
  background-color: var(--color-green-900);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero.small {
  padding: 60px 0 50px;
}

/* Left-anchored, not the shared centered container — on wide screens the
   text should hug the edge, not float as a boxed card over the photo. */
.hero .container {
  max-width: none;
  padding-left: clamp(24px, 9vw, 180px);
  padding-right: clamp(24px, 4vw, 60px);
}

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

.hero h1 { color: #fff; }
.hero .lede { color: #eef4ee; }

/* Homepage hero: structured split layout, photo as a framed element rather
   than a full-bleed backdrop the text has to fight for contrast against. */
.hero-split {
  background-image: linear-gradient(135deg, var(--color-green-900), var(--color-green-700));
  padding: 76px 0;
  overflow: hidden;
}

.hero-split-inner {
  margin: 0 auto;
  padding: 0 clamp(24px, 7vw, 120px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-copy .eyebrow {
  font-family: var(--font-base);
}

.hero-media img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 12px;
  border: 4px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-stat .num {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.hero-stat .label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #bfd6c5;
}

.breadcrumb {
  font-size: 0.85rem;
  color: #d9e8dd;
  margin-bottom: 14px;
}
.breadcrumb a { color: #fff; font-weight: 600; }

/* ============ Sections ============ */
section {
  padding: 64px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-head {
  max-width: 720px;
  margin-bottom: 40px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ============ Grids / Cards ============ */
.grid {
  display: grid;
  gap: 22px;
}

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

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.card .icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  display: block;
}

.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; }

.img-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.img-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}
.img-card .img-card-body { padding: 18px 20px; }
.img-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.img-card p { font-size: 0.92rem; margin-bottom: 0; }

/* Two column media/text */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.split img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  height: 380px;
  object-fit: cover;
}
.split.reverse .split-media { order: 2; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat .num {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--color-orange-600);
}
.stat .label {
  font-size: 0.9rem;
  color: var(--color-ink-light);
}

/* Check list */
.check-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  color: var(--color-ink-light);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-green-100);
  color: var(--color-green-700);
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Pill tags */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tag {
  background: var(--color-green-100);
  color: var(--color-green-700);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.tag.orange { background: var(--color-orange-100); color: var(--color-orange-600); }

/* CTA banner */
.cta-banner {
  background: linear-gradient(120deg, var(--color-green-900), var(--color-green-700));
  color: #fff;
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: #dfeee2; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-banner .cta-row { justify-content: center; }

/* Gallery / lightbox */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--color-border);
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 14, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 8px;
}
.lightbox-caption {
  color: #fff;
  text-align: center;
  margin-top: 14px;
  font-size: 0.95rem;
}
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-nav.prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.next { right: 24px; top: 50%; transform: translateY(-50%); }

/* Form */
.form-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow-sm);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--color-green-900);
}
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 18px;
  background: var(--color-bg-alt);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--color-green-500);
  outline-offset: 1px;
  background: #fff;
}
textarea { resize: vertical; min-height: 130px; }

.form-note {
  font-size: 0.85rem;
  color: var(--color-ink-light);
  margin-top: -6px;
}

.form-success {
  display: none;
  background: var(--color-green-100);
  color: var(--color-green-700);
  border-radius: 8px;
  padding: 16px 18px;
  font-weight: 600;
  margin-bottom: 18px;
}
.form-success.show { display: block; }

/* Contact info cards */
.contact-info-list {
  display: grid;
  gap: 18px;
}
.contact-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.contact-info-item .icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--color-orange-100);
  color: var(--color-orange-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.contact-info-item h4 { margin: 0 0 4px; font-size: 0.98rem; }
.contact-info-item p { margin: 0; font-size: 0.92rem; }

/* Table (exhibitor directory categories) */
.directory-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.filter-btn {
  border: 1px solid var(--color-border);
  background: #fff;
  padding: 9px 16px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  color: var(--color-ink-light);
}
.filter-btn.active, .filter-btn:hover {
  background: var(--color-green-700);
  color: #fff;
  border-color: var(--color-green-700);
}

.directory-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.directory-card .cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-orange-600);
  margin-bottom: 8px;
  display: block;
}

.notice-box {
  background: var(--color-orange-100);
  border: 1px solid #f3d6ac;
  border-radius: var(--radius);
  padding: 20px 24px;
  color: #7a4b0f;
  font-size: 0.92rem;
  margin-bottom: 32px;
}

/* News cards */
.news-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.news-card img { height: 190px; object-fit: cover; width: 100%; }
.news-card .news-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.news-card .date-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-green-700);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}
.news-card .read-more {
  margin-top: auto;
  font-weight: 700;
  color: var(--color-orange-600);
  font-size: 0.9rem;
}

/* Partners logos strip */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.partner-tile {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  font-weight: 700;
  color: var(--color-green-800, var(--color-green-700));
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
}

/* ============ Footer ============ */
.site-footer {
  background: var(--color-green-900);
  color: #cfe0d3;
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 36px;
}
.footer-brand { color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 10px; }
.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.footer-col a, .footer-col p {
  display: block;
  color: #b9cdbc;
  font-size: 0.92rem;
  margin-bottom: 10px;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: #9fb6a3;
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split.reverse .split-media { order: 0; }
  .split img { height: 280px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .partner-grid { grid-template-columns: repeat(3, 1fr); }

  .hero-split-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-media img { height: 320px; }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-cta { margin-left: 0; margin-top: 8px; }
  .nav-toggle { display: flex; }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 12px 14px;
  }
  .nav-dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    padding: 0 0 4px 14px;
    min-width: 0;
  }
  .nav-item.open .nav-dropdown-menu { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero { padding: 64px 0 48px; }
  section { padding: 48px 0; }
  .cta-banner { padding: 32px 22px; }

  .hero-split { padding: 48px 0; }
  .hero-stats { gap: 22px; flex-wrap: wrap; }
  .hero-media img { height: 240px; }
}
