/* eSenior Helper — shared senior-friendly design system */
:root {
  --bs-primary: #14315a;
  --bs-primary-rgb: 20, 49, 90;
  --brand-navy: #14315a;
  --brand-navy-dark: #0e2542;
  --brand-amber: #b45309;
  --brand-amber-dark: #8f4207;
  --brand-teal: #0f6b6b;
  --success-green: #2e7d32;
  --text: #1f2933;
  --text-muted: #52606d;
  --bg: #f7f9fb;
  --surface: #ffffff;
  --border: #d9e2ec;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4, h5, h6 { color: var(--brand-navy); font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 2.75rem); }

p, li, label, .form-text { font-size: 1rem; }

a { color: var(--brand-teal); }
a:hover { color: var(--brand-navy); }

/* Skip link for keyboard/screen-reader users */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--brand-navy); color: #fff; padding: 12px 20px;
}
.skip-link:focus { left: 0; color: #fff; }

/* Visible focus for all interactive elements */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, .form-check-input:focus-visible {
  outline: 3px solid var(--brand-navy);
  outline-offset: 2px;
}

.navbar-brand { font-weight: 700; font-size: 1.8rem; color: var(--brand-navy) !important; }
.navbar .nav-link { font-size: 1.1rem; padding: 12px 16px; color: var(--brand-navy); }

/* Buttons — min 48px tap target */
.btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
.btn-lg { font-size: 1.15rem; }
.btn-primary {
  background-color: var(--brand-amber); border-color: var(--brand-amber);
  color: #fff; font-weight: 600; padding: 12px 30px;
}
.btn-primary:hover { background-color: var(--brand-amber-dark); border-color: var(--brand-amber-dark); color: #fff; }
.btn-outline-light { min-height: 48px; }

.hero-section {
  background: linear-gradient(135deg, var(--brand-navy) 0%, #24507f 100%);
  color: #fff; padding: 80px 0;
}
.hero-section h1, .hero-section h2 { color: #fff; }

/* Headings inside dark-background sections must stay light (the global
   h1-h6 navy rule above would otherwise render them dark-on-dark). */
.hero-section h1, .hero-section h2, .hero-section h3, .hero-section h4, .hero-section h5, .hero-section h6,
.newsletter-signup h1, .newsletter-signup h2, .newsletter-signup h3, .newsletter-signup h4, .newsletter-signup h5, .newsletter-signup h6,
.newsletter-cta h1, .newsletter-cta h2, .newsletter-cta h3, .newsletter-cta h4, .newsletter-cta h5, .newsletter-cta h6,
.legal-hero h1, .legal-hero h2, .legal-hero h3, .legal-hero h4, .legal-hero h5, .legal-hero h6,
.compliance-footer h1, .compliance-footer h2, .compliance-footer h3, .compliance-footer h4, .compliance-footer h5, .compliance-footer h6 { color: #fff; }

.section-title { color: var(--brand-navy); font-weight: 700; margin-bottom: 2rem; }

.feature-icon, .benefit-icon {
  width: 80px; height: 80px; background: #e7eef7; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
}
.feature-icon i, .benefit-icon i { font-size: 2rem; color: var(--brand-navy); }

.trust-badge { background: var(--surface); border: 2px solid var(--border); border-radius: 10px; padding: 20px; text-align: center; height: 100%; }

.form-control, .form-select { font-size: 1.05rem; }
.form-control:focus, .form-select:focus {
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 0.2rem rgba(20, 49, 90, 0.25);
}

/* Larger consent checkboxes for easier tapping */
.checkbox-custom { transform: scale(1.5); margin-right: .5rem; }
.form-check { padding-left: 2.25rem; }

.sms-info { background: #eef4fb; border-left: 4px solid var(--brand-navy); padding: 15px; border-radius: 5px; margin: 15px 0; }

.trust-indicators { background: #eef1f5; border-radius: 10px; padding: 20px; margin: 20px 0; }

.compliance-footer { background: var(--brand-navy-dark); color: #fff; padding: 40px 0 20px; }
.compliance-footer a { color: #cdd8e6; }
.compliance-footer a:hover { color: #fff; }

.text-small { font-size: 0.9rem; }

/* Signup page components (moved from signup.html inline styles) */
.signup-form {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  padding: 50px;
  margin-top: -50px;
  position: relative;
  z-index: 10;
}
.step-indicator { display: flex; justify-content: center; margin-bottom: 30px; }
.step { display: flex; align-items: center; margin: 0 10px; }
.step-number {
  width: 32px; height: 32px;
  background: var(--brand-amber); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; margin-right: 10px;
}

.newsletter-section { background: #eef1f5; padding: 60px 0; }

/* Listicle page components (moved from listicle.html inline styles) */
.article-content {
  background: var(--surface);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.article-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 20px;
  line-height: 1.2;
}

.article-subtitle {
  font-size: 1.3rem;
  color: var(--brand-amber);
  font-weight: 600;
  margin-bottom: 30px;
}

.author-info { display: flex; align-items: center; margin-bottom: 20px; }
.author-avatar { width: 50px; height: 50px; border-radius: 50%; margin-right: 15px; }

.savings-item {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  transition: all 0.3s ease;
  position: relative;
}
.savings-item:hover {
  border-color: var(--brand-navy);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.savings-number {
  position: absolute; top: -15px; left: 30px;
  background: var(--brand-navy); color: #fff;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 1.2rem;
}
.savings-title { color: var(--brand-navy); font-weight: 700; font-size: 1.5rem; margin-bottom: 15px; margin-top: 10px; }
.savings-description { font-size: 1.1rem; line-height: 1.7; margin-bottom: 20px; }

.cta-button {
  background: var(--brand-amber); color: #fff; border: none;
  padding: 15px 30px; border-radius: 8px; font-weight: 600; font-size: 1.1rem;
  text-decoration: none; display: inline-block; transition: all 0.3s ease;
}
.cta-button:hover { background: var(--brand-amber-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }

.newsletter-signup {
  background: linear-gradient(135deg, var(--brand-navy) 0%, #24507f 100%);
  color: #fff; padding: 40px; border-radius: 15px; text-align: center; margin: 40px 0;
}

.disclaimer {
  background: #f8f9fa; border-left: 4px solid var(--text-muted);
  padding: 15px; margin: 20px 0; font-size: 0.9rem; color: var(--text-muted);
}

.highlight-stat { background: #e3f2fd; padding: 20px; border-radius: 10px; text-align: center; margin: 20px 0; }
.highlight-stat .number { font-size: 2.5rem; font-weight: bold; color: var(--brand-navy); }

@media (max-width: 768px) {
  .article-title { font-size: 1.8rem; }
  .article-content { padding: 20px; }
  .savings-item { padding: 20px; }
}

/* Third-party placement group — injected via SSI include on listicle.html */
.placement-group {
  background: var(--surface); border: 2px solid var(--border); border-radius: 15px;
  padding: 30px; margin-bottom: 30px; transition: all 0.3s ease; position: relative;
}
.placement-group:hover { border-color: var(--brand-navy); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); transform: translateY(-2px); }
.placement-group h2 { color: var(--brand-navy); font-weight: 700; font-size: 1.5rem; margin-bottom: 20px; margin-top: 0; }
.placement-group h2 a { color: var(--brand-navy); text-decoration: none; }
.placement-group h2 a:hover { color: var(--brand-amber); text-decoration: none; }
.placement-group img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto 20px auto; border-radius: 10px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
.placement-group p,
.placement-group li { font-size: 1.1rem; line-height: 1.7; margin: 0 0 15px; color: var(--text); }
.placement-group a { color: var(--brand-navy); cursor: pointer; text-decoration: none; }
.placement-group a:focus,
.placement-group a:hover { color: var(--brand-amber); text-decoration: underline; }
.placement-group hr { border: none; height: 2px; background: linear-gradient(to right, transparent, var(--brand-navy), transparent); margin: 30px 0; }

.placement-button {
  background: var(--brand-amber) !important; color: #fff !important; border: none !important;
  padding: 15px 30px !important; border-radius: 8px !important; font-weight: 600 !important; font-size: 1.1rem !important;
  text-decoration: none !important; display: block !important; width: 100% !important; margin: 20px auto !important;
  transition: all 0.3s ease !important; cursor: pointer !important; text-align: center !important; white-space: normal !important;
}
.placement-button:hover,
.placement-button:focus {
  background: var(--brand-amber-dark) !important; color: #fff !important; transform: translateY(-2px) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important; text-decoration: none !important;
}

.modal-content { border-radius: 15px; border: none; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); }
.modal-header { border-bottom: 1px solid var(--border); padding: 20px; }
.modal-body { padding: 30px; }
.modal-body h4 { color: var(--brand-navy); font-weight: 600; }

@media (max-width: 768px) {
  .placement-group { padding: 20px; margin-bottom: 20px; }
  .placement-group h2 { font-size: 1.3rem; }
  .placement-group p,
  .placement-group li { font-size: 1rem; }
  .placement-button { font-size: 1rem !important; padding: 12px 20px !important; }
}

/* News page components (moved from news.html inline styles) */
.article-card {
  background: var(--surface);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  padding: 0;
  margin-bottom: 30px;
  transition: all 0.3s ease;
  overflow: hidden;
  height: 100%;
}
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 15px 15px 0 0;
}

/* Renamed from the page's original .article-content to avoid colliding with
   the full-article-body .article-content defined above (listicle.html). */
.news-card-content { padding: 25px; }

.article-category {
  background: #e3f2fd;
  color: var(--brand-navy);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Renamed from the page's original .article-title to avoid colliding with
   the large Playfair-Display .article-title defined above (listicle.html). */
.news-card-title {
  color: var(--brand-navy);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 15px 0 10px;
  line-height: 1.4;
  display: inline-block;
}
.news-card-title:hover { color: var(--brand-amber); text-decoration: none; }

.article-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 15px;
}

.read-time { display: flex; align-items: center; }

.featured-article {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 50px;
}

.featured-content { padding: 40px; }

.featured-title {
  font-size: 2.2rem;
  color: var(--brand-navy);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
}

.category-filter {
  background: var(--surface);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 25px;
  margin-bottom: 30px;
}

.filter-btn {
  background: #f8f9fa;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 20px;
  margin: 5px;
  transition: all 0.3s ease;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--brand-navy);
  color: #fff;
  border-color: var(--brand-navy);
}

.newsletter-cta {
  background: linear-gradient(135deg, var(--brand-navy) 0%, #24507f 100%);
  color: #fff;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  margin: 50px 0;
}

.trending-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #dc3545;
  color: #fff;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Contact page components (moved from contact.html inline styles) */
.contact-card {
  background: var(--surface);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 30px;
  transition: transform 0.3s ease;
}
.contact-card:hover { transform: translateY(-5px); }

.contact-icon {
  width: 70px;
  height: 70px;
  background: #e3f2fd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.contact-icon i { font-size: 1.8rem; color: var(--brand-navy); }

.contact-form {
  background: var(--surface);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  padding: 40px;
}

.faq-section { background: #f8f9fa; }

.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-item:last-child { border-bottom: none; }

.faq-question { font-weight: 600; color: var(--brand-navy); margin-bottom: 10px; }

/* Thank-you page components (moved from thank-you.html inline styles) */
.thank-you-icon {
  width: 120px;
  height: 120px;
  background: var(--brand-amber);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
}
.thank-you-icon i { font-size: 3rem; color: #fff; }

.next-steps {
  background: var(--surface);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  padding: 40px;
  margin: 40px 0;
}

.step-icon {
  width: 60px;
  height: 60px;
  background: #e3f2fd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.step-icon i { font-size: 1.5rem; color: var(--brand-navy); }

/* Legal pages (privacy.html, terms.html) */
.legal-hero {
  background: linear-gradient(135deg, var(--brand-navy) 0%, #4a7bc8 100%);
  padding: 80px 0;
  color: #fff;
}

.legal-content {
  background: var(--surface);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sidebar {
  background: var(--bg);
  border-radius: 10px;
  position: sticky;
  top: 100px;
}

.highlight-box {
  background: #e8f4fd;
  border-left: 4px solid var(--brand-navy);
  padding: 20px;
  margin: 20px 0;
  border-radius: 5px;
}

.privacy-section {
  margin-bottom: 2rem;
}

.privacy-section h3 {
  color: var(--brand-navy);
  font-weight: 600;
  margin-bottom: 1rem;
}

.terms-section {
  margin-bottom: 2rem;
}

.terms-section h3 {
  color: var(--brand-navy);
  font-weight: 600;
  margin-bottom: 1rem;
}

.key-points {
  background: var(--bg);
  border-radius: 8px;
  padding: 15px;
}
