/*
Theme Name:   Cat Dog Bird Child
Theme URI:    https://catdogbird.com
Description:  Child theme for Cat Dog Bird — extends Hello Elementor with custom single post and archive layouts.
Author:       Cat Dog Bird
Version:      1.0.0
Template:     hello-elementor
Tags:         blog, pet, child-theme
Text Domain:  catdogbird-child
*/

/* ─────────────────────────────────────────────
   GOOGLE FONTS
───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600&display=swap');

/* ─────────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────────── */
:root {
  --sage:        #3B6D11;
  --sage-mid:    #4a8515;
  --sage-pale:   #C0DD97;
  --sage-mist:   #EAF3DE;
  --amber:       #BA7517;
  --amber-bright:#EF9F27;
  --amber-pale:  #FAEEDA;
  --amber-soft:  #FAC775;
  --cream:       #FDFCF8;
  --warm-off:    #F7F4EE;
  --charcoal:    #2C2C2A;
  --ink:         #1e1e1c;
  --muted:       #5F5E5A;
  --faint:       #888780;
  --rule:        #E2DDD4;
  --serif:       'Lora', Georgia, serif;
  --sans:        'Plus Jakarta Sans', sans-serif;
  --content-width: 740px;
  --wide-width:    1160px;
}

/* ─────────────────────────────────────────────
   BASE RESET
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage); }
a:hover { color: var(--sage-mid); }

/* ─────────────────────────────────────────────
   LAYOUT WRAPPERS
───────────────────────────────────────────── */
.site-main { padding: 3rem 0; }

.cdb-container {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.cdb-content-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─────────────────────────────────────────────
   ░░  SINGLE POST PAGE  ░░
───────────────────────────────────────────── */

/* POST HERO */
.cdb-post-hero {
  background: var(--warm-off);
  border-bottom: 1px solid var(--rule);
  padding: 3rem 0 0;
  margin-bottom: 3rem;
}

.cdb-post-hero__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

.cdb-post-hero__category {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  text-decoration: none;
  margin-bottom: 1rem;
}
.cdb-post-hero__category:hover { color: var(--amber-bright); }

.cdb-post-hero__title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--charcoal);
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.cdb-post-hero__excerpt {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.cdb-post-hero__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--faint);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
}

.cdb-post-hero__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--sage-mist);
  color: var(--sage);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cdb-post-hero__author { font-weight: 600; color: var(--charcoal); }
.cdb-post-hero__dot { color: var(--rule); }

.cdb-post-hero__badge {
  background: var(--sage-mist);
  color: var(--sage);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  margin-left: auto;
}

.cdb-post-hero__image {
  max-width: var(--wide-width);
  margin: 0 auto;
  overflow: hidden;
  max-height: 500px;
}

.cdb-post-hero__image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

/* POST CONTENT */
.cdb-post-body {
  max-width: var(--content-width);
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.cdb-post-body .entry-content {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink);
}

.cdb-post-body .entry-content p { margin-bottom: 1.5rem; }

.cdb-post-body .entry-content h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.cdb-post-body .entry-content h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--charcoal);
  margin: 2rem 0 0.75rem;
}

.cdb-post-body .entry-content ul,
.cdb-post-body .entry-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.cdb-post-body .entry-content li { margin-bottom: 0.4rem; }

.cdb-post-body .entry-content a {
  color: var(--sage);
  text-decoration: underline;
  text-decoration-color: var(--sage-pale);
  text-underline-offset: 3px;
}
.cdb-post-body .entry-content a:hover { color: var(--sage-mid); }

.cdb-post-body .entry-content blockquote {
  border-left: 3px solid var(--sage);
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: var(--sage-mist);
  font-style: italic;
  color: var(--muted);
}

.cdb-post-body .entry-content img {
  border-radius: 0;
  margin: 2rem 0;
}

.cdb-post-body .entry-content strong { color: var(--charcoal); font-weight: 600; }

/* VET-REVIEW BOX */
.cdb-vet-box {
  background: var(--sage-mist);
  border: 1px solid var(--sage-pale);
  border-left: 4px solid var(--sage);
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.cdb-vet-box__icon {
  width: 32px; height: 32px;
  background: var(--sage);
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  font-family: var(--serif);
  font-style: italic;
}

.cdb-vet-box__text strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 4px;
}

/* POST TAGS */
.cdb-post-tags {
  max-width: var(--content-width);
  margin: 0 auto 2rem;
  padding: 1.5rem 1.5rem 0;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.cdb-post-tags__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.cdb-post-tags a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  background: var(--warm-off);
  border: 1px solid var(--rule);
  padding: 4px 12px;
  transition: background 0.15s, color 0.15s;
}
.cdb-post-tags a:hover { background: var(--sage-mist); color: var(--sage); }

/* RELATED POSTS */
.cdb-related {
  background: var(--warm-off);
  border-top: 1px solid var(--rule);
  padding: 3rem 0;
}

.cdb-related__inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.cdb-related__title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cdb-related__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.cdb-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* ─────────────────────────────────────────────
   ░░  ARCHIVE / BLOG PAGE  ░░
───────────────────────────────────────────── */

/* ARCHIVE HERO BANNER */
.cdb-archive-hero {
  background: var(--charcoal);
  padding: 3rem 1.5rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.cdb-archive-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sage), var(--amber-bright), var(--sage));
}

.cdb-archive-hero__kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber-soft);
  display: block;
  margin-bottom: 0.6rem;
}

.cdb-archive-hero__title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.cdb-archive-hero__desc {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ARCHIVE LAYOUT */
.cdb-archive {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3.5rem;
  align-items: start;
}

.cdb-archive__posts {}

/* FEATURED POST (first post, large) */
.cdb-archive-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--rule);
  margin-bottom: 2.5rem;
  overflow: hidden;
}

