/* BirdingWestJava.com Bird Guide */
.bird-guide-page{background:#fff;color:var(--ink)}
.bg-hero,.species-hero{padding:30px 0 72px;background:linear-gradient(118deg,#073f2b,#0a4b35 58%,#123f35);color:#fff}
.bg-hero-grid,.species-hero-grid{display:grid;grid-template-columns:1fr .9fr;gap:55px;align-items:center}
.bg-hero h1,.species-hero h1{font-size:clamp(42px,5vw,64px);line-height:1.05;letter-spacing:-.055em;color:#fff;margin:0 0 20px}
.bg-hero h1 em,.species-hero h1 em,.bg-cta h2 em{font-style:normal;color:var(--lime)}
.bg-lead{font-size:16px;line-height:1.8;color:#e1eee5;max-width:650px}
.bg-hero figure{margin:0;min-height:300px;border:1px solid rgba(255,255,255,.2);border-radius:22px 130px 22px 22px;background:linear-gradient(145deg,#1c6447,#0b3025);display:grid;place-items:center;position:relative;overflow:hidden}
.hero-bird-symbol{font-size:clamp(40px,6vw,70px);line-height:.9;letter-spacing:.08em;font-weight:800;color:rgba(255,255,255,.17);text-align:center}
.bg-hero figcaption{position:absolute;bottom:18px;left:20px;color:#d8e8dc;font-size:12px}
.bg-stats{display:flex;gap:18px;flex-wrap:wrap;color:#c8ddcd;font-size:12px;margin-top:24px}
.bg-stats span:before{content:"✓";color:var(--lime);margin-right:7px}
.bg-intro{padding:65px 0;background:#f6f8f3}
.bg-intro .container{max-width:900px}
.bg-intro h2,.bg-heading h2{font-size:clamp(30px,3.5vw,43px);line-height:1.15;letter-spacing:-.05em;color:#183b2b;margin:0 0 14px}
.bg-intro h2 em,.bg-heading h2 em{font-style:normal;color:#78a92a}
.bg-intro p:not(.eyebrow){color:#68786d;font-size:15px;line-height:1.85}
.bg-catalog{padding:78px 0}
.bg-heading{display:grid;grid-template-columns:1fr .7fr;gap:45px;align-items:end;margin-bottom:28px}
.bg-heading>p{color:#68786d;line-height:1.8;font-size:14px}
.bg-filters{display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px;padding:18px;background:#f6f8f3;border:1px solid #e2eadf;border-radius:14px;margin-bottom:18px}
.bg-filters label{display:grid;gap:7px;color:#42604e;font-size:12px;font-weight:700}
.bg-filters input,.bg-filters select{width:100%;min-height:44px;border:1px solid #dce6d9;border-radius:8px;padding:10px 12px;background:#fff;color:#244334;font:inherit;font-weight:400}
.result-count{font-size:12px;color:#738278;margin:0 0 15px}
.species-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}
.species-card{overflow:hidden;border:1px solid #e0e9dc;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(7,63,43,.04);display:flex;flex-direction:column}
.species-visual{height:170px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;background:linear-gradient(140deg,#e8f0e4,#f5f7f1);color:#72936b;text-decoration:none}
.bird-mark{font-size:54px;font-weight:800;line-height:1;color:#7da66c;opacity:.65}
.species-visual small{font-size:9px;letter-spacing:.18em;font-weight:800;color:#66845e}
.species-copy{padding:18px 19px 20px;display:flex;flex-direction:column;flex:1}
.species-meta{font-size:10px;letter-spacing:.07em;text-transform:uppercase;color:#66865c;font-weight:800}
.species-copy h2{font-size:19px;line-height:1.25;color:#183b2b;margin:8px 0 3px}
.species-copy h2 a{color:inherit;text-decoration:none}
.scientific{font-style:italic;color:#758278;font-size:12px;margin:0 0 10px}
.species-copy>p:not(.scientific){font-size:13px;line-height:1.7;color:#68786d;margin:0 0 16px}
.species-more{margin-top:auto;padding-top:12px;border-top:1px solid #e8eee5;color:#397d36;font-size:12px;font-weight:800;text-decoration:none}
.no-results{padding:35px;text-align:center;background:#f6f8f3;border-radius:12px;color:#68786d}
.bg-note{padding:45px 0;background:#f6f8f3}
.bg-note h2{color:#183b2b;font-size:25px}.bg-note p{color:#68786d;line-height:1.8}.bg-note a{color:#397d36;font-weight:700}
.bg-cta{padding:64px 0;background:linear-gradient(120deg,#073f2b,#0d5739);color:#fff;text-align:center}
.bg-cta .container{max-width:850px}.bg-cta h2{font-size:clamp(30px,4vw,43px);color:#fff;line-height:1.15}
.bg-cta p{color:#dce9df;line-height:1.8}
.species-hero nav{font-size:12px;color:#d3e3d7;margin-bottom:28px}.species-hero nav a{color:inherit}
.species-hero h1{font-size:clamp(38px,4.5vw,58px)}
.species-photo-pending{min-height:270px;border:1px solid rgba(255,255,255,.2);border-radius:18px;background:rgba(255,255,255,.06);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:25px;text-align:center}
.species-photo-pending p{color:#e4eee7}.species-photo-pending a{color:#c9ef70;font-size:12px}
.species-pill{display:inline-block;border:1px solid rgba(255,255,255,.3);border-radius:20px;padding:7px 12px;color:#d9eadc;font-size:11px}
.species-article{padding:70px 0}.species-article-grid{display:grid;grid-template-columns:1fr 280px;gap:55px}
.species-article article h2{color:#183b2b;font-size:25px;margin:28px 0 10px}
.species-article article p{color:#607267;line-height:1.85;font-size:15px}
.species-side{border:1px solid #e0e9dc;border-radius:14px;padding:22px;height:max-content}
.species-side>span{font-size:10px;color:#679044;letter-spacing:.12em;font-weight:800}
.species-side p{font-size:13px;color:#64766a;border-bottom:1px solid #e8eee5;padding-bottom:9px}
.species-side p b{display:block;color:#183b2b;margin-bottom:3px}
.species-side a{display:block;color:#397d36;font-size:12px;font-weight:700;margin-top:14px}
@media(max-width:900px){.species-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bg-hero-grid,.species-hero-grid{gap:30px}.species-article-grid{grid-template-columns:1fr 240px;gap:28px}}
@media(max-width:650px){.bg-hero-grid,.species-hero-grid,.bg-heading,.species-article-grid{grid-template-columns:1fr;gap:20px}.bg-hero h1,.species-hero h1{font-size:40px}.bg-hero figure{min-height:180px}.bg-intro,.bg-catalog,.species-article{padding:52px 0}.bg-filters{grid-template-columns:1fr}.species-grid{grid-template-columns:1fr}.species-visual{height:145px}.species-side{order:-1}}


/* Javan Blue Robin image integration */
.species-visual.has-species-image {
    position: relative;
    display: block;
    height: 170px;
    overflow: hidden;
    padding: 0;
    background: #e8f0e4;
}
.species-visual.has-species-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.species-image-label {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 6px 9px;
    border-radius: 20px;
    background: rgba(7, 63, 43, .88);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}
.species-photo-loaded {
    position: relative;
    min-height: 0;
    aspect-ratio: 4 / 3;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 18px 90px 18px 18px;
    background: #244b36;
}
.species-photo-loaded img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 270px;
    object-fit: cover;
}
.species-photo-loaded figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 28px 18px 15px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(transparent, rgba(0,0,0,.68));
}
.species-photo-loaded figcaption em {
    font-weight: 400;
}
@media(max-width:650px) {
    .species-visual.has-species-image { height: 190px; }
    .species-photo-loaded img { min-height: 220px; }
}

/* V1.4 — Automatic image slots for all species.
   Upload /images/bird-guide/<species-slug>.webp and the matching card/profile displays it. */
.bird-guide-page .species-card .species-visual.has-species-image {
    position: relative !important;
    display: block !important;
    flex: 0 0 190px !important;
    width: 100% !important;
    height: 190px !important;
    min-height: 190px !important;
    max-height: 190px !important;
    overflow: hidden !important;
    padding: 0 !important;
    background: linear-gradient(145deg,#e8f0e4,#dce8d9) !important;
}
.bird-guide-page .species-card .species-visual.has-species-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center;
}
.bird-guide-page .species-card .species-visual.has-species-image img[hidden] {
    display: none !important;
}
.bird-guide-page .species-image-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #72936b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
}
.bird-guide-page .species-image-label {
    z-index: 2;
}
.bird-guide-page .species-photo-loaded {
    position: relative;
}
.bird-guide-page .species-photo-loaded img[hidden] {
    display: none !important;
}
.bird-guide-page .species-detail-fallback {
    display: none;
    min-height: 270px;
    place-content: center;
    text-align: center;
    padding: 25px;
    color: #dce9df;
    font-weight: 700;
    background: linear-gradient(145deg,#174d37,#0b3427);
}
.bird-guide-page .species-detail-fallback small {
    display: inline-block;
    margin-top: 8px;
    font-weight: 400;
    color: #c8ddcd;
}
.bird-guide-page .species-detail-fallback[hidden] {
    display: none !important;
}
.bird-guide-page .species-detail-fallback:not([hidden]) {
    display: grid;
}
@media(max-width:650px) {
    .bird-guide-page .species-card .species-visual.has-species-image {
        flex-basis: 185px !important;
        height: 185px !important;
        min-height: 185px !important;
        max-height: 185px !important;
    }
}

/* Combined V1.4 card styling + V1.5 hero photo styling */
/* V1.5 — Uploaded Bird Guide hero photograph */
.bird-guide-page .bg-hero figure.bg-hero-photo {
    position: relative; display: block; min-height: 0; aspect-ratio: 4 / 3;
    margin: 0; overflow: hidden; border: 7px solid rgba(255,255,255,.14);
    border-radius: 22px 130px 22px 22px; background: #315b43;
    box-shadow: 0 28px 70px rgba(0,0,0,.22);
}
.bird-guide-page .bg-hero figure.bg-hero-photo img {
    position: absolute; inset: 0; display: block; width: 100%; height: 100%;
    object-fit: cover; object-position: center;
}
.bird-guide-page .bg-hero figure.bg-hero-photo figcaption {
    position: absolute; z-index: 1; left: 0; right: 0; bottom: 0;
    padding: 35px 20px 17px; color: #fff; font-size: 12px; font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,.55);
    background: linear-gradient(transparent,rgba(0,0,0,.62));
}
@media(max-width:650px) {
    .bird-guide-page .bg-hero figure.bg-hero-photo {
        aspect-ratio: 4 / 3; border-radius: 18px 95px 18px 18px;
    }
}

/* FINAL CARD LAYOUT — preserve V1.4 appearance, allow content to determine height */
.bird-guide-page #species-grid.species-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-rows: auto !important;
  align-items: start !important;
  gap: 18px !important;
}

.bird-guide-page #species-grid.species-grid > article.species-card {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-self: start !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #e0e9dc !important;
  border-radius: 16px !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 8px 24px rgba(7,63,43,.05) !important;
}

.bird-guide-page #species-grid.species-grid > article.species-card > a.species-visual {
  box-sizing: border-box !important;
  display: block !important;
  position: relative !important;
  flex: 0 0 190px !important;
  width: 100% !important;
  height: 190px !important;
  min-height: 190px !important;
  max-height: 190px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #e8f0e4 !important;
}

.bird-guide-page #species-grid.species-grid > article.species-card > a.species-visual img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
}

.bird-guide-page #species-grid.species-grid > article.species-card > .species-copy {
  box-sizing: border-box !important;
  display: flex !important;
  position: static !important;
  flex: 0 0 auto !important;
  flex-direction: column !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 18px 19px 20px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  background-image: none !important;
  color: #183b2b !important;
  box-shadow: none !important;
}

.bird-guide-page #species-grid.species-grid > article.species-card > .species-copy > * {
  position: static !important;
  float: none !important;
  max-height: none !important;
  overflow: visible !important;
  white-space: normal !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.bird-guide-page #species-grid.species-grid > article.species-card > .species-copy > p:not(.scientific) {
  display: block !important;
  height: auto !important;
  margin: 0 0 14px !important;
  color: #68786d !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}

.bird-guide-page #species-grid.species-grid > article.species-card > .species-copy > .species-more {
  display: block !important;
  margin-top: 0 !important;
  padding-top: 12px !important;
  border-top: 1px solid #e8eee5 !important;
  color: #397d36 !important;
}

.bird-guide-page #species-grid.species-grid > article.species-card[hidden],
.bird-guide-page #species-grid.species-grid > article.species-card.is-filtered-out {
  display: none !important;
}

@media (max-width: 900px) {
  .bird-guide-page #species-grid.species-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 650px) {
  .bird-guide-page #species-grid.species-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: auto !important;
    gap: 18px !important;
    align-items: start !important;
  }
  .bird-guide-page #species-grid.species-grid > article.species-card {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    align-self: start !important;
    margin: 0 !important;
    border-radius: 16px !important;
  }
  .bird-guide-page #species-grid.species-grid > article.species-card > a.species-visual {
    flex-basis: 185px !important;
    height: 185px !important;
    min-height: 185px !important;
    max-height: 185px !important;
  }
  .bird-guide-page #species-grid.species-grid > article.species-card > .species-copy {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 16px 15px 18px !important;
  }
}
