/**
 * asb-pages.css — صفحات داخلی، سکشن‌ها، جستجو
 */

/* ── Layout helpers ─────────────────────── */
.container,
.page-shell,
.page-article {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-article {
  padding-bottom: 72px;
  padding-top: 28px;
}

/* ── Breadcrumb ─────────────────────────── */
.breadcrumb,
.breadcrumb-asb {
  background: var(--n50);
  border-bottom: 1px solid var(--n150);
  padding: 14px 0;
  margin-bottom: 0;
}

.breadcrumb + .page-article,
.breadcrumb-asb + .page-article {
  padding-top: 28px;
}

.breadcrumb ol,
.breadcrumb-asb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: .82rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.breadcrumb li::after,
.breadcrumb-asb li:not(:last-child)::after {
  content: '›';
  margin-right: 10px;
  color: var(--n300);
}

.breadcrumb a,
.breadcrumb-asb a {
  color: var(--g600);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb a:hover,
.breadcrumb-asb a:hover {
  color: var(--g800);
}

.breadcrumb span[aria-current],
.breadcrumb-asb span[aria-current] {
  color: var(--n500);
}

/* ── Page header & content ────────────── */
.page-header {
  padding: 8px 0 24px;
  margin-bottom: 8px;
  position: static;
  background: transparent;
  border: none;
  z-index: auto;
  top: auto;
}

.page-h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 800;
  color: var(--n900);
  line-height: 1.35;
  margin: 0 0 12px;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: .8rem;
  color: var(--n400);
  margin-bottom: 8px;
}

.page-content {
  font-size: .95rem;
  line-height: 1.85;
  color: var(--n700);
}

.page-content h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--g800);
  margin: 28px 0 12px;
}

.page-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--g700);
  margin: 22px 0 10px;
}

.page-content p {
  margin-bottom: 14px;
}

.page-content ul,
.page-content ol {
  margin: 0 0 16px 1.2em;
}

.page-content a {
  color: var(--g600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-content a:hover {
  color: var(--g800);
}

.page-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r12);
  margin: 12px 0;
}

.page-content blockquote {
  border-right: 4px solid var(--au500);
  background: var(--au100);
  padding: 14px 18px;
  border-radius: var(--r8);
  margin: 16px 0;
  color: var(--n700);
}

/* ── TOC ──────────────────────────────── */
.toc-box {
  background: var(--n50);
  border: 1.5px solid var(--n150);
  border-radius: var(--r12);
  padding: 18px 20px;
  margin: 24px 0;
}

.toc-title {
  font-size: .95rem;
  font-weight: 800;
  color: var(--g800);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-list a {
  color: var(--g600);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
}

.toc-list a:hover {
  color: var(--g800);
}

.toc-level-3 {
  padding-right: 16px;
}

/* ── Page sections (generic) ──────────── */
.page-section {
  margin: 36px 0;
  padding-top: 8px;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--g800);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--n150);
}

/* ── Gallery ──────────────────────────── */
.section-gallery .gallery-grid {
  display: grid;
  gap: 12px;
}

.gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-cols-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-cols-5 { grid-template-columns: repeat(5, 1fr); }
.gallery-cols-6 { grid-template-columns: repeat(6, 1fr); }

.gallery-item {
  border-radius: var(--r12);
  overflow: hidden;
  background: var(--n100);
  border: 1px solid var(--n150);
}

.gallery-link {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s var(--ease);
}

.gallery-link:hover img {
  transform: scale(1.04);
}

.gallery-caption {
  font-size: .78rem;
  color: var(--n500);
  padding: 8px 10px;
  text-align: center;
}

/* ── Video ────────────────────────────── */
.section-video {
  margin: 28px 0;
  scroll-margin-top: 88px;
}

.section-video .section-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--g800);
  margin-bottom: 14px;
}

.section-video .video-wrapper {
  border-radius: var(--r16);
  overflow: hidden;
  background: var(--n900);
  box-shadow: var(--sh2);
  margin: 0;
}

.section-video .video-wrapper.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  height: auto;
  padding-bottom: 0;
}

