/* ==========================================================
   Amil Pets — Learning Centre design system
   Fonts: Poppins (headings) / Helvetica, Inter fallback (body)
   ========================================================== */
:root {
  --green: #0D4022;
  --green-deep: #092E18;
  --orange: #EE6510;
  --orange-deep: #C2530C;
  --bg: #F8F9F8;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --text: #1A231D;
  --text-soft: #5B6760;
  --shadow: 0 10px 30px rgba(13,64,34,0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.post-type-archive-guide,
body.single-guide,
body.tax-guide_category {
  background: var(--bg);
  color: var(--text);
  font-family: Helvetica, Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.alc-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3, .alc-heading {
  font-family: 'Poppins', Helvetica, sans-serif;
  font-weight: 700;
}

/* Skip link (accessibility) */
.alc-skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--green);
  color: #fff;
  padding: 12px 18px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}

.alc-skip-link:focus {
  left: 0;
  top: 0;
}

/* Focus states */
a:focus-visible, 
button:focus-visible, 
input:focus-visible {
  outline: 3px solid var(--orange); 
  outline-offset: 2px;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 13px 22px;
  border-radius: 8px;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease;
}

.btn-primary:hover {
  background: var(--green-deep);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--green);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1.5px solid var(--green);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  align-self: flex-start;
}

.btn-secondary:hover {
  background: var(--green);
  color: #fff;
}

.btn-accent {
  background: var(--orange);
}

.btn-accent:hover {
  background: var(--orange-deep);
}

/* Hero Section & Layout */
.alc-hero {
  padding: 40px 0 30px;
}

/* The previous fix (forcing display:block on .alc-hero / #alc-main
   themselves) doesn't work: a flex/grid item's own `display` value
   doesn't remove it from being laid out as an item by its PARENT.
   Since we don't know the exact class/ID Astra (or header.php) uses
   for that wrapping element, target it structurally with :has() —
   "whatever element directly contains .alc-hero or #alc-main, force
   it back to normal block flow." Requires a browser with :has()
   support (all current major browsers as of 2026). */
body.post-type-archive-guide *:has(> .alc-hero),
body.post-type-archive-guide *:has(> #alc-main),
body.tax-guide_category *:has(> .alc-hero),
body.tax-guide_category *:has(> #alc-main),
body.single-guide *:has(> .alc-breadcrumbs),
body.single-guide *:has(> .alc-article),
body.single-guide *:has(> .alc-wrap) {
  display: block !important;
}

#alc-main,
.alc-hero,
.alc-hero .alc-wrap {
  column-count: 1 !important;
  columns: auto !important;
  display: block !important;
}

#alc-main > * {
  break-inside: avoid-column;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.alc-breadcrumbs {
  padding: 0 0 16px;
  font-size: 0.85rem;
  color: var(--text-soft);
  width: 100%;
}

.alc-breadcrumbs a {
  color: var(--text-soft);
  text-decoration: none;
}

.alc-breadcrumbs a:hover {
  color: var(--green);
  text-decoration: underline;
}

.alc-breadcrumbs [aria-current] {
  color: var(--green);
  font-weight: 600;
}

/* Small uppercase page badge above the H1 */
.alc-page-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-deep);
  background: rgba(238,101,16,0.1);
  padding: 7px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.alc-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #EFF6F1;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
  border: 1px solid rgba(13,64,34,0.1);
}

.alc-title {
  font-size: clamp(2rem, 3.8vw, 3rem);
  color: var(--green);
  line-height: 1.15;
  margin: 0 0 16px;
}

.alc-hero-content .lede,
.alc-hero .lede {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-soft);
  margin: 0 0 24px;
  max-width: 640px;
}

.alc-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  box-shadow: var(--shadow);
  max-width: 480px;
}

.alc-search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.98rem;
  width: 100%;
  font-family: inherit;
  color: var(--text);
}

.alc-search-box svg {
  opacity: 0.55;
  flex-shrink: 0;
}

.alc-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* Category Filter Pills */
.alc-cat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 36px;
}

.alc-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 9px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}

.alc-cat-pill:hover {
  border-color: var(--orange);
}

.alc-cat-pill[aria-current="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.alc-hero .alc-wrap {
  container-type: inline-size;
  container-name: alc-hero;
}

/* Featured Guide (shown in the archive hero, below the category pills) */
.alc-featured {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 48px;
}

@media (max-width: 800px) {
  .alc-featured {
    grid-template-columns: 1fr;
  }
}

