/* Bolivia: compact photo-led country tiles matching established DANZO country layout.
   Scoped to Bolivia-only stylesheet; shared DANZO styling is untouched. */
#heritage.heritage{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:stretch}
#heritage .hcard{position:relative;display:flex;flex-direction:column;min-width:0;min-height:365px;padding:0 0 16px;overflow:hidden;border:1px solid #e3e7ef;border-radius:8px;background:#fff;box-shadow:0 6px 24px rgba(13,27,54,.07)}
#heritage .hcard .art,#heritage.heritage.photo-top .hcard .art{position:relative;inset:auto;width:100%;height:145px;flex:0 0 145px;margin:0 0 12px;display:block;overflow:hidden;background:#e6edf1}
#heritage .hcard .art img,#heritage.heritage.photo-top .hcard .art img{width:100%;height:100%;display:block;object-fit:cover;-webkit-mask-image:none!important;mask-image:none!important}
#heritage .hcard .ico,#heritage.heritage.photo-top .hcard .ico{position:relative;top:auto;inset:auto;margin:0 14px 7px;padding:0;width:25px;height:25px;flex:0 0 25px;background:none;box-shadow:none;color:#0d1b36}
#heritage .hcard h3,#heritage .hcard p,#heritage .hcard ul,#heritage.heritage.photo-top .hcard h3,#heritage.heritage.photo-top .hcard p,#heritage.heritage.photo-top .hcard ul{position:relative;z-index:1;max-width:none;width:auto;margin-inline:14px;overflow-wrap:anywhere;text-shadow:none}
#heritage .hcard h3{font-size:17px;line-height:1.2;margin-bottom:6px;color:#0d1b36}
#heritage .hcard p,#heritage .hcard li{font-size:12.5px;line-height:1.55;color:#4b5971}
#heritage .hcard ul{padding-inline-start:17px}
#heritage .hcard .pill-btn{margin:auto 14px 0;align-self:flex-start;max-width:calc(100% - 28px);box-sizing:border-box;white-space:normal;min-height:36px}
/* Famous Places: five landscape photos on one row, navy captions below, like the country reference. */
#places.places{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px}
#places .place{display:flex;flex-direction:column;position:relative;height:195px;aspect-ratio:auto;min-width:0;overflow:hidden;background:#e6edf1;border-radius:7px;box-shadow:0 5px 15px rgba(13,27,54,.08)}
#places .place>img{display:block;flex:1 1 auto;min-height:0;width:100%;height:136px;object-fit:cover;transition:transform .3s}
#places .place:hover>img{transform:scale(1.03)}
#places .place::after{content:none!important;display:none!important}
#places .place>span{position:relative;inset:auto;bottom:auto;flex:0 0 59px;display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;background:#0d1b36;color:#fff;padding:8px 10px;font-size:14px;line-height:1.25;text-shadow:none;font-family:var(--serif);font-weight:700;overflow-wrap:anywhere}
#places .place .ext{top:8px;inset-inline-end:8px}
#places .place.with-desc{height:195px;min-height:195px}
#places .place.with-desc .pimg{height:136px;flex:1 1 auto}
#places .place.with-desc .pband{background:#0d1b36;padding:8px 10px}
#places .place.with-desc .pband b{font-size:14px;color:white}
/* Fail clearly, not with a fake colorful placeholder. */
.dcard .ph{background:#e6edf1}
.img-missing,.dcard .ph.img-missing,#places .place.img-missing,#heritage .hcard .art.img-missing{background:#e6edf1!important}
img[data-scotland-photo-failed="true"]{opacity:0}
.scotland-photo-unavailable{position:absolute;inset:0 0 59px;display:flex;align-items:center;justify-content:center;text-align:center;padding:12px;background:#e6edf1;color:#526072;font-size:12px;font-weight:600;line-height:1.4}
html[dir="rtl"] #heritage .hcard{text-align:right}
html[dir="rtl"] #places .place>span{text-align:right}
@media(max-width:1100px){#heritage.heritage{grid-template-columns:repeat(2,minmax(0,1fr))}#places.places{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:670px){#heritage.heritage{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#heritage .hcard{min-height:370px}#heritage .hcard .art,#heritage.heritage.photo-top .hcard .art{height:110px;flex-basis:110px}#heritage .hcard h3{font-size:16px}#heritage .hcard p{font-size:12px}#places.places{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#places .place{height:188px}#places .place>span{font-size:13px;flex-basis:59px}}
@media(max-width:390px){#heritage.heritage{grid-template-columns:1fr}#heritage .hcard{min-height:0}#heritage .hcard .art,#heritage.heritage.photo-top .hcard .art{height:150px;flex-basis:150px}#heritage .hcard .pill-btn{margin-top:15px}}

/* Bolivia: graceful YouTube embed fallback */
.danzo-video-player{display:grid;gap:10px}.danzo-video-player .vframe{width:100%;aspect-ratio:16/9;display:block;min-height:240px;border:0;border-radius:18px}.danzo-direct-youtube{display:inline-flex;align-items:center;justify-content:center;justify-self:center;padding:10px 20px;border-radius:999px;background:#0e1b36;color:white!important;font-weight:700;text-decoration:none}

/* Bolivia-only related card sizing: match the compact Peru reference. */
body:has(#related) #rgrid.rgrid { display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); max-width:1160px; margin-inline:auto; gap:16px; }
body:has(#related) #rgrid .rcard {aspect-ratio: 3/4; background:#12284b;}
body:has(#related) #rgrid .rcard::after {background:linear-gradient(0deg,rgba(7,16,42,.86) 0%,rgba(7,16,42,.12) 45%,transparent 80%);}
body:has(#related) #rgrid .rcard:nth-child(n)::after {background:linear-gradient(0deg,rgba(7,16,42,.86) 0%,rgba(7,16,42,.12) 45%,transparent 80%);}
body:has(#related) #rgrid .rcard .r-ph img{object-fit:cover;object-position:center center;filter:none;}
body:has(#related) #rgrid .rcard b{font-size:15.5px;line-height:1.4;inset-inline:14px;bottom:14px;}

@media(max-width:640px){body:has(#related) #rgrid.rgrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}body:has(#related) #rgrid .rcard b{font-size:14px;}}
/* No artificial fake badges, gradients never masquerade as photographs. */

/* Bolivia QA: preserve approved photo-top card proportions; no false low-res stretching. */
body.bolivia-page img{background:#0d1b36;color:#fff}
#heritage .hcard .art img,#places .place img{object-fit:cover;object-position:center}
[data-photo-credit]{font-size:11px;color:#52627a}
html[lang="fa"] #heritage .hcard p,html[lang="fa"] #places .place{line-height:1.75}

/* DANZO Bolivia first-release photo uniqueness rules */
.dcard.no-photo .ph, .dcard .ph:empty, .hcard .art:empty {display:none!important}
.dcard.no-photo{background:linear-gradient(145deg,#132859,#7035a9)!important;color:white; min-height:160px}
.dcard.no-photo .body{background:none!important;color:white!important;padding:22px!important}
.dcard.no-photo .body h3,.dcard.no-photo .body p{color:white!important}
.hcard{background:linear-gradient(145deg,#fdf3e8,#f6edff);}
.place.no-photo{background:linear-gradient(145deg,#10244b,#a5339e);min-height:155px;color:#fff}
.place.no-photo span{color:#fff;position:relative;padding:28px;display:block;z-index:2}
.hd.no-photo{background:linear-gradient(120deg,#152951,#e84679);color:white}
.hd.no-photo span,.ex.no-photo span{position:relative!important}
.rcard.no-photo{background:linear-gradient(135deg,#172e62,#8f31ab);color:white;min-height:105px}
.rcard.no-photo>b{padding:25px 18px;color:white!important;display:block}
.ex.no-photo{background:linear-gradient(135deg,#283c78,#b13b87);color:white;min-height:125px}
.ex.no-photo span,.ex.no-photo b,.ex.no-photo small{color:white!important}
.event-brief{padding:20px 12px}

/* V3 restored photo-led sections.  Any unavailable file is labeled as a blocking preview error. */
body:has(#dances) #dances .dcard.has-photo{min-height:295px;background:#0e2145!important;overflow:hidden}
body:has(#dances) #dances .dcard.has-photo .ph{position:relative;display:block;overflow:hidden;width:100%;min-height:190px;height:190px;background:#e6ebf2}
body:has(#dances) #dances .dcard.has-photo .ph img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
body:has(#dances) #dances .dcard.has-photo .body{padding:14px 16px 18px!important;color:white!important;background:#0d1b36!important;min-height:120px}
body:has(#dances) #dances .dcard.has-photo h3,body:has(#dances) #dances .dcard.has-photo p{color:#fff!important}
#heritage .hcard .art{min-height:145px}
#places .place>img{display:block;object-fit:cover;object-position:center;min-height:0}
.bolivia-photo-error{display:flex!important;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;min-height:100px;padding:14px;background:#ffe5e5;color:#8b1717;font-size:13px;text-align:center;font-weight:700;border:2px solid #c63131}
.bolivia-preview-alert{position:fixed;z-index:99999;bottom:16px;left:16px;right:16px;background:#8e1616;color:#fff;padding:12px 20px;border-radius:12px;box-shadow:0 7px 25px #0004;max-width:650px;margin:auto;text-align:center;font:700 15px/1.5 system-ui;}
body:has(#rgrid) .rcard.no-photo{min-height:65px!important;height:auto!important;aspect-ratio:auto!important;background:#102b55!important;display:flex;align-items:center;justify-content:center;border-radius:12px;}
body:has(#rgrid) .rcard.no-photo b{padding:14px!important;position:static!important;display:block;text-align:center;}
@media(min-width:900px){body:has(#dances) #dances.dances{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:680px){body:has(#dances) #dances.dances{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:420px){body:has(#dances) #dances.dances{grid-template-columns:1fr!important}}

/* Bolivia V8: compact all-country dance directory on every dance page. */
.dance-page #related .rgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(185px,1fr));gap:11px;align-items:stretch}
.dance-page #related .bo-mini-link{min-height:80px;display:flex;align-items:center;gap:10px;overflow:hidden;padding:10px 12px;background:#fff;border:1px solid #e3def0;border-radius:15px;text-decoration:none;color:#102143;box-shadow:0 10px 24px -19px #152047;transition:transform .2s,box-shadow .2s}
.dance-page #related .bo-mini-link:hover{transform:translateY(-3px);box-shadow:0 13px 24px -15px #152047}
.dance-page #related .bo-mini-photo{width:90px;min-width:90px;height:65px;overflow:hidden;border-radius:10px;display:block;background:#e5e8ee}
.dance-page #related .bo-mini-photo img{width:100%;height:100%;object-fit:cover;display:block}
.dance-page #related .bo-mini-name{min-width:0;display:block}
.dance-page #related .bo-mini-name b{display:block;color:#102143;font:800 14px/1.3 system-ui,sans-serif;overflow-wrap:anywhere}
.dance-page #related .bo-mini-name small{display:block;font:600 11px/1.4 system-ui,sans-serif;margin-top:5px;color:#6553a2}
.dance-page #related .bo-mini-link:not(.has-mini-photo)::before{content:"";display:block;width:5px;min-width:5px;align-self:stretch;border-radius:10px;background:linear-gradient(#ef4365,#763ff0)}
@media(max-width:600px){.dance-page #related .rgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.dance-page #related .bo-mini-link{min-height:78px;padding:8px}.dance-page #related .bo-mini-photo{width:66px;min-width:66px;height:59px}}
