/* styles.css — Striving For Achievement Foundation (SFAF)
   ✅ Global, elite mentorship/education theme
   ✅ Includes: base styles, layout utilities, navbar + footer, home sections
   ✅ Works with: navbar.js injector + index.html structure you’re using
*/

/* =========================
   THEME TOKENS
========================= */
:root {
  /* Brand-inspired palette (tweak anytime) */
  --sfaf-burgundy: #7b1f25;
  --sfaf-burgundy-2: #5f151a;
  --sfaf-gold: #caa15a;
  --sfaf-gold-2: #b38b45;

  --sfaf-ink: #0f0f12;
  --sfaf-ink-2: #14141a;
  --sfaf-paper: #fafafc;

  --sfaf-muted: rgba(255, 255, 255, 0.78);
  --sfaf-muted-dark: rgba(15, 15, 18, 0.72);

  --sfaf-border: rgba(255, 255, 255, 0.14);
  --sfaf-border-dark: rgba(15, 15, 18, 0.12);

  --sfaf-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --sfaf-shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.12);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --container: 1180px;

  /* Navbar sizing */
  --nav-h: 72px;
}

/* =========================
   GLOBAL RESET / BASELINE
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #111;
  background: var(--sfaf-paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

::selection {
  background: rgba(202, 161, 90, 0.35);
}

/* =========================
   UTILITIES
========================= */
.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.page {
  min-height: calc(100vh - var(--nav-h));
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* =========================
   TYPOGRAPHY
========================= */
h1,
h2,
h3,
h4 {
  font-family: "Playfair Display", serif;
  margin: 0 0 10px;
  color: #0b0b0e;
}

p {
  margin: 0 0 12px;
}

.kicker {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(123, 31, 37, 0.08);
  border: 1px solid rgba(123, 31, 37, 0.16);
  color: var(--sfaf-burgundy);
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* =========================
   CARDS / SURFACES
========================= */
.card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--sfaf-shadow-soft);
  border: 1px solid var(--sfaf-border-dark);
}

.card-pad {
  padding: 24px;
}

/* =========================
   NAVBAR (Injected by navbar.js)
========================= */
#siteNavbar {
  position: relative;
  z-index: 50;
}

/* Sticky glass nav */
.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sfaf-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

/* Brand */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.nav-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.nav-name {
  font-family: "Playfair Display", serif;
  font-weight: 800;
  letter-spacing: 0.6px;
  font-size: 1.1rem;
}

/* Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--sfaf-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 12px;
  border-radius: 12px;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(
    135deg,
    rgba(123, 31, 37, 0.75),
    rgba(202, 161, 90, 0.35)
  );
  border: 1px solid rgba(202, 161, 90, 0.35);
}

/* Logout button matches links */
.nav-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Hamburger */
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 999px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle span + span {
  margin-top: 7px;
}

/* When menu open (body gets .nav-open from JS) */
.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}
/* Make nav buttons look like links */
.nav-menu .nav-btn {
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  text-align: left;
}

/* Mobile nav */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    position: fixed;
    left: 14px;
    right: 14px;
    top: calc(var(--nav-h) + 10px);
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(10, 10, 12, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--sfaf-shadow);

    /* closed by default */
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .nav-menu[data-open="true"] {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    padding: 14px 14px;
    border-radius: 14px;
    font-size: 1rem;
  }
}

