/*
Theme Name: Astra Child
Template: Astra
Version: 1.0
Description: Child theme for The Canine Wellness Hub
*/

/* =========================================================
   Base: calm defaults
   ========================================================= */

body {
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.site-main {
  background: #f3f6f9;
}

/* =========================================================
   Fix: Astra duplicate featured image on single Breed pages only
   ========================================================= */

.single-breed .ast-featured-img,
.single-breed .ast-single-post-featured-section,
.single-breed .post-thumb-img-content,
.single-breed .ast-post-thumbnail {
  display: none !important;
}

/* =========================================================
   Single Breed layout styles (STYLE A)
   ========================================================= */

.cwh-breed__wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px;
}

.cwh-breed__hero {
  margin: 18px 0 22px;
}

.cwh-breed__title {
  font-size: 42px;
  line-height: 1.12;
  margin: 0 0 8px;
}

.cwh-breed__group {
  margin: 0 0 14px;
  font-size: 14px;
  color: #475569;
}

.cwh-breed__image {
  width: 100%;
  display: block;
}

/* Snapshot */

.cwh-breed__snapshot {
  margin: 0;
  font-size: 1.05em;
  opacity: 0.92;
  max-width: 72ch;
}

/* Panels */

.cwh-breed__panel {
  margin: 26px 0;
  padding: 22px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.cwh-breed__h2 {
  margin: 0 0 14px 0;
  line-height: 1.2;
  letter-spacing: -0.15px;
}

/* =========================================================
   At-a-glance
   ========================================================= */

.cwh-breed__glance-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 860px) {
  .cwh-breed__glance-grid {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
  }
}

.cwh-breed__glance-label {
  font-weight: 800;
  font-size: 0.95em;
  margin: 0 0 10px 0;
  opacity: 0.9;
}

.cwh-breed__facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cwh-breed__facts li {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f7f8fa;
  border: 1px solid rgba(15, 23, 42, 0.10);
  font-size: 0.94em;
}

.cwh-breed__facts strong {
  font-weight: 800;
}

/* =========================================================
   Breed guide — 2-column tabs
   ========================================================= */

.cwh-breed__guide-intro {
  margin: 0 0 14px 0;
  opacity: 0.9;
  max-width: 75ch;
}

.cwh-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 860px) {
  .cwh-tabs {
    grid-template-columns: 340px 1fr;
    align-items: start;
    gap: 18px;
  }
}

.cwh-tabs__list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.cwh-tabs__tab {
  appearance: none;
  -webkit-appearance: none;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  background: #ffffff !important;
  border-radius: 14px;
  padding: 12px 12px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
  position: relative;
  font-size: 1rem !important;
  line-height: 1.35 !important;
  text-transform: none !important;
}

.cwh-tabs__tab:hover,
.cwh-tabs__tab:focus,
.cwh-tabs__tab:focus-visible {
  color: #0f172a !important;
  background: #f7f8fa !important;
  outline: none;
}

.cwh-tabs__tab.is-active {
  color: #0f172a !important;
  background: #ffffff !important;
  border-color: rgba(29, 78, 216, 0.30) !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.cwh-tabs__tab.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.85);
}

.cwh-tabs__tab-title {
  display: block !important;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 4px 0;
  padding-left: 10px;
  color: #0f172a !important;
}

.cwh-tabs__tab-hint {
  display: block !important;
  font-size: 0.88rem;
  opacity: 0.85;
  padding-left: 10px;
  color: #475569 !important;
}

.cwh-tabs__panel {
  margin: 0;
}

.cwh-tabs__panel-inner {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  padding: 18px 18px;
}

.cwh-tabs__panel[hidden],
.cwh-tabs__panel[data-tab-inactive] {
  display: none !important;
}

.cwh-tabs__extras {
  margin-top: 18px;
  padding: 18px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 8px 18px rgba(0,0,0,.05);
}

