/* Central Alberta Seniors — text-first, senior-friendly styling */
:root {
  --primary: #2E5E4E;
  --secondary: #F5F0E6;
  --accent: #C9A227;
  --text: #2B2B2B;
  --muted: #6B6B6B;
  --radius: 10px;
  --font: Georgia, 'Times New Roman', serif;
  --font-scale: 1; /* accessibility: A-/A/A+ buttons multiply this */
}

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--secondary);
  line-height: 1.6;
  font-size: calc(22px * var(--font-scale)); /* bumped from 18px for seniors */
}

/* WEATHER STRIP: persistent, top of every page, mood layer behind it */
.weather-strip {
  background: var(--primary);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}
.weather-city { font-weight: bold; }
.weather-forecast { opacity: 0.95; }
.weather-refresh {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius);
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  min-height: 48px; /* tappable target for seniors */
}
.weather-refresh:hover { background: rgba(255,255,255,0.3); }

/* Accessibility: text-size control (A-, A, A+) and high-contrast toggle */
.a11y-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.a11y-controls button {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  min-width: 48px; /* tappable target for seniors */
  min-height: 48px;
}
.a11y-controls button:hover,
.a11y-controls button.active {
  background: rgba(255,255,255,0.3);
}

/* High-contrast theme — toggled via JS adding .high-contrast to body */
body.high-contrast {
  --text: #000000;
  --muted: #1a1a1a;
  --secondary: #ffffff;
  --primary: #003300;
  background: #ffffff;
  color: #000000;
}
body.high-contrast .profile-card,
body.high-contrast .listing-card {
  border: 2px solid #000000;
}
body.high-contrast .btn-primary {
  background: #000000;
  color: #ffffff;
}
body.high-contrast .btn-ghost {
  border-color: #000000;
  color: #000000;
}
body.high-contrast .weather-strip {
  background: #003300;
}

/* HEADER: logo left, brand text dead-center, nav right */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 1rem 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 1rem; }
.logo { height: 56px; width: auto; }
.brand-text { text-align: center; }
.site-header h1 { font-size: 1.4rem; font-weight: normal; margin: 0; }
.tagline { font-size: 0.95rem; opacity: 0.9; margin: 0; }

.header-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-self: end;
}

.main-nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.main-nav a {
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1rem; /* enlarged tap target, was 0.4rem 0.8rem */
  border-radius: var(--radius);
  font-size: 1.05rem;
}
.main-nav a:hover,
.main-nav a.active { background: rgba(255,255,255,0.15); }

.hero {
  text-align: center;
  padding: 3.5rem 1.5rem; /* extra top padding to clear weather strip + mood layer */
  background: #fff;
}
.hero h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 1.5rem; }

.btn {
  display: inline-block;
  padding: 0.9rem 1.8rem; /* enlarged tap target, was 0.7rem 1.4rem */
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  min-height: 48px; /* tappable target for seniors */
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--accent); color: #2B2B2B; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid #ccc; }
.btn:hover { opacity: 0.9; }

.profiles-section,
.cost-cutting-page { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem; }

.section-header { margin-bottom: 1.5rem; }
.section-header h2,
.section-header h3 { margin-bottom: 0.5rem; }

.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; align-items: center; }
.filters input[type="search"],
.filters select {
  padding: 0.6rem 0.9rem; /* enlarged tap target, was 0.5rem 0.75rem */
  border-radius: var(--radius);
  border: 1px solid #ccc;
  font-size: 1rem;
  font-family: inherit;
  min-height: 48px;
}

/* TEXT-FIRST profile cards — no photo grid */
.profiles-container { display: flex; flex-direction: column; gap: 1rem; }
.profile-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem; /* enlarged padding, was 1.25rem */
  border: 1px solid #e0e0e0;
}
.profile-card-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.profile-name { font-size: 1.25rem; }
.verified-badge {
  display: inline-block;
  background: var(--accent);
  color: #2B2B2B;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: bold;
}
.profile-location { color: var(--muted); font-size: 0.9rem; }
.profile-blurb { margin: 0.75rem 0; }
.profile-interests { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin-bottom: 1rem; }
.profile-interests li {
  background: var(--secondary);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
}
.profile-card-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Cost-cutting sub-tabs */
.sub-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; border-bottom: 2px solid #e0e0e0; }
.sub-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  color: var(--muted);
  min-height: 48px; /* tappable target for seniors */
}
.sub-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: bold;
}
.sub-tab-panel { display: none; }
.sub-tab-panel.active { display: block; }

.listings { display: flex; flex-direction: column; gap: 1rem; }
.listing-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem; /* enlarged padding, was 1.25rem */
  border: 1px solid #e0e0e0;
}

.disclaimer {
  margin-top: 2rem;
  padding: 1rem;
  background: #fff3cd;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--primary); }

@media (max-width: 640px) {
  body { font-size: calc(20px * var(--font-scale)); /* bumped from 17px */ }
  .hero h2 { font-size: 1.6rem; }
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .brand { flex-direction: column; gap: 0.5rem; }
  .brand-text { text-align: center; }
  .header-right {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    justify-self: stretch;
  }
  .main-nav {
    flex-direction: column;
    width: 100%;
  }
  .main-nav a {
    text-align: center;
    width: 100%;
  }
  .a11y-controls {
    justify-content: center;
  }
  .weather-strip {
    flex-direction: column;
    text-align: center;
  }
  .hero {
    padding: 2.5rem 1rem;
  }
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  .filters input[type="search"],
  .filters select {
    width: 100%;
  }
}