/* ==========================================================================
   POLITICADE UNIFIED SHELL STYLES (Header & Footer System)
   Applied across Homepage, Social Security Calculator, and Political Quiz
   ========================================================================== */

:root {
  --shell-bg: #080c14;
  --shell-bg-glass: rgba(8, 12, 20, 0.88);
  --shell-border: rgba(255, 255, 255, 0.08);
  --shell-border-hover: rgba(255, 255, 255, 0.2);
  --shell-text: #f8fafc;
  --shell-text-muted: #94a3b8;
  --shell-text-dim: #64748b;
  --shell-cyan: #06b6d4;
  --shell-indigo: #6366f1;
  --shell-purple: #a855f7;
  --shell-emerald: #10b981;
  --shell-glow-cyan: rgba(6, 182, 212, 0.35);
  --shell-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shell-mono: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   Site Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--shell-bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--shell-border);
  padding: 0.85rem 2rem;
  transition: all 0.2s ease;
}

.site-header-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

/* Brand */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--shell-text);
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.site-brand:hover {
  opacity: 0.92;
}

.brand-badge {
  background: linear-gradient(135deg, var(--shell-indigo), var(--shell-cyan));
  color: #ffffff;
  padding: 0.42rem 0.85rem;
  border-radius: 9px;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.07em;
  box-shadow: 0 0 20px var(--shell-glow-cyan);
  display: inline-block;
  line-height: 1.2;
  font-family: var(--shell-font);
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--shell-text);
  line-height: 1;
  font-family: var(--shell-font);
}

.brand-divider {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 300;
  font-size: 1.1rem;
  margin: 0 0.1rem;
}

.brand-subname {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--shell-text-muted);
  letter-spacing: -0.01em;
  font-family: var(--shell-font);
  white-space: nowrap;
}

/* Nav Menu & Actions */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.site-nav-link {
  color: var(--shell-text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: var(--shell-font);
}

.site-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.site-nav-link.active {
  color: var(--shell-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.site-nav-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--shell-border);
  color: #ffffff;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  cursor: pointer;
  font-family: var(--shell-font);
}

.site-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--shell-border-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.site-nav-btn.primary {
  background: linear-gradient(135deg, var(--shell-indigo), var(--shell-cyan));
  border: none;
  box-shadow: 0 3px 12px var(--shell-glow-cyan);
  color: #ffffff;
  font-weight: 700;
}

.site-nav-btn.primary:hover {
  box-shadow: 0 5px 20px rgba(6, 182, 212, 0.5);
  filter: brightness(1.08);
}

/* Tool Embedded Controls (e.g. Valuation Mode) */
.header-tool-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--shell-border);
  padding: 3px 4px 3px 9px;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
}

.header-tool-control .control-label {
  font-size: 0.72rem;
  color: var(--shell-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  font-family: var(--shell-font);
}

.header-tool-control .segmented-control {
  display: inline-flex;
  background: rgba(8, 12, 20, 0.7);
  border-radius: 9999px;
  padding: 2px;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.header-tool-control .btn-segmented {
  background: transparent;
  border: none;
  color: var(--shell-text-muted);
  font-family: var(--shell-font);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.header-tool-control .btn-segmented:hover {
  color: #ffffff;
}

.header-tool-control .btn-segmented.active {
  background: linear-gradient(135deg, var(--shell-indigo), var(--shell-cyan));
  color: #ffffff;
  box-shadow: 0 2px 8px var(--shell-glow-cyan);
}

/* Responsive Header */
@media (max-width: 900px) {
  .site-header {
    padding: 0.75rem 1.25rem;
  }
  .site-header-container {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding: 0.6rem 0.85rem;
  }
  .site-header-container {
    gap: 0.5rem;
  }
  .brand-subname,
  .brand-divider {
    display: none;
  }
  .brand-badge {
    padding: 0.32rem 0.65rem;
    font-size: 0.85rem;
  }
  .site-nav {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 3px;
  }
  .site-nav::-webkit-scrollbar {
    display: none;
  }
  .site-nav-link {
    font-size: 0.8rem;
    padding: 0.4rem 0.65rem;
    flex-shrink: 0;
  }
  .header-tool-control {
    width: 100%;
    justify-content: space-between;
    margin-bottom: 0.2rem;
  }
  .header-tool-control .segmented-control {
    flex: 1;
  }
  .header-tool-control .btn-segmented {
    flex: 1;
    justify-content: center;
    padding: 0.35rem 0.5rem;
    font-size: 0.72rem;
  }
  .site-nav-btn {
    flex-shrink: 0;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    min-height: 38px;
  }
}

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--shell-border);
  background: rgba(8, 12, 20, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 3.5rem 2rem 2.5rem;
  margin-top: auto;
  width: 100%;
}

.site-footer-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.site-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  flex-wrap: wrap;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand-wrap {
  max-width: 440px;
}

.footer-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--shell-text);
  margin-bottom: 0.85rem;
}

