:root {
  --primary: #1b4332;
  --accent: #d4a017;
  --bg: #f7f7f5;
  --text: #1f2421;
  --muted: #6b7280;
  --card: #ffffff;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Smooth in-page navigation; offset anchors so they don't hide under the sticky header. */
html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
section { padding: 76px 0; scroll-margin-top: 84px; }
.section-title {
  font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--primary); margin-bottom: 10px;
  letter-spacing: -0.02em; position: relative;
}
.section-title::after {
  content: ""; display: block; width: 54px; height: 4px; border-radius: 4px;
  background: var(--accent); margin-top: 14px;
}
.section-sub { color: var(--muted); margin-bottom: 42px; max-width: 640px; font-size: 1.02rem; }

/* Header */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--primary); }
.brand img { height: 44px; width: auto; }
.brand .brand-name { font-size: 1.05rem; line-height: 1.1; }
.brand .brand-tag { font-size: 0.72rem; color: var(--muted); font-weight: 500; }
.nav-links { display: flex; gap: 6px; list-style: none; align-items: center; }
.nav-links a { font-weight: 600; color: var(--text); transition: all .18s;
  padding: 8px 14px; border-radius: 999px; font-size: .94rem; }
.nav-links a:hover { color: var(--primary); background: rgba(27,67,50,.07); }
.nav-ai { background: var(--accent); color: #1f2421 !important; padding: 7px 14px;
  border-radius: 999px; font-weight: 700; }
.nav-ai:hover { color: #1f2421 !important; opacity: .9; }

/* AI record verification box on front page */
.verify-box { display: flex; gap: 10px; max-width: 540px; margin-bottom: 16px; flex-wrap: wrap; }
.verify-box input { flex: 1; min-width: 220px; padding: 13px 16px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 1rem; font-family: inherit; }
.verify-box input:focus { outline: none; border-color: var(--primary); }
.verify-loading { color: var(--muted); }
.verify-result-card { max-width: 560px; border-radius: var(--radius); padding: 20px; }
.verify-result-card.ok { background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; }
.verify-result-card.bad { background: #fee2e2; border: 1px solid #fca5a5; color: #b91c1c; }
.verify-result-card h3 { margin-bottom: 12px; }
.vr-lines div { display: flex; justify-content: space-between; gap: 12px;
  padding: 5px 0; border-bottom: 1px solid rgba(0,0,0,.08); font-size: .92rem; }
.vr-lines span:first-child { color: #374151; font-weight: 600; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--primary); }

/* Hero — modern split layout, photo shown in original colours (no green filter) */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(212,160,23,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(27,67,50,.08), transparent 55%),
    #fbfbf9;
  padding: 70px 0 80px;
  color: var(--text);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center;
}
.hero-text { text-align: left; }
.hero-badge {
  display: inline-block; background: rgba(212,160,23,.16); color: #8a6500;
  font-weight: 700; font-size: .76rem; letter-spacing: .04em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.1; color: var(--primary);
  margin-bottom: 18px; letter-spacing: -0.02em;
}
.hero p { font-size: 1.12rem; max-width: 520px; margin: 0 0 30px; color: #4b5563; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-media {
  border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgba(27,67,50,.18);
  background: #fff; aspect-ratio: 4 / 3;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Hero auto-rotating slideshow */
.hero-slideshow { position: relative; width: 100%; height: 100%; }
.hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1s ease; }
.hero-slide.active { opacity: 1; }
.hero-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; gap: 7px;
  justify-content: center; z-index: 2; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.55); transition: all .3s; }
