/*
Theme Name: Pet Industry Insights
Theme URI: https://www.petindustryinsights.com/
Author: Industry Insights
Description: Lightweight editorial theme for an English pet industry blog.
Version: 1.0.5
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: petindustryinsights
*/

:root {
  --pii-ink: #1c2526;
  --pii-muted: #5e6b6d;
  --pii-soft: #f4f7f5;
  --pii-line: #dbe5df;
  --pii-accent: #2f6f5e;
  --pii-accent-dark: #214f43;
  --pii-gold: #b8842d;
  --pii-white: #ffffff;
  --pii-max: 1120px;
  --pii-content: 760px;
  --pii-radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--pii-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  background: var(--pii-white);
  overflow-x: hidden;
}

a {
  color: var(--pii-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

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

.site-header {
  border-bottom: 1px solid var(--pii-line);
  background: rgba(255, 255, 255, 0.96);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner,
.site-main,
.footer-inner {
  width: min(var(--pii-max), calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  width: calc(100% - 64px);
  max-width: none;
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--pii-ink);
}

.brand-logo,
.brand-text {
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--pii-accent);
  display: grid;
  place-items: center;
  color: var(--pii-white);
  font-weight: 800;
  letter-spacing: 0;
}

.custom-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
}

.brand-title {
  display: block;
  font-size: 20px;
  font-weight: 760;
  line-height: 1.15;
  color: var(--pii-ink);
}

.brand-subtitle {
  display: block;
  color: var(--pii-muted);
  font-size: 13px;
  line-height: 1.3;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--pii-line);
  border-radius: 8px;
  background: var(--pii-white);
  color: var(--pii-ink);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-menu a {
  color: var(--pii-ink);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
}

.primary-menu a:hover {
  color: var(--pii-accent);
}

.site-main {
  padding: 34px 0 58px;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 32px;
  align-items: end;
  padding: 26px 0 34px;
  border-bottom: 1px solid var(--pii-line);
  margin-bottom: 28px;
}

.kicker {
  color: var(--pii-gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  line-height: 1.22;
  letter-spacing: 0;
}

.home-intro h1,
.archive-header h1,
.page-header h1,
.single-header h1 {
  margin: 10px 0 14px;
  font-size: clamp(32px, 5vw, 56px);
}

.home-intro p,
.archive-header p,
.page-header p {
  margin: 0;
  color: var(--pii-muted);
  font-size: 18px;
}

.intro-note {
  padding: 18px;
  border: 1px solid var(--pii-line);
  border-radius: var(--pii-radius);
  background: var(--pii-soft);
  color: var(--pii-muted);
  font-size: 15px;
}

.section-title {
  margin: 0 0 18px;
  font-size: 24px;
}

.post-list {
  display: grid;
  gap: 24px;
}

.post-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--pii-line);
}

.post-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--pii-radius);
  background: var(--pii-soft);
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--pii-muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.post-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.post-card h2 a {
  color: var(--pii-ink);
  text-decoration: none;
}

.post-card h2 a:hover {
  color: var(--pii-accent);
}

.post-card p {
  margin: 0 0 14px;
  color: var(--pii-muted);
}

.read-more {
  font-weight: 750;
  text-decoration: none;
}

.archive-header,
.page-header,
.single-header {
  max-width: var(--pii-content);
  margin: 0 auto 30px;
}

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

.entry-content {
  font-size: 18px;
}

.entry-content h2 {
  margin-top: 36px;
  font-size: 30px;
}

.entry-content h3 {
  margin-top: 28px;
  font-size: 24px;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content figure {
  margin-top: 0;
  margin-bottom: 22px;
}

.entry-content figure {
  max-width: 100%;
}

.entry-content figcaption,
.wp-caption-text {
  color: var(--pii-muted);
  font-size: 14px;
  line-height: 1.5;
}

.entry-content blockquote {
  border-left: 4px solid var(--pii-accent);
  padding-left: 18px;
  color: var(--pii-muted);
}

.entry-footer {
  max-width: var(--pii-content);
  margin: 36px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--pii-line);
  color: var(--pii-muted);
  font-size: 14px;
}

.pagination {
  margin-top: 28px;
}

.pagination .nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pii-line);
  border-radius: 8px;
  padding: 0 12px;
  text-decoration: none;
}

.pagination .current {
  background: var(--pii-accent);
  color: var(--pii-white);
  border-color: var(--pii-accent);
}

.site-footer {
  background: #172321;
  color: #d8e2df;
  padding: 44px 0 30px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 0.8fr;
  gap: 28px;
}

.footer-inner h2,
.footer-inner h3 {
  color: var(--pii-white);
  margin: 0 0 12px;
  font-size: 17px;
}

.footer-inner p,
.footer-inner ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.footer-inner li {
  margin-bottom: 8px;
}

.footer-inner a {
  color: #d8e2df;
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--pii-white);
}

.copyright {
  width: min(var(--pii-max), calc(100% - 40px));
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #aab8b4;
  font-size: 13px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 820px) {
  .header-inner,
  .site-main,
  .footer-inner,
  .copyright {
    width: calc(100vw - 56px);
    max-width: calc(100vw - 56px);
  }

  .header-inner {
    max-width: none;
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-navigation {
    display: none;
    position: absolute;
    top: 64px;
    right: 14px;
    left: auto;
    width: min(220px, calc(100vw - 28px));
    background: var(--pii-white);
    border: 1px solid var(--pii-line);
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 160ms ease, transform 160ms ease;
    z-index: 30;
  }

  body.nav-open .site-navigation {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .primary-menu {
    width: auto;
    margin: 0;
    padding: 10px;
    display: grid;
    gap: 2px;
  }

  .primary-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
  }

  .primary-menu a:hover {
    background: var(--pii-soft);
  }

  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 64px 0 0;
    background: transparent;
    z-index: 10;
  }

  body.nav-open .nav-backdrop {
    display: block;
  }

  .home-intro {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 0 28px;
    margin-bottom: 22px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .home-intro h1,
  .archive-header h1,
  .page-header h1,
  .single-header h1,
  .content-wrap h1 {
    font-size: 28px;
    line-height: 1.16;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
  }

  .home-intro p,
  .archive-header p,
  .page-header p {
    font-size: 16px;
    line-height: 1.65;
    overflow-wrap: anywhere;
  }

  .intro-note {
    overflow-wrap: anywhere;
  }

  .content-wrap,
  .entry-content,
  .site-footer {
    max-width: 100%;
    overflow-x: hidden;
  }

  .footer-inner,
  .footer-inner section,
  .footer-inner p {
    min-width: 0;
    max-width: 100%;
  }

  .post-card {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 14px;
  }

  .post-card h2 {
    font-size: 20px;
  }

  .post-card p {
    font-size: 15px;
  }

  .post-meta {
    font-size: 13px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .brand-subtitle {
    display: none;
  }

  .brand-title {
    font-size: 18px;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .entry-content {
    font-size: 17px;
  }
}