/* =========================
   FOOTER (Injected by navbar.js)
========================= */
.footer {
  background: #0b0b0e;
  color: rgba(255, 255, 255, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 46px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 26px;
  align-items: start;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.footer-name {
  font-family: "Playfair Display", serif;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 1.05rem;
  color: #fff;
}

.footer-contact p {
  margin: 6px 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
}

.footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-copy {
  margin: 0 0 10px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
}

/* Inconspicuous login button */
.footer-login {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.85rem;
  opacity: 0.55;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  transition: opacity 160ms ease, background 160ms ease;
}

.footer-login:hover {
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   HOME PAGE STYLES
========================= */
.home-body {
  background: url("./img/Home.png") center/cover no-repeat fixed;
}

/* overlay for readability */
.home-overlay {
  background: rgba(0, 0, 0, 0.65);
  padding: 80px 0;
}

.hero-content {
  text-align: center;
  color: #fff;
}

.hero-logo {
  width: min(320px, 80%);
  margin: 0 auto 30px;
}

.hero-card {
  max-width: 900px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--sfaf-shadow);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-text {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.92);
}

.hero-list {
  text-align: left;
  margin-top: 16px;
  padding-left: 20px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.hero-list li + li {
  margin-top: 10px;
}

/* Mission / Vision */
.mission-section {
  background: #fafafa;
  padding: 80px 0;
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
}

.mission-card,
.vision-card {
  padding: 40px;
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--sfaf-shadow-soft);
  border: 1px solid var(--sfaf-border-dark);
  text-align: left;
  position: relative;
  overflow: hidden;
}

/* subtle accent */
.mission-card::before,
.vision-card::before {
  content: "";
  position: absolute;
  inset: -40% -40% auto auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(
    circle at center,
    rgba(202, 161, 90, 0.22),
    transparent 60%
  );
  transform: rotate(18deg);
}

.mission-title,
.vision-title {
  font-family: "Playfair Display", serif;
  letter-spacing: 2px;
  margin-bottom: 10px;
  color: #9c7a5b;
  font-weight: 800;
}

.mission-text,
.vision-text {
  font-size: 1.22rem;
  line-height: 1.6;
  margin: 0;
  color: #1a1a1f;
}

/* Impact statement */
.impact-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #111, #2a2a2a);
}

.impact-text {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  text-align: center;
  font-weight: 600;
  line-height: 1.4;
  max-width: 900px;
  margin: 0 auto;
}

/* =========================
   HOME: EVENTS (auto-hide)
========================= */
.home-events {
  padding: 80px 0;
  background: #ffffff;
}

.home-events-head {
  margin-bottom: 18px;
  text-align: left;
}

.home-events-title {
  margin: 0 0 6px;
}

.home-events-subtitle {
  margin: 0;
  color: rgba(15, 15, 18, 0.7);
  line-height: 1.6;
  max-width: 820px;
}

.home-events-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.home-event {
  padding: 18px;
  border-radius: 16px;
}

.home-event-title {
  margin: 0 0 6px;
}

.home-event-when,
.home-event-where {
  margin: 0;
  color: rgba(15, 15, 18, 0.72);
}

.home-event-desc {
  margin-top: 10px;
  color: rgba(15, 15, 18, 0.86);
  line-height: 1.55;
}

.home-event-flyer {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  text-decoration: none;
}

.home-event-flyer:hover {
  text-decoration: underline;
}

/* =========================
   FORMS (nice defaults)
========================= */
.form-shell {
  max-width: 980px;
  margin: 40px auto;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

label {
  font-weight: 600;
  color: #111;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 15, 18, 0.16);
  background: #fff;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(123, 31, 37, 0.55);
  box-shadow: 0 0 0 4px rgba(123, 31, 37, 0.12);
}

.help {
  font-size: 0.92rem;
  color: rgba(15, 15, 18, 0.65);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  text-decoration: none;
  font-weight: 600;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--sfaf-shadow-soft);
}

.btn-primary {
  background: linear-gradient(135deg, var(--sfaf-burgundy), var(--sfaf-gold));
  border: 1px solid rgba(202, 161, 90, 0.35);
  color: #fff;
}

.btn-primary:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

/* =========================
   RESPONSIVE TWEAKS
========================= */
@media (max-width: 640px) {
  .hero-card {
    padding: 22px;
  }
  .home-overlay {
    padding: 60px 0;
  }
  .mission-card,
  .vision-card {
    padding: 26px;
  }
}

/* ✅ Add these to styles.css (Register/Login shell) */

.auth-shell {
  padding: 34px;
  border-radius: 16px;
}

.auth-head {
  margin-bottom: 18px;
}

.auth-title {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
}

.auth-subtitle {
  margin: 0;
  color: rgba(15, 15, 18, 0.7);
  line-height: 1.6;
}

.auth-form {
  margin-top: 18px;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.auth-span-2 {
  grid-column: span 2;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.auth-msg {
  margin-top: 14px;
  min-height: 22px;
  font-weight: 600;
}

.auth-msg.ok {
  color: #0f7a3b;
}

.auth-msg.err {
  color: #b42318;
}

@media (max-width: 720px) {
  .auth-shell {
    padding: 22px;
  }
  .auth-grid {
    grid-template-columns: 1fr;
  }
  .auth-span-2 {
    grid-column: auto;
  }
}

/* =========================
   ADMIN DASHBOARD
========================= */
.admin-shell {
  padding: 40px 0 60px;
}

.admin-head {
  margin-bottom: 24px;
}

.admin-title {
  margin: 0 0 6px;
}

.admin-subtitle {
  margin: 0;
  color: rgba(15, 15, 18, 0.7);
}

.admin-gate {
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(15, 15, 18, 0.12);
  font-weight: 600;
}

.admin-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.admin-card {
  display: block;
  padding: 24px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(15, 15, 18, 0.12);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--sfaf-shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.admin-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sfaf-shadow);
}

.admin-card h3 {
  margin: 0 0 6px;
}

.admin-card p {
  margin: 0;
  color: rgba(15, 15, 18, 0.65);
}

/* =========================
   USERS ADMIN PAGE
========================= */
.users-shell {
  padding: 40px 0 60px;
}

.users-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.users-title {
  margin: 0 0 6px;
}

.users-subtitle {
  margin: 0;
  color: rgba(15, 15, 18, 0.7);
}

.users-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.users-search,
.users-filter {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 15, 18, 0.16);
  background: #fff;
  min-width: 220px;
}

.users-filter {
  min-width: 150px;
}

.users-msg {
  min-height: 22px;
  font-weight: 600;
  margin: 8px 0 14px;
}

.users-msg.ok {
  color: #0f7a3b;
}

.users-msg.err {
  color: #b42318;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.user-card {
  padding: 18px;
  border-radius: 16px;
}

.user-name {
  margin: 0 0 6px;
}

.user-meta {
  margin: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.user-small {
  font-size: 0.9rem;
  color: rgba(15, 15, 18, 0.65);
}

.user-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid rgba(15, 15, 18, 0.12);
  background: rgba(15, 15, 18, 0.04);
}

.pill-admin {
  color: #fff;
  background: linear-gradient(135deg, rgba(123, 31, 37, 0.95), rgba(202, 161, 90, 0.65));
  border-color: rgba(202, 161, 90, 0.35);
}

.pill-user {
  color: rgba(15, 15, 18, 0.85);
}

.user-details {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  color: rgba(15, 15, 18, 0.86);
}

.user-label {
  font-weight: 700;
}

.user-uid {
  font-size: 0.92rem;
  color: rgba(15, 15, 18, 0.65);
  word-break: break-all;
}

.user-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.user-note {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: rgba(15, 15, 18, 0.62);
}

/* Danger button */
.btn-danger {
  border-color: rgba(180, 35, 24, 0.3);
  color: #b42318;
}

.btn-danger:hover {
  box-shadow: 0 12px 28px rgba(180, 35, 24, 0.18);
}

/* =========================
   EVENTS ADMIN
========================= */
.events-shell{padding:40px 0 60px}
.events-form-card{padding:22px;margin-bottom:28px}
.events-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:16px
}
.event-card{padding:18px;border-radius:16px}
.event-flyer{
  margin-top:10px;
  border-radius:12px;
  max-height:220px;
  object-fit:cover;
  width:100%
}
.event-actions{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.events-list-tools{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
}

/* =========================
   CONTACT PAGE
========================= */
.contact-shell {
  padding: 60px 0 80px;
}

.contact-head {
  margin-bottom: 22px;
  max-width: 760px;
}

.contact-title {
  margin: 0 0 8px;
}

.contact-subtitle {
  margin: 0;
  color: rgba(15, 15, 18, 0.72);
  line-height: 1.6;
}

.contact-card {
  padding: 24px;
  border-radius: 18px;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.contact-form .btn {
  grid-column: 1 / -1;
  justify-self: start;
}

/* Mobile */
@media (max-width: 640px) {
  .contact-form {
    grid-template-columns: 1fr;
  }
}

/* =========================
   CONTACT PAGE BACKGROUND
   (Vision_Pict.png 1500x1000)
========================= */

.contact-body {
  background: url("./img/Vision_Pict.png") center center / cover no-repeat fixed;
  position: relative;
}

/* Dark overlay for readability */
.contact-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.65) 100%
  );
  z-index: 0;
  pointer-events: none;
}

