/*
Theme Name: Paws & Pages Child
Theme URI: https://dogbreedsites.com
Description: GeneratePress child theme for Paws & Pages — refined colour
             scheme, accessibility fixes and breed page components.
Author: Ben Shannon
Template: generatepress
Version: 1.0.0
Text Domain: paws-pages-child
*/

:root {
  --pp-orange:        #C2611A;
  --pp-orange-hover:  #9E4E12;
  --pp-orange-tint:   #FDF1E4;
  --pp-teal:          #2F5D50;
  --pp-teal-tint:     #EAF1EE;
  --pp-cream:         #FBF7F0;
  --pp-surface:       #FFFDFA;
  --pp-charcoal:      #241F1B;
  --pp-charcoal-soft: #5A514A;
  --pp-border:        #E8DCCC;
  --pp-focus:         #1A73E8;
  --pp-radius:        12px;
  --pp-shadow:        0 1px 2px rgba(36,31,27,.04), 0 8px 24px rgba(36,31,27,.06);
}

/* ---------- FOUNDATION ---------- */
body {
  background-color: var(--pp-cream);
  color: var(--pp-charcoal);
}

.site-header {
  background-color: var(--pp-orange-tint);
  color: var(--pp-charcoal);
  position: relative;
}

.generate-page-header {
  background-color: var(--pp-orange-tint) !important;
  color: var(--pp-charcoal) !important;
}

.button,
button:not(.menu-toggle),
.wp-block-button__link,
input[type="submit"],
.wp-block-search__button {
  background-color: var(--pp-orange);
  color: #fff;
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 12px 20px;
  font-weight: 600;
}
.button:hover,
.wp-block-button__link:hover,
.wp-block-search__button:hover,
input[type="submit"]:hover {
  background-color: var(--pp-orange-hover);
  color: #fff;
}

/* ---------- LINKS & CONTRAST ---------- */
a {
  color: var(--pp-orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover { color: var(--pp-orange-hover); }
.main-navigation a, .site-title a { text-decoration: none; }

.site-footer, .site-info, .footer-widgets {
  background-color: var(--pp-charcoal);
  color: #F2ECE4;
}
.site-footer a, .site-info a, .footer-widgets a {
  color: #FFFFFF !important;
  text-decoration: underline;
}
.site-footer a:hover, .footer-widgets a:hover { color: #F5C89B !important; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--pp-focus);
  outline-offset: 2px;
}

/* ---------- HEADER: branding, then nav, then search ---------- */
.inside-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 20px;
}
.inside-header .site-branding   { order: 1; }
.inside-header .main-navigation { order: 2; width: 100%; }
.inside-header .header-widget,
.inside-header .wp-block-search { order: 3; width: 100%; }

.main-title {
  font-size: 1.65rem;
  line-height: 1.15;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-description {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--pp-charcoal-soft);
  margin: 4px 0 0;
  line-height: 1.4;
}

/* Hamburger to top-right, 44x44 tap target */
.menu-toggle {
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--pp-charcoal);
  border-radius: 8px;
  color: var(--pp-charcoal);
  padding: 0;
}
.menu-toggle:hover, .menu-toggle:focus {
  background: rgba(36,31,27,.06);
  color: var(--pp-charcoal);
}
@media (max-width: 768px) {
  .inside-header .site-branding { padding-right: 64px; }
}
.main-navigation .main-nav ul li a {
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* ---------- TYPOGRAPHY ---------- */
.entry-title, h1.entry-title {
  font-size: clamp(1.75rem, 6vw, 2rem);
  line-height: 1.2;
  margin-bottom: 0.4em;
}
@media (min-width: 782px) { .entry-title { font-size: 2.6rem; } }

h2 { font-size: clamp(1.4rem, 4.5vw, 1.85rem); line-height: 1.25; margin-top: 2em; }
h3 { font-size: clamp(1.15rem, 3.5vw, 1.35rem); line-height: 1.3; margin-top: 1.6em; }

.entry-content p, .entry-content li { max-width: 68ch; }
.entry-meta { color: var(--pp-charcoal-soft); font-size: 0.875rem; }
.entry-meta a { color: var(--pp-orange); }
.has-small-font-size { font-size: 14px !important; }

/* ---------- ARCHIVE CARDS ---------- */
.generate-columns .inside-article,
body:not(.single) .site-main > .post {
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  padding: 20px;
  margin-bottom: 24px;
}
.read-more, .more-link {
  display: inline-block;
  margin-top: 10px;
  font-weight: 600;
  min-height: 44px;
  line-height: 44px;
  text-decoration: underline;
}

/* ---------- AUTHOR: Ben Shannon ---------- */
.pp-byline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.2rem;
}
.pp-byline img { border-radius: 50%; }
.pp-byline-name { font-weight: 600; }