.hero-dot.active { background: #fff; width: 22px; border-radius: 5px; }
.hero-media-empty {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-size: 5rem; background: linear-gradient(135deg, #eef3f0, #e3ece7);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #1f2421;
  font-weight: 700; padding: 14px 30px; border-radius: 999px;
  border: 0; cursor: pointer; transition: transform .15s, box-shadow .2s, opacity .2s;
  box-shadow: 0 8px 20px rgba(212,160,23,.28);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(212,160,23,.36); }
.btn-outline { background: transparent; border: 2px solid #fff; color: #fff; box-shadow: none; }
.btn-ghost {
  background: #fff; color: var(--primary); border: 1.5px solid var(--border); box-shadow: none;
}
.btn-ghost:hover { border-color: var(--primary); box-shadow: 0 8px 20px rgba(0,0,0,.06); }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-text { text-align: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-media { max-width: 520px; margin: 0 auto; }
}

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-grid img { border-radius: var(--radius); box-shadow: var(--shadow); }
.about-text p { margin-bottom: 16px; color: #374151; }
.about-placeholder {
  border-radius: var(--radius); background: #e7ece9; min-height: 280px;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}

/* Cards grid */
.grid { display: grid; gap: 24px; }
/* Responsive auto-fill grids → uniform, sensibly-sized tiles that scale with the
   number of items (no over-wide 2-up cards, no stretched lone card). */
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { box-shadow: 0 16px 38px rgba(27,67,50,.14); transform: translateY(-5px); }
/* Uniform image area: same height on every tile, whole photo shown (letterboxed
   on a soft background) so nothing is cropped and the grid stays tidy. */
.card-img { width: 100%; aspect-ratio: 16 / 10; display: block; }
img.card-img { object-fit: contain; object-position: center; background: #f1f4f2; }
div.card-img { background: #e7ece9; display: flex; align-items: center;
  justify-content: center; color: var(--muted); font-size: .9rem; }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { color: var(--primary); margin-bottom: 6px; }
.tag {
  display: inline-block; align-self: flex-start; font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; background: rgba(212,160,23,.16);
  color: #8a6500; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.card-body p { color: #4b5563; font-size: .95rem; flex: 1; }
.card-meta { margin-top: 12px; font-size: .85rem; color: var(--muted); }
.card-meta strong { color: var(--text); }
.price { font-weight: 700; color: var(--primary); margin-top: 10px; }

.section-alt { background: linear-gradient(180deg, #ffffff, #f6f8f6); }

/* What We Offer — systems */
.systems-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.system-card { overflow: hidden; }
.system-img, .system-img-empty { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; display: block; }
.system-img-empty { display: flex; align-items: center; justify-content: center; font-size: 3rem;
  background: linear-gradient(135deg, #eef3f0, #e3ece7); }
.system-tagline { color: #4b5563; font-size: .95rem; flex: 1; margin-bottom: 12px; }
.system-url { font-size: .82rem; color: var(--muted); margin-bottom: 14px; word-break: break-all; }
.system-btn { align-self: flex-start; padding: 10px 22px; }

/* International Visits — photo gallery */
.visit-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.visit-item { position: relative; margin: 0; border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow); background: #e7ece9; aspect-ratio: 4 / 3; cursor: zoom-in; }
.visit-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.visit-item:hover img { transform: scale(1.05); }
.visit-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 10px;
  color: #fff; font-size: .9rem; font-weight: 600;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); }
@media (max-width: 520px) { .visit-gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; } }

/* Team members */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.team-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); text-align: center; transition: transform .2s, box-shadow .2s; }
.team-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.12); }
.team-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #e7ece9; }
.team-photo-empty { display: flex; align-items: center; justify-content: center; font-size: 3.4rem; color: #9fb3a8; }
.team-body { padding: 16px 16px 20px; }
.team-name { font-size: 1.08rem; color: var(--primary); margin: 0 0 4px; }
.team-role { font-size: .9rem; font-weight: 600; color: var(--accent); margin: 0 0 8px; }
.team-bio { font-size: .88rem; color: var(--muted); line-height: 1.55; margin: 0; }
@media (max-width: 520px) { .team-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; } }

/* Feasibility promo */
.feas-promo { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.feas-tag { display: inline-block; background: rgba(212,160,23,.16); color: #8a6500;
  font-weight: 700; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 14px; }
.feas-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; }
.feas-list li { color: #374151; font-weight: 500; }
.feas-promo-card { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feas-stat { background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 22px 16px; text-align: center; box-shadow: var(--shadow); }
.feas-stat b { display: block; font-size: 1.5rem; color: var(--primary); }
.feas-stat span { font-size: .76rem; color: var(--muted); margin-top: 4px; display: block; }
@media (max-width: 820px) { .feas-promo { grid-template-columns: 1fr; gap: 28px; } }

/* Sire ranked list */
.sire-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.filter-btn {
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 20px; font-weight: 600; cursor: pointer; color: var(--text); transition: all .15s;
}
.filter-btn:hover { border-color: var(--accent); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.sire-list { display: flex; flex-direction: column; gap: 16px; }
.sire-row {
  display: grid; grid-template-columns: 44px 200px 1fr; gap: 18px; align-items: start;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.sire-rank {
  width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.sire-photo {
  width: 200px; height: 150px; border-radius: 10px; object-fit: cover; background: #e7ece9;
  display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .85rem;
}
.sire-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.sire-main h3 { color: var(--primary); margin-bottom: 2px; }
.sire-index { text-align: center; background: rgba(212,160,23,.14); border-radius: 10px; padding: 8px 14px; min-width: 86px; }
.sire-index-val { font-size: 1.5rem; font-weight: 800; color: var(--primary); line-height: 1; }
.sire-index-type { font-size: .72rem; font-weight: 700; letter-spacing: .05em; color: #8a6500; margin-top: 3px; }
.profile-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .88rem; }
.profile-table td { padding: 5px 8px; border-bottom: 1px solid var(--border); }
.profile-table td:first-child { color: var(--muted); width: 55%; }
.profile-table td:last-child { font-weight: 600; text-align: right; }

/* Genetic / production traits — grouped grid of compact stat cards */
.gen-group { margin: 12px 0 4px; }
.gen-group-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--border);
}
.gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gen-card {
  display: flex; flex-direction: column; gap: 2px; background: #f6f8f6;
  border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px;
}
.gen-card-label { font-size: .72rem; color: var(--muted); line-height: 1.25; }
.gen-card-val { font-size: 1.02rem; font-weight: 700; color: var(--primary); }
@media (max-width: 520px) { .gen-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } }
.sire-desc { margin-top: 10px; color: #4b5563; font-size: .92rem; }

.sire-row { cursor: pointer; transition: transform .15s, box-shadow .15s; outline: none; }
.sire-row:hover, .sire-row:focus { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.sire-highlights { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: .9rem; color: #4b5563; }
.sire-highlights b { color: var(--primary); }
.view-link { display: inline-block; margin-top: 10px; color: var(--accent); font-weight: 700; font-size: .88rem; }

@media (max-width: 600px) {
  .sire-row { grid-template-columns: 36px 1fr; }
  .sire-photo { grid-column: 1 / -1; width: 100%; height: 200px; }
}

/* Sire detail modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,28,22,.6); z-index: 200;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #fff; border-radius: var(--radius); max-width: 720px; width: 100%;
  padding: 30px; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-close {
  position: absolute; top: 14px; right: 14px; background: #f3f4f6; border: 0;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem;
}
.modal-head { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.modal-photo {
  width: 160px; height: 160px; border-radius: 12px; object-fit: cover; background: #e7ece9;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.modal-head h2 { color: var(--primary); margin: 6px 0 4px; }
.modal-index { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.modal-index .sire-index-val { font-size: 2rem; color: var(--primary); }
.modal-index .sire-index-type { font-size: .9rem; color: #8a6500; font-weight: 700; }
.modal-sub { color: var(--primary); margin: 22px 0 10px; padding-top: 14px; border-top: 1px solid var(--border); }

/* Linear trait bars (90–130) */
.linear-scale { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted);
  margin: 0 0 6px; padding-left: 150px; }
.linear-row { display: grid; grid-template-columns: 150px 1fr 42px; align-items: center; gap: 10px; margin-bottom: 7px; }
.linear-label { font-size: .85rem; color: #374151; }
.linear-track { position: relative; height: 12px; background: #eef1ef; border-radius: 999px; }
.linear-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 999px; }
.linear-mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--primary); opacity: .5; }
.linear-val { font-size: .85rem; font-weight: 700; text-align: right; color: var(--primary); }

@media (max-width: 520px) {
  .linear-scale { padding-left: 95px; }
  .linear-row { grid-template-columns: 95px 1fr 36px; }
}

/* Companies */
.company-logo { height: 56px; margin-bottom: 14px; object-fit: contain; }
.company-placeholder { height: 56px; display:flex; align-items:center; font-weight:700; color: var(--primary); font-size: 1.2rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-item { display: flex; gap: 12px; margin-bottom: 18px; align-items: flex-start; }
#contact-fb { margin-top: 36px; }
.social-grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 24px; }
.social-card { width: 400px; max-width: 100%; border-radius: 12px; box-shadow: var(--shadow); background: #fff; overflow: hidden; }
.fb-preview iframe { display: block; width: 100%; height: 500px; border: 0; background: #fff; }
.yt-preview { display: flex; flex-direction: column; }
.yt-preview iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
/* Channel-only fallback card */
.yt-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 240px; padding: 28px; text-decoration: none; color: var(--primary); text-align: center; }
.yt-card:hover { background: #fafafa; }
.yt-card .yt-logo { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 46px;
  background: #ff0000; color: #fff; border-radius: 12px; font-size: 1.5rem; }
.yt-card strong { font-size: 1.1rem; }
.yt-card .yt-go { font-size: .9rem; color: var(--accent); word-break: break-all; }
@media (max-width: 520px) { .social-card { width: 100%; } }
.contact-item .ico { font-size: 1.3rem; }
.contact-card { background: #fff; padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-card input, .contact-card textarea {
  width: 100%; padding: 12px; margin-bottom: 14px; border: 1px solid var(--border);
  border-radius: 8px; font-family: inherit; font-size: .95rem;
}

/* Footer */
footer { background: var(--primary); color: #d7e3dc; padding: 40px 0; text-align: center; }
footer a { color: var(--accent); }
.admin-link { font-size: .8rem; opacity: .7; }

@media (max-width: 860px) {
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0; background: #fff;
    flex-direction: column; padding: 18px 20px; gap: 16px;
    border-bottom: 1px solid var(--border); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  /* .grid-2 / .grid-3 are responsive via auto-fill minmax — no override needed. */
}

/* ============================================================
   SIRE ROW — ranked list
   ============================================================ */
.sire-photo-empty {
  width: 200px; height: 150px; border-radius: 10px; background: #e7ece9;
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
}
.sire-rel { font-size: .68rem; color: rgba(255,255,255,.8); text-align: center; margin-top: 2px; }
.sh-chip { background: #f3f4f6; border-radius: 6px; padding: 3px 8px; font-size: .82rem; white-space: nowrap; }
.sh-chip b { color: var(--primary); }

/* ============================================================
   SIRE DETAIL MODAL — two-column professional layout
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,22,16,.65); z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 30px 16px 40px; overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 18px; max-width: 860px; width: 100%;
  padding: 28px 28px 32px; position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,.28);
}
.modal-close {
  position: absolute; top: 16px; right: 16px; background: #f3f4f6;
  border: 0; width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer; font-size: 1.1rem; line-height: 1;
  transition: background .15s;
}
.modal-close:hover { background: #e5e7eb; }

/* Two-column top — both columns align to the top, hero photo does NOT stretch */
.sdl-top {
  display: grid; grid-template-columns: 3fr 2fr; gap: 24px;
  margin-bottom: 22px; align-items: start;
}

/* Hero photo column */
.sdl-hero-col { display: flex; flex-direction: column; gap: 14px; }
.sdl-hero-img {
  width: 100%; border-radius: 14px; object-fit: cover;
  max-height: 380px; display: block; box-shadow: var(--shadow);
  /* Preserve aspect — no vertical stretching */
  align-self: flex-start;
}
.sdl-hero-empty {
  width: 100%; height: 260px; background: #e7ece9; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 1.1rem;
}

/* Pedigree box below hero */
.sdl-pedigree {
  display: flex; align-items: center; gap: 12px;
  background: #f7f7f5; border-radius: 10px; padding: 14px 16px;
}
.ped-item { flex: 1; min-width: 0; }
.ped-role {
  display: block; font-size: .7rem; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); font-weight: 700; margin-bottom: 3px;
}
.ped-item strong { font-size: .92rem; color: var(--primary); word-break: break-word; }
.ped-x { font-size: 1.4rem; color: var(--muted); font-weight: 700; flex-shrink: 0; }

/* Info column — identity + index badge only, no overflow needed */
.sdl-info-col { display: flex; flex-direction: column; gap: 16px; align-self: start; }

/* Identity block */
.sdl-identity { display: flex; flex-direction: column; gap: 4px; }
.sdl-name {
  font-size: 1.9rem; font-weight: 800; color: var(--primary);
  text-transform: uppercase; letter-spacing: .04em; margin: 6px 0 0;
  line-height: 1.1;
}
.sdl-code { font-size: .95rem; color: var(--muted); margin-bottom: 8px; }
.sdl-meta { font-size: .85rem; display: flex; flex-direction: column; gap: 5px; margin-bottom: 6px; }
.sdl-meta div { display: flex; gap: 8px; }
.sdl-meta span { color: var(--muted); width: 65px; flex-shrink: 0; font-size: .8rem; }
.sdl-hapl {
  font-size: .8rem; color: #6b7280; background: #f3f4f6;
  border-radius: 6px; padding: 6px 10px; line-height: 1.5;
}

/* Index badge */
.sdl-idx-badge {
  background: linear-gradient(135deg, var(--primary) 0%, #2d6a4f 100%);
  color: #fff; border-radius: 12px; padding: 16px 18px;
}
.sdl-idx-top { display: flex; align-items: baseline; gap: 10px; }
.sdl-ival { font-size: 2.6rem; font-weight: 900; line-height: 1; }
.sdl-itype { font-size: 1.05rem; font-weight: 700; opacity: .85; }
.sdl-irel { font-size: .78rem; opacity: .8; margin-top: 5px; }
.sdl-idh  { font-size: .78rem; opacity: .75; margin-top: 2px; }

/* ── Daughters & Dam gallery strip (below two-column top) ── */
.sdl-gallery-row {
  margin-bottom: 24px; padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}
.sdl-gallery-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); margin-bottom: 12px;
}
.sdl-gallery-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.sdl-photo-card {
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: #fafafa;
  display: flex; flex-direction: column;
}
.sdl-photo-label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted);
  padding: 8px 10px 4px; background: #f7f7f5;
}
.sdl-photo-card img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
  cursor: zoom-in; transition: transform .18s;
}
.sdl-photo-card img:hover { transform: scale(1.03); }
.sdl-photo-img-empty {
  aspect-ratio: 4/3; background: #e7ece9;
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
}
.sdl-photo-cap { padding: 8px 10px; flex: 1; }
.sdl-photo-cap strong { display: block; font-size: .82rem; color: var(--primary); margin-bottom: 2px; }
.sdl-photo-cap span { font-size: .74rem; color: var(--muted); display: block; }
.sdl-herd { font-style: italic; }

/* Bottom data strip */
.sdl-data { border-top: 2px solid var(--border); padding-top: 22px; }
.sdl-section { margin-bottom: 22px; }
.sdl-sec-title {
  font-size: .85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--primary); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.ltr-scale-note { font-size: .72rem; color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* Conformation composites */
.sdl-composites {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px;
}
.comp-chip {
  background: rgba(27,67,50,.07); border: 1px solid rgba(27,67,50,.18);
  border-radius: 10px; padding: 10px 18px; text-align: center; min-width: 82px;
}
.comp-chip span {
  display: block; font-size: .7rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 3px;
}
.comp-chip strong { font-size: 1.5rem; color: var(--primary); font-weight: 800; }

/* Linear polar bars */
/* Linear group header on front page */
.ltr-group { margin-bottom: 20px; }
.ltr-group-title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--accent);
  padding: 5px 0 4px; margin-bottom: 6px;
  border-bottom: 1px dashed rgba(212,160,23,.4);
}
.ltr-header {
  display: grid; grid-template-columns: 155px 70px 1fr 70px 46px;
  font-size: .7rem; color: var(--muted); padding-bottom: 4px;
}
.ltr-lo-h { text-align: right; padding-right: 6px; }
.ltr-hi-h { }
.ltr-row {
  display: grid; grid-template-columns: 155px 70px 1fr 70px 46px;
  align-items: center; gap: 4px; margin-bottom: 7px;
}
.ltr-name { font-size: .84rem; color: #374151; }
.ltr-lo   { font-size: .74rem; color: var(--muted); text-align: right; padding-right: 6px; }
.ltr-bar  { position: relative; height: 11px; background: #e7ece9; border-radius: 999px; }
.ltr-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--primary); border-radius: 999px; transition: width .2s; }
.ltr-avg  {
  position: absolute; left: 40%; top: -4px; bottom: -4px; width: 2px;
  background: var(--accent); opacity: .55; border-radius: 2px;
}
.ltr-hi   { font-size: .74rem; color: var(--muted); padding-left: 6px; }
.ltr-val  { font-weight: 700; color: var(--primary); font-size: .95rem; text-align: right; }

/* Breeding notes bullets */
.sdl-bullets { padding-left: 18px; margin: 0; }
.sdl-bullets li { margin-bottom: 7px; color: #374151; font-size: .93rem; }

/* Responsive modal */
@media (max-width: 680px) {
  .modal { padding: 18px 14px 24px; }
  .sdl-top { grid-template-columns: 1fr; }
  .sdl-hero-img { max-height: 260px; }
  .ltr-row, .ltr-header { grid-template-columns: 110px 54px 1fr 54px 36px; }
  .ltr-lo, .ltr-hi { font-size: .66rem; }
  .ltr-name { font-size: .76rem; }
}

/* ============================================================
   PRODUCT CARD + DETAIL MODAL
   ============================================================ */
.product-card { cursor: pointer; }
.card-desc-clamp {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Blog-style product article */
.product-modal { max-width: 820px; }
.pm-article { padding: 4px 2px; }
.pm-head { margin-bottom: 18px; }
.pm-title { color: var(--primary); margin: 10px 0 6px; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; }
.pm-price { font-weight: 700; color: var(--accent); font-size: 1.1rem; }
.pm-hero {
  width: 100%; max-height: 460px; object-fit: contain; background: #f1f4f2;
  border-radius: 14px; margin-bottom: 22px; display: block; cursor: zoom-in;
  box-shadow: 0 16px 40px rgba(27,67,50,.14);
}
.pm-desc { color: #374151; line-height: 1.8; font-size: 1.04rem; }
.pm-desc p { margin-bottom: 14px; }
/* Rich-text article rendering (mirrors the editor's figure/table styles) */
.pm-desc h1 { font-size: 1.7rem; color: var(--primary); margin: .6em 0 .3em; }
.pm-desc h2 { font-size: 1.4rem; color: var(--primary); margin: .6em 0 .3em; }
.pm-desc h3 { font-size: 1.2rem; color: var(--primary); margin: .6em 0 .3em; }
.pm-desc h4 { font-size: 1.05rem; color: var(--primary); margin: .6em 0 .3em; }
.pm-desc ul, .pm-desc ol { margin: .6em 0; padding-inline-start: 26px; }
.pm-desc blockquote { border-inline-start: 3px solid var(--accent); margin: 1em 0; padding: 8px 18px;
  color: #555; background: #faf7ee; border-radius: 0 8px 8px 0; }
.pm-desc pre { background: #f3f4f3; padding: 12px 16px; border-radius: 8px; font-family: monospace; overflow: auto; }
.pm-desc a { color: var(--accent); text-decoration: underline; }
.pm-desc hr { border: 0; border-top: 2px solid var(--border); margin: 22px 0; }
.pm-desc table, .company-desc table { border-collapse: collapse; margin: 14px 0; }
.pm-desc table td, .company-desc table td { border: 1px solid var(--border); padding: 7px 11px; }
.pm-desc ul.rt-checklist, .company-desc ul.rt-checklist, .about-body ul.rt-checklist { list-style: none; padding-left: 4px; }
.pm-desc ul.rt-checklist li, .company-desc ul.rt-checklist li { margin: 4px 0; }
.pm-desc figure { margin: 16px 0; }
.pm-desc figure img { max-width: 100%; border-radius: 10px; display: block; cursor: zoom-in; }
.pm-desc figure figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 6px; font-style: italic; }
.pm-desc figure.rt-img-small  { width: 35%; }
.pm-desc figure.rt-img-medium { width: 60%; }
.pm-desc figure.rt-img-large  { width: 85%; }
.pm-desc figure.rt-img-full   { width: 100%; }
.pm-desc figure.rt-img-center { margin-left: auto; margin-right: auto; }
.pm-desc figure.rt-img-left   { float: left; margin: 6px 20px 12px 0; max-width: 50%; }
.pm-desc figure.rt-img-right  { float: right; margin: 6px 0 12px 20px; max-width: 50%; }
.pm-desc figure.rt-img-inline { display: inline-block; vertical-align: top; margin: 4px 10px; }
.pm-desc::after { content: ""; display: block; clear: both; }

/* free-positioned (overlapping) images — front of / behind text */
.pm-desc, #about-body, .company-desc { position: relative; isolation: isolate; }
.pm-desc figure.rt-img-front,  #about-body figure.rt-img-front,  .company-desc figure.rt-img-front  { position: absolute; z-index: 30; margin: 0; }
.pm-desc figure.rt-img-behind, #about-body figure.rt-img-behind, .company-desc figure.rt-img-behind { position: absolute; z-index: -1; margin: 0; }

/* Rich-content figures in About & Partners (mirrors .pm-desc) */
#about-body figure, .company-desc figure { margin: 16px 0; }
#about-body figure img, .company-desc figure img { max-width: 100%; border-radius: 10px; display: block; }
#about-body figure figcaption, .company-desc figure figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 6px; font-style: italic; }
#about-body figure.rt-img-small,  .company-desc figure.rt-img-small  { width: 35%; }
#about-body figure.rt-img-medium, .company-desc figure.rt-img-medium { width: 60%; }
#about-body figure.rt-img-large,  .company-desc figure.rt-img-large  { width: 85%; }
#about-body figure.rt-img-full,   .company-desc figure.rt-img-full   { width: 100%; }
#about-body figure.rt-img-center, .company-desc figure.rt-img-center { margin-left: auto; margin-right: auto; }
#about-body figure.rt-img-left,   .company-desc figure.rt-img-left   { float: left; margin: 6px 20px 12px 0; max-width: 50%; }
#about-body figure.rt-img-right,  .company-desc figure.rt-img-right  { float: right; margin: 6px 0 12px 20px; max-width: 50%; }
#about-body figure.rt-img-inline, .company-desc figure.rt-img-inline { display: inline-block; vertical-align: top; margin: 4px 10px; }
#about-body::after, .company-desc::after { content: ""; display: block; clear: both; }
body.rtl .pm-desc figure.rt-img-left { float: right; margin: 6px 0 12px 20px; }
body.rtl .pm-desc figure.rt-img-right { float: left; margin: 6px 20px 12px 0; }
@media (max-width: 640px) {
  .pm-desc figure.rt-img-small, .pm-desc figure.rt-img-medium,
  .pm-desc figure.rt-img-large, .pm-desc figure.rt-img-left, .pm-desc figure.rt-img-right { width: 100%; max-width: 100%; float: none; margin: 16px 0; }
}
.pm-sub {
  color: var(--primary); font-size: 1.15rem; margin: 26px 0 12px;
  padding-bottom: 8px; border-bottom: 2px solid var(--border);
}
.pm-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pm-features li {
  position: relative; padding-left: 30px; color: #374151; font-size: 1rem; line-height: 1.5;
}
.pm-features li::before {
  content: "✔"; position: absolute; left: 0; top: 0;
  color: #fff; background: var(--accent); width: 20px; height: 20px;
  border-radius: 50%; font-size: .7rem; display: flex; align-items: center; justify-content: center;
}
.pm-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px;
}
.pm-gallery img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px;
  cursor: zoom-in; transition: transform .15s, box-shadow .2s; border: 1px solid var(--border);
}
.pm-gallery img:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.pm-actions { margin-top: 26px; }
.pm-cta { margin-top: 0; }
body.rtl .pm-features li { padding-left: 0; padding-right: 30px; }
body.rtl .pm-features li::before { left: auto; right: 0; }

/* ============================================================
   PHOTO LIGHTBOX
   ============================================================ */
.photo-lb {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.88);
  align-items: center; justify-content: center;
}
.photo-lb.open { display: flex; }
.lb-img {
  max-width: 92vw; max-height: 88vh; object-fit: contain;
  border-radius: 10px; display: block; box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.lb-close {
  position: fixed; top: 20px; right: 24px;
  background: rgba(255,255,255,.15); color: #fff;
  border: 1px solid rgba(255,255,255,.3); border-radius: 50%;
  width: 42px; height: 42px; font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); transition: background .15s;
}
.lb-close:hover { background: rgba(255,255,255,.3); }

/* ============================================================
   ADMIN — <details> collapsible sections
   ============================================================ */
.adm-detail {
  border-top: 1px solid var(--border);
  margin-top: 12px;
}
.adm-detail summary {
  cursor: pointer; list-style: none;
  padding: 11px 4px; font-weight: 700; font-size: .88rem;
  color: var(--primary); display: flex; align-items: center; gap: 8px;
  user-select: none;
}
.adm-detail summary::-webkit-details-marker { display: none; }
.adm-detail summary::after {
  content: "▶"; font-size: .65rem; margin-left: auto;
  color: var(--muted); transition: transform .2s;
}
.adm-detail[open] summary::after { transform: rotate(90deg); }
.adm-detail summary small { font-weight: 400; color: var(--muted); }
.adm-body { padding: 10px 0 14px; }
.idx-val-tag { background: rgba(27,67,50,.12); color: var(--primary); }

/* ============================================================
   ADMIN — photo upload group with remove button
   ============================================================ */
.photo-group { margin-top: 4px; }
.photo-preview {
  display: flex; align-items: flex-start; gap: 12px;
  background: #f7f7f5; border: 1px solid var(--border);
  border-radius: 10px; padding: 10px; margin-top: 6px;
}
.photo-preview .thumb {
  width: 100px; height: 75px; border-radius: 7px;
  object-fit: cover; display: block; flex-shrink: 0;
}
.remove-photo-btn {
  background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5;
  border-radius: 8px; padding: 7px 12px; cursor: pointer;
  font-size: .82rem; font-weight: 600; white-space: nowrap;
  transition: background .15s; align-self: center;
}
.remove-photo-btn:hover { background: #fecaca; }

/* ADMIN — daughter block */
.daughter-block {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; margin-bottom: 12px; background: #fafafa;
}
.daughter-block-title {
  font-weight: 700; color: var(--primary); font-size: .88rem; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.daughter-block-title::before {
  content: ""; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent);
}

/* ===== Language switcher & RTL (Pashto / Dari) ===== */
.site-lang-switch {
  background: var(--primary); color: #fff; border: 1px solid var(--primary);
  border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: .85rem;
  cursor: pointer; font-family: inherit;
}
.site-lang-switch option { color: #1f2421; background: #fff; }

/* RTL layout for Pashto & Dari */
body.rtl { direction: rtl; }
body.rtl .nav { flex-direction: row-reverse; }
body.rtl .hero-grid,
body.rtl .about-grid,
body.rtl .contact-grid,
body.rtl .feas-promo { direction: rtl; }
body.rtl .section-title::after { margin-left: auto; }
body.rtl .feas-list { padding-right: 0; }
body.rtl .hero-text,
body.rtl .feas-promo-text { text-align: right; }
body.rtl .contact-item { flex-direction: row-reverse; text-align: right; }
body.rtl .verify-box { flex-direction: row-reverse; }
/* Use a font stack with good Arabic-script coverage when RTL */
body.rtl { font-family: "Segoe UI", "Noto Naskh Arabic", "Tahoma", system-ui, sans-serif; }
