/* ============================================
   SPIKE'S FRENCHIE GUIDE — Design System
   Theme: French Bulldog warm tones
   Mobile-first responsive
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Background */
  --bg-primary: #FFF8F0;
  --bg-secondary: #F5E6D3;
  --bg-tertiary: #EED9C4;
  --bg-dark: #3E2C1E;
  --bg-dark-alt: #2D2016;

  /* Text */
  --text-primary: #2D2016;
  --text-secondary: #6B5B4E;
  --text-light: #8C7B6E;
  --text-on-dark: #FFF8F0;
  --text-on-dark-muted: #D4C4B0;

  /* Accent */
  --accent: #D4956A;
  --accent-hover: #B87A52;
  --accent-light: #F0D4B8;
  --accent-cta: #E8734A;
  --accent-cta-hover: #D4613A;

  /* Cards */
  --card-bg: #FFFFFF;
  --card-border: #E8D5C0;
  --card-shadow: 0 2px 12px rgba(45, 32, 22, 0.08);
  --card-shadow-hover: 0 6px 24px rgba(45, 32, 22, 0.14);

  /* Badges / Tags */
  --badge-health: #4CAF50;
  --badge-warning: #FF7043;
  --badge-emergency: #E53935;
  --badge-puppy: #42A5F5;
  --badge-adult: #66BB6A;
  --badge-senior: #9C27B0;
  --badge-nutrition: #FF9800;
  --badge-breed: #8D6E63;

  /* Layout */
  --max-width: 1200px;
  --content-width: 800px;
  --nav-height: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 50px;

  /* Typography */
  --font-heading: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-med: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

ul, ol {
  padding-left: 1.5rem;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
  font-size: 1.15rem;
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
}

.text-muted {
  color: var(--text-secondary);
}

.text-light {
  color: var(--text-light);
}

.text-accent {
  color: var(--accent);
}

/* --- Layout Containers --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section {
  padding: 3rem 0;
}

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

.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section-dark > .container > h2,
.section-dark > .container > p {
  color: var(--text-on-dark);
}

.section-dark .text-muted {
  color: var(--text-on-dark-muted);
}

.section-dark .card {
  color: var(--text-primary);
}

.section-dark .card h3 {
  color: var(--text-primary);
}

.section-dark .card p {
  color: var(--text-secondary);
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 240, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  height: var(--nav-height);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 50%;
}

.footer-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.25rem;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 0.25rem;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-light);
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-med);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  padding: 1.5rem;
  z-index: 99;
  overflow-y: auto;
}

.nav-mobile.open {
  display: block;
}

.nav-mobile a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--card-border);
}

.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--accent);
  background: var(--accent-light);
}

/* Desktop nav */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

/* --- Breadcrumbs --- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--text-secondary);
}

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

.breadcrumb-sep::before {
  content: ">";
  margin: 0 0.15rem;
}

/* --- Hero --- */
.hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.hero-home {
  padding: 4rem 0 3rem;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 50%, var(--accent-light) 100%);
}

.hero-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--accent-light);
  color: var(--accent-hover);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.hero-emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
}

.hero-spike-img {
  width: 180px;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
  filter: drop-shadow(0 4px 16px rgba(45, 32, 22, 0.2));
}

@media (min-width: 768px) {
  .hero-spike-img {
    width: 240px;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-med);
}

