/*
Theme Name: AskPetVet
Theme URI: https://askpetvet.com
Author: Christine D. Calder DVM, DACVB
Description: Custom theme for AskPetVet, expert pet behavior and health articles. Maroon, brown, and gold, built to WCAG 2.1 AA.
Version: 1.0.9
Requires at least: 6.4
Requires PHP: 8.0
License: All rights reserved
Text Domain: askpetvet
*/

:root {
	--maroon: #660000;
	--maroon-dark: #4d0000;
	--brown: #52352a;
	--brown-2: #6b4a3d;
	--ink: #1f1714;
	--cream: #fdf9f3;
	--tan: #f5ede6;
	--line: #e8dccf;
	--gold: #d29932;
	--gold-dark: #8a5d12;
	--gold-light: #f6e3b4;
	--butter: #fdf6e8;
	--muted: #7a5a40;
	--white: #ffffff;
	--radius: 16px;
	--shadow: 0 2px 6px rgba(31, 23, 20, .06), 0 10px 24px rgba(31, 23, 20, .06);
	--head: "Bricolage Grotesque", system-ui, sans-serif;
	--body: "Source Sans 3", system-ui, sans-serif;
	--logo: "EB Garamond", Georgia, serif;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font-family: var(--body);
	font-size: 1.125rem;
	line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--maroon); text-underline-offset: 3px; }
a:hover { color: var(--maroon-dark); }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.15; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding-left: 1.25em; }
main:focus { outline: none; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.section { padding-top: 56px; padding-bottom: 8px; }
.section-title { margin-bottom: 24px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.section-head a { font-weight: 600; }
.lead { font-size: 1.25rem; color: var(--brown); }
.empty { background: var(--tan); border-radius: var(--radius); padding: 24px; }

/* Accessibility helpers */
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: 16px; top: -100px; z-index: 1000;
	background: var(--maroon); color: var(--white); padding: 12px 20px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--white); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
	outline: 3px solid var(--gold-dark);
	outline-offset: 3px;
	border-radius: 4px;
}

/* Buttons */
.btn, .search-form button, input[type="submit"], .wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 10px 22px;
	background: var(--maroon); color: var(--white);
	font-family: var(--body); font-size: 1.05rem; font-weight: 600; text-decoration: none;
	border: 0; border-radius: 999px; cursor: pointer;
}
.btn:hover, .search-form button:hover, input[type="submit"]:hover, .wp-block-button__link:hover { background: var(--maroon-dark); color: var(--white); }
.btn-small { min-height: 44px; padding: 8px 18px; font-size: 1rem; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--maroon); text-decoration: none; min-height: 44px; }
.brand-name { font-family: var(--logo); font-size: 2rem; font-weight: 500; color: var(--brown); line-height: 1; }
.brand-name em, .footer-brand em { color: var(--maroon); }
.main-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.main-nav .menu, .footer-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.main-nav .menu a {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
	color: var(--ink); font-weight: 600; text-decoration: none; border-radius: 8px;
}
.main-nav .menu a:hover, .main-nav .current-menu-item > a { color: var(--maroon); background: var(--tan); }

/* Disclaimer bar */
.disclaimer-bar { background: var(--butter); border-bottom: 1px solid var(--gold-light); font-size: .95rem; color: var(--brown); }
.disclaimer-bar p { margin: 0 auto; padding-top: 10px; padding-bottom: 10px; }
.disclaimer-bar a { color: var(--maroon); font-weight: 600; }

/* Search */
.search-form { display: flex; gap: 8px; max-width: 620px; margin: 24px 0; }
.search-form input[type="search"] {
	flex: 1; min-width: 0; min-height: 52px; padding: 10px 20px;
	font: inherit; font-size: 1.05rem; color: var(--ink);
	background: var(--white); border: 2px solid var(--line); border-radius: 999px;
}
.search-form input[type="search"]::placeholder { color: var(--muted); }
.search-form input[type="search"]:focus { border-color: var(--maroon); }