.cdb-archive-featured__image {
  overflow: hidden;
}

.cdb-archive-featured__image img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cdb-archive-featured:hover .cdb-archive-featured__image img {
  transform: scale(1.03);
}

.cdb-archive-featured__content {
  padding: 2rem;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid var(--rule);
}

.cdb-archive-featured__tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  display: block;
  margin-bottom: 0.75rem;
}

.cdb-archive-featured__title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--charcoal);
  text-decoration: none;
  display: block;
  margin-bottom: 0.75rem;
  transition: color 0.15s;
}
.cdb-archive-featured__title:hover { color: var(--sage); }

.cdb-archive-featured__excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

/* STANDARD POST CARD GRID */
.cdb-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* CARD */
.cdb-card {
  display: flex;
  flex-direction: column;
}

.cdb-card__image {
  overflow: hidden;
  aspect-ratio: 16/10;
  margin-bottom: 1rem;
}

.cdb-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.cdb-card:hover .cdb-card__image img { transform: scale(1.04); }

.cdb-card__category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  display: block;
  margin-bottom: 0.4rem;
  text-decoration: none;
}
.cdb-card__category:hover { color: var(--amber-bright); }

.cdb-card__title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--charcoal);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.15s;
}
.cdb-card__title:hover { color: var(--sage); }

.cdb-card__excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 0.75rem;
}

.cdb-card__meta {
  font-size: 11px;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}

.cdb-card__badge {
  background: var(--sage-mist);
  color: var(--sage);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  margin-left: auto;
}

/* ARCHIVE SIDEBAR */
.cdb-archive-sidebar {}

.cdb-sidebar-widget {
  background: var(--warm-off);
  border: 1px solid var(--rule);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.cdb-sidebar-widget__title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--sage);
}

.cdb-sidebar-post {
  display: flex;
  gap: 12px;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}
.cdb-sidebar-post:last-child { border-bottom: none; padding-bottom: 0; }

.cdb-sidebar-post__thumb {
  width: 72px; height: 56px;
  overflow: hidden;
  flex-shrink: 0;
}
.cdb-sidebar-post__thumb img {
  width: 72px; height: 56px;
  object-fit: cover;
  transition: transform 0.3s;
}
.cdb-sidebar-post:hover .cdb-sidebar-post__thumb img { transform: scale(1.06); }

.cdb-sidebar-post__cat {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  display: block;
  margin-bottom: 3px;
}

.cdb-sidebar-post__title {
  font-family: var(--serif);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--charcoal);
  transition: color 0.15s;
}
.cdb-sidebar-post:hover .cdb-sidebar-post__title { color: var(--sage); }

/* CATEGORY LIST WIDGET */
.cdb-cat-list { list-style: none; }
.cdb-cat-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.cdb-cat-list li:last-child { border-bottom: none; }
.cdb-cat-list a {
  text-decoration: none;
  color: var(--charcoal);
  font-weight: 500;
  transition: color 0.15s;
}
.cdb-cat-list a:hover { color: var(--sage); }
.cdb-cat-list__count {
  background: var(--sage-mist);
  color: var(--sage);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
}

/* NEWSLETTER WIDGET */
.cdb-nl-widget { text-align: center; }
.cdb-nl-widget p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.cdb-nl-widget input {
  width: 100%;
  border: 1px solid var(--rule);
  padding: 9px 12px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--charcoal);
  background: white;
  outline: none;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}
.cdb-nl-widget input:focus { border-color: var(--sage); }
.cdb-nl-widget button {
  width: 100%;
  background: var(--sage);
  color: white;
  border: none;
  padding: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s;
}
.cdb-nl-widget button:hover { background: var(--sage-mid); }

/* PAGINATION */
.cdb-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 2.5rem 0 0;
}

.cdb-pagination a,
.cdb-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--rule);
  background: white;
  transition: all 0.15s;
}

.cdb-pagination a:hover { border-color: var(--sage); color: var(--sage); }
.cdb-pagination .current {
  background: var(--sage);
  color: white;
  border-color: var(--sage);
}

/* ─────────────────────────────────────────────
   SHARED COMPONENTS
───────────────────────────────────────────── */
.cdb-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}
.cdb-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.cdb-read-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  text-decoration: none;
  border-bottom: 2px solid var(--sage-pale);
  padding-bottom: 1px;
  transition: border-color 0.15s;
}
.cdb-read-link::after { content: ' →'; }
.cdb-read-link:hover { border-color: var(--sage); color: var(--sage); }

/* ─────────────────────────────────────────────
   RESPONSIVE BREAKPOINTS
───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cdb-archive {
    grid-template-columns: 1fr;
  }
  .cdb-archive-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .cdb-related__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .cdb-archive-featured {
    grid-template-columns: 1fr;
  }
  .cdb-archive-featured__content {
    border-left: none;
    border-top: 1px solid var(--rule);
  }
  .cdb-archive-featured__image img {
    min-height: 220px;
  }
  .cdb-post-hero__image img {
    height: 320px;
  }
}

@media (max-width: 640px) {
  .cdb-archive-grid {
    grid-template-columns: 1fr;
  }
  .cdb-archive-sidebar {
    grid-template-columns: 1fr;
  }
  .cdb-related__grid {
    grid-template-columns: 1fr;
  }
  .cdb-post-hero__badge {
    margin-left: 0;
  }
  .cdb-post-hero__meta {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .cdb-post-hero {
    padding: 2rem 0 0;
  }
  .cdb-archive-hero {
    padding: 2rem 1.25rem;
  }
}