.video-embed {
  padding-bottom: 0;
  height: auto;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.section-video .video-wrapper.video-native {
  aspect-ratio: auto;
  height: auto;
  line-height: 0;
}

.video-native video {
  width: 100%;
  height: auto;
  display: block;
  max-height: min(72vh, 720px);
  object-fit: contain;
  vertical-align: top;
}

/* ── Forms (inner pages) ──────────────── */
.section-form .front-form,
.asb-form-inner {
  background: var(--n50);
  border: 1.5px solid var(--n150);
  border-radius: var(--r16);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-form .form-group,
.asb-form-inner .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-form label,
.asb-form-inner label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--n700);
}

.section-form .required,
.asb-form-inner .required {
  color: #c0392b;
}

.section-form input,
.section-form select,
.section-form textarea,
.asb-form-inner input,
.asb-form-inner select,
.asb-form-inner textarea {
  width: 100%;
  background: var(--n0);
  border: 1.5px solid var(--n200);
  border-radius: var(--r8);
  font-family: 'Vazirmatn', sans-serif;
  font-size: .88rem;
  padding: 11px 14px;
  outline: none;
  transition: .2s;
  direction: rtl;
}

.section-form input:focus,
.section-form select:focus,
.section-form textarea:focus,
.asb-form-inner input:focus,
.asb-form-inner select:focus,
.asb-form-inner textarea:focus {
  border-color: var(--g500);
  box-shadow: 0 0 0 3px rgba(39, 96, 41, .08);
}

.section-form textarea,
.asb-form-inner textarea {
  min-height: 108px;
  resize: vertical;
}

.btn-form-submit,
.asb-form-inner .btn-send {
  background: var(--g700);
  color: var(--n0);
  border: none;
  padding: 13px 24px;
  border-radius: var(--r8);
  font-family: 'Vazirmatn', sans-serif;
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  transition: .2s;
  align-self: flex-start;
}

.btn-form-submit:hover,
.asb-form-inner .btn-send:hover {
  background: var(--g800);
}

.form-success-msg {
  background: rgba(39, 96, 41, .08);
  border: 1px solid rgba(39, 96, 41, .2);
  color: var(--g700);
  padding: 14px 18px;
  border-radius: var(--r8);
  font-weight: 600;
}

.form-error-msg {
  background: rgba(192, 57, 43, .08);
  border: 1px solid rgba(192, 57, 43, .2);
  color: #a93226;
  padding: 12px 16px;
  border-radius: var(--r8);
  font-size: .85rem;
}

/* Captcha */
.captcha2-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.captcha2-equation {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--n0);
  border: 1.5px solid var(--n200);
  border-radius: var(--r8);
  padding: 8px 12px;
}

.captcha2-input {
  width: 56px !important;
  text-align: center;
  padding: 6px !important;
}

.captcha2-refresh {
  background: var(--n100);
  border: 1px solid var(--n200);
  border-radius: var(--r8);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--n500);
  font-size: .9rem;
  line-height: 1;
}
.captcha2-refresh:hover { background: var(--n150); color: var(--g700); }

.captcha2-refresh.spin svg {
  animation: asbSpin .4s linear;
}

@keyframes asbSpin {
  to { transform: rotate(360deg); }
}

.field-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
}

/* ── FAQ section (page) ───────────────── */
.section-faq .faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-faq .faq-it {
  background: var(--n0);
  border: 1.5px solid var(--n150);
  border-radius: var(--r12);
  overflow: hidden;
}

.section-faq .faq-q {
  padding: 14px 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .9rem;
}

.section-faq .faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
  font-size: .85rem;
  color: var(--n500);
}

.section-faq .faq-a-in {
  padding: 0 18px 16px;
}

.section-faq .faq-it.open .faq-a {
  max-height: 400px;
}

/* ── Children / cards ─────────────────── */
.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.children-grid--cards {
  margin-top: 8px;
}

@media (max-width: 768px) {
  .children-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .child-card {
    display: grid;
    grid-template-columns: 108px 1fr;
    align-items: stretch;
  }
  .child-card-media { min-height: 0; }
  .child-card-img,
  .child-card-placeholder {
    height: 100%;
    min-height: 88px;
    aspect-ratio: auto;
  }
  .child-card-body { padding: 12px 12px 12px 0; }
}

.child-card-media {
  position: relative;
  background: linear-gradient(165deg, #eef3ee 0%, #e2ebe2 55%, #d5e0d5 100%);
}

.child-card-placeholder {
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--g600);
  opacity: .35;
}