/* Ensure content sits above overlay */
.contact-body .page,
.contact-body .contact-shell {
  position: relative;
  z-index: 1;
}

/* Make text readable on image */
.contact-body .contact-title {
  color: #ffffff;
}

.contact-body .contact-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

/* Glass card effect for form */
.contact-body .contact-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.25),
    0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Mobile performance (disable fixed bg on mobile) */
@media (max-width: 768px) {
  .contact-body {
    background-attachment: scroll;
  }
}

/* =========================
   ADMIN: CONTACT MESSAGES
========================= */
.contact-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.contact-admin-card {
  padding: 18px;
  border-radius: 16px;
}

.contact-admin-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-admin-name {
  margin: 0 0 6px;
}

.contact-admin-meta {
  margin: 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.contact-admin-email {
  margin: 10px 0 0;
  color: rgba(15, 15, 18, 0.78);
}

.contact-admin-body {
  margin-top: 12px;
}

.contact-admin-question {
  margin: 0;
  color: rgba(15, 15, 18, 0.88);
  line-height: 1.6;
  white-space: pre-wrap;
}

.contact-admin-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================
   ADMIN CONTACT: TOOLBAR + PAGER
========================= */
.contact-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

.contact-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-pager {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-pageinfo {
  font-weight: 700;
  color: rgba(15, 15, 18, 0.72);
}

.contact-pagesize {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* =========================
   BOARD MEMBERS ADMIN
========================= */
.member-form-card {
  margin-bottom: 24px;
  padding: 22px;
}

.member-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.member-form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.member-card {
  padding: 16px;
  text-align: center;
}

.member-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
}

.member-photo.placeholder {
  display: grid;
  place-items: center;
  background: #f2f4f7;
  color: #667085;
  font-weight: 600;
}

.member-position {
  font-weight: 700;
  color: #9b1c1c;
  margin: 4px 0;
}

.member-bio {
  font-size: 0.95rem;
  color: rgba(15, 15, 18, 0.78);
}

.member-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .member-form {
    grid-template-columns: 1fr;
  }
}

/* =========================
   PUBLIC: BOARD PAGE
========================= */
.board-shell {
  padding: 60px 0 80px;
}

.board-head {
  max-width: 820px;
  margin-bottom: 26px;
}

.board-title {
  margin: 0 0 8px;
}

.board-subtitle {
  margin: 0;
  color: rgba(15, 15, 18, 0.72);
  line-height: 1.6;
}

/* Row blocks */
.board-row-block {
  margin-top: 24px;
}

.board-row-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

/* Horizontal row track */
.board-row-track {
  display: flex;
  gap: 16px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.board-row-track::-webkit-scrollbar {
  height: 10px;
}

.board-row-track::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 999px;
}

/* Uniform card sizing */
.board-card {
  width: 240px;            /* uniform card width */
  flex: 0 0 auto;
  text-align: left;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  scroll-snap-align: start;
  cursor: pointer;
}

.board-card-media {
  width: 100%;
  height: 220px;           /* uniform image height */
  background: #f2f4f7;
  overflow: hidden;
}

.board-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;       /* uniform crop */
  display: block;
}

