/* ═══════════════════════════════════════
   CommunityVet.co.za — Shared Styles
   ═══════════════════════════════════════ */

/* ─── Tokens ─── */
:root {
  --red-950: #450A0A; --red-900: #7F1D1D; --red-800: #991B1B; --red-600: #DC2626;
  --red-100: #FEE2E2; --red-50: #FEF2F2;
  --amber-100: #FEF3C7; --amber-50: #FFFBEB;
  --slate-900: #0f172a; --slate-600: #475569; --slate-500: #64748b;
  --slate-200: #e2e8f0; --slate-100: #f1f5f9; --slate-50: #f8fafc;
  --text: var(--slate-900); --text-muted: var(--slate-600);
  --bg: #fff; --bg-alt: var(--slate-50);
  --border: var(--slate-200);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-xs: 0.375rem; --r-sm: 0.5rem; --r-md: 0.75rem; --r-lg: 1rem; --r-xl: 1.25rem;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); font-size: 1rem; line-height: 1.7; color: var(--text); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-600); text-decoration: none; }
a:hover { color: var(--red-800); }
ul { list-style: none; }

/* ─── Container ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red-600); margin-bottom: 0.75rem; }
.title { font-size: 1.75rem; font-weight: 700; line-height: 1.25; margin-bottom: 1rem; }
.subtitle { font-size: 1.05rem; color: var(--text-muted); max-width: 600px; line-height: 1.7; margin-bottom: 2.5rem; }

/* ─── Emergency Bar ─── */
.emergency-bar { background: var(--amber-50); border-bottom: 2px solid #fbbf24; position: relative; z-index: 1000; }
.emergency-inner { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; }
.emergency-bar p { font-size: 0.875rem; color: #78350f; flex: 1; }
.emergency-bar p strong { font-weight: 700; }
.emergency-numbers { display: flex; gap: 1rem; flex-wrap: wrap; }
.emergency-numbers a { color: #78350f; font-weight: 600; font-size: 0.875rem; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.emergency-close { background: none; border: none; font-size: 1.25rem; color: #78350f; cursor: pointer; padding: 0.25rem; opacity: 0.6; line-height: 1; }
.emergency-close:hover { opacity: 1; }
.emergency-bar.hidden { display: none; }

/* ─── Navigation ─── */
.nav { background: #fff; border-bottom: 0.5px solid var(--border); position: sticky; top: 0; z-index: 900; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: flex; align-items: center; }
.logo img { height: 42px; width: auto; }
.nav-list { display: flex; gap: 0.25rem; }
.nav-list a { font-size: 0.875rem; font-weight: 500; color: var(--slate-500); padding: 0.5rem 0.75rem; border-radius: var(--r-sm); transition: color .15s; }
.nav-list a:hover { color: var(--text); }

/* ─── Hero (full-bleed overlay) ─── */
.hero { position: relative; min-height: 65vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(69,10,10,0.88) 0%, rgba(127,29,29,0.72) 40%, rgba(69,10,10,0.92) 100%); }
.hero-content { position: relative; z-index: 1; text-align: center; padding: 4rem 0 3rem; max-width: 680px; margin: 0 auto; }
.hero-eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: #FCA5A5; margin-bottom: 1.25rem; }
.hero-title { font-size: clamp(1.75rem, 4.5vw, 3rem); font-weight: 800; color: #fff; line-height: 1.15; margin-bottom: 1rem; }
.hero-stat { color: #FCA5A5; }
.hero-sub { font-size: 1.05rem; color: rgba(255,255,255,0.78); line-height: 1.7; max-width: 520px; margin: 0 auto 2rem; }
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-trust { margin-top: 2rem; font-size: 0.75rem; color: rgba(255,255,255,0.45); }
.hero-trust a { color: rgba(255,255,255,0.55); text-decoration: underline; }

/* ─── Buttons ─── */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; border-radius: var(--r-md); transition: all .2s; cursor: pointer; text-decoration: none; line-height: 1; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 0.95rem; }
.btn-primary { background: var(--red-600); color: #fff; }
.btn-primary:hover { background: var(--red-800); color: #fff; }
.btn-ghost { background: rgba(255,255,255,0.1); color: #fff; border: 1.5px solid rgba(255,255,255,0.3); }
.btn-ghost:hover { background: rgba(255,255,255,0.18); color: #fff; border-color: rgba(255,255,255,0.5); }

/* ─── Stats Bar ─── */
.stats-bar { background: var(--red-950); padding: 2.5rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--r-lg); padding: 1.5rem 1rem; text-align: center; }
.stat-num { display: block; font-size: 1.75rem; font-weight: 800; color: #FCA5A5; line-height: 1; margin-bottom: 0.25rem; }
.stat-lbl { display: block; font-size: 0.7rem; font-weight: 500; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.25rem; }

/* ─── Pathways ─── */
.pathways { background: var(--bg-alt); padding: 5rem 0; }
.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.path-card { background: var(--bg); border: 0.5px solid var(--border); border-radius: var(--r-xl); padding: 1.75rem; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column; }
.path-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.08); transform: translateY(-2px); }
.path-icon { width: 48px; height: 48px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 1rem; flex-shrink: 0; }
.path-icon--green { background: #DCFCE7; color: #16A34A; }
.path-icon--amber { background: #FEF3C7; color: #D97706; }
.path-icon--blue { background: #DBEAFE; color: #2563EB; }
.path-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.path-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1.25rem; flex: 1; }
.path-cta { font-size: 0.875rem; font-weight: 600; color: var(--red-600); margin-top: auto; }

/* ─── Who It's For ─── */
.who-section { padding: 5rem 0; }
.who-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.who-content p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.who-sidebar h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; }
.who-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0; border-bottom: 0.5px solid var(--border); font-size: 0.875rem; }
.who-list li:last-child { border-bottom: none; }
.who-image { margin-top: 1.5rem; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.who-image img { border-radius: var(--r-lg); }

/* ─── Generic Sections ─── */
.section { padding: 4rem 0; }
.section--alt { background: var(--bg-alt); }

/* ─── Mission ─── */
.mission-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2.5rem; align-items: start; }
.mission-content p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.disclaimer-box { background: var(--red-50); border: 1px solid var(--red-100); border-left: 4px solid var(--red-600); border-radius: 0 var(--r-lg) var(--r-lg) 0; padding: 1.25rem 1.5rem; }
.disclaimer-header { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red-800); margin-bottom: 0.75rem; }
.disclaimer-box p { font-size: 0.85rem; color: var(--slate-600); line-height: 1.7; margin-bottom: 0.5rem; }
.disclaimer-box p:last-child { margin-bottom: 0; }

/* ─── Breed Guides ─── */
.breed-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.breed-card { background: var(--bg); border: 0.5px solid var(--border); border-radius: var(--r-lg); padding: 1.25rem; text-align: center; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.breed-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); transform: translateY(-2px); }
.breed-emoji { font-size: 1.5rem; line-height: 1; }
.breed-name { font-size: 0.95rem; font-weight: 700; }
.breed-meta { font-size: 0.7rem; color: var(--slate-500); }
.breed-card--alt { background: var(--red-50); border-color: var(--red-100); }
.breed-card--alt .breed-name { color: var(--red-800); }

/* ─── Emergency Cards ─── */
.emergency-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.emergency-card { background: var(--amber-50); border: 1px solid var(--amber-100); border-radius: var(--r-lg); padding: 1.25rem; text-align: center; }
.emergency-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.35rem; }
.emergency-phone { display: block; font-size: 1.15rem; font-weight: 800; color: var(--red-600); text-decoration: none; margin-bottom: 0.25rem; }
.emergency-card p { font-size: 0.75rem; color: var(--slate-500); }

/* ─── Page Header (subpages) ─── */
.page-header { background: linear-gradient(160deg, #450A0A 0%, #7F1D1D 60%, #991B1B 100%); padding: 3rem 0; color: #fff; text-align: center; position: relative; overflow: hidden; }
.page-header h1 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; margin-bottom: 0.5rem; }
.page-header p { font-size: 0.95rem; color: rgba(255,255,255,0.75); max-width: 560px; margin: 0 auto 1.5rem; }
.page-header .header-img { width: 100%; max-width: 500px; margin: 1rem auto 0; border-radius: var(--r-lg); box-shadow: 0 10px 40px rgba(0,0,0,0.25); }
.page-content { max-width: 840px; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.page-content h2 { font-size: 1.35rem; font-weight: 700; margin: 2rem 0 0.75rem; color: var(--red-800); }
.page-content h3 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.page-content p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.page-content ul, .page-content ol { margin: 0.5rem 0 1rem 1.5rem; color: var(--text-muted); font-size: 0.95rem; }
.page-content li { margin-bottom: 0.4rem; }
.page-content table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.875rem; }
.page-content th { background: var(--red-800); color: #fff; padding: 0.65rem 0.75rem; text-align: left; font-weight: 600; font-size: 0.8rem; }
.page-content td { padding: 0.6rem 0.75rem; border-bottom: 0.5px solid var(--border); }
.page-content tr:nth-child(even) td { background: var(--bg-alt); }
.page-content .cta-box { background: var(--red-50); border: 1px solid var(--red-100); border-radius: var(--r-lg); padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.page-content .cta-box h3 { margin-top: 0; color: var(--red-800); }
.page-content .back-link { display: inline-block; font-size: 0.875rem; color: var(--slate-500); text-decoration: none; margin-bottom: 1rem; }
.page-content .back-link:hover { color: var(--text); }
.page-content .callout { background: var(--amber-50); border: 1px solid var(--amber-100); border-radius: var(--r-md); padding: 1rem 1.25rem; margin: 1.25rem 0; }
.page-content .callout p { margin: 0; color: #78350f; font-size: 0.9rem; }

/* ─── Footer ─── */
.footer { background: var(--red-950); color: rgba(255,255,255,0.6); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-logo { font-size: 1.25rem; font-weight: 800; color: #fff; display: block; margin-bottom: 0.75rem; }
.footer-tagline { font-size: 0.85rem; line-height: 1.7; max-width: 320px; }
.footer-nav { display: flex; gap: 2.5rem; }
.footer-col h4 { font-size: 0.8rem; font-weight: 700; color: rgba(255,255,255,0.8); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { font-size: 0.85rem; color: rgba(255,255,255,0.5); transition: color .15s; }
.footer-col a:hover { color: #FCA5A5; }
.footer-bottom { padding-top: 1.5rem; text-align: center; font-size: 0.75rem; color: rgba(255,255,255,0.35); }
.footer-bottom p + p { margin-top: 0.35rem; }
.footer-bottom a { color: #FCA5A5; text-decoration: underline; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .path-grid { grid-template-columns: 1fr; }
  .who-grid, .mission-grid, .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .breed-grid { grid-template-columns: repeat(3, 1fr); }
  .emergency-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .container { padding: 0 1rem; }
  .nav-list { display: none; }
  .hero { min-height: 75vh; }
  .hero-content { padding: 2.5rem 1rem; }
  .hero-title { font-size: 1.6rem; }
  .hero-sub { font-size: 0.9rem; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .title { font-size: 1.35rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .stat { padding: 1rem 0.75rem; }
  .stat-num { font-size: 1.3rem; }
  .breed-grid { grid-template-columns: repeat(2, 1fr); }
  .emergency-grid { grid-template-columns: 1fr; }
  .emergency-inner { flex-wrap: wrap; }
  .emergency-numbers { gap: 0.5rem; }
  .footer-nav { flex-direction: column; gap: 1.25rem; }
  .page-content { padding: 2rem 1rem; }
}