.btn-primary {
  background: var(--accent-cta);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-cta-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(232, 115, 74, 0.3);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 2px solid var(--card-border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 0.5rem 0;
}

.btn-ghost:hover {
  color: var(--accent-hover);
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 500px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition-med);
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* Ensure card headings on dark sections have good contrast */
.section-dark .card h3 {
  color: var(--text-primary);
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Link card (clickable) */
a.card:hover {
  color: inherit;
}

/* --- Badges --- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
}

.badge-health { background: var(--badge-health); }
.badge-warning { background: var(--badge-warning); }
.badge-emergency { background: var(--badge-emergency); }
.badge-puppy { background: var(--badge-puppy); }
.badge-adult { background: var(--badge-adult); }
.badge-senior { background: var(--badge-senior); }
.badge-nutrition { background: var(--badge-nutrition); }
.badge-breed { background: var(--badge-breed); }

/* --- Stats Bar --- */
.stats-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 2rem 0;
}

@media (min-width: 600px) {
  .stats-bar {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-item {
  text-align: center;
  padding: 1rem;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* --- Content Article --- */
.article-header {
  padding: 2rem 0 1rem;
}

.article-content {
  padding: 1rem 0 3rem;
}

.article-content h2 {
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--bg-secondary);
}

.article-content h3 {
  margin: 2rem 0 0.75rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.25rem;
}

.article-content li {
  margin-bottom: 0.4rem;
}

/* Info boxes */
.info-box {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  border-left: 4px solid;
}

.info-box-summary {
  background: #EEF0FF;
  border-color: #6366F1;
}

.info-box-summary ul {
  margin: 0.25rem 0 0 1rem;
  padding: 0;
}

.info-box-summary li {
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.info-box-tip {
  background: #E8F5E9;
  border-color: var(--badge-health);
}

.info-box-warning {
  background: #FFF3E0;
  border-color: var(--badge-warning);
}

.info-box-emergency {
  background: #FFEBEE;
  border-color: var(--badge-emergency);
}

.info-box-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Data tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

.data-table th {
  background: var(--bg-secondary);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: var(--bg-secondary);
}

/* Responsive table wrapper */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

/* --- Sources / References --- */
.sources {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--bg-secondary);
}

.sources h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.sources ol {
  font-size: 0.85rem;
  color: var(--text-light);
}

.sources li {
  margin-bottom: 0.35rem;
}

.sources a {
  color: var(--text-secondary);
  text-decoration: underline;
}

/* --- Footer --- */
.footer {
  background: var(--bg-dark);
  color: var(--text-on-dark-muted);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer h4 {
  color: var(--text-on-dark);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.footer p {
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a {
  color: var(--text-on-dark-muted);
  font-size: 0.85rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
}

.footer-bottom a {
  color: var(--text-on-dark-muted);
}

/* --- Utility --- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Page-specific --- */

/* Quick nav grid on home */
.quick-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

@media (min-width: 500px) {
  .quick-nav {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .quick-nav {
    grid-template-columns: repeat(3, 1fr);
  }
}

.quick-nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-med);
}

.quick-nav-card:hover {
  border-color: var(--accent);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-4px);
  color: inherit;
}

.quick-nav-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.quick-nav-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.quick-nav-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Meet Spike section */
.meet-spike {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .meet-spike {
    grid-template-columns: 1fr 1fr;
  }
}

.spike-photo {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spike-photo-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  filter: drop-shadow(0 6px 20px rgba(45, 32, 22, 0.15));
}

/* Alert banner */
.alert-banner {
  background: linear-gradient(135deg, #FFF3E0, #FFECB3);
  border: 1.5px solid var(--badge-warning);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.alert-banner-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.alert-banner h4 {
  margin-bottom: 0.25rem;
  color: #E65100;
}

.alert-banner p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Sub-page list */
.topic-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.topic-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
}

.topic-item:hover {
  border-color: var(--accent);
  background: var(--bg-secondary);
  color: inherit;
}

.topic-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.topic-item h3 {
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.topic-item p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
}

.topic-arrow {
  margin-left: auto;
  color: var(--text-light);
  font-size: 1.2rem;
  transition: transform var(--transition-fast);
}

.topic-item:hover .topic-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* --- Related Articles --- */
.related-articles {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1.5px solid var(--card-border);
}

.related-articles > h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.related-articles .topic-item h3 {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --- Breed Color Cards --- */
.color-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}

@media (min-width: 600px) {
  .color-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.color-card {
  background: var(--card-bg);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  transition: all var(--transition-med);
}

.color-card:hover {
  border-color: var(--accent);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}

.color-card img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin: 0 auto 0.75rem;
  filter: drop-shadow(0 3px 8px rgba(45, 32, 22, 0.12));
}

.color-card h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.color-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.color-card .badge {
  margin-bottom: 0.5rem;
}

.color-card--fad {
  border-color: var(--badge-warning);
  border-style: dashed;
}

.color-card--fad:hover {
  border-color: var(--badge-emergency);
}

/* --- Print --- */
@media print {
  .nav, .footer, .nav-mobile {
    display: none;
  }
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
  .info-box {
    border: 1px solid #999;
    page-break-inside: avoid;
  }
}