.child-card-date {
  display: block;
  margin-top: 8px;
  font-size: .72rem;
  color: var(--n400);
}

.child-card {
  background: var(--n0);
  border: 1.5px solid var(--n150);
  border-radius: var(--r12);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: .25s var(--ease);
  display: block;
}

.child-card:hover {
  border-color: var(--g400);
  box-shadow: var(--sh2);
  transform: translateY(-2px);
}

.child-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}

.child-card-body {
  padding: 14px 16px;
}

.child-card-title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--n900);
  margin-bottom: 6px;
}

.child-card-excerpt {
  font-size: .8rem;
  color: var(--n500);
  line-height: 1.6;
  margin: 0;
}

/* ── News list (مجله) ─────────────────── */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  background: var(--n0);
  border: 1.5px solid var(--n150);
  border-radius: var(--r12);
  text-decoration: none;
  color: inherit;
  transition: .25s var(--ease);
}

.news-item:hover {
  border-color: var(--g400);
  box-shadow: var(--sh2);
  transform: translateY(-2px);
  color: inherit;
}

.news-item-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--r8);
  display: block;
}

.news-item-ph {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(165deg, #eef3ee 0%, #e2ebe2 55%, #d5e0d5 100%);
  border-radius: var(--r8);
  font-size: 1.6rem;
  color: var(--g600);
  opacity: .35;
}

.news-item-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--n900);
  margin-bottom: 6px;
  line-height: 1.45;
}

.news-item-excerpt {
  font-size: .8rem;
  color: var(--n500);
  line-height: 1.6;
  margin: 0 0 8px;
}

.news-item-date {
  font-size: .72rem;
  color: var(--n400);
}

@media (max-width: 768px) {
  .news-item {
    grid-template-columns: 96px 1fr;
    gap: 10px;
    padding: 12px;
  }
  .news-item-title { font-size: .88rem; }
}

.section-children .cards-grid,
.children-section .cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.card-item {
  background: var(--n0);
  border: 1.5px solid var(--n150);
  border-radius: var(--r12);
  overflow: hidden;
  transition: .25s var(--ease);
}

.card-item:hover {
  border-color: var(--g400);
  box-shadow: var(--sh2);
  transform: translateY(-2px);
}

.card-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-item-img {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--g800), var(--g600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  overflow: hidden;
}

.card-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-item-body {
  padding: 14px 16px;
}

.card-item-title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--n900);
  margin-bottom: 6px;
}

.card-item-excerpt {
  font-size: .8rem;
  color: var(--n500);
  line-height: 1.6;
}

/* ── Related pages ────────────────────── */
.related-pages {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1.5px solid var(--n150);
}

.related-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--g800);
  margin-bottom: 16px;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--n50);
  border: 1px solid var(--n150);
  border-radius: var(--r8);
  text-decoration: none;
  color: inherit;
  transition: .2s;
}

.related-item:hover {
  border-color: var(--g400);
  background: rgba(39, 96, 41, .04);
}

.related-item-title {
  font-weight: 700;
  font-size: .88rem;
  color: var(--n900);
}

.related-item-img {
  width: 48px;
  height: 48px;
  border-radius: var(--r8);
  overflow: hidden;
  flex-shrink: 0;
}

.related-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── CTA block ────────────────────────── */
.page-cta {
  background: linear-gradient(135deg, var(--g800), var(--g700));
  border-radius: var(--r16);
  padding: 28px 32px;
  margin: 32px 0;
  color: var(--n0);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-cta h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.page-cta p {
  font-size: .85rem;
  opacity: .85;
}

.page-cta .btn-primary {
  background: var(--au500);
  color: var(--g900);
  box-shadow: none;
}

/* ── Share ────────────────────────────── */
.page-share-footer {
  margin-top: 36px;
  margin-bottom: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--n150);
  width: 100%;
}

.page-share-footer .share-bar {
  width: 100%;
}

.share-bar {
  position: relative;
  background: linear-gradient(135deg, var(--g900), var(--g800));
  border-radius: var(--r12);
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  width: 100%;
  box-sizing: border-box;
}

.share-bar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--au400);
  font-weight: 700;
  font-size: .88rem;
  flex-shrink: 0;
}

.share-bar-head i {
  font-size: 1rem;
}