/* Container-query fallback: if .alc-featured ever sits in a narrower
   wrapper than the full page width (e.g. nested in a smaller column),
   stack the image above the body instead of squeezing two columns. */
@container alc-hero (max-width: 700px) {
  .alc-featured {
    grid-template-columns: 1fr;
  }
  .alc-featured img {
    min-height: 200px;
  }
}

.alc-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 220px;
}

.alc-featured-body {
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.alc-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-deep);
  margin-bottom: 10px;
}

.alc-featured-body h2 {
  font-size: 1.5rem;
  margin: 0 0 10px;
  color: var(--green);
}

.alc-featured-body p {
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0 0 20px;
}

/* Grid Cards */
.alc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

@media (max-width: 980px) {
  .alc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 660px) {
  .alc-grid {
    grid-template-columns: 1fr;
  }
}

.alc-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.alc-card-image {
  display: block;
  margin: -22px -22px 16px -22px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.alc-card-image img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.alc-tag {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
  background: #EFF6F1;
  color: var(--green);
}

.alc-card h3 {
  font-size: 1.1rem;
  line-height: 1.32;
  margin: 0 0 10px;
}

.alc-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.alc-card h3 a:hover {
  color: var(--green);
}

.alc-card p.excerpt {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0 0 18px;
  flex-grow: 1;
}

.alc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.alc-meta svg {
  opacity: 0.7;
}

/* Related Products */
.alc-related-products {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.alc-related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  flex: 1;
  min-width: 220px;
}

.alc-related-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.alc-related-card strong {
  display: block;
  font-size: 0.88rem;
}

.alc-related-card span {
  font-size: 0.78rem;
  color: var(--text-soft);
}

/* Reading Progress Bar */
.alc-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--orange);
  width: 0%;
  z-index: 300;
  transition: width .1s linear;
}

/* Sticky Newsletter */
.alc-sticky-nl {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--green);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  transform: translateY(120%);
  transition: transform .3s ease;
  z-index: 250;
}

.alc-sticky-nl.show {
  transform: translateY(0);
}

.alc-sticky-nl input {
  padding: 10px 14px;
  border-radius: 6px;
  border: none;
  min-width: 200px;
}

.alc-sticky-nl button {
  padding: 10px 16px;
  border-radius: 6px;
  border: none;
  background: var(--orange);
  color: #221604;
  font-weight: 800;
  cursor: pointer;
}

.alc-sticky-nl .close {
  background: transparent;
  color: #fff;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
}

/* Recently Viewed */
.alc-recent {
  margin: 40px 0;
}

.alc-recent-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.alc-recent-card {
  flex: 0 0 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-decoration: none;
  color: var(--text);
}

.alc-recent-card strong {
  display: block;
  font-size: 0.86rem;
  line-height: 1.3;
}

/* Single Article */
.alc-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 28px 90px;
}

.alc-article h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  color: var(--green);
  line-height: 1.2;
  margin: 14px 0 14px;
}

.alc-article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 28px;
}

.alc-article-body p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: #233a2a;
  margin: 0 0 18px;
}

.alc-share-row {
  display: flex;
  gap: 10px;
  margin: 30px 0;
}

.alc-share-row a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  text-decoration: none;
}

.alc-share-row a:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.alc-cta-box {
  margin-top: 30px;
  padding: 22px;
  border-radius: 12px;
  background: #FFF4EB;
  border: 1px solid rgba(238,101,16,0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* Internal Links */
.alc-explore {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 26px 0;
  margin: 50px 0;
}

.alc-explore-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-weight: 600;
  font-size: 0.92rem;
}

.alc-explore-row a {
  color: var(--green);
  text-decoration: none;
}

.alc-explore-row a:hover {
  text-decoration: underline;
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Hide the default WordPress/theme page title on Learning Centre pages.
   Broadened beyond the original two selectors to also catch common
   theme/page-builder title wrappers, since themes vary in what markup
   they use for the automatic archive/page heading. */
body.post-type-archive-guide .page-title,
body.post-type-archive-guide h1.entry-title,
body.post-type-archive-guide .entry-header,
body.post-type-archive-guide .page-header,
body.post-type-archive-guide .ast-archive-title,
body.post-type-archive-guide .elementor-page-title,
body.tax-guide_category .page-title,
body.tax-guide_category h1.entry-title,
body.tax-guide_category .entry-header,
body.tax-guide_category .page-header,
body.tax-guide_category .ast-archive-title,
body.tax-guide_category .elementor-page-title,
body.single-guide .page-title,
body.single-guide .entry-header .entry-title,
body.single-guide .page-header {
  display: none !important;
}