/* L.1351: actual owner video placement. No source file or audio changes. */
/* Storia Mortari AND Peirano: genuinely central, not right-edge framed. */
body.ama-site .ama-history-balanced .ama-history-video-section{
 padding-block:clamp(16px,2.4vw,32px)!important;
}
body.ama-site .ama-history-balanced .ama-history-video-section .ama-history-video,
body.ama-site .ama-history-balanced .ama-mortari-video-spotlight .ama-history-video{
 display:grid!important;
 grid-template-columns:minmax(0,1fr)!important;
 justify-items:center!important;align-items:start!important;
 width:min(1160px,calc(100% - 34px))!important;max-width:1160px!important;
 min-height:0!important;height:auto!important;
 margin-inline:auto!important;
 padding:clamp(20px,2.8vw,32px)!important;
 gap:clamp(16px,2.2vw,22px)!important;
 box-sizing:border-box!important;
 text-align:center!important;
}
body.ama-site .ama-history-balanced .ama-history-video-section .ama-history-video-copy{
 justify-self:center!important;max-width:720px!important;width:100%!important;
 text-align:center!important;
}
body.ama-site .ama-history-balanced .ama-history-video-section .ama-history-video-copy>*{
 text-align:center!important;margin-inline:auto!important;
}
body.ama-site .ama-history-balanced .ama-history-video-section .ama-history-video-frame{
 width:min(100%,360px)!important;max-width:360px!important;
 justify-self:center!important;align-self:start!important;
 margin:0 auto!important;
}
body.ama-site .ama-history-balanced .ama-history-video-section .ama-history-video-frame video{
 width:100%!important;max-width:none!important;
 height:auto!important;max-height:590px!important;
 aspect-ratio:9 / 16!important;
 object-fit:cover!important;object-position:center!important;
 border-radius:17px!important;
 background-color:#121c17!important;
}
body.ama-site .ama-history-balanced .ama-history-video-section .ama-history-video-frame figcaption{
 width:100%!important;max-width:none!important;
 text-align:center!important;
}
@media(max-width:620px){
 body.ama-site .ama-history-balanced .ama-history-video-section .ama-history-video,
 body.ama-site .ama-history-balanced .ama-mortari-video-spotlight .ama-history-video{
  width:calc(100% - 22px)!important;padding:17px!important;gap:13px!important;
 }
 body.ama-site .ama-history-balanced .ama-history-video-section .ama-history-video-frame{
  width:min(100%,300px)!important;max-width:300px!important;
 }
 body.ama-site .ama-history-balanced .ama-history-video-section .ama-history-video-frame video{
  max-height:510px!important;
 }
}
/* Medicalshop archive: existing film next to the introduction, no separate
   low-down section and no blank space left behind. */