.board-card-img.placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: #667085;
  font-weight: 700;
}

.board-card-body {
  padding: 14px 14px 16px;
}

.board-card-name {
  font-weight: 800;
  margin-bottom: 6px;
}

.board-card-pos {
  color: rgba(15, 15, 18, 0.78);
}

/* =========================================================
   BOARD MEMBERS (Row 3) — Limit to 4 cards per line (desktop)
========================================================= */

/* Only affect the Board Members row */
#rowMembersTrack.board-row-track {
  /* keep your spacing */
  gap: 16px;
}

/* Desktop: grid with 4 columns max */
@media (min-width: 1024px) {
  #rowMembersTrack.board-row-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow-x: visible;       /* no horizontal scroll on desktop */
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  /* Let cards size to grid column width */
  #rowMembersTrack .board-card {
    width: 100%;
    flex: initial;
  }
}

/* Tablet: 2–3 columns depending on width */
@media (min-width: 700px) and (max-width: 1023px) {
  #rowMembersTrack.board-row-track {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-x: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  #rowMembersTrack .board-card {
    width: 100%;
    flex: initial;
  }
}

/* Mobile: 1–2 columns */
@media (max-width: 699px) {
  #rowMembersTrack.board-row-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  #rowMembersTrack .board-card {
    width: 100%;
    flex: initial;
  }
}