.cwh-tabs__extras ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.cwh-tabs__extras ul li {
  position: relative;
  padding-left: 34px;
  margin: 10px 0;
  line-height: 1.4;
}

.cwh-tabs__extras ul li:before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,.18);
  background: #fff;
}

/* =========================================================
   Breed Directory – Archive page
   ========================================================= */

.cwh-breed-archive__wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px;
}

.cwh-breed-archive__title {
  font-size: 40px;
  line-height: 1.1;
  margin: 0 0 10px;
}

.cwh-breed-archive__header h1 {
  margin-bottom: 8px;
}

.cwh-breed-archive__intro {
  max-width: 720px;
  color: #475569;
}

.cwh-breed-archive__intro p {
  margin: 0 0 14px;
}

.cwh-breed-archive__browse-note,
.cwh-breed-archive__footer {
  margin-top: 22px;
  padding: 22px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.cwh-breed-archive__browse-note h2,
.cwh-breed-archive__footer h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.2;
}

.cwh-breed-archive__browse-note p,
.cwh-breed-archive__footer p {
  margin: 0 0 12px;
  color: #475569;
}

.cwh-breed-archive__footer p:last-child,
.cwh-breed-archive__browse-note p:last-child {
  margin-bottom: 0;
}

/* Filters */

.cwh-breed-archive__filters {
  display: grid;
  gap: 16px;
  padding: 16px;
  margin-top: 18px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.cwh-filter-primary {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
}

.cwh-filter-refine {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 860px) {
  .cwh-filter-primary {
    grid-template-columns: 1fr;
  }

  .cwh-filter-refine {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .cwh-filter-refine {
    grid-template-columns: 1fr;
  }
}

.cwh-breed-archive__filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cwh-breed-archive__filter label {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.cwh-breed-archive__filters input[type="search"],
.cwh-breed-archive__filters select {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: #ffffff;
}

.cwh-breed-archive__filter-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.cwh-breed-archive__apply,
.cwh-breed-archive__reset {
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid rgba(15, 23, 42, 0.18);
  text-decoration: none;
  cursor: pointer;
  background: #ffffff;
  color: #0f172a !important;
  white-space: nowrap;
}

.cwh-breed-archive__apply:hover,
.cwh-breed-archive__reset:hover {
  background: #f1f5f9;
}

/* A-Z strip */

.cwh-breed-az {
  margin-top: 22px;
  margin-bottom: 26px;
  padding: 16px 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  display: grid;
  grid-template-columns: repeat(27, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  text-align: center;
}

.cwh-breed-az a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 10px;
  text-decoration: none !important;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a !important;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cwh-breed-az a:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.10);
  color: #0f172a !important;
}

.cwh-breed-az a.active {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.14);
  color: #0f172a !important;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .cwh-breed-az {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .cwh-breed-az {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 500px) {
  .cwh-breed-az {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Cards grid */

.cwh-breed-archive__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
  justify-items: center;
}

.cwh-breed-card__card-link {
  display: block;
  width: 100%;
  max-width: 380px;
  text-decoration: none;
  color: inherit;
}

.cwh-breed-card {
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  width: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cwh-breed-card__image {
  width: 100%;
  height: auto;
  display: block;
}

.cwh-breed-card__placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #e5e7eb;
}

.cwh-breed-card__body {
  padding: 16px;
}

.cwh-breed-card__title {
  margin: 0 0 6px;
  font-size: 18px;
}

.cwh-breed-card__group {
  margin: 0 0 10px;
  font-size: 13px;
  color: #475569;
}

.cwh-breed-card__snapshot {
  margin: 0 0 12px;
  color: #334155;
  font-size: 14px;
}

.cwh-breed-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cwh-breed-card__meta li {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.12);
  font-size: 12px;
}

/* Safe hover effect */

.cwh-breed-card__card-link:hover .cwh-breed-card,
.cwh-breed-card__card-link:focus-visible .cwh-breed-card {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
}

.cwh-breed-card__card-link:hover .cwh-breed-card__title,
.cwh-breed-card__card-link:focus-visible .cwh-breed-card__title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cwh-breed-card__card-link:focus-visible {
  outline: 3px solid rgba(29, 78, 216, 0.28);
  outline-offset: 3px;
  border-radius: 18px;
}

.cwh-breed-archive__empty {
  margin-top: 18px;
  color: #475569;
}

/* Cleaner pagination */

.cwh-breed-archive__pagination {
  margin-top: 28px;
}

.cwh-breed-archive__pagination-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.cwh-breed-archive__page-link,
.cwh-breed-archive__page-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
}