/* Hero */
.hero { background: linear-gradient(180deg, var(--tan), var(--cream)); padding: 48px 0 24px; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-inner > * { min-width: 0; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.05fr 1fr; } }
.badge {
	display: inline-block; background: var(--gold-light); color: var(--brown);
	font-weight: 600; font-size: .95rem; padding: 6px 14px; border-radius: 999px;
}
.hero h1 .accent { color: var(--maroon); }
.hero-photos { position: relative; padding-bottom: 40px; }
.hero-photo-main { width: 88%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow); }
.hero-photo-small {
	position: absolute; right: 0; bottom: 0; width: 38%; aspect-ratio: 1; object-fit: cover; object-position: 50% 30%;
	border-radius: 20px; border: 6px solid var(--white); box-shadow: var(--shadow);
}
.name-card {
	position: absolute; left: 16px; bottom: 0; display: flex; align-items: center; gap: 12px;
	background: var(--white); border-radius: 14px; padding: 10px 16px 10px 10px; box-shadow: var(--shadow);
	max-width: 62%;
}
.name-card img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.name-card p { margin: 0; font-size: .95rem; line-height: 1.35; color: var(--brown); }
.name-card strong { color: var(--ink); }
@media (max-width: 520px) {
	.hero-photo-main { width: 100%; }
	.hero-photo-small { display: none; }
	.name-card { max-width: calc(100% - 32px); }
}

/* Grids and cards */
.grid { display: grid; gap: 24px; list-style: none; margin: 0; padding: 0; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card {
	display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line);
	border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
}
.card > img, .card-media img, .card-placeholder { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-media { display: block; }
.card-placeholder { display: block; background: linear-gradient(135deg, var(--tan), var(--gold-light)); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 22px; flex: 1; }
.kicker { display: block; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-dark); margin: 0; }
.card-title { display: block; font-family: var(--head); font-size: 1.3rem; font-weight: 700; line-height: 1.2; margin: 0; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--maroon); }
.card-text { display: block; color: var(--brown); margin: 0; }
.meta { font-size: .9rem; color: var(--muted); }
.guide-art { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10; background: var(--maroon); color: var(--gold-light); }
.lift { transition: transform .2s ease, box-shadow .2s ease; }
.lift:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(31, 23, 20, .08), 0 18px 36px rgba(31, 23, 20, .12); }
a.card:hover .card-title { color: var(--maroon); }