/* Keep uniform image height even when cards resize */
#rowMembersTrack .board-card-media {
  height: 220px;
}

/* =========================================================
   BOARD PAGE BACKGROUND
========================================================= */

.board-body {
  background:
    linear-gradient(
      rgba(0, 0, 0, 0.55),
      rgba(0, 0, 0, 0.65)
    ),
    url("./img/teach.png");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  min-height: 100vh;
}

/* Mobile performance */
@media (max-width: 768px) {
  .board-body {
    background-attachment: scroll;
  }
}

/* Ensure content sits above overlay */
.board-body .page,
.board-body .board-shell {
  position: relative;
  z-index: 1;
}

/* Improve text contrast on image */
.board-body .board-title {
  color: #ffffff;
}

.board-body .board-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

.board-body .board-row-title {
  color: #ffffff;
}

.board-body .board-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(4px);
}

/* =========================
   BOARD MODAL
========================= */
.board-modal-panel {
  max-width: 920px;
  width: calc(100% - 28px);
  border-radius: 18px;
  overflow: hidden;
}

.board-modal-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
}

.board-modal-media {
  background: #111;
}

.board-modal-img {
  width: 100%;
  height: 360px;          /* uniform modal image height */
  object-fit: cover;
  display: block;
}

.board-modal-content {
  padding: 22px;
  background: #fff;
}

.board-modal-name {
  margin: 0 0 6px;
}

.board-modal-pos {
  margin: 0 0 12px;
  font-weight: 800;       /* bold position */
  color: rgba(15, 15, 18, 0.78);
}

.board-modal-bio {
  margin: 0;
  color: rgba(15, 15, 18, 0.88);
  line-height: 1.65;
  white-space: pre-wrap;
}

/* Mobile */
@media (max-width: 820px) {
  .board-modal-grid {
    grid-template-columns: 1fr;
  }
  .board-modal-img {
    height: 280px;
  }
  .board-card {
    width: 220px;
  }
  .board-card-media {
    height: 200px;
  }
}

/* =========================================================
   GLOBAL UTILITIES + FOUNDATIONS
   (Required by board, admin, events, contact pages)
========================================================= */

/* Hide utility */
.hidden {
  display: none !important;
}

/* Prevent background scroll when modal open */
body.modal-open {
  overflow: hidden;
}

/* =========================
   CARD SYSTEM
========================= */
.card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(16, 24, 40, 0.06);
  box-shadow:
    0 2px 10px rgba(16, 24, 40, 0.06),
    0 10px 24px rgba(16, 24, 40, 0.08);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

/* Subtle lift on hover for clickable cards */
.card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 18px rgba(16, 24, 40, 0.10),
    0 16px 40px rgba(16, 24, 40, 0.12);
  border-color: rgba(16, 24, 40, 0.10);
}

/* =========================
   MODAL SYSTEM
========================= */

