/* ERA Public Directory Styles — Wix-inspired dark cards on muted background */

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

body {
  font-family: 'Open Sans', sans-serif;
  background: #c5cfd8;
  color: #2d3b2d;
  min-height: 100vh;
}

/* Header — styles now in ../wix-header.css */
.era-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Hero */
.hero {
  text-align: center;
  padding: 2.5rem 1.5rem 1rem;
  background: linear-gradient(180deg, #d4a017 0%, #c5930e 100%);
  color: #fff;
}

.hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.9);
  font-weight: 300;
  margin-top: 0.4rem;
}

/* Controls */
.controls {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #8a9a8a;
  pointer-events: none;
}

#search {
  width: 100%;
  padding: 0.6rem 0.75rem 0.6rem 2.5rem;
  border: 1px solid #b0bec5;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Open Sans', sans-serif;
  background: #fff;
  color: #2d3b2d;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#search:focus {
  outline: none;
  border-color: #1a5c2a;
  box-shadow: 0 0 0 3px rgba(26, 92, 42, 0.15);
}

.filters {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.45rem 1rem;
  border: 1px solid #b0bec5;
  border-radius: 20px;
  background: #fff;
  color: #5a7a5a;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: #1a5c2a;
  color: #1a5c2a;
}

.filter-btn.active {
  background: #1a5c2a;
  color: #fff;
  border-color: #1a5c2a;
}

.count {
  font-size: 0.85rem;
  color: #607d8b;
  margin-left: auto;
  white-space: nowrap;
}

/* Grid — fluid auto-fill adapts smoothly to any viewport */
.grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: #607d8b;
  font-size: 1rem;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: #607d8b;
}

/* Card — dark green like Wix */
.card {
  background: #1f4a3a;
  border-radius: 14px;
  padding: 1.5rem 1.25rem 1rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.card-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.75rem;
  display: block;
  border: 3px solid rgba(255,255,255,0.2);
  background: #2a5a48;
}

.card-initials {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: #fff;
  border: 3px solid rgba(255,255,255,0.2);
}

.card-name {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.3rem;
}

.card-badges {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-board { background: rgba(255,255,255,0.15); color: #8fd4a4; }
.badge-donor { background: #d4a017; color: #fff; }

.card-bio {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
  margin-bottom: 0.5rem;
  width: 100%;
}

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

.read-more {
  font-size: 0.78rem;
  color: #8fd4a4;
  cursor: pointer;
  border: none;
  background: none;
  font-weight: 600;
  padding: 0;
  margin-bottom: 0.5rem;
  display: none;
}

.read-more:hover { text-decoration: underline; color: #b0e8c0; }
.read-more.visible { display: inline; }

/* Email link */
.card-email {
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
}

.card-email a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
}

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

/* Social icons row */
.card-socials {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  width: 100%;
}

.card-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: all 0.2s;
}

.card-socials a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.card-socials svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.card-attendance {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.45);
  margin-top: 0.4rem;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  color: #607d8b;
}

.footer a { color: #455a64; text-decoration: underline; }

/* Responsive — grid auto-fills, these handle non-grid elements */
@media (max-width: 768px) {
  .nav { gap: 1rem; }
  .nav a { font-size: 0.8rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero-sub { font-size: 0.9rem; }
  .controls { flex-direction: column; align-items: stretch; }
  .search-wrap { max-width: none; }
  .count { margin-left: 0; }
  .grid { padding: 1rem; }
}

@media (max-width: 480px) {
  .grid { padding: 0.75rem; gap: 1rem; }
  .header-inner { flex-direction: column; gap: 0.5rem; }
  .nav { flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
  .hero { padding: 1.5rem 1rem 0.75rem; }
  .hero h1 { font-size: 1.25rem; }
  .card { padding: 1.25rem 1rem 0.75rem; }
  .card-photo, .card-initials { width: 80px; height: 80px; }
}