/* Animal tiles */
.tile {
	position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
	text-decoration: none; color: var(--white); background: var(--brown); box-shadow: var(--shadow);
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile-small-mammals { background: var(--maroon); }
.tile-reptiles { background: var(--brown-2); }
.tile-art { position: absolute; inset: 0 0 56px; display: flex; align-items: center; justify-content: center; color: var(--gold-light); }
.tile-label {
	position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 14px 18px; background: rgba(31, 23, 20, .82); color: var(--white);
	font-family: var(--head); font-size: 1.35rem; font-weight: 800;
}
.tile:hover .tile-label { background: var(--maroon); color: var(--white); }

/* Ads */
.ad-slot { margin-top: 48px; text-align: center; }
.ad-slot::before { content: "Advertisement"; display: block; font-size: .8rem; color: var(--muted); margin-bottom: 6px; }

/* Help box */
.help-box {
	display: grid; gap: 24px; background: var(--brown); color: var(--white);
	border-radius: 24px; padding: 32px;
}
@media (min-width: 900px) { .help-box { grid-template-columns: 1fr 1.1fr; padding: 40px 48px; } }
.help-box h2 { color: var(--white); }
.help-box p { color: #f3e9e1; }
.help-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.help-box li { background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 14px 18px; }
.help-box strong { color: var(--gold-light); }
.help-box a { color: var(--white); font-weight: 600; }
.help-box a:hover { color: var(--gold-light); }
.help-box a:focus-visible { outline-color: var(--gold-light); }

/* Newsletter */
.newsletter {
	display: grid; gap: 24px; align-items: center; background: var(--gold-light);
	border-radius: 24px; padding: 32px;
}
@media (min-width: 900px) { .newsletter { grid-template-columns: 1fr 1fr; padding: 40px 48px; } }
.newsletter p { color: var(--brown); margin: 0; }
.newsletter-form input[type="email"], .newsletter-form input[type="text"] {
	width: 100%; min-height: 48px; padding: 10px 16px; font: inherit;
	border: 2px solid var(--line); border-radius: 10px; background: var(--white);
}

/* Footer */
.site-footer { margin-top: 64px; background: var(--ink); color: #eadfd6; font-size: 1rem; }
.footer-inner { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
@media (min-width: 900px) { .footer-inner { grid-template-columns: 1.6fr 1fr; } }
.footer-brand { font-family: var(--logo); font-size: 1.8rem; color: var(--white); margin-bottom: 8px; }
.footer-brand em { color: var(--gold); }
.footer-nav .menu { flex-direction: column; gap: 0; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); text-decoration: none; }
.footer-nav a:hover { color: var(--gold-light); text-decoration: underline; }
.site-footer a:focus-visible { outline-color: var(--gold); }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .12); font-size: .9rem; color: #cbbcb0; }
.footer-legal p { margin: 0 auto; padding-top: 20px; padding-bottom: 110px; }

/* Articles and pages */
.article { max-width: 780px; padding-top: 48px; }
.article-header { margin-bottom: 24px; }
.byline { color: var(--muted); font-size: 1rem; }
.article-image { margin: 0 0 32px; }
.article-image img { width: 100%; border-radius: var(--radius); }
.article-image figcaption, .wp-caption-text, figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }
.entry-content > * { margin-top: 0; margin-bottom: 1.1em; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content li { margin-bottom: .4em; }
.entry-content blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--gold); color: var(--brown); font-style: italic; }
.entry-content img { border-radius: 12px; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.entry-content th { background: var(--tan); }
.vet-box { margin: 40px 0; padding: 24px 28px; background: var(--butter); border: 1px solid var(--gold-light); border-left: 6px solid var(--gold); border-radius: 12px; }
.vet-box h2 { font-size: 1.3rem; }
.vet-box p { margin: 0; }
.author-box { display: flex; gap: 24px; align-items: flex-start; margin: 40px 0; padding: 28px; background: var(--tan); border-radius: var(--radius); }
.author-box img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex: none; }
.author-name { font-family: var(--head); font-size: 1.3rem; font-weight: 700; margin: 4px 0 8px; }
.author-box p:last-child { margin-bottom: 0; }
@media (max-width: 600px) { .author-box { flex-direction: column; } }
.post-nav .nav-links { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.post-nav a { display: block; padding: 16px 20px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.post-nav a:hover { border-color: var(--maroon); }
.post-nav .meta { display: block; }
.post-nav-title { font-weight: 600; }

/* Archives */
.archive-header { margin-bottom: 32px; }
.archive-description { color: var(--brown); max-width: 720px; }
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 14px;
	background: var(--white); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600;
}
.pagination .current { background: var(--maroon); border-color: var(--maroon); color: var(--white); }

/* Books */
.page-intro { max-width: 780px; margin-bottom: 32px; }
.disclosure { font-size: .95rem; color: var(--muted); background: var(--tan); border-radius: 10px; padding: 12px 16px; }
.book-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.book { display: grid; grid-template-columns: 140px 1fr; gap: 28px; align-items: start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.book-cover img { width: 140px; border-radius: 6px; box-shadow: 0 6px 16px rgba(31, 23, 20, .18); }
.book-cover-blank { display: flex; align-items: center; justify-content: center; width: 140px; aspect-ratio: 2 / 3; border-radius: 6px; background: var(--maroon); color: var(--gold-light); }
.book h2 { font-size: 1.4rem; margin: 6px 0 8px; }
.book p { color: var(--brown); }
.book .out-of-print {
	display: inline-block; margin: 0; padding: 6px 12px;
	background: var(--tan); border-left: 4px solid var(--maroon); border-radius: 4px;
	color: var(--maroon); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .95rem;
}
@media (max-width: 600px) {
	.book { grid-template-columns: 1fr; }
	.book-cover img, .book-cover-blank { width: 120px; }
}

/* Media */
.media-group { margin-top: 40px; }
.media-card { padding: 22px 24px; gap: 8px; }
.media-card .card-title { font-size: 1.2rem; }
.media-card a { margin-top: auto; padding-top: 8px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }

/* WordPress classes */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { margin-left: -80px; margin-right: -80px; max-width: none; }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
@media (max-width: 960px) { .alignwide { margin-left: 0; margin-right: 0; } }
.wp-caption { max-width: 100%; }
.sticky, .bypostauthor, .gallery-caption { }
.widget-title { font-size: 1.2rem; }

/* Comments (in case they are turned on later) */
.comments-area { margin-top: 40px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
	.lift:hover { transform: none; }
}