/* Backdrop */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;

  display: grid;
  place-items: center;

  padding: 20px;

  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);

  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}

/* Hidden state */
.modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Panel (the white box) */
.modal-panel {
  position: relative;
  background: #ffffff;
  border-radius: 18px;

  width: min(960px, 100%);
  max-height: calc(100vh - 40px);

  overflow: auto;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.25),
    0 30px 80px rgba(0, 0, 0, 0.35);

  transform: translateY(0) scale(1);
  transition: transform 0.22s ease;
}

/* Animate when hidden */
.modal.hidden .modal-panel {
  transform: translateY(10px) scale(0.98);
}

/* =========================
   MODAL CLOSE BUTTON
========================= */
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;

  width: 40px;
  height: 40px;

  border-radius: 10px;
  border: none;

  background: rgba(0, 0, 0, 0.06);
  color: #111;

  font-size: 20px;
  font-weight: 700;

  display: grid;
  place-items: center;

  cursor: pointer;

  transition:
    background 0.18s ease,
    transform 0.12s ease;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.modal-close:active {
  transform: scale(0.96);
}

/* =========================
   ACCESSIBILITY IMPROVEMENTS
========================= */

/* Focus ring */
:focus-visible {
  outline: 3px solid #9b1c1c;
  outline-offset: 2px;
}

/* Better button cursor */
button,
.btn {
  cursor: pointer;
}

/* Smooth images */
img {
  max-width: 100%;
  height: auto;
}

/* =========================
   MOBILE HARDENING
========================= */
@media (max-width: 640px) {
  .modal {
    padding: 14px;
  }

  .modal-panel {
    border-radius: 14px;
    max-height: calc(100vh - 28px);
  }

  .modal-close {
    width: 36px;
    height: 36px;
  }
}

/* =========================================================
   ABOUT PAGE BACKGROUND
   (image.jpg is 275x183 — handled safely)
========================================================= */

.about-body {
  background:
    linear-gradient(
      rgba(0, 0, 0, 0.65),
      rgba(0, 0, 0, 0.72)
    ),
    url("./img/image.png");

  background-size: cover;       /* upscale nicely */
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  min-height: 100vh;
}

/* Mobile performance */
@media (max-width: 768px) {
  .about-body {
    background-attachment: scroll;
  }
}

/* =========================
   ABOUT LAYOUT
========================= */

.about-shell {
  padding: 70px 0 90px;
  display: flex;
  justify-content: center;
}

.about-card {
  max-width: 820px;
  padding: 36px 32px 40px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
}

/* Typography */
.about-title {
  margin: 0 0 10px;
  font-family: "Playfair Display", serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
}

.about-text {
  margin: 0 0 28px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(15, 15, 18, 0.88);
}

/* Mobile */
@media (max-width: 640px) {
  .about-card {
    padding: 26px 20px 28px;
  }
}

/* =========================================================
   DONATE PAGE
========================================================= */
.donate-body {
  background:
    linear-gradient(
      rgba(0, 0, 0, 0.45),
      rgba(0, 0, 0, 0.62)
    ),
    url("./img/thanks.png");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  min-height: 100vh;
}

/* Mobile performance */
@media (max-width: 768px) {
  .donate-body {
    background-attachment: scroll;
  }
}

.donate-shell {
  padding: 80px 0 100px;
  display: flex;
  justify-content: center;
}

.donate-card {
  max-width: 900px;
  width: 100%;
  padding: 34px 32px 36px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
}

.donate-title {
  margin: 0 0 14px;
  font-family: "Playfair Display", serif;
  font-weight: 900;
  font-size: clamp(2rem, 3.2vw, 3.4rem);
  line-height: 1.08;
}

.donate-text {
  margin: 0 0 16px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(15, 15, 18, 0.88);
}

.donate-btn {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  font-weight: 800;
}

.donate-note {
  margin: 14px 0 0;
  color: rgba(15, 15, 18, 0.70);
  font-size: 0.95rem;
}

/* Mobile */
@media (max-width: 640px) {
  .donate-card {
    padding: 26px 20px 28px;
  }
}