body.ama-site .ama-history .ama-medicalshop-intro{
 width:min(1280px,100%)!important;max-width:1280px!important;
}
body.ama-site .ama-history .ama-medicalshop-intro-grid{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) minmax(245px,320px)!important;
 gap:12px clamp(18px,3vw,40px)!important;
 align-items:start!important;
 margin-top:20px!important;
}
body.ama-site .ama-history .ama-medicalshop-intro-grid>div:not(.ama-history-video){
 min-width:0!important;grid-column:1!important;
}
body.ama-site .ama-history .ama-medicalshop-intro-grid>.ama-history-video-medicalshop{
 grid-column:2!important;grid-row:1 / span 2!important;
 align-self:start!important;justify-self:center!important;
 display:flex!important;flex-direction:column!important;align-items:center!important;
 min-width:0!important;width:100%!important;max-width:320px!important;
 height:auto!important;min-height:0!important;
 margin:0!important;padding:17px!important;gap:11px!important;
 box-sizing:border-box!important;
 background:linear-gradient(145deg,#e9f0eb,#f6f5ef)!important;
 border:1px solid #d6e2d7!important;border-radius:20px!important;
}
body.ama-site .ama-history .ama-medicalshop-intro-grid>.ama-history-video-medicalshop .ama-history-video-copy{
 width:100%!important;max-width:100%!important;
}
body.ama-site .ama-history .ama-medicalshop-intro-grid>.ama-history-video-medicalshop .ama-history-video-copy h2{
 font-size:clamp(1.35rem,2vw,1.65rem)!important;line-height:1.12!important;
}
body.ama-site .ama-history .ama-medicalshop-intro-grid>.ama-history-video-medicalshop .ama-history-video-copy>p{
 font-size:.85rem!important;line-height:1.42!important;
}
body.ama-site .ama-history .ama-medicalshop-intro-grid>.ama-history-video-medicalshop .ama-history-video-frame{
 display:block!important;width:min(100%,260px)!important;max-width:260px!important;
 margin:0 auto!important;
}
body.ama-site .ama-history .ama-medicalshop-intro-grid>.ama-history-video-medicalshop video{
 display:block!important;width:100%!important;height:auto!important;
 max-height:410px!important;
 aspect-ratio:9 / 16!important;object-fit:cover!important;object-position:center!important;
 border-radius:15px!important;
}
body.ama-site .ama-history .ama-medicalshop-status{margin-top:12px!important}
body.ama-site .ama-history .ama-medicalshop-gallery-section{margin-top:22px!important}
@media(max-width:850px){
 body.ama-site .ama-history .ama-medicalshop-intro-grid{
  grid-template-columns:minmax(0,1fr)!important;gap:13px!important;
 }
 body.ama-site .ama-history .ama-medicalshop-intro-grid>div:not(.ama-history-video){
  grid-column:1!important;
 }
 body.ama-site .ama-history .ama-medicalshop-intro-grid>.ama-history-video-medicalshop{
  grid-column:1!important;grid-row:1!important;
  width:min(100%,520px)!important;max-width:520px!important;
 }  body.ama-site .ama-history .ama-medicalshop-intro-grid>.ama-history-video-medicalshop .ama-history-video-frame{
  width:min(100%,275px)!important;max-width:275px!important;
 }
}
/* L1353 visual verification: merge historical paragraphs and status into
   ONE natural-flow left column, never two stretched grid rows. */
@media(min-width:851px){
 body.ama-site .ama-history .ama-medicalshop-intro-grid{
  grid-template-rows:auto!important;align-items:start!important;
  align-content:start!important;
 }
 body.ama-site .ama-history .ama-medicalshop-intro-grid>.ama-history-video-medicalshop{
  grid-column:2!important;grid-row:1!important;
 }
 body.ama-site .ama-history .ama-medicalshop-intro-grid>div:not(.ama-history-video){
  grid-column:1!important;grid-row:1!important;align-self:start!important;
 }
}
@media(max-width:850px){
 body.ama-site .ama-history .ama-medicalshop-intro-grid>div:not(.ama-history-video){
  grid-column:1!important;grid-row:2!important;
 }
}
body.ama-site .ama-history .ama-medicalshop-intro-grid>.ama-history-video-medicalshop .ama-history-video-frame{
 width:min(100%,220px)!important;max-width:220px!important;
}
body.ama-site .ama-history .ama-medicalshop-intro-grid>.ama-history-video-medicalshop video{
 max-height:355px!important;
}
body.ama-site .ama-history .ama-medicalshop-intro-grid .ama-medicalshop-status{
 margin:15px 0 0!important;padding:14px 17px!important;
 border-radius:13px!important;
}
body.ama-site .ama-history .ama-medicalshop-intro-grid .ama-medicalshop-status p{
 font-size:.93rem!important;line-height:1.5!important;
}

/* L1358: remove the white hover stripe on the chapter navigation. */
body.ama-site .ama-history .ama-history-nav--single-row{
 scrollbar-width:none!important;
 overflow-y:clip!important;padding-bottom:0!important;
}
body.ama-site .ama-history .ama-history-nav--single-row::-webkit-scrollbar{
 display:none!important;width:0!important;height:0!important;
}
body.ama-site .ama-history .ama-history-nav a::before,
body.ama-site .ama-history .ama-history-nav a::after{
 content:none!important;display:none!important;
}
body.ama-site .ama-history .ama-history-nav a:hover{
 box-shadow:none!important;text-decoration:none!important;
 border-color:#5d7966!important;background:#e7f0e8!important;color:#263e30!important;
}
body.ama-site .ama-history .ama-history-nav a[aria-current="page"]:hover{
 color:#fff!important;background:#456653!important;border-color:#456653!important;
}
/* L1460: the one-line Story nav uses clipped vertical overflow.
   Its global hover translateY(-1px) shifted the TOP border outside the clip,
   creating the owner's missing upper-outline segment. Do not move these links.
   Preserve hover palette, visible focus and a complete 1px solid border. */
body.ama-site .ama-history .ama-history-nav a:is(:hover,:focus-visible){
 transform:none!important;filter:none!important;
 border-style:solid!important;border-width:1px!important;
 background-clip:padding-box!important;
}
/* General Storia: use the available width and bring the cards closer. */
body.ama-site .ama-history-general>.ama-section>.ama-shell{
 width:min(1510px,calc(100% - 48px))!important;max-width:none!important;
}
body.ama-site .ama-history-general .ama-history-intro{
 display:block!important;width:100%!important;max-width:none!important;
 margin:0 0 clamp(10px,1.5vw,18px)!important;
 padding:0!important;
}
body.ama-site .ama-history-general .ama-history-intro h2,
body.ama-site .ama-history-general .ama-history-intro p{
 max-width:none!important;
}
body.ama-site .ama-history-general .ama-history-intro h2{
 font-size:clamp(2rem,3vw,2.85rem)!important;margin:0 0 12px!important;
}
body.ama-site .ama-history-general .ama-history-intro p:not(.ama-kicker){
 font-size:clamp(1.06rem,1.22vw,1.23rem)!important;
 line-height:1.52!important;margin:0 0 8px!important;
}
body.ama-site .ama-history-general .ama-history-cards{
 gap:clamp(14px,2vw,24px)!important;margin-top:12px!important;
}
body.ama-site .ama-history-general .ama-section{
 padding-block:clamp(16px,2.1vw,28px)!important;
}
body.ama-site .ama-history-general .ama-history-heading{
 padding-block:clamp(18px,2.5vw,32px)!important;
}
body.ama-site .ama-history-general .ama-history-nav{
 margin-top:14px!important;
}
/* Mortari & Peirano: preserve exact centered video, place official transparent
   Amafarmacia logo on RIGHT in its unused lateral space. */
body.ama-site .ama-history-balanced .ama-history-video-section .ama-history-video{
 position:relative!important;
}
body.ama-site .ama-history-balanced .ama-history-video-section .ama-story-video-brand{
 box-sizing:border-box!important;position:absolute!important;
 left:calc(50% + 205px)!important;top:56%!important;
 transform:translateY(-50%)!important;
 width:clamp(142px,18vw,240px)!important;
 margin:0!important;padding:16px 15px!important;
 display:flex!important;justify-content:center!important;align-items:center!important;
 border:1px solid rgba(78,109,83,.25)!important;border-radius:19px!important;
 background:linear-gradient(155deg,#fffefa,#eef4e8)!important;
 box-shadow:0 12px 30px rgba(25,54,36,.13)!important;
 pointer-events:none!important;
}
body.ama-site .ama-history-balanced .ama-history-video-section .ama-story-video-brand img{
 display:block!important;width:100%!important;height:auto!important;max-height:185px!important;
 object-fit:contain!important;
}
@media(max-width:1080px){
 body.ama-site .ama-history-balanced .ama-history-video-section .ama-story-video-brand{
  position:static!important;transform:none!important;
  width:min(240px,80%)!important;max-width:240px!important;
  margin:2px auto 0!important;padding:12px!important;
  justify-self:center!important;
 }
}
@media(max-width:660px){
 body.ama-site .ama-history-general>.ama-section>.ama-shell{
  width:calc(100% - 26px)!important;
 }
 body.ama-site .ama-history-general .ama-history-intro h2{
  font-size:clamp(1.8rem,7vw,2.25rem)!important;
 }
}

/* L1451 owner correction — story videos must balance THREE columns on wide
   screens: original description LEFT, vertical video CENTRE, authentic
   coloured location mark RIGHT. Keep pre-existing mobile stacked layout. */
@media(min-width:981px){
 body.ama-site .ama-history-balanced .ama-history-video-section .ama-history-video,
 body.ama-site .ama-history-balanced .ama-mortari-video-spotlight .ama-history-video{
  display:grid!important;
  grid-template-columns:minmax(0,1.05fr) minmax(268px,.9fr) minmax(0,1.05fr)!important;
  grid-template-rows:auto!important;
  align-items:center!important;justify-items:stretch!important;
  width:min(1820px,calc(100% - 36px))!important;
  max-width:1820px!important;
  min-height:0!important;height:auto!important;
  gap:clamp(14px,2.1vw,34px)!important;
  padding:clamp(20px,2.3vw,34px)!important;
  text-align:left!important;
 }
 body.ama-site .ama-history-balanced .ama-history-video-section .ama-history-video-copy{
  grid-column:1!important;grid-row:1!important;
  align-self:center!important;justify-self:stretch!important;
  width:100%!important;max-width:none!important;
  min-width:0!important;text-align:left!important;
 }
 body.ama-site .ama-history-balanced .ama-history-video-section .ama-history-video-copy>*{
  text-align:left!important;margin-left:0!important;margin-right:0!important;
 }
 body.ama-site .ama-history-balanced .ama-history-video-section .ama-history-video-frame{
  grid-column:2!important;grid-row:1!important;
  align-self:center!important;justify-self:center!important;
  width:min(100%,340px)!important;max-width:340px!important;
  margin-inline:auto!important;
 }
 body.ama-site .ama-history-balanced .ama-mortari-video-spotlight .ama-history-video-frame{
  width:min(100%,340px)!important;max-width:340px!important;
 }
 body.ama-site .ama-history-balanced .ama-history-video-section .ama-story-video-brand{
  grid-column:3!important;grid-row:1!important;
  box-sizing:border-box!important;position:static!important;
  inset:auto!important;top:auto!important;left:auto!important;
  transform:none!important;align-self:center!important;justify-self:stretch!important;
  width:100%!important;max-width:none!important;
  min-width:0!important;min-height:clamp(210px,21vw,335px)!important;height:auto!important;
  margin:0!important;padding:clamp(10px,1.4vw,20px)!important;
  border:1px solid #d6e2d7!important;border-radius:19px!important;
  background:linear-gradient(145deg,#f5f8f3,#e6eee7)!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  box-shadow:0 12px 30px rgba(25,54,36,.12)!important;
 }
 body.ama-site .ama-history-balanced .ama-history-video-section .ama-story-video-brand img{
  display:block!important;width:100%!important;
  height:clamp(205px,22vw,288px)!important;max-height:288px!important;
  object-fit:cover!important;object-position:center!important;
 }
}
/* No override <= 980 px: preserve previously approved stacked mobile style.
   Brand asset itself changed from invisible white-only to authentic
   Mortari/Peirano green-backed WordPress logos; no recolour or redrawing. */



