/* Big Marv's Legacy Rescue — front-end styles for the Dogs templates.
   Loaded only on the dog archive/single pages. Provides the small subset of
   Bootstrap grid/utilities the templates use (so no Bootstrap dependency),
   plus the carousel + full-screen lightbox and theme-consistent styling. */

.bml-plugin-main { --lime:#B2E635; --ink:#181F22; --surface:#F8FAF5; }

/* ---- layout (mini Bootstrap) ---- */
.bml-plugin-main .container,
.bml-plugin-main .container-fluid { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.bml-plugin-main .row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.bml-plugin-main .row > [class*="col-"] { padding: 0 12px; margin-bottom: 24px; box-sizing: border-box; width: 100%; }
.bml-plugin-main .col-6 { flex: 0 0 50%; max-width: 50%; }
@media (min-width:768px){
  .bml-plugin-main .col-md-4 { flex:0 0 33.333%; max-width:33.333%; }
  .bml-plugin-main .col-md-5 { flex:0 0 41.666%; max-width:41.666%; }
  .bml-plugin-main .col-md-7 { flex:0 0 58.333%; max-width:58.333%; }
}
@media (min-width:992px){
  .bml-plugin-main .col-lg-3 { flex:0 0 25%; max-width:25%; }
  .bml-plugin-main .col-lg-4 { flex:0 0 33.333%; max-width:33.333%; }
  .bml-plugin-main .col-lg-8 { flex:0 0 66.666%; max-width:66.666%; }
}

/* ---- utilities used by the templates ---- */
.bml-plugin-main .text-center{text-align:center}
.bml-plugin-main .text-decoration-none{text-decoration:none}
.bml-plugin-main .text-dark{color:var(--ink)}
.bml-plugin-main .text-muted{color:#6b7280}
.bml-plugin-main .mb-1{margin-bottom:.25rem}.bml-plugin-main .mb-3{margin-bottom:1rem}.bml-plugin-main .mb-4{margin-bottom:1.5rem}
.bml-plugin-main .p-3{padding:1rem}
.bml-plugin-main .rounded{border-radius:14px}
.bml-plugin-main .bg-light{background:var(--surface)}
.bml-plugin-main .w-100{width:100%}.bml-plugin-main .h-100{height:100%}
.bml-plugin-main .d-block{display:block}
.bml-plugin-main .img-fluid{max-width:100%;height:auto}
.bml-plugin-main .visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
/* Track the theme's fluid body size so the description matches surrounding
   paragraphs at every viewport width (fixed 1rem diverged from it on mobile). */
.bml-plugin-main .fs-6{font-size:var(--wp--preset--font-size--medium,1rem)}.bml-plugin-main .lh-base{line-height:1.55}
.bml-plugin-main .fa-angle-right::before{content:"\203A";margin-right:8px;color:var(--lime);font-weight:800;font-style:normal}
.bml-plugin-main .fa-arrow-right::before{content:"\2192";font-style:normal;margin-left:4px}

/* ---- headings / text ---- */
.bml-plugin-main h1{font-family:Oswald,"Arial Narrow",sans-serif;text-transform:uppercase;letter-spacing:.02em;color:var(--ink);line-height:1.08}
.bml-plugin-main a{color:var(--ink)}
.bml-plugin-main a:hover{color:#7aa81f}

/* ---- archive cards ---- */
.bml-plugin-main .card{background:#fff;border-radius:14px;overflow:hidden;box-shadow:0 8px 24px rgba(24,31,34,.07);transition:transform .2s ease}
.bml-plugin-main .card:hover{transform:translateY(-3px)}
.bml-plugin-main .card-body{padding:14px 12px 18px}
.bml-plugin-main .card-title{font-family:Oswald,sans-serif;text-transform:uppercase;font-size:1.05rem;margin:0 0 4px;color:var(--ink)}
.bml-plugin-main .card-text{font-size:.85rem;margin:0}
.bml-plugin-main .ratio-4x3{aspect-ratio:4/3;position:relative;overflow:hidden}
.bml-plugin-main .ratio-4x3 > *{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}

/* ---- adopt button ---- */
.bml-plugin-main .home-btns{display:inline-block;text-decoration:none}
.bml-plugin-main .home-btns button{background:var(--lime);color:var(--ink);border:none;border-radius:999px;padding:.75rem 1.7rem;font-family:Oswald,sans-serif;font-weight:600;text-transform:uppercase;letter-spacing:.03em;cursor:pointer}
.bml-plugin-main .home-btns button:hover{background:var(--ink);color:#fff}

/* ---- details box ---- */
.bml-plugin-main .dog-details > div{padding:.4rem 0;border-bottom:1px solid #e8ebe3;font-size:.95em}
.bml-plugin-main .dog-details > div:last-child{border-bottom:none}

/* ================= Gallery carousel ================= */
.bml-gallery{margin-bottom:1rem}
.bml-gallery-main{position:relative;border-radius:14px;overflow:hidden;background:var(--ink);aspect-ratio:4/3;cursor:zoom-in}
.bml-gallery-main img,.bml-gallery-main video{width:100%;height:100%;object-fit:cover;display:block}
.bml-gallery-main .bml-zoom-hint{position:absolute;bottom:10px;right:10px;background:rgba(24,31,34,.72);color:#fff;font-size:.72rem;padding:4px 11px;border-radius:999px;pointer-events:none}
.bml-gallery-thumbs{display:flex;gap:8px;margin-top:10px;overflow-x:auto;padding-bottom:4px}
.bml-gallery-thumb{flex:0 0 auto;width:68px;height:68px;border:2px solid transparent;border-radius:10px;overflow:hidden;padding:0;cursor:pointer;background:var(--ink);position:relative}
.bml-gallery-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.bml-gallery-thumb.is-active{border-color:var(--lime)}
.bml-gallery-thumbs:has(> .bml-gallery-thumb:only-child){display:none}
.bml-gallery-thumb .bml-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.1rem;background:rgba(24,31,34,.4)}

/* ================= Full-screen lightbox ================= */
.bml-lb{position:fixed;inset:0;z-index:100000;display:none;align-items:center;justify-content:center;background:rgba(15,20,22,.95);padding:clamp(1rem,4vw,3rem)}
.bml-lb.is-open{display:flex}
.bml-lb-media{display:flex;align-items:center;justify-content:center;max-width:94vw;max-height:88vh}
.bml-lb-media img,.bml-lb-media video{max-width:94vw;max-height:86vh;width:auto;height:auto;border-radius:8px;box-shadow:0 20px 60px rgba(0,0,0,.5)}
.bml-lb button{position:absolute;background:rgba(255,255,255,.13);color:#fff;border:none;border-radius:999px;cursor:pointer;transition:background .2s}
.bml-lb button:hover{background:var(--lime);color:var(--ink)}
.bml-lb-close{top:1.25rem;right:1.5rem;width:46px;height:46px;font-size:1.7rem;line-height:1}
.bml-lb-prev,.bml-lb-next{top:50%;transform:translateY(-50%);width:54px;height:54px;font-size:2rem;line-height:1}
.bml-lb-prev{left:1.25rem}.bml-lb-next{right:1.25rem}
.bml-lb-count{position:absolute;bottom:1.25rem;left:50%;transform:translateX(-50%);color:#e7f3c4;font-size:.85rem}
@media (max-width:600px){.bml-lb-prev{left:.5rem}.bml-lb-next{right:.5rem}.bml-lb-prev,.bml-lb-next{width:44px;height:44px;font-size:1.6rem}}
@media (prefers-reduced-motion:reduce){.bml-gallery-main,.card{transition:none}}
