/* Shared design for all petmedia sites. Mobile first; each site sets --primary and
   --accent inline from its admin settings. No framework, nothing to update. */

:root {
  --primary: #2f5d50;
  --accent: #c8641e;
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1f2421;
  --muted: #5d6661;
  --line: #e3e1da;
  --radius: 10px;
  --wrap: 1120px;
  --measure: 70ch;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 var(--font);
}

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

a { color: var(--primary); text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }

h1, h2, h3 { line-height: 1.25; margin: 1.6em 0 0.5em; }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); margin-top: 0.6em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.65rem); }
h3 { font-size: 1.15rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* Header and navigation ------------------------------------------------------- */

.site-header { background: var(--primary); color: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.brand { color: #fff; font-weight: 700; font-size: 1.3rem; text-decoration: none; }
.brand:hover { color: #fff; }
.brand img { height: 40px; width: auto; }
.search-link { color: #fff; font-size: 0.95rem; }
.search-link:hover { color: #fff; opacity: 0.85; }

/* On phones the menu scrolls sideways instead of hiding behind a button. */
.site-nav { background: rgba(0, 0, 0, 0.12); }
.site-nav ul {
  display: flex; gap: 0.25rem; margin: 0 auto; list-style: none;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.site-nav ul::-webkit-scrollbar { display: none; }
.site-nav a {
  display: block; padding: 0.7rem 0.75rem; color: #fff; text-decoration: none;
  white-space: nowrap; font-size: 0.95rem;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.preview-bar {
  background: #fff3b0; color: #4a3b00; text-align: center; padding: 0.4rem; font-size: 0.9rem;
}

/* Page content ---------------------------------------------------------------- */

main { padding-bottom: 3rem; }

.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.3rem; list-style: none; margin: 1rem 0 0; padding: 0; font-size: 0.875rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 0.3rem; }
.breadcrumbs a { color: var(--muted); }

.lead { font-size: 1.15rem; color: var(--muted); }
.lead p { margin: 0; }

.page { max-width: 760px; }
.page-header { margin-bottom: 1rem; }
.byline { color: var(--muted); font-size: 0.9rem; margin: 0; }

.prose { max-width: var(--measure); }
.prose img { border-radius: var(--radius); }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.4rem 0.6rem; text-align: left; }
.prose blockquote { margin: 1.2rem 0; padding: 0.2rem 1rem; border-left: 4px solid var(--accent); color: var(--muted); }

.figure { margin: 1.5rem 0; }
.figure img { border-radius: var(--radius); width: 100%; }
.figure figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 0.35rem; }

.label { display: inline-block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); }
.label-ad { background: #fff3e0; padding: 0.15rem 0.5rem; border-radius: 4px; }

/* Cards ----------------------------------------------------------------------- */

.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card a { display: block; height: 100%; color: inherit; text-decoration: none; }
.card a:hover h3 { color: var(--accent); }
.card img, .card-placeholder { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-placeholder { background: linear-gradient(135deg, var(--primary), var(--accent)); opacity: 0.25; }
.card-body { padding: 0.8rem 1rem 1rem; }
.card-body h3 { margin: 0.2rem 0 0.4rem; }
.card-body p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.more { font-weight: 600; }

/* Breeds ---------------------------------------------------------------------- */

.with-aside { display: grid; gap: 1.5rem; }
@media (min-width: 900px) {
  .page:has(.with-aside) { max-width: none; }
  .with-aside { grid-template-columns: minmax(0, var(--measure)) 300px; align-items: start; }
  .with-aside .facts { order: 2; position: sticky; top: 1rem; }
}

.facts, .breed-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.facts h2 { margin-top: 0; font-size: 1.1rem; }
.facts dl, .breed-card dl { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; margin: 0; font-size: 0.95rem; }
.facts dt, .breed-card dt { color: var(--muted); }
.facts dd, .breed-card dd { margin: 0; }
.breed-card { margin: 1.5rem 0; }
.breed-card-title { font-weight: 700; margin: 0 0 0.5rem; }

.breed-list { columns: 1; padding-left: 1.2rem; }
@media (min-width: 600px) { .breed-list { columns: 2; } }
@media (min-width: 960px) { .breed-list { columns: 3; } }

.author-box { margin-top: 2rem; padding: 1rem 1.2rem; border-top: 3px solid var(--primary); background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); }
.author-box p { margin: 0.3rem 0; }
.author-name { font-weight: 700; }
.author-name span { font-weight: 400; color: var(--muted); }

/* Footer ---------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; padding: 1.5rem 0; }
.site-footer p { margin: 0; }
