/* JustForSeniors.org — base styles
   Design goals: high legibility for older readers, warm trustworthy palette, generous spacing. */

:root {
  --navy: #1b3a5c;
  --navy-dark: #122a44;
  --gold: #d99a2b;
  --gold-dark: #b87e17;
  --cream: #fbf7ef;
  --green: #3a7d5c;
  --text: #24303d;
  --text-light: #52606d;
  --border: #e3dccb;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(27,58,92,0.08);
  --shadow-hover: 0 10px 28px rgba(27,58,92,0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Verdana, Arial, sans-serif;
  font-size: 19px;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
}

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

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold-dark); }

h1, h2, h3, h4, h5, h6 { color: var(--navy-dark); line-height: 1.25; font-weight: 700; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--navy-dark);
  padding: 10px 16px; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.1;
}
.brand-logo { width: 46px; height: 46px; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-size: 26px;
  font-weight: 800;
  color: var(--navy-dark);
}
.brand-dot { color: var(--gold-dark); }
.brand-tagline {
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 600;
}
.main-nav {
  display: flex;
  gap: 6px;
}
.main-nav a {
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 17px;
  color: var(--navy-dark);
}
.main-nav a:hover, .main-nav a.active {
  background: var(--cream);
  color: var(--gold-dark);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px; height: 3px; background: var(--navy-dark); border-radius: 2px;
}

@media (max-width: 780px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-top: 10px;
  }
  .main-nav.open { display: flex; }
  .header-inner { position: relative; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 72px 24px;
  text-align: center;
}
.hero-inner { max-width: 780px; margin: 0 auto; }
.hero h1 { color: var(--white); font-size: 40px; margin: 0 0 18px; }
.hero-sub { font-size: 20px; color: #dbe6f0; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy-dark);
}
.btn-primary:hover { background: var(--gold-dark); color: var(--white); }
.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); color: var(--white); }

/* On light backgrounds, secondary btn needs dark text */
.section .btn-secondary, .page-hero .btn-secondary {
  color: var(--navy-dark);
  border-color: var(--navy-dark);
}
.section .btn-secondary:hover, .page-hero .btn-secondary:hover { background: var(--navy-dark); color: var(--white); }

/* ---------- Sections ---------- */
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px;
}
.section h2 {
  font-size: 30px;
  margin-bottom: 28px;
  text-align: center;
}
.narrow-section { max-width: 820px; }
.narrow-section h2 { text-align: left; font-size: 24px; margin-top: 36px; }
.narrow-section p { font-size: 19px; margin-bottom: 18px; }

.center-cta { text-align: center; margin-top: 30px; }

.page-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
}
.page-hero h1 { font-size: 34px; margin-bottom: 10px; }
.page-hero p { font-size: 19px; color: var(--text-light); max-width: 700px; margin: 0 auto; }

/* ---------- Category tiles ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.cat-tile {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  font-weight: 700;
  font-size: 17px;
  color: var(--navy-dark);
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); color: var(--gold-dark); }

/* ---------- Post cards ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
}
.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
  color: var(--text);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.post-card-img { aspect-ratio: 16/10; overflow: hidden; background: var(--border); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: var(--gold); font-weight: 800; font-size: 22px;
}
.post-card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.post-card-cat {
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--green); font-weight: 700; margin-bottom: 6px;
}
.post-card-body h3 { font-size: 19px; margin: 0 0 10px; }
.post-card-body p { font-size: 15.5px; color: var(--text-light); margin: 0; }

/* ---------- Filter bar (blog index) ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; justify-content: center;
}
.filter-btn {
  background: var(--white);
  border: 2px solid var(--border);
  color: var(--navy-dark);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.filter-btn:hover { border-color: var(--gold); }
.filter-btn.active { background: var(--navy-dark); border-color: var(--navy-dark); color: var(--white); }

/* ---------- Trust section ---------- */
.trust-section { background: var(--white); border-radius: var(--radius); }
.trust-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 26px;
}
.trust-item h3 { font-size: 19px; margin-bottom: 8px; }
.trust-item p { color: var(--text-light); font-size: 16.5px; }

/* ---------- Article page ---------- */
.article {
  max-width: 820px;
  margin: 0 auto;
  padding: 44px 24px 10px;
}
.article-header { text-align: center; margin-bottom: 6px; }
.article-header h1 { font-size: 32px; margin: 10px 0; }
.article-date { color: var(--text-light); font-size: 15px; }

.inline-disclosure {
  max-width: 820px;
  margin: 20px auto 0;
  padding: 14px 20px;
  background: #fdf3df;
  border: 1px solid var(--gold);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-light);
}

.article-body { padding: 30px 0 10px; font-size: 19px; }
.article-body h2 {
  font-size: 25px; margin-top: 40px; margin-bottom: 16px;
  background: none !important; color: var(--navy-dark) !important;
  padding: 0 !important;
}
.article-body h3 { font-size: 21px; margin-top: 30px; margin-bottom: 12px; background: none !important; color: var(--navy-dark) !important; padding: 0 !important; }
.article-body h4, .article-body h5, .article-body h6 { font-size: 18px; margin-top: 24px; background: none !important; color: var(--navy-dark) !important; padding: 0 !important; }
.article-body p { margin: 0 0 18px; color: var(--text); background: none !important; }
.article-body ul, .article-body ol { margin: 0 0 20px; padding-left: 28px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--green); font-weight: 600; text-decoration: underline; }
.article-body strong { color: var(--navy-dark); }
.article-body figure { margin: 26px 0; }
.article-body img.article-img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 8px auto;
}
.article-body table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.article-body table td, .article-body table th { border: 1px solid var(--border); padding: 10px; text-align: left; }

.cta-wrap { text-align: center; margin: 28px 0; }
.btn-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-dark) !important;
  font-weight: 700;
  font-size: 17px;
  padding: 15px 30px;
  border-radius: 999px;
  text-decoration: none !important;
}
.btn-cta:hover { background: var(--gold-dark); color: var(--white) !important; }

.faq-block { margin: 40px 0; padding: 26px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.faq-item { border-top: 1px solid var(--border); padding: 16px 0; }
.faq-item:first-of-type { border-top: none; }
.faq-item h3 { font-size: 18px; margin: 0 0 8px; }
.faq-item p { margin: 0; color: var(--text-light); }

.related-section { background: var(--white); border-radius: var(--radius); margin-top: 20px; }

.contact-email { font-size: 24px; font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #cfd9e3;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1180px; margin: 0 auto; padding: 50px 24px 30px;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
}
.footer-brand { color: var(--white); font-size: 22px; margin-bottom: 10px; }
.footer-col h4 { color: var(--white); font-size: 15px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.footer-col a { display: block; color: #cfd9e3; margin-bottom: 10px; }
.footer-col a:hover { color: var(--gold); }
.footer-col p { font-size: 15px; color: #a9b7c4; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  max-width: 1180px; margin: 0 auto; padding: 20px 24px 30px;
  font-size: 13.5px; color: #8fa0b0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.footer-bottom a { color: #b7c6d3; text-decoration: underline; }

@media (max-width: 700px) {
  body { font-size: 18px; }
  .hero h1 { font-size: 30px; }
  .footer-inner { grid-template-columns: 1fr; }
  .article { padding: 30px 18px 0; }
}