.share-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.share-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--r8);
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .88);
  font-family: 'Vazirmatn', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: .2s var(--ease);
}

.share-chip:hover {
  background: rgba(255, 255, 255, .14);
  transform: translateY(-1px);
  color: var(--n0);
}

.share-chip i {
  font-size: 1.05rem;
}

.sc-wa:hover { background: rgba(37, 211, 102, .22); border-color: rgba(37, 211, 102, .35); color: #6ee7a0; }
.sc-tg:hover { background: rgba(34, 158, 217, .22); border-color: rgba(34, 158, 217, .35); color: #7dd3fc; }
.sc-x:hover { background: rgba(255, 255, 255, .15); }
.sc-li:hover { background: rgba(10, 102, 194, .25); border-color: rgba(10, 102, 194, .35); color: #93c5fd; }
.sc-copy:hover { background: rgba(201, 168, 76, .2); border-color: rgba(201, 168, 76, .35); color: var(--au300); }

/* نسخه روشن — داخل پنل جزئیات اسب */
.share-bar--light {
  background: var(--n50);
  border: 1.5px solid var(--n150);
  box-shadow: none;
}

.share-bar--light .share-bar-head {
  color: var(--g700);
  width: 100%;
  margin-bottom: 2px;
}

.share-bar--light .share-bar-actions {
  width: 100%;
}

.share-bar--light .share-chip {
  background: var(--n0);
  border: 1.5px solid var(--n200);
  color: var(--n700);
}

.share-bar--light .share-chip:hover {
  color: var(--g800);
  border-color: var(--g400);
  background: rgba(39, 96, 41, .04);
}

.share-bar--light .sc-tg:hover { color: #229ed9; border-color: rgba(34, 158, 217, .4); background: rgba(34, 158, 217, .08); }
.share-bar--light .sc-wa:hover { color: #25d366; border-color: rgba(37, 211, 102, .4); background: rgba(37, 211, 102, .08); }
.share-bar--light .sc-x:hover { color: var(--n900); }
.share-bar--light .sc-li:hover { color: #0a66c2; border-color: rgba(10, 102, 194, .35); background: rgba(10, 102, 194, .06); }
.share-bar--light .sc-copy:hover { color: var(--au700); border-color: var(--au500); background: var(--au100); }

.horse-share-wrap {
  margin-top: 16px;
  width: 100%;
}

.horse-video-highlight {
  animation: horseVideoPulse 1.2s ease;
}

@keyframes horseVideoPulse {
  0%, 100% { box-shadow: none; }
  40% { box-shadow: 0 0 0 4px rgba(201, 168, 76, .45); }
}

.share-copied-toast {
  position: absolute;
  bottom: -28px;
  right: 20px;
  font-size: .75rem;
  color: var(--g600);
  font-weight: 600;
  background: var(--au100);
  padding: 4px 10px;
  border-radius: var(--r8);
}

@media (max-width: 520px) {
  .share-bar { flex-direction: column; align-items: stretch; }
  .share-bar-actions { justify-content: center; }
  .share-chip span { display: none; }
  .share-chip { padding: 10px 12px; }
}

/* ── Comments ─────────────────────────── */
.comments-section {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1.5px solid var(--n150);
}

.comment-form textarea {
  width: 100%;
  border: 1.5px solid var(--n200);
  border-radius: var(--r8);
  padding: 12px;
  font-family: inherit;
  min-height: 100px;
}

/* ── Search page ──────────────────────── */
.search-page {
  padding: 40px 0 72px;
}

.search-page .page-h1 {
  margin-bottom: 20px;
}

.search-form {
  margin-bottom: 28px;
}

.search-input-wrapper {
  display: flex;
  gap: 8px;
  background: var(--n50);
  border: 1.5px solid var(--n200);
  border-radius: var(--r12);
  padding: 6px 6px 6px 14px;
}

.search-input-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: .95rem;
  outline: none;
  direction: rtl;
}

.search-input-wrapper button {
  background: var(--g700);
  color: var(--n0);
  border: none;
  border-radius: var(--r8);
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.search-input-wrapper button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.search-results-header p {
  color: var(--n500);
  margin-bottom: 16px;
  font-size: .9rem;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-result-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--n50);
  border: 1.5px solid var(--n150);
  border-radius: var(--r12);
  transition: .2s;
}

.search-result-item:hover {
  border-color: var(--g400);
  box-shadow: var(--sh1);
}

.search-result-img {
  width: 80px;
  height: 80px;
  border-radius: var(--r8);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--n200);
}

.search-result-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-title a {
  color: var(--g800);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
}

.search-result-title a:hover {
  color: var(--g600);
}

.search-result-excerpt {
  font-size: .85rem;
  color: var(--n500);
  margin: 6px 0;
  line-height: 1.6;
}

.search-result-meta {
  font-size: .75rem;
  color: var(--n400);
  display: flex;
  gap: 12px;
}

.search-result-item mark {
  background: rgba(201, 168, 76, .35);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

/* ── Horse archive extras ─────────────── */
.horse-archive-intro {
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--n50);
  border-radius: var(--r12);
  border: 1px solid var(--n150);
}

.horse-archive .sec-head h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--n900);
}

.horse-archive .sec-head {
  margin-bottom: 24px;
}

/* ── Horse archive: breed pills + filter panel ── */
.horse-archive {
  --hf-ctrl-h: 46px;
  --hf-ctrl-r: 12px;
  --hf-gap: 12px;
}

.horse-filter-panel {
  margin-bottom: 28px;
}

/* Breed segmented bar */
.horse-archive .breed-pills-track {
  background: var(--n0);
  border: 1.5px solid var(--n150);
  border-radius: var(--r16);
  padding: 6px;
  margin-bottom: 14px;
  box-shadow: var(--sh1);
}

.horse-archive .breed-pills-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.horse-archive .breed-pills-scroll::-webkit-scrollbar {
  display: none;
}

.horse-archive .breed-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: min-content;
}

.horse-archive .breed-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--r12);
  font-size: .82rem;
  font-weight: 600;
  color: var(--n600, var(--n500));
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .2s;
}

