/* ============================================
   Richmond PAL — Youth Sports & Community
   Unique theme: rp- prefix throughout
   ============================================ */

:root {
  --rp-primary: #1e3a5f;
  --rp-primary-deep: #142942;
  --rp-accent: #e63946;
  --rp-accent-hover: #c62d39;
  --rp-bg: #ffffff;
  --rp-bg-light: #f0f4f8;
  --rp-text: #2b2b2b;
  --rp-text-muted: #5e6e82;
  --rp-border: #d0dbe6;
  --rp-border-light: #e4ecf4;
  --rp-white: #ffffff;
  --rp-font-heading: 'Poppins', sans-serif;
  --rp-font-body: 'Roboto', sans-serif;
  --rp-max-width: 1160px;
  --rp-sidebar-width: 270px;
  --rp-radius: 6px;
  --rp-radius-lg: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--rp-font-body);
  color: var(--rp-text);
  background: var(--rp-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* --- Container --- */
.rp-container { max-width: var(--rp-max-width); margin: 0 auto; padding: 0 1.5rem; }

/* --- Top Navigation --- */
.rp-topnav {
  background: var(--rp-primary-deep);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.rp-topnav .rp-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.rp-brand {
  font-family: var(--rp-font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--rp-white);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rp-brand::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 28px;
  background: var(--rp-accent);
  border-radius: 2px;
}

.rp-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.rp-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-family: var(--rp-font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: var(--rp-radius);
  transition: color 0.15s, background 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rp-links a:hover {
  color: var(--rp-white);
  background: rgba(255,255,255,0.1);
}

.rp-links a.rp-active {
  background: var(--rp-accent);
  color: var(--rp-white);
}

.rp-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--rp-white);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

/* --- Hero Section --- */
.rp-hero {
  background: linear-gradient(135deg, var(--rp-primary-deep) 0%, var(--rp-primary) 60%, #2a5080 100%);
  color: var(--rp-white);
  position: relative;
  overflow: hidden;
}

.rp-hero::after {
  content: "";
  position: absolute;
  bottom: -60px;
  right: -40px;
  width: 300px;
  height: 300px;
  border: 40px solid rgba(230,57,70,0.12);
  border-radius: 50%;
  pointer-events: none;
}

.rp-hero-inner {
  position: relative;
  z-index: 2;
  padding: 5rem 0 4.5rem;
  max-width: 700px;
}

.rp-hero-tagline {
  display: inline-block;
  font-family: var(--rp-font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--rp-accent);
  margin-bottom: 1rem;
  padding: 0.3rem 0.9rem;
  border: 2px solid var(--rp-accent);
  border-radius: var(--rp-radius);
}

.rp-hero h1 {
  font-family: var(--rp-font-heading);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 1.25rem;
}

.rp-hero-desc {
  font-size: 1.15rem;
  line-height: 1.7;
  opacity: 0.88;
  margin-bottom: 2.25rem;
}

.rp-hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.rp-btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--rp-font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--rp-radius);
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rp-btn:active { transform: translateY(1px); }

.rp-btn--red {
  background: var(--rp-accent);
  color: var(--rp-white);
  box-shadow: 0 3px 12px rgba(230,57,70,0.3);
}

.rp-btn--red:hover {
  background: var(--rp-accent-hover);
  box-shadow: 0 4px 16px rgba(230,57,70,0.4);
}

.rp-btn--ghost {
  background: transparent;
  color: var(--rp-white);
  border: 2px solid rgba(255,255,255,0.4);
}

.rp-btn--ghost:hover {
  border-color: var(--rp-white);
  background: rgba(255,255,255,0.08);
}

/* --- Section Headings --- */
.rp-section {
  padding: 3.5rem 0;
}

.rp-section--alt {
  background: var(--rp-bg-light);
}

.rp-heading {
  font-family: var(--rp-font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--rp-primary);
  text-align: center;
  margin-bottom: 0.5rem;
  position: relative;
}

.rp-heading::after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background: var(--rp-accent);
  margin: 0.6rem auto 0;
  border-radius: 2px;
}

.rp-subheading {
  text-align: center;
  color: var(--rp-text-muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Program / Card Grid --- */
.rp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.rp-card {
  background: var(--rp-white);
  border-radius: var(--rp-radius-lg);
  border: 1px solid var(--rp-border);
  padding: 2rem 1.75rem;
  text-decoration: none;
  color: var(--rp-text);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.rp-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--rp-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.rp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(30,58,95,0.1);
}

.rp-card:hover::before {
  transform: scaleX(1);
}

.rp-card h3 {
  font-family: var(--rp-font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--rp-primary);
  margin-bottom: 0.5rem;
}

.rp-card p {
  font-size: 0.9rem;
  color: var(--rp-text-muted);
  line-height: 1.6;
  flex: 1;
}

.rp-card-arrow {
  margin-top: 1rem;
  font-family: var(--rp-font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rp-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- CTA Banner --- */
.rp-cta-banner {
  background: var(--rp-primary);
  color: var(--rp-white);
  text-align: center;
  padding: 3.5rem 1.5rem;
}

.rp-cta-banner h2 {
  font-family: var(--rp-font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.rp-cta-banner p {
  font-size: 1.05rem;
  opacity: 0.8;
  margin-bottom: 1.75rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Page Banner (List/Single) --- */
.rp-page-banner {
  background: var(--rp-primary-deep);
  color: var(--rp-white);
  padding: 2.75rem 0 2.25rem;
  border-bottom: 4px solid var(--rp-accent);
}

.rp-page-banner h1 {
  font-family: var(--rp-font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
}

.rp-page-banner .rp-lead {
  color: rgba(255,255,255,0.7);
  font-size: 1.05rem;
  margin-top: 0.5rem;
  max-width: 640px;
}

/* --- Breadcrumb --- */
.rp-breadcrumb {
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
  opacity: 0.65;
}

.rp-breadcrumb a { color: rgba(255,255,255,0.75); text-decoration: none; }
.rp-breadcrumb a:hover { text-decoration: underline; }
.rp-breadcrumb .rp-sep { margin: 0 0.35rem; }

/* --- Two-Column Layout --- */
.rp-page-body { padding: 2.5rem 0 4rem; }

.rp-two-col {
  display: grid;
  grid-template-columns: 1fr var(--rp-sidebar-width);
  gap: 3rem;
  align-items: start;
}

.rp-main { min-width: 0; }

/* --- Sidebar --- */
.rp-sidebar-box {
  background: var(--rp-bg-light);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 80px;
}

.rp-sidebar-box h4 {
  font-family: var(--rp-font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rp-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--rp-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rp-sidebar-box ul { list-style: none; }
.rp-sidebar-box li { margin: 0.4rem 0; }

.rp-sidebar-box a {
  color: var(--rp-primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s;
  display: block;
  padding: 0.25rem 0;
}

.rp-sidebar-box a:hover { color: var(--rp-accent); }

/* --- Table of Contents --- */
.rp-toc {
  border: 1px solid var(--rp-border);
  border-left: 4px solid var(--rp-accent);
  border-radius: 0 var(--rp-radius) var(--rp-radius) 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  background: var(--rp-bg-light);
}

.rp-toc h3 {
  font-family: var(--rp-font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--rp-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.rp-toc nav ul { list-style: none; margin: 0; padding: 0; }
.rp-toc nav li { margin: 0.2rem 0; }
.rp-toc nav a { color: var(--rp-primary); text-decoration: none; font-size: 0.88rem; }
.rp-toc nav a:hover { color: var(--rp-accent); text-decoration: underline; }
.rp-toc nav ul ul { padding-left: 1.1rem; }

/* --- Content Typography --- */
.rp-content h2 {
  font-family: var(--rp-font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--rp-primary);
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--rp-border-light);
}

.rp-content h3 {
  font-family: var(--rp-font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2rem 0 0.5rem;
  color: var(--rp-primary-deep);
}

.rp-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.5rem 0 0.4rem;
  color: var(--rp-text);
}

.rp-content p { margin-bottom: 1.15rem; }

.rp-content ul, .rp-content ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
}

.rp-content li { margin-bottom: 0.35rem; }

.rp-content blockquote {
  border-left: 4px solid var(--rp-accent);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: var(--rp-bg-light);
  color: var(--rp-text-muted);
  font-style: italic;
  border-radius: 0 var(--rp-radius) var(--rp-radius) 0;
}

.rp-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.rp-content th, .rp-content td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--rp-border);
  text-align: left;
}

.rp-content th {
  background: var(--rp-primary);
  color: var(--rp-white);
  font-family: var(--rp-font-heading);
  font-weight: 600;
}

.rp-content tr:nth-child(even) { background: var(--rp-bg-light); }

.rp-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--rp-radius);
  margin: 1rem 0;
}

.rp-content a {
  color: var(--rp-primary);
  text-decoration: underline;
  text-decoration-color: var(--rp-accent);
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.rp-content a:hover { color: var(--rp-accent); }

/* --- Related Pages --- */
.rp-related {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--rp-border-light);
}

.rp-related h3 {
  font-family: var(--rp-font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rp-primary);
  margin-bottom: 0.75rem;
}

.rp-related ul { list-style: none; }
.rp-related li { margin: 0.35rem 0; }
.rp-related a { color: var(--rp-primary); text-decoration: none; font-weight: 600; }
.rp-related a:hover { color: var(--rp-accent); }

/* --- List Page Intro --- */
.rp-list-intro {
  max-width: 720px;
  margin-bottom: 2rem;
}

/* --- Footer --- */
.rp-bottom {
  background: var(--rp-primary-deep);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.88rem;
}

.rp-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.rp-footer-brand { max-width: 380px; }

.rp-footer-name {
  font-family: var(--rp-font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rp-white);
  margin-bottom: 0.4rem;
}

.rp-footer-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  opacity: 0.65;
}

.rp-footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rp-footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s;
}

.rp-footer-links a:hover { color: var(--rp-accent); }

.rp-footer-copy {
  padding-top: 1.25rem;
  text-align: center;
  opacity: 0.35;
  font-size: 0.78rem;
}

/* --- Responsive --- */
@media (max-width: 920px) {
  .rp-two-col { grid-template-columns: 1fr; }
  .rp-sidebar-box { position: static; order: -1; }
}

@media (max-width: 768px) {
  html { font-size: 15px; }

  .rp-hero-inner { padding: 3.5rem 0 3rem; }
  .rp-hero h1 { font-size: 2.1rem; }
  .rp-page-banner h1 { font-size: 1.7rem; }

  .rp-footer-inner { flex-direction: column; gap: 1.5rem; }
  .rp-grid { grid-template-columns: 1fr; }

  .rp-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--rp-primary-deep);
    padding: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  }

  .rp-links.rp-open { display: flex; }
  .rp-links a { padding: 0.7rem 1rem; width: 100%; }
  .rp-toggle { display: block; }
}