.footer-tagline {
  color: var(--shell-text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 0;
  font-family: var(--shell-font);
}

.footer-nav-groups {
  display: flex;
  gap: 3.5rem;
  flex-wrap: wrap;
}

.footer-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-group-heading {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--shell-text);
  margin-bottom: 0.25rem;
  font-family: var(--shell-font);
}

.footer-nav-group a {
  color: var(--shell-text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  transition: all 0.2s ease;
  font-family: var(--shell-font);
  display: inline-block;
}

.footer-nav-group a:hover {
  color: var(--shell-cyan);
  transform: translateX(2px);
}

.site-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  font-size: 0.82rem;
  color: var(--shell-text-dim);
  font-family: var(--shell-font);
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: var(--shell-text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
  font-family: var(--shell-font);
}

.footer-bottom-links a:hover {
  color: var(--shell-text);
}

/* Responsive Footer */
@media (max-width: 800px) {
  .site-footer {
    padding: 2.5rem 1.25rem 2rem;
  }
  .site-footer-top {
    flex-direction: column;
    gap: 2rem;
  }
  .footer-nav-groups {
    gap: 2rem;
    width: 100%;
    justify-content: space-between;
  }
  .site-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* ==========================================================================
   Unified Support / Donation Section
   ========================================================================== */
.donation-banner-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3.5rem;
  box-sizing: border-box;
}

.donation-banner-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(6, 182, 212, 0.12) 100%), rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 16px;
  padding: 2.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 24px rgba(6, 182, 212, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 2.5rem;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .donation-banner-section {
    padding: 1rem 1.25rem 2.5rem;
  }
  .donation-banner-card {
    grid-template-columns: 1fr;
    padding: 1.75rem 1.25rem;
    gap: 1.5rem;
  }
}

.donation-info h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--shell-text);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
  font-family: var(--shell-font);
}

.donation-info p {
  font-size: 0.9rem;
  color: var(--shell-text-muted);
  line-height: 1.6;
  margin-bottom: 0.85rem;
  font-family: var(--shell-font);
}

.donation-info p:last-of-type {
  margin-bottom: 1.25rem;
}

.stripe-badge-trust {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.8rem;
  color: var(--shell-text-dim);
  flex-wrap: wrap;
  font-family: var(--shell-font);
}

.donation-action-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--shell-border);
  border-radius: 12px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-sizing: border-box;
}

.donation-action-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--shell-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--shell-font);
}

.donation-presets-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

@media (max-width: 480px) {
  .donation-presets-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.btn-donate-amount {
  background: rgba(8, 12, 20, 0.8);
  border: 1px solid var(--shell-border);
  color: var(--shell-text);
  font-family: var(--shell-mono);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.6rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-donate-amount:hover,
.btn-donate-amount.active {
  border-color: var(--shell-cyan);
  background: rgba(6, 182, 212, 0.15);
  color: var(--shell-cyan);
  box-shadow: 0 0 12px var(--shell-glow-cyan);
}

.btn-stripe-checkout {
  background: linear-gradient(135deg, var(--shell-indigo), var(--shell-cyan));
  color: #fff !important;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  box-shadow: 0 4px 15px var(--shell-glow-cyan);
  transition: all 0.2s ease;
  font-family: var(--shell-font);
}

.btn-stripe-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(6, 182, 212, 0.6);
  filter: brightness(1.08);
}

.donation-subtext {
  text-align: center;
  font-size: 0.75rem;
  color: var(--shell-text-dim);
  font-family: var(--shell-font);
}

/* Modal for Project Support */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 16px;
  max-width: min(520px, calc(100% - 1rem));
  width: 100%;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px var(--shell-glow-cyan);
  position: relative;
  margin: auto;
  backdrop-filter: blur(20px);
  box-sizing: border-box;
}

.modal-close-btn {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  background: transparent;
  border: none;
  color: var(--shell-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: #fff;
}

/* Mobile Small Screen Enhancements (< 540px) */
@media (max-width: 540px) {
  .site-footer {
    padding: 2rem 1rem 1.5rem;
  }
  .site-footer-top {
    gap: 1.5rem;
  }
  .footer-nav-groups {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .footer-nav-group a {
    padding: 0.3rem 0;
    font-size: 0.92rem;
  }
  .footer-bottom-links {
    flex-direction: column;
    gap: 0.75rem;
  }
  .donation-banner-section {
    padding: 1rem 0.75rem 2.25rem;
  }
  .donation-banner-card {
    padding: 1.35rem 1rem;
    gap: 1.25rem;
    border-radius: 12px;
  }
  .donation-info h3 {
    font-size: 1.2rem;
  }
  .donation-info p {
    font-size: 0.85rem;
  }
  .stripe-badge-trust {
    font-size: 0.75rem;
    gap: 0.4rem;
  }
  .donation-action-box {
    padding: 1rem 0.85rem;
  }
  .btn-donate-amount {
    font-size: 0.9rem;
    padding: 0.7rem 0.4rem;
    min-height: 44px;
  }
  .btn-stripe-checkout {
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
    min-height: 48px;
  }
  .modal-card {
    padding: 1.5rem 1rem;
    border-radius: 14px;
  }
}