.horse-archive .breed-pill:hover {
  background: var(--n100);
  color: var(--g700);
}

.horse-archive .breed-pill.active {
  background: linear-gradient(135deg, var(--g700), var(--g600));
  color: var(--n0);
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(39, 96, 41, .28);
}

/* Filter card */
.horse-archive .horse-filters {
  margin: 0;
}

.horse-archive .horse-filters-box {
  background: var(--n0);
  border: 1.5px solid var(--n150);
  border-radius: var(--r16);
  overflow: hidden;
  box-shadow: var(--sh2);
}

.horse-archive .horse-filters-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--g800), var(--g700));
  color: var(--n0);
}

.horse-archive .horse-filters-head-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r8);
  background: rgba(255, 255, 255, .12);
  font-size: .9rem;
}

.horse-archive .horse-filters-head-title {
  font-size: .92rem;
  font-weight: 800;
}

.horse-archive .horse-filters-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: var(--hf-gap);
  background: var(--n50);
}

.horse-archive .horse-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.horse-archive .horse-filter-field--full {
  width: 100%;
}

.horse-archive .horse-filter-label {
  font-size: .72rem;
  font-weight: 700;
  color: var(--n500);
  padding-inline: 2px;
}

/* Unified control shell — same height for input & select */
.horse-archive .horse-filter-control {
  position: relative;
  display: block;
  width: 100%;
}

.horse-archive .horse-filter-input,
.horse-archive .horse-filter-select {
  display: block;
  width: 100%;
  height: var(--hf-ctrl-h);
  box-sizing: border-box;
  margin: 0;
  padding: 0 14px;
  border: 1.5px solid var(--n200);
  border-radius: var(--hf-ctrl-r);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 500;
  color: var(--n900);
  background: var(--n0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}

.horse-archive .horse-filter-input--icon {
  padding-inline-start: 40px;
}

.horse-archive .horse-filter-leading {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .88rem;
  color: var(--n400);
  pointer-events: none;
  z-index: 1;
}

.horse-archive .horse-filter-control--select .horse-filter-select {
  padding-inline-end: 40px;
  cursor: pointer;
}

.horse-archive .horse-filter-chevron {
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: .72rem;
  color: var(--n400);
  pointer-events: none;
}

.horse-archive .horse-filter-input::placeholder {
  color: var(--n400);
  font-weight: 400;
}

.horse-archive .horse-filter-input:focus,
.horse-archive .horse-filter-select:focus {
  outline: none;
  border-color: var(--g500);
  box-shadow: 0 0 0 3px rgba(39, 96, 41, .14);
}

/* Filter grid — mobile: single column stack */
.horse-archive .horse-filters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--hf-gap);
  width: 100%;
}

