/* DANZO San Marino — reference-locked geometry (Scotland country.css + Scotland presentation).
   Only San Marino-specific exceptions. Hero, cards and spacing never exceed reference sizes.
   All other layout measurements come from the unchanged shared template. */
body:has(#country-data) .hero {
  height:clamp(240px,24vw,380px);
  min-height:0;
  background:#173c43;
}
body:has(#country-data) .hero>img{
  width:100%;height:100%;object-fit:cover;object-position:center center;
  filter:none;opacity:1;
}
body:has(#country-data) .hero-glow,
html[dir="rtl"] body:has(#country-data) .hero-glow{
  display:grid;place-items:center;padding:20px;text-align:center;
  background:linear-gradient(90deg,rgba(3,19,31,.28),rgba(3,19,31,.12),rgba(3,19,31,.28));
}
body:has(#country-data) .hero-text,
html[dir="rtl"] body:has(#country-data) .hero-text{
  margin:0 auto;padding:0;max-width:440px;background:transparent;border:0;
  box-shadow:none;text-align:center;
}
body:has(#country-data) .hero h1{font-size:clamp(34px,4.6vw,62px);color:#fff;line-height:1.1;text-shadow:0 3px 14px rgba(0,0,0,.75)}
body:has(#country-data) .hero p{font-size:clamp(14px,1.45vw,19px);color:#fff;text-shadow:0 2px 9px rgba(0,0,0,.75)}
body:has(#country-data) .hero .flag{width:86px;height:54px;margin-bottom:10px}
body:has(#country-data) #dances.dances{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
body:has(#country-data) #dances .dcard{flex-direction:column;min-height:0}
body:has(#country-data) #dances .dcard .ph{width:100%;flex:none;aspect-ratio:200/130}
body:has(#country-data) #dances .dcard .body{display:block;padding:10px 12px 14px}
.san-marino-all-dances-link{text-align:center;margin:20px auto 0}
/* Reference Scotland provides 4 heritage columns, 145px photo heights and 365px cards;
   five 195px place tiles. Do not override those measurements. */
@media(max-width:1100px){body:has(#country-data) #dances.dances{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){body:has(#country-data) #dances.dances{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:390px){body:has(#country-data) #dances.dances{grid-template-columns:1fr}}
/* Keep icon sizing controlled and prevent the oversized social buttons seen in earlier builds. */
.dz-social svg{width:20px;height:20px;max-width:20px;max-height:20px}
