/* EAA Chapter 319 — inspired by the 2017 Artisteer template palette */
:root {
  --page-bg: #AEC0D3;
  --sheet-border: #819DBB;
  --nav-bg: #28394B;
  --nav-text: #E1E5EA;
  --nav-hover: #C3E2FF;
  --accent: #004A8E;
  --accent-mid: #005CB3;
  --link: #0072DC;
  --headline: #36424E;
  --slogan: #0F1215;
  --text: #1A2430;
  --muted: #495A6A;
  --white: #ffffff;
  --danger: #a33;
  --ok: #1a6b3c;
}

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", Times, serif;
  color: var(--text);
  background: var(--page-bg) url("/images/page.jpeg") fixed;
  line-height: 1.55;
}

a {
  color: var(--link);
}

a:hover {
  color: var(--accent-mid);
}

.site-wrap {
  width: min(1200px, calc(100% - 1.5rem));
  margin: 1.25rem auto 2rem;
}

.sheet {
  background: linear-gradient(to bottom, #8194A7 0%, #A2B0BE 20%, #8D9EB0 50%, #7E91A5 80%, #8799AB 100%);
  border: 1px solid var(--sheet-border);
  border-radius: 4px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(26, 36, 48, 0.18);
}

.sheet-inner {
  background: var(--white);
  border-radius: 2px;
  overflow: hidden;
}

.site-header {
  background: #AEC0D3 url("/images/header.jpg") center / cover no-repeat;
  padding: 1.75rem 1.5rem 1.25rem;
  text-align: center;
  border-bottom: 1px solid #c5d2e0;
}

.site-header .brand {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--headline);
  letter-spacing: 0.02em;
}

.site-header .brand a {
  color: inherit;
  text-decoration: none;
}

.site-header .slogan {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  color: var(--slogan);
  font-style: italic;
  font-weight: 400;
}

.site-nav {
  background: var(--nav-bg);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.site-nav a {
  display: block;
  padding: 0.7rem 1rem;
  color: var(--nav-text);
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--nav-hover);
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle {
  display: none;
  width: 100%;
  background: var(--nav-bg);
  color: var(--nav-text);
  border: 0;
  padding: 0.75rem 1rem;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.content {
  padding: 1.5rem 1.75rem 2rem;
  min-height: 280px;
}

.content h1 {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 1.65rem;
  font-weight: 700;
}

.content h2 {
  color: var(--accent);
  font-size: 1.3rem;
}

.content .lead {
  font-size: 1.08rem;
  color: var(--muted);
}

.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list li {
  border-bottom: 1px solid #dde5ee;
  padding: 0.65rem 0;
}

.article-list a {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 600;
  text-decoration: none;
}

.article-list a:hover {
  text-decoration: underline;
}

.article-list .meta {
  display: block;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.project-hero {
  display: block;
  max-width: min(100%, 640px);
  height: auto;
  margin: 0.75rem 0 1rem;
  border: 1px solid #c5d2e0;
}

.project-update {
  margin: 1.75rem 0;
  padding-top: 0.75rem;
  border-top: 1px solid #dde5ee;
}

.project-update h2 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem;
  margin: 0.85rem 0 0;
}

.project-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #c5d2e0;
}

.article-body h1 {
  text-align: left;
  font-size: 1.55rem;
  margin: 0.5rem 0 0.35rem;
}

.site-footer {
  background: #eef3f8;
  border-top: 1px solid #c5d2e0;
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer a {
  font-weight: 600;
}

.fb-link {
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* Forms & members */
.form-card {
  max-width: 420px;
  margin: 0 auto;
}

.form-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.form-card .filter-check {
  display: flex;
  margin: 0.65rem 0;
  font-weight: 400;
}

label {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0.75rem 0 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #9aadc0;
  border-radius: 3px;
  font-size: 1rem;
  font-family: Arial, Helvetica, sans-serif;
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(to bottom, #2997FF 0%, #0084FF 40%, #0064C2 100%);
  color: #fff !important;
  border: 0;
  border-radius: 3px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn-secondary {
  background: linear-gradient(to bottom, #8194A7, #5a6d80);
}

.btn-danger {
  background: linear-gradient(to bottom, #c45, #922);
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 3px;
  margin-bottom: 1rem;
  font-family: Arial, Helvetica, sans-serif;
}

.flash-error {
  background: #fde8e8;
  color: var(--danger);
  border: 1px solid #e8b4b4;
}

.flash-ok {
  background: #e6f5ec;
  color: var(--ok);
  border: 1px solid #a8d4b8;
}

.table-wrap {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
}

table.data th,
table.data td {
  border-bottom: 1px solid #dde5ee;
  padding: 0.55rem 0.45rem;
  text-align: left;
  vertical-align: top;
}

table.data th {
  background: #eef3f8;
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

table.data th a.sort-link {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}

table.data th a.sort-link:hover {
  text-decoration: underline;
  color: var(--accent-mid);
}

.contact-cell {
  font-size: 0.95rem;
  line-height: 1.35;
  word-break: break-word;
}

.admin-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  min-width: 7.5rem;
}

.admin-actions form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
}

.admin-actions .btn {
  margin-top: 0;
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
}

.avatar {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  background: #eef3f8;
  border: 1px solid #c5d2e0;
}

.avatar-lg {
  width: 120px;
  height: 120px;
  margin: 0 auto 0.75rem;
}

.profile-photo {
  text-align: center;
  margin: 1rem 0 1.5rem;
  font-family: Arial, Helvetica, sans-serif;
}

.col-photo {
  width: 64px;
}

table.data td.col-photo {
  vertical-align: middle;
}

input[type="file"] {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
}

.admin-photo {
  margin-bottom: 1.5rem;
}

.admin-photo h2 {
  margin-top: 0;
}

.admin-divider {
  border: 0;
  border-top: 1px solid #c5d2e0;
  margin: 1.5rem 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  font-family: Arial, Helvetica, sans-serif;
}

.search-box {
  flex: 1;
  min-width: 180px;
}

.admin-filters {
  margin-top: 0;
}

.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  white-space: nowrap;
  font-size: 0.95rem;
  cursor: pointer;
}

.filter-check input {
  margin: 0;
}

.by-laws-body p,
.article-body p {
  margin: 0.75rem 0;
}

.by-laws-body li {
  margin: 0.25rem 0;
}

.article-body img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
  }

  .site-nav ul {
    display: none;
    flex-direction: column;
  }

  .site-nav.is-open ul {
    display: flex;
  }

  .content {
    padding: 1.1rem 1rem 1.5rem;
  }
}

textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #9aadc0;
  border-radius: 3px;
  font-size: 1rem;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
  resize: vertical;
}

.field-hint {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
  color: #495A6A;
  margin: 0.35rem 0 0;
}

.muted {
  color: #495A6A;
  font-weight: normal;
  font-size: 0.9rem;
}

.title-preview {
  margin: 0.25rem 0 1rem;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--accent);
  font-size: 1.05rem;
}