/* Actions */
.horse-archive .horse-filters-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 14px 16px;
  background: var(--n0);
  border-top: 1.5px solid var(--n150);
}

.horse-archive .horse-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: var(--hf-ctrl-h);
  padding: 0 18px;
  border-radius: var(--hf-ctrl-r);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform .2s, box-shadow .2s, background .2s;
}

.horse-archive .horse-filter-btn--primary {
  background: linear-gradient(135deg, var(--g700), var(--g600));
  color: var(--n0);
  box-shadow: var(--shg);
}

.horse-archive .horse-filter-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(39, 96, 41, .28);
}

.horse-archive .horse-filter-btn--ghost {
  background: var(--n0);
  color: var(--n600, var(--n500));
  border: 1.5px solid var(--n200);
  box-shadow: none;
}

.horse-archive .horse-filter-btn--ghost:hover {
  border-color: var(--g400);
  color: var(--g700);
  background: rgba(39, 96, 41, .04);
}

/* Tablet+ */
@media (min-width: 640px) {
  .horse-archive .horse-filters-actions {
    grid-template-columns: 1fr 1fr;
  }

  .horse-archive .horse-filters-actions:has(.horse-filter-btn--primary:only-child) {
    grid-template-columns: 1fr;
  }
}

/* Desktop */
@media (min-width: 769px) {
  .horse-archive .breed-pills-track {
    padding: 8px;
    margin-bottom: 18px;
  }

  .horse-archive .breed-pills-scroll {
    overflow: visible;
  }

  .horse-archive .breed-pills {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .horse-archive .breed-pill {
    flex: 1 1 auto;
    min-width: 88px;
    max-width: 140px;
  }

  .horse-archive .horse-filters-body {
    padding: 18px 20px;
    gap: 14px;
  }

  .horse-archive .horse-filters-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 16px;
  }

  .horse-archive .horse-filters-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .horse-archive .horse-filters-actions {
    grid-template-columns: auto auto;
    justify-content: flex-end;
    padding: 16px 20px;
  }

  .horse-archive .horse-filter-btn {
    width: auto;
    min-width: 148px;
  }
}

@media (min-width: 1024px) {
  .horse-archive .horse-filters-head {
    padding: 16px 20px;
  }

  .horse-archive .horse-filters-body {
    padding: 20px 22px;
  }
}

/* Legacy override — hide old flex layout if cached HTML */
.horse-archive .horse-filters-row {
  display: none !important;
}

/* ── Utility ──────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 768px) {
  .gallery-cols-3,
  .gallery-cols-4,
  .gallery-cols-5,
  .gallery-cols-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-result-item {
    flex-direction: column;
  }

  .page-cta {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .gallery-cols-2,
  .gallery-cols-3,
  .gallery-cols-4 {
    grid-template-columns: 1fr;
  }
}

/* ── Lightbox (horse gallery + sections) ── */
.asb-lb {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, .93);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.asb-lb.is-open { display: flex; }
.asb-lb-fig {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 100%;
}
.asb-lb-img {
  max-width: min(96vw, 1200px);
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r8);
  box-shadow: 0 8px 40px rgba(0, 0, 0, .4);
}
.asb-lb-cap {
  color: rgba(255, 255, 255, .85);
  font-size: .88rem;
  text-align: center;
  max-width: 90vw;
}
.asb-lb-btn {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  backdrop-filter: blur(4px);
}
.asb-lb-btn:hover { background: rgba(255, 255, 255, .22); }
.asb-lb-close { top: 16px; left: 16px; font-size: 1.6rem; }
.asb-lb-prev { right: 16px; top: 50%; transform: translateY(-50%); }
.asb-lb-next { left: 16px; top: 50%; transform: translateY(-50%); }
.asb-lb-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .7);
  font-size: .8rem;
  background: rgba(0, 0, 0, .35);
  padding: 4px 12px;
  border-radius: var(--rpill);
}
@media (max-width: 520px) {
  .asb-lb-prev, .asb-lb-next { width: 38px; height: 38px; }
  .asb-lb-img { max-height: 76vh; }
}
