:root {
  --evergreen: #1B3B2F;
  --evergreen-light: #274F3F;
  --evergreen-dark: #122A21;
  --maize: #D9A441;
  --maize-light: #E6BE6E;
  --umber: #6B4226;
  --ivory: #F7F3EA;
  --sage: #8FA787;
  --ink: #22221F;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Inter, Arial, sans-serif;
  line-height: 1.55;
}
h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  margin: 0 0 0.5em;
  line-height: 1.15;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-sm { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.wrap-md { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.15s;
}
.btn-gold { background: var(--maize); color: var(--evergreen-dark); }
.btn-gold:hover { background: var(--maize-light); }
.btn-outline { border-color: rgba(247,243,234,0.4); color: var(--ivory); }
.btn-outline:hover { background: rgba(247,243,234,0.1); }
.btn-green { background: var(--evergreen); color: var(--ivory); }
.btn-green:hover { background: var(--evergreen-light); }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-danger { background: #b3412c; color: #fff; }
.btn-outline-dark { border-color: rgba(27,59,47,0.3); color: var(--evergreen); }
.btn-outline-dark:hover { border-color: var(--maize); }

/* Header */
.site-header {
  background: var(--ivory);
  border-bottom: 1px solid rgba(27,59,47,0.1);
  position: sticky; top: 0; z-index: 40;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.site-header .logo { display: flex; align-items: center; gap: 10px; font-family: Georgia, serif; font-size: 18px; color: var(--evergreen); font-weight: 600; }
.site-header .logo img { height: 34px; width: auto; }
.site-nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.site-nav a { font-size: 14px; color: var(--ink); opacity: 0.75; }
.site-nav a:hover, .site-nav a.active { opacity: 1; color: var(--evergreen); }
.site-nav .btn { font-size: 13px; padding: 8px 18px; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--evergreen); color: var(--ivory); }
.hero .wrap { position: relative; padding: 96px 24px 110px; }
.hero .eyebrow { color: var(--maize); letter-spacing: 0.2em; font-size: 12px; font-weight: 500; margin-bottom: 20px; }
.hero h1 { font-size: 46px; max-width: 620px; }
.hero h1 em { color: var(--maize); font-style: italic; }
.hero p.lead { max-width: 520px; color: rgba(247,243,234,0.8); font-size: 18px; margin-top: 20px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.hero .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; max-width: 480px; margin-top: 56px; }
.hero .stats .val { font-family: Georgia, serif; font-size: 38px; color: var(--maize); line-height: 1; }
.hero .stats .lab { font-size: 12px; color: rgba(247,243,234,0.6); margin-top: 8px; }

.hero-sm { text-align: center; padding: 70px 24px; }
.hero-sm h1 { font-size: 36px; }

/* Sections */
section.pad { padding: 80px 0; }
.eyebrow-sm { color: var(--maize); letter-spacing: 0.2em; font-size: 12px; font-weight: 500; margin-bottom: 14px; }
h1.page-title { font-size: 34px; color: var(--evergreen); margin-bottom: 26px; }
.card { border: 1px solid rgba(27,59,47,0.15); border-radius: 16px; padding: 22px; transition: 0.15s; background: #fff; }
.card:hover { border-color: var(--maize); }
.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); }
@media (max-width: 800px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .hero .stats { grid-template-columns: repeat(3, 1fr); gap: 14px; } .hero h1 { font-size: 34px; } }

.soft-box { background: rgba(143,167,135,0.12); border-radius: 16px; padding: 26px; }
.divider-line { border-bottom: 1px solid rgba(27,59,47,0.15); padding-bottom: 12px; margin-bottom: 22px; }

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(27,59,47,0.15); border-radius: 16px; overflow: hidden; }
@media (max-width: 800px) { .timeline { grid-template-columns: 1fr; } }
.timeline .cell { background: var(--ivory); padding: 30px; }
.timeline .num { color: var(--maize); font-family: Georgia, serif; font-size: 34px; margin-bottom: 12px; }
.timeline .year { font-size: 11px; letter-spacing: 0.15em; color: rgba(34,34,31,0.5); margin-bottom: 4px; }
.timeline .lab { font-family: Georgia, serif; font-size: 17px; color: var(--evergreen); margin-bottom: 10px; }
.timeline .amt { font-size: 14px; font-weight: 600; color: var(--umber); }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; color: var(--evergreen); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=file], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid rgba(27,59,47,0.25); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 100px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--maize); outline-offset: 1px; }
.form-box { background: #fff; border: 1px solid rgba(27,59,47,0.12); border-radius: 16px; padding: 26px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.checkbox-row input { width: auto; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 20px; }
.alert-success { background: #dff3e4; color: #1e5b34; border: 1px solid #b7e0c3; }
.alert-error { background: #fbe4e1; color: #8a2c1f; border: 1px solid #f3bdb4; }

/* Tables */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(27,59,47,0.1); }
table.data th { color: var(--evergreen); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; background: rgba(143,167,135,0.1); }
table.data tr:hover td { background: rgba(217,164,65,0.06); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-paid { background: #dff3e4; color: #1e5b34; }
.badge-partial { background: #fdf1d6; color: #8a5b0a; }
.badge-debt { background: #fbe4e1; color: #8a2c1f; }
.badge-ok { background: #e4e9e2; color: #45543f; }
.badge-warn { background: #fdf1d6; color: #8a5b0a; }
.badge-critical { background: #fbe4e1; color: #8a2c1f; }

/* Footer */
.site-footer { background: var(--evergreen-dark); color: rgba(247,243,234,0.7); padding: 46px 0; margin-top: 60px; font-size: 14px; }
.site-footer a { color: rgba(247,243,234,0.7); }
.site-footer a:hover { color: var(--maize); }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* Dashboard shell (admin/owner) */
.dash-wrap { display: flex; min-height: 100vh; }
.dash-sidebar { width: 240px; background: var(--evergreen-dark); color: var(--ivory); padding: 24px 0; flex-shrink: 0; }
.dash-sidebar .brand { padding: 0 22px 20px; font-family: Georgia, serif; font-size: 17px; border-bottom: 1px solid rgba(247,243,234,0.1); margin-bottom: 14px; }
.dash-sidebar nav a { display: block; padding: 10px 22px; font-size: 14px; color: rgba(247,243,234,0.75); }
.dash-sidebar nav a:hover, .dash-sidebar nav a.active { background: rgba(217,164,65,0.15); color: var(--maize); border-right: 3px solid var(--maize); }
.dash-main { flex: 1; padding: 34px 40px; max-width: 1180px; }
.dash-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.dash-topbar h1 { font-size: 24px; color: var(--evergreen); }
.dash-user { font-size: 13px; color: rgba(34,34,31,0.6); }
.stat-card { background: #fff; border: 1px solid rgba(27,59,47,0.1); border-radius: 14px; padding: 20px; }
.stat-card .val { font-family: Georgia, serif; font-size: 28px; color: var(--evergreen); }
.stat-card .lab { font-size: 12px; color: rgba(34,34,31,0.55); margin-top: 4px; }
@media (max-width: 900px) {
  .dash-wrap { flex-direction: column; }
  .dash-sidebar { width: 100%; }
  .dash-sidebar nav { display: flex; overflow-x: auto; }
  .dash-main { padding: 24px; }
}

.pill-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.pill { padding: 6px 14px; border-radius: 999px; font-size: 13px; border: 1px solid rgba(27,59,47,0.2); }
.pill.active { background: var(--evergreen); color: var(--ivory); border-color: var(--evergreen); }

.simple-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.simple-bar-track { flex: 1; background: rgba(27,59,47,0.08); border-radius: 6px; height: 14px; overflow: hidden; }
.simple-bar-fill { background: var(--maize); height: 100%; }
.simple-bar-label { width: 160px; flex-shrink: 0; }
.simple-bar-value { width: 90px; text-align: right; flex-shrink: 0; }

/* Leadership spotlight carousel */
.carousel-panel {
  position: relative;
  background: var(--evergreen);
  border-radius: 24px;
  overflow: hidden;
}
.carousel-slide {
  display: grid;
  grid-template-columns: 340px 1fr;
}
@media (max-width: 800px) { .carousel-slide { grid-template-columns: 1fr; } }
.carousel-photo { padding: 34px 0 0 34px; }
@media (max-width: 800px) { .carousel-photo { padding: 30px 30px 0; } }
.carousel-photo img, .carousel-photo-fallback {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: 16px; border: 2px solid rgba(217,164,65,0.5);
}
.carousel-photo-fallback {
  display: flex; align-items: center; justify-content: center;
  background: rgba(247,243,234,0.1); color: rgba(247,243,234,0.5); font-size: 13px;
}
.carousel-bio { padding: 34px 44px; color: var(--ivory); display: flex; flex-direction: column; justify-content: center; }
.carousel-quote { font-size: 34px; color: rgba(217,164,65,0.6); line-height: 1; margin-bottom: 10px; font-family: Georgia, serif; }
.carousel-bio h3 { font-size: 28px; margin-bottom: 4px; }
.carousel-title { color: var(--maize); font-size: 13px; font-weight: 600; letter-spacing: 0.03em; margin-bottom: 18px; }
.carousel-text { color: rgba(247,243,234,0.8); max-width: 520px; line-height: 1.6; }
.carousel-controls { display: flex; align-items: center; gap: 14px; padding: 0 44px 30px; }
@media (max-width: 800px) { .carousel-controls { padding: 0 30px 30px; } }
.carousel-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(247,243,234,0.3);
  background: transparent; color: var(--ivory); font-size: 18px; cursor: pointer;
}
.carousel-btn:hover { background: rgba(247,243,234,0.1); }
.carousel-counter { font-size: 12px; color: rgba(247,243,234,0.5); }
.carousel-thumbs { display: flex; gap: 12px; margin-top: 18px; overflow-x: auto; padding-bottom: 6px; }
.carousel-thumb {
  flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  border: 1px solid rgba(27,59,47,0.15); border-radius: 12px; padding: 8px 12px;
  background: #fff; cursor: pointer; font-size: 13px; color: var(--evergreen);
}
.carousel-thumb.active { border-color: var(--maize); background: rgba(217,164,65,0.1); }
.carousel-thumb img { width: 34px; height: 42px; object-fit: cover; border-radius: 6px; }
.carousel-thumb-fallback { width: 34px; height: 42px; border-radius: 6px; background: rgba(143,167,135,0.3); display: block; }

/* Outlined nav button (matches "Owner / Admin Login" style) */
.btn-outline-nav {
  border: 1px solid var(--evergreen);
  color: var(--evergreen);
  background: transparent;
  padding: 8px 18px;
  font-size: 13px;
}
.btn-outline-nav:hover { background: var(--evergreen); color: var(--ivory); }

/* Team card photos (Leadership grid) */
.team-card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.team-card-img-fallback {
  background: rgba(143,167,135,0.2); display: flex; align-items: center;
  justify-content: center; color: rgba(27,59,47,0.4); font-size: 13px;
}

/* Keep photos from taking over the whole screen on phones */
@media (max-width: 640px) {
  .carousel-slide { grid-template-columns: 1fr; }
  .carousel-photo { padding: 20px 20px 0; }
  .carousel-photo img, .carousel-photo-fallback {
    aspect-ratio: 1 / 1;
    max-height: 300px;
  }
  .carousel-bio { padding: 20px 24px 26px; }
  .carousel-bio h3 { font-size: 22px; }
  .carousel-quote { font-size: 26px; margin-bottom: 6px; }
  .carousel-controls { padding: 0 24px 24px; }
  .team-card-img, .team-card-img-fallback { aspect-ratio: 16/10; max-height: 220px; }
}

/* Leadership — alternating editorial rows (no JS required) */
.leader-row {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 50px;
  align-items: center;
  padding: 50px 0;
  border-bottom: 1px solid rgba(27,59,47,0.1);
}
.leader-row:last-child { border-bottom: none; }
.leader-row-reverse { grid-template-columns: 1fr 340px; }
.leader-row-reverse .leader-photo-col { order: 2; }
.leader-row-reverse .leader-text-col { order: 1; }

.leader-photo {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(27,59,47,0.15);
}
.leader-photo-fallback {
  display: flex; align-items: center; justify-content: center;
  background: rgba(143,167,135,0.2); color: rgba(27,59,47,0.4); font-size: 13px;
}

.leader-index {
  display: block;
  font-family: Georgia, serif;
  font-size: 40px;
  color: rgba(217,164,65,0.45);
  line-height: 1;
  margin-bottom: 10px;
}
.leader-name { color: var(--evergreen); font-size: 28px; margin-bottom: 4px; }
.leader-title {
  color: var(--maize);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.leader-bio { color: rgba(34,34,31,0.75); line-height: 1.7; max-width: 560px; }

@media (max-width: 760px) {
  .leader-row, .leader-row-reverse {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 36px 0;
  }
  .leader-row-reverse .leader-photo-col,
  .leader-row-reverse .leader-text-col { order: initial; }
  .leader-photo { aspect-ratio: 4/3; max-height: 320px; }
  .leader-name { font-size: 23px; }
}

/* Redesigned admin/owner sidebar with icons */
.dash-sidebar { display: flex; flex-direction: column; padding: 22px 0; }
.dash-sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 0 20px 16px; }
.dash-sidebar .brand img { width: 30px; height: 30px; border-radius: 6px; }
.dash-sidebar .brand span { font-family: Georgia, serif; font-size: 16px; color: var(--ivory); }
.sidebar-label { padding: 0 20px 10px; font-size: 11px; letter-spacing: 0.1em; color: var(--maize); font-weight: 600; }
.dash-sidebar nav { display: flex; flex-direction: column; }
.dash-sidebar nav a, .sidebar-bottom a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 20px; font-size: 14px; color: rgba(247,243,234,0.75);
}
.dash-sidebar nav a:hover, .dash-sidebar nav a.active,
.sidebar-bottom a:hover, .sidebar-bottom a.active {
  background: rgba(217,164,65,0.15); color: var(--maize); border-right: 3px solid var(--maize);
}
.nav-icon { width: 17px; height: 17px; flex-shrink: 0; }
.sidebar-bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(247,243,234,0.1); display: flex; flex-direction: column; }

.dash-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(34,34,31,0.6); }
.dash-user-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: rgba(143,167,135,0.25);
  display: flex; align-items: center; justify-content: center; color: var(--evergreen);
}
.dash-user-avatar .nav-icon { width: 15px; height: 15px; }

/* Photo upload field (admin forms) */
.photo-upload-row { display: flex; align-items: center; gap: 16px; margin: 6px 0 4px; }
.photo-upload-preview {
  width: 76px; height: 92px; border-radius: 10px; background: rgba(143,167,135,0.2);
  display: flex; align-items: center; justify-content: center; color: rgba(27,59,47,0.4);
  overflow: hidden; flex-shrink: 0; border: 1px dashed rgba(27,59,47,0.25);
}
.photo-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-upload-preview .nav-icon { width: 26px; height: 26px; }
.upload-btn-label {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(27,59,47,0.25); border-radius: 999px;
  padding: 9px 18px; font-size: 13px; font-weight: 600; color: var(--evergreen);
  cursor: pointer; background: #fff; width: fit-content;
}
.upload-btn-label:hover { border-color: var(--maize); }
.upload-btn-label input[type=file] { display: none; }
.upload-hint { font-size: 12px; color: rgba(34,34,31,0.5); margin-top: 4px; }

/* Member/item list rendered as cards instead of a table */
.item-list { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.item-row {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid rgba(27,59,47,0.1); border-radius: 12px; padding: 12px 16px;
}
.item-row img { width: 44px; height: 54px; object-fit: cover; border-radius: 8px; }
.item-row .item-photo-fallback {
  width: 44px; height: 54px; border-radius: 8px; background: rgba(143,167,135,0.25);
  display: flex; align-items: center; justify-content: center; color: rgba(27,59,47,0.4);
}
.item-row .item-photo-fallback .nav-icon { width: 20px; height: 20px; }
.item-row .item-info { flex: 1; }
.item-row .item-info strong { display: block; color: var(--evergreen); font-size: 15px; }
.item-row .item-info span { display: block; font-size: 12px; color: rgba(34,34,31,0.55); }
.item-row .item-actions { display: flex; gap: 14px; font-size: 13px; }
.item-row .item-actions a, .item-row .item-actions button {
  background: none; border: none; padding: 0; cursor: pointer; font-size: 13px;
}
.item-row .item-actions .edit-link { color: var(--evergreen); }
.item-row .item-actions .remove-link { color: #b3412c; }

/* Global mobile safety: never allow sideways scrolling on any page */
html, body { max-width: 100%; overflow-x: hidden; }

/* Mobile hamburger menu (header) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px; height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--evergreen);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .site-header .wrap { position: relative; flex-wrap: nowrap; }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ivory);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 24px 20px;
    border-bottom: 1px solid rgba(27,59,47,0.12);
    box-shadow: 0 12px 20px rgba(27,59,47,0.08);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 0; width: 100%; }
  .site-nav .btn { margin-top: 8px; }
}