.pp-author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--pp-teal-tint);
  border-left: 4px solid var(--pp-teal);
  padding: 20px;
  border-radius: 0 var(--pp-radius) var(--pp-radius) 0;
  margin: 40px 0 8px;
}
.pp-author-box img { border-radius: 50%; flex-shrink: 0; }
.pp-author-name { font-size: 1.05rem; font-weight: 700; color: var(--pp-teal); }
.pp-author-role {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--pp-charcoal-soft);
  margin: 2px 0 8px;
}
.pp-author-box p { margin: 0; font-size: 0.92rem; color: var(--pp-charcoal-soft); }

/* ---------- FOOTER WIDGETS ---------- */
.footer-widgets .widget-title {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C9BDAF;
  margin: 0 0 12px;
}
.footer-widgets ul { list-style: none; padding: 0; margin: 0; }
.footer-widgets li { margin-bottom: 10px; }

/* ---------- BREED COMPONENTS ---------- */
.wp-block-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  overflow: hidden;
  font-size: 0.97rem;
  margin: 2rem 0;
  box-shadow: var(--pp-shadow);
}
.wp-block-table th {
  background: var(--pp-teal);
  color: #fff;
  text-align: left;
  font-weight: 600;
  padding: 0.85rem 1rem;
  border: 0;
}
.wp-block-table td {
  padding: 0.8rem 1rem;
  border: 0;
  border-top: 1px solid var(--pp-border);
  vertical-align: top;
}
.wp-block-table tbody tr:nth-child(even) { background: #FCFAF7; }
.wp-block-table td:first-child { font-weight: 600; width: 34%; }
@media (max-width: 600px) {
  .wp-block-table td, .wp-block-table th { padding: .65rem .7rem; font-size: .9rem; }
}

.breed-quickfacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--pp-border);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  overflow: hidden;
  margin: 2rem 0;
}
.qf-item { background: var(--pp-surface); padding: 1rem; text-align: center; }
.qf-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--pp-charcoal-soft);
  font-weight: 700;
}
.qf-value { font-size: 1.1rem; font-weight: 700; margin-top: .3rem; color: var(--pp-teal); }

.breed-ratings {
  display: grid;
  gap: .85rem;
  margin: 1.75rem 0;
  background: var(--pp-orange-tint);
  padding: 1.4rem;
  border-radius: var(--pp-radius);
}
.rating-row {
  display: grid;
  grid-template-columns: minmax(110px, 160px) 1fr auto;
  gap: 1rem;
  align-items: center;
}
.rating-label { font-weight: 600; font-size: .92rem; }
.rating-track {
  height: 10px;
  background: #fff;
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--pp-border);
}
.rating-fill { height: 100%; background: var(--pp-orange); border-radius: 99px; }
.rating-value { font-variant-numeric: tabular-nums; font-size: .85rem; }
@media (max-width: 520px) {
  .rating-row { grid-template-columns: 1fr auto; }
  .rating-track { grid-column: 1 / -1; }
}

.breed-tag {
  display: inline-block;
  background: var(--pp-teal-tint);
  color: var(--pp-teal);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: .8rem;
  font-weight: 600;
  margin: 0 6px 6px 0;
  text-decoration: none;
}
.breed-tag:hover { background: var(--pp-teal); color: #fff; }

.callout {
  border-left: 4px solid var(--pp-orange);
  background: var(--pp-orange-tint);
  padding: 1.1rem 1.3rem;
  border-radius: 0 var(--pp-radius) var(--pp-radius) 0;
  margin: 1.75rem 0;
}
.callout--vet { border-color: var(--pp-teal); background: var(--pp-teal-tint); }

.breed-toc {
  background: var(--pp-surface);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  padding: 1.2rem 1.4rem;
  margin: 2rem 0;
}
.breed-toc ul { list-style: none; padding-left: 0; columns: 2; column-gap: 2rem; }
.breed-toc li { margin: .35rem 0; break-inside: avoid; }
@media (max-width: 600px) { .breed-toc ul { columns: 1; } }

/* ---------- ACCESSIBILITY ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
img { max-width: 100%; height: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
