/* Keep the map clear of entry cards when the desktop side rails no longer fit. */
@media(max-width:1249px){
  .md-page .md-canvas{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important}
  .md-page .md-map-surface{position:relative!important;inset:auto!important;height:clamp(520px,72svh,700px)!important;min-height:520px!important;margin:0!important;overflow:hidden}
  .md-page .md-map-stage{left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;width:min(92vw,680px)!important;height:92%!important;transform:translate(-50%,-50%)!important}
  .md-page .md-map-stage .iranmap{width:auto!important;height:90%!important;max-width:92vw!important;max-height:calc(100svh - 220px)!important}
  .md-page .md-control-rail{display:flex!important;position:relative!important;inset:auto!important;width:min(calc(100% - 32px),640px)!important;max-height:none!important;margin:16px auto 82px!important;transform:none!important}
  .md-page .md-entry-tiles{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .md-page .md-perimeter-tile,.md-page .md-news-tile{position:relative!important;inset:auto!important;width:100%!important;min-height:72px!important;height:auto!important;margin:0!important;transform:none!important}
  .md-page .md-perimeter-tile:hover,.md-page .md-perimeter-tile:focus-visible{transform:translateY(-3px)!important}
  .md-page .md-map-prompt{top:clamp(260px,35svh,360px)!important}
  .md-page .md-map-scroll-cue{left:10px!important;top:clamp(260px,38svh,360px)!important;width:58px!important;height:58px!important;transform:translateY(-50%)!important;font-size:32px!important}
  .md-page .md-map-scroll-cue-icon{width:44px!important;height:44px!important;border-radius:13px!important;font-size:42px!important}
  .md-page .md-map-scroll-cue>span:last-child{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
  .md-page .md-map-scroll-cue:hover{transform:translateY(calc(-50% - 4px))!important}
}

@media(max-width:700px){
  .md-standalone-page .md-landing.md-page{--md-nav-height:84px;--md-hero-height:clamp(152px,34vw,190px)}
  .md-page .md-site-nav{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:38px 28px;height:var(--md-nav-height)!important;min-height:var(--md-nav-height)!important;align-content:center;gap:3px 4px;padding:5px 10px!important}
  .md-page .md-site-brand-tools{grid-column:1/3;grid-row:1;width:auto!important;min-width:0;justify-content:center}
  .md-page .md-standalone-brand,.md-page .md-standalone-brand img{width:min(110px,100%)!important;height:36px!important}
  .md-page .md-site-nav-links{display:contents!important}
  .md-page .md-header-region-form{grid-column:3/7;grid-row:1;width:100%;min-width:0}
  .md-page .md-header-region-form select{width:100%!important;min-width:0;min-height:32px!important;padding:4px 7px!important;font-size:10px!important}
  .md-page .md-site-nav-links a{grid-row:2;display:flex;align-items:center;justify-content:center;min-width:0;padding:3px!important;font-size:9px!important;line-height:1.25;white-space:normal;text-align:center}
  .md-page .md-site-nav-links a:nth-of-type(1){grid-column:1/3}
  .md-page .md-site-nav-links a:nth-of-type(2){grid-column:3/5}
  .md-page .md-site-nav-links a:nth-of-type(3){grid-column:5/7}
  .md-page .md-site-nav-links a:last-child{height:auto!important;border:0!important}
  .md-page .md-site-nav-links a:last-child:after{display:none}
  .md-page .md-hero-copy{width:calc(100% - 32px)!important;min-width:0!important;max-width:100%!important;margin:var(--md-nav-height) 16px 0 auto!important}
  .md-page .md-hero-copy h1,.md-page .md-hero-copy h1 span,.md-page .md-hero-copy h1 strong{max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere;word-break:normal}
  .md-page .md-hero-copy h1{font-size:clamp(20px,5.8vw,27px)!important}
  .md-page .md-hero-copy p{max-width:100%;font-size:10px!important;line-height:1.8}
  .md-page .md-map-surface{height:clamp(500px,68svh,650px)!important;min-height:500px!important}
  .md-page .md-map-stage{width:min(96vw,520px)!important;height:86%!important}
  .md-page .md-map-stage .iranmap{width:min(86vw,360px)!important;height:auto!important;max-width:86vw!important;max-height:calc(100svh - 245px)!important;aspect-ratio:280/310!important}
  .md-page .md-control-rail{width:calc(100% - 24px)!important;margin:12px auto 76px!important}
  .md-page .md-perimeter-tile,.md-page .md-news-tile{min-height:68px!important;padding:10px 12px!important}
  .md-page .md-map-prompt{top:clamp(250px,34svh,330px)!important;width:calc(100% - 84px)!important;font-size:10px!important}
  .md-page .md-map-scroll-cue{left:8px!important;top:clamp(250px,37svh,330px)!important;width:48px!important;height:48px!important;font-size:27px!important}
  .md-page .md-map-scroll-cue-icon{width:36px!important;height:36px!important;border-radius:11px!important;font-size:34px!important}
}

/* Suppress SVG focus outlines for every province at every viewport size. */
.md-page .iranmap .province:focus,
.md-page .iranmap .province:focus-visible{outline:0!important;outline-color:transparent!important;outline-offset:0!important;box-shadow:none!important;stroke:transparent!important;stroke-width:.9!important}

/* Touch browsers may paint a native blue tap highlight over SVG provinces. */
@media(max-width:700px), (pointer:coarse){
  .md-page .iranmap,.md-page .iranmap .province{-webkit-tap-highlight-color:transparent}
}

@media(prefers-reduced-motion:reduce){.md-page .md-map-scroll-cue{animation:none!important}}

/* Center the actual province silhouette while preserving its SVG dimensions. */
@media(min-width:701px) and (max-width:1249px){.md-page .md-map-stage{left:calc(50% + clamp(18px,2.8vw,34px))!important}}
@media(max-width:700px){.md-page .md-map-stage{left:calc(50% + clamp(8px,3.5vw,16px))!important}}

/* Province names remain one line with identical, plain styling at every viewport. */
#md-iran-map text.md-persistent-map-label{
  text-anchor:middle!important;dominant-baseline:central!important;
  font-size:5.5px!important;font-weight:600!important;fill:#000000!important;text-rendering:geometricPrecision!important;
  stroke:none!important;stroke-width:0!important;paint-order:normal!important;
  filter:none!important;text-shadow:none!important;pointer-events:none!important;
  white-space:pre!important;text-wrap:nowrap!important;overflow:visible!important
}

/* The store tile title is sufficient; omit the extra eyebrow on desktop and mobile. */
.md-page .md-store-tile>span:nth-child(2)>small{display:none!important}

/* Compact, separated image tiles keep all four entries within the lower-banner footprint. */
@media(max-width:700px){
  .md-page .md-entry-tiles{grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:10px!important;row-gap:20px!important;align-items:stretch!important}
  .md-page .md-entry-tiles>.md-perimeter-tile{
    position:relative!important;inset:auto!important;width:100%!important;
    height:min(27vw,105px)!important;min-height:0!important;max-height:105px!important;
    margin:0!important;padding:0!important;overflow:hidden!important;
    grid-template-columns:minmax(0,1fr)!important;grid-template-rows:32px minmax(0,1fr)!important;
    transform:none!important
  }
  .md-page .md-entry-tiles>.md-perimeter-tile:before{grid-row:1!important;grid-column:1!important;width:100%!important;height:32px!important;min-height:0!important;aspect-ratio:auto!important}
  .md-page .md-entry-tiles>.md-perimeter-tile>span:nth-child(2){
    position:relative!important;grid-row:2!important;grid-column:1!important;
    display:flex!important;flex-direction:column!important;justify-content:center!important;
    gap:1px!important;width:100%!important;height:100%!important;min-height:0!important;
    padding:4px 8px!important;overflow:hidden!important;text-align:right!important
  }
  .md-page .md-store-tile>span:nth-child(2)>small{position:static!important;inset:auto!important;width:auto!important;max-width:100%!important;padding:0!important;border:0!important;background:transparent!important;white-space:nowrap!important}
  .md-page .md-entry-tiles>.md-perimeter-tile strong{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.6em;overflow:hidden;text-overflow:ellipsis;white-space:normal!important;line-height:1.3!important}
  .md-page .md-entry-tiles>.md-perimeter-tile em{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.6em;overflow:hidden;text-overflow:ellipsis;white-space:normal!important;line-height:1.3!important}
  .md-page .md-entry-tiles>.md-perimeter-tile .md-vip-action{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25!important}
  .md-page .md-entry-tiles>.md-perimeter-tile:hover,.md-page .md-entry-tiles>.md-perimeter-tile:focus-visible{z-index:3;transform:translateY(-2px)!important}
  .md-page .md-map-scroll-cue{width:clamp(40px,12vw,48px)!important;height:clamp(46px,13vw,54px)!important;border:1px solid #b9a273!important;border-radius:13px!important;background:linear-gradient(145deg,#f4f1e8,#d8dfd4)!important;box-shadow:0 2px 0 #839283,0 5px 12px #17271f28,inset 0 1px 0 #fff!important;color:#244536!important}
  .md-page .md-map-scroll-cue-icon{width:clamp(30px,8.5vw,36px)!important;height:clamp(30px,8.5vw,36px)!important;display:grid!important;place-items:center!important;border-radius:10px!important;background:linear-gradient(145deg,#416c55,#183b2e)!important;box-shadow:inset 0 1px 0 #ffffff44,0 3px 8px #10201955!important;color:#f6eed8!important;font-size:clamp(24px,7.5vw,30px)!important;line-height:.8!important;text-shadow:none!important}
  .md-page .md-map-prompt{display:none!important}
}

/* Responsive entry-card mockup approved for the next release: match the lower
   banner footprint on phones, use a two-column rail on tablets, and keep the
   photo beside the copy at both sizes. */
@media(min-width:701px) and (max-width:1249px){
  .md-page .md-entry-tiles{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;align-items:stretch!important}
  .md-page .md-entry-tiles>.md-perimeter-tile{
    position:relative!important;inset:auto!important;width:100%!important;height:180px!important;min-height:180px!important;max-height:180px!important;
    margin:0!important;padding:0!important;overflow:hidden!important;display:grid!important;
    grid-template-columns:38% minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;direction:ltr!important;transform:none!important
  }
  .md-page .md-entry-tiles>.md-perimeter-tile:before{grid-area:1/1!important;width:100%!important;height:100%!important;min-height:0!important;aspect-ratio:auto!important;background-size:cover!important;background-position:center!important}
  .md-page .md-entry-tiles>.md-perimeter-tile>span:nth-child(2){
    position:relative!important;grid-area:1/2!important;direction:rtl!important;display:flex!important;flex-direction:column!important;justify-content:center!important;
    gap:5px!important;width:100%!important;height:100%!important;min-height:0!important;padding:12px 16px!important;overflow:hidden!important;text-align:right!important
  }
  .md-page .md-entry-tiles>.md-perimeter-tile strong{font-size:clamp(14px,1.8vw,18px)!important;line-height:1.4!important;white-space:normal!important}
  .md-page .md-entry-tiles>.md-perimeter-tile em{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;max-height:2.9em!important;overflow:hidden!important;font-size:clamp(11px,1.35vw,14px)!important;line-height:1.45!important;white-space:normal!important}
  .md-page .md-entry-tiles>.md-perimeter-tile .md-vip-action{display:inline-flex!important;align-self:flex-start!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
}

/* Use the same compact green scroll cue on phone and tablet; remove the old
   yellow ring that made the tablet version look like a separate control. */
@media(max-width:1249px){
  .md-page .md-map-scroll-cue{
    width:42px!important;height:46px!important;min-width:42px!important;min-height:46px!important;padding:0!important;display:grid!important;place-items:center!important;
    border:1px solid #52755e!important;border-radius:14px!important;background:linear-gradient(145deg,#eff4eb,#c6d7c7)!important;
    box-shadow:0 3px 8px rgba(23,39,31,.18)!important;color:#244b37!important
  }
  .md-page .md-map-scroll-cue-icon{
    width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;margin:0!important;padding:0!important;display:grid!important;place-items:center!important;
    border:0!important;border-radius:10px!important;background:linear-gradient(145deg,#416c55,#183b2e)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 2px 5px rgba(16,32,25,.22)!important;color:#f6eed8!important;font-size:30px!important;line-height:.8!important;text-shadow:none!important
  }
  .md-page .md-map-scroll-cue:hover{transform:translateY(calc(-50% - 2px))!important}
  .md-page .md-map-scroll-cue:focus-visible{outline:2px solid #52755e!important;outline-offset:2px!important}
}

/* Phone cards follow the lower-banner width and height, with image and copy
   side by side instead of the cramped two-column mini-card treatment. */
@media(max-width:700px){
  .md-page .md-control-rail{width:calc(100% - 20px)!important;margin:12px auto 76px!important}
  .md-page .md-entry-tiles{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;width:100%!important;align-items:stretch!important}
  .md-page .md-entry-tiles>.md-perimeter-tile{
    position:relative!important;inset:auto!important;width:100%!important;height:135px!important;min-height:135px!important;max-height:135px!important;
    margin:0!important;padding:0!important;overflow:hidden!important;display:grid!important;grid-template-columns:36% minmax(0,1fr)!important;
    grid-template-rows:minmax(0,1fr)!important;direction:ltr!important;transform:none!important;border-radius:5px 18px!important
  }
  .md-page .md-entry-tiles>.md-perimeter-tile:before{grid-area:1/1!important;width:100%!important;height:100%!important;min-height:0!important;aspect-ratio:auto!important;background-size:cover!important;background-position:center!important}
  .md-page .md-entry-tiles>.md-perimeter-tile>span:nth-child(2){
    position:relative!important;grid-area:1/2!important;direction:rtl!important;display:flex!important;flex-direction:column!important;justify-content:center!important;
    gap:3px!important;width:100%!important;height:100%!important;min-height:0!important;padding:10px 13px!important;overflow:hidden!important;text-align:right!important
  }
  .md-page .md-entry-tiles>.md-perimeter-tile>span:nth-child(2)>small{display:none!important}
  .md-page .md-entry-tiles>.md-perimeter-tile strong{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;max-height:2.8em!important;overflow:hidden!important;font-size:clamp(13px,3.8vw,16px)!important;line-height:1.4!important;white-space:normal!important}
  .md-page .md-entry-tiles>.md-perimeter-tile em{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;max-height:2.8em!important;overflow:hidden!important;font-size:clamp(10px,2.9vw,12px)!important;line-height:1.45!important;white-space:normal!important}
  .md-page .md-entry-tiles>.md-perimeter-tile .md-vip-action{display:inline-flex!important;align-self:flex-start!important;max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:11px!important;line-height:1.4!important;margin-top:2px!important}
  .md-page .md-entry-tiles>.md-perimeter-tile:hover,.md-page .md-entry-tiles>.md-perimeter-tile:focus-visible{z-index:3;transform:translateY(-2px)!important}
}