.cwh-breed-archive__page-link {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.18);
  color: #0f172a;
  text-decoration: none;
}

.cwh-breed-archive__page-link:hover {
  background: #f1f5f9;
}

.cwh-breed-archive__page-link.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.cwh-breed-archive__page-status {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.10);
  color: #334155;
}

@media (max-width: 700px) {
  .cwh-breed-archive__pagination-inner {
    justify-content: center;
  }

  .cwh-breed-archive__page-status {
    order: -1;
    width: 100%;
  }
}

/* =========================================================
   Mobile accordion for breed guide
   ========================================================= */

.cwh-accordion--mobile{
  display:none;
}

@media (max-width:860px){

  .cwh-tabs--desktop{
    display:none;
  }

  .cwh-accordion--mobile{
    display:block;
  }

  .cwh-accordion__item{
    margin-bottom:10px;
  }

  .cwh-accordion__button{
    width:100%;
    box-sizing:border-box;
    appearance:none;
    -webkit-appearance:none;
    color:#0f172a !important;
    border:1px solid rgba(15,23,42,.12) !important;
    background:#ffffff !important;
    border-radius:14px;
    padding:14px 16px;
    cursor:pointer;
    text-align:left;
    box-shadow:0 6px 14px rgba(15,23,42,.04);
    font-size:1rem !important;
    line-height:1.35 !important;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
  }

  .cwh-accordion__button.is-active{
    border-color:rgba(29,78,216,.30) !important;
    box-shadow:0 12px 24px rgba(15,23,42,.08);
  }

  .cwh-accordion__title{
    font-weight:900;
  }

  .cwh-accordion__icon::before{
    content:"+";
    font-weight:700;
    font-size:1.2rem;
  }

  .cwh-accordion__button.is-active .cwh-accordion__icon::before{
    content:"−";
  }

  .cwh-accordion__panel{
    margin-top:10px;
    scroll-margin-top:16px;
  }

}

/* =========================================================
   Related breeds / internal links
   ========================================================= */

.cwh-tabs__list .cwh-tabs__extras--related {
  margin-top: 18px;
}

.cwh-tabs__extras--related .cwh-breed__links-block {
  padding: 0;
  border: 0;
  background: transparent;
}

.cwh-tabs__extras--related .cwh-breed__links-block + .cwh-breed__links-block {
  margin-top: 18px;
}

.cwh-tabs__extras--related .cwh-breed__links-title {
  margin: 0 0 10px 0;
  font-size: 1rem;
  line-height: 1.25;
  color: #0f172a;
}

/* Remove inherited tick styling from related links */
.cwh-tabs__extras--related ul li:before {
  content: none !important;
  display: none !important;
}

.cwh-tabs__extras--related .cwh-breed__link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block;
}

.cwh-tabs__extras--related .cwh-breed__link-list li {
  padding: 0;
  margin: 0 0 10px 0;
}

.cwh-tabs__extras--related .cwh-breed__link-list li:last-child {
  margin-bottom: 0;
}

.cwh-tabs__extras--related .cwh-breed__link-list a {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.5;
}

.cwh-tabs__extras--related .cwh-breed__link-list a:hover,
.cwh-tabs__extras--related .cwh-breed__link-list a:focus {
  background: transparent;
  text-decoration-thickness: 2px;
}