:root{
  --exdensur-blue:#292b69;
  --gray:#555;
  --light:#888;
  --link-main:#0c7aa2;   /* link header+footer (più scuro) */
  --link-panel:#17b1dc;  /* link dentro il box blu (più chiaro) */
}

*{
  box-sizing:border-box;
  -webkit-tap-highlight-color:transparent;
}

html,body{
  margin:0;
  height:100%;
  background:#fff;
  font-family:-apple-system,"SF Pro Text",system-ui,sans-serif;
}

.screen{
  position:relative;
  width:100%;
  height:100%;
  max-width:1050px;      /* ottimizzato per iPad/desktop */
  margin:auto;
  overflow:hidden;
  background:#fff;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

/* LINK GLOBALI (header+footer) */
a,
a:visited,
a:active{
  color:var(--link-main);
  text-decoration:underline;
}
a:hover{
  color:var(--link-main);
  text-decoration:underline;
}

/* LOGO GSK */
.gsk{
  position:absolute;
  top:24px;
  right:24px;
  width:64px;
  height:64px;
  opacity:0;
  transform:translateY(4px);
  animation:logoIn .45s ease-out forwards;
  animation-delay:.1s;
  z-index:3;
}
.gsk img{
  width:100%;
  height:100%;
  object-fit:contain;
}
@keyframes logoIn{
  0%{opacity:0; transform:translateY(4px);}
  70%{opacity:1; transform:translateY(-1px);}
  100%{opacity:1; transform:translateY(0);}
}

/* BLOCCO PRINCIPALE */
.title{
  position:absolute;
  top:25%;
  left:20px;
  transform:translateY(-50%);
  text-align:left;
  z-index:2;
}
.t1{
  color:var(--gray);
  font-size:18px;
  opacity:0;
  transform:translateY(6px);
  animation:titleIn .45s ease-out forwards;
  animation-delay:.4s;
}
.product-logo{
  display:block;
  width:340px;
  max-width:90%;
  margin-top:8px;
  opacity:0;
  transform:translateY(6px);
  animation:titleIn .45s ease-out forwards;
  animation-delay:.7s;
}
.prescribing{
  display:inline-block;
  font-size:13px;
  margin-top:8px;
  opacity:0;
  transform:translateY(6px);
  animation:titleIn .45s ease-out forwards;
  animation-delay:1.0s;
}
@keyframes titleIn{
  0%{opacity:0; transform:translateY(6px);}
  80%{opacity:1; transform:translateY(-1px);}
  100%{opacity:1; transform:translateY(0);}
}

/* SEZIONE DEVICE */
.device{
  position:absolute;
  left:20px;
  right:20px;
  top:53%;
  text-align:left;
  z-index:4;
}
.choose{
  color:var(--gray);
  font-size:18px;
  margin-bottom:10px;
  opacity:0;
  transform:translateY(4px);
  animation:labelIn .45s ease-out forwards;
  animation-delay:1.35s;
}
@keyframes labelIn{
  0%{opacity:0; transform:translateY(4px);}
  100%{opacity:1; transform:translateY(0);}
}

/* BOTTONE */
.btn{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  max-width:420px;    /* limitato su iPad/desktop */
  margin:6px 0;
  background:var(--exdensur-blue);
  color:#fff;
  font-size:18px;
  font-weight:600;
  border:none;
  border-radius:6px;
  padding:13px 16px;
  box-shadow:0 8px 20px rgba(0,0,0,.15);
  cursor:pointer;
  opacity:0;
  transform:translateX(-22px);
  animation:btnIn .55s ease-out forwards;
  animation-delay:1.65s;
  overflow:hidden;
}
@keyframes btnIn{
  0%{opacity:0; transform:translateX(-22px);}
  25%{opacity:0.6; transform:translateX(-8px);}
  60%{opacity:1; transform:translateX(2px);}
  100%{opacity:1; transform:translateX(0);}
}
.btn span,
.btn img{
  display:inline-block;
  opacity:1;
  transform:translateX(0);
}
.btn img{
  height:22px;
  width:auto;
  margin-left:10px;
  flex-shrink:0;
}

/* FOOTER */
footer{
  margin-top:auto;
  padding:24px 20px 40px;
  font-size:11px;
  line-height:1.4;
  color:#000;
  text-align:left;
  opacity:0;
  animation:footerFade .7s ease-out forwards;
  animation-delay:2.05s;
  z-index:1;
}
@keyframes footerFade{
  0%{opacity:0;}
  100%{opacity:1;}
}
.wifi-icon{
  height:14px;
  width:auto;
  vertical-align:middle;
  margin-left:4px;
}
footer img.logo{
  width:34px;
  height:auto;
  vertical-align:middle;
}
.footer-logo{
  display:flex;
  align-items:center;
  margin-top:4px;
  gap:10px;
}
.footer-meta{
  font-size:11px;
}

@media (max-height:700px){
  .title{top:27%;}
  .device{top:51%;}
}

/* USCITE */
.logo-out{
  animation:logoOut .45s ease-in forwards;
}
@keyframes logoOut{
  0%{opacity:1; transform:translateY(0);}
  100%{opacity:0; transform:translate(-40px,0);}
}
.title-out{
  animation:titleOut .5s ease-in forwards;
}
@keyframes titleOut{
  0%{opacity:1; transform:translate(0,-50%);}
  100%{opacity:0; transform:translate(-40px,-50%);}
}
.choose-out{
  animation:chooseOut .45s ease-in forwards;
}
@keyframes chooseOut{
  0%{opacity:1; transform:translateX(0);}
  100%{opacity:0; transform:translateX(-40px);}
}
.footer-out{
  animation:footerOut .5s ease-in forwards;
}
@keyframes footerOut{
  0%{opacity:1; transform:translateX(0);}
  100%{opacity:0; transform:translateX(-40px);}
}

/* USCITA TESTO / ICONA DAL BOTTONE */
.btn-text-out{
  animation:btnTextSlide .55s ease-in forwards;
}
.btn-icon-out{
  animation:btnIconSlide .55s ease-in forwards;
}
@keyframes btnTextSlide{
  0%{opacity:1; transform:translateX(0);}
  100%{opacity:0; transform:translateX(-80px);}
}
@keyframes btnIconSlide{
  0%{opacity:1; transform:translateX(0);}
  100%{opacity:0; transform:translateX(80px);}
}
.btn-disabled{
  pointer-events:none;
}

/* PANEL */
.fill-panel{
  position:absolute;
  background:var(--exdensur-blue);
  border-radius:6px;
  z-index:5;
  pointer-events:auto;
  transition:
    left 1.0s cubic-bezier(.25,.9,.35,1.04),
    top  1.0s cubic-bezier(.25,.9,.35,1.04),
    width 1.0s cubic-bezier(.25,.9,.35,1.04),
    height 1.0s cubic-bezier(.25,.9,.35,1.04),
    border-radius 1.0s ease-out;
}
.panel-exit-right{
  animation:panelSlideOutRight .6s ease-in forwards;
}
@keyframes panelSlideOutRight{
  0%{transform:translateX(0);}
  100%{transform:translateX(120%);}
}
.panel-exit-left{
  animation:panelSlideOutLeft .6s ease-in forwards;
}
@keyframes panelSlideOutLeft{
  0%{transform:translateX(0);}
  100%{transform:translateX(-120%);}
}

/* CONTENUTO BOX BLU */
.panel-inner{
  position:relative;
  width:100%;
  height:100%;
  padding:32px 24px 26px;
  color:#fff;
  font-size:16px;
  line-height:1.45;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:0;
}
.panel-inner > div:first-child{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-height:0;
}

.panel-header{
  margin-bottom:18px;
  flex-shrink:0;
}

.panel-title{
  font-size:18px;
  font-weight:700;
  margin:0 0 10px;
  opacity:0;
  transform:translateX(-26px);
  animation:panelContentIn .6s ease-out forwards;
  animation-delay:.65s;
}

.panel-icon-row{
  margin-bottom:10px;
  opacity:0;
  transform:translateX(-26px);
  animation:panelContentIn .6s ease-out forwards;
  animation-delay:.80s;
}

.panel-icon{
  height:60px;
  width:auto;
}

.panel-subtitle{
  font-size:13px;
  font-weight:400;
  opacity:0;
  transform:translateX(-26px);
  animation:panelContentIn .6s ease-out forwards;
  animation-delay:.95s;
}
.panel-subtitle a.panel-link,
.panel-subtitle a.panel-link:visited,
.panel-subtitle a.panel-link:hover,
.panel-subtitle a.panel-link:active{
  font-size:13px;
  color:var(--link-panel);
  text-decoration:underline;
}

.panel-body{
  flex:1 1 auto;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  padding-right:4px;
  padding-bottom:48px;
  min-height:0;
}
.panel-body > *{
  margin:0 0 14px;
  opacity:0;
  transform:translateX(-26px);
  animation:panelContentIn .6s ease-out forwards;
}
.panel-body > :nth-child(1){
  animation-delay:1.10s;
}
.panel-body > :nth-child(2){
  animation-delay:1.30s;
}

.panel-section{
  margin-bottom:12px;
}
.panel-section-title{
  font-weight:700;
  text-transform:uppercase;
  margin-bottom:4px;
}
.panel-section p{
  margin:4px 0;
}
.panel-section ul{
  margin:4px 0 4px 18px;
  padding:0;
}
.panel-section ul li{
  margin-bottom:4px;
}

.panel-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:10px;
  opacity:0;
  transform:translateX(-26px);
  animation:panelContentIn .6s ease-out forwards;
  animation-delay:1.55s;
  flex-shrink:0;
}
.panel-btn{
  background:transparent;
  border:none;
  color:#fff;
  font-size:14px;
  text-transform:uppercase;
  letter-spacing:.08em;
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 0;
  cursor:pointer;
}
.panel-btn:focus{
  outline:none;
}
.panel-arrow{
  font-size:16px;
  line-height:1;
}
.panel-back .panel-arrow,
.panel-continue .panel-arrow{
  transform:translateY(1px);
}

@keyframes panelContentIn{
  0%{opacity:0; transform:translateX(-26px);}
  80%{opacity:1; transform:translateX(2px);}
  100%{opacity:1; transform:translateX(0);}
}

/* HINT SCROLL */
.scroll-hint{
  position:absolute;
  left:50%;
  bottom:70px;
  transform:translateX(-50%) translateY(8px);
  background:#fff;
  padding:6px 12px;
  border-radius:6px;
  font-size:12px;
  display:flex;
  align-items:center;
  gap:6px;
  opacity:1;
  cursor:pointer;
  box-shadow:0 3px 8px rgba(0,0,0,0.18);
  transition:opacity .25s ease-out, transform .25s ease-out;
  z-index:10;
  color:#222;
}
.scroll-hint-hidden{
  opacity:0;
  pointer-events:none;
  transform:translateX(-50%) translateY(12px);
}
.scroll-hint-icon{
  height:16px;
  width:auto;
  animation:bounceY 1.2s infinite;
}
@keyframes bounceY{
  0%,100%{transform:translateY(0);}
  50%{transform:translateY(3px);}
}

/* === LAYOUT PAGINE VIDEO + TESTO === */

.page-content{
  position:absolute;
  left:20px;
  right:20px;
  top:100px;
  bottom:72px; /* spazio per barra in basso */
  display:flex;
  flex-direction:column;
  gap:14px;
  background:#fff;
  padding-bottom:24px; /* spazio extra sopra il footer blu */
  overflow:hidden;
}

/* blocchi che entrano da destra → sinistra */
.page-block{
  background:#fff;
  border-radius:8px;
  padding:0;                 /* 👈 niente padding: bordi allineati a index */
  opacity:0;
  transform:translateX(24px);
  animation:pageInRight .55s ease-out forwards;
}

.page-block.delay-1{animation-delay:.35s;}
.page-block.delay-2{animation-delay:.55s;}
.page-block.delay-3{animation-delay:.75s;}

@keyframes pageInRight{
  0%{opacity:0; transform:translateX(24px);}
  60%{opacity:1; transform:translateX(-2px);}
  100%{opacity:1; transform:translateX(0);}
}

/* VIDEO */

.video-shell{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.video-frame{
  position:relative;
  width:100%;
  padding-top:100%; /* modulo QUADRATO */
  overflow:hidden;
  border-radius:8px;
  background:#000;
  box-shadow:0 4px 16px rgba(0,0,0,.06); /* meno marcata e più diffusa */
}

.video-frame video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}

/* timeline SEMPRE visibile */

.video-timeline{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:6px;
  font-size:11px;
  color:var(--gray);
}

.video-timeline input[type="range"]{
  flex:1;
}

/* TESTO */

.content-box-title{
  font-size:18px;          /* ↑ come i bottoni */
  font-weight:600;
  color:var(--gray);
  margin:8px 0 6px;
}
.content-box-text{
  font-size:14px;
  color:var(--gray);
  line-height:1.45;
  overflow:hidden;
  text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-line-clamp:6; /* limita le righe per non toccare il footer */
  -webkit-box-orient:vertical;
}
.content-box-text p{
  margin:4px 0;
}

/* BARRA IN BASSO (step) */

.step-bar{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:56px;
  background:var(--exdensur-blue); /* BLU come i bottoni principali */
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 20px;
  font-size:15px;
  opacity:0;
  transform:translateX(24px);
  animation:pageInRight .55s ease-out forwards;
  animation-delay:.75s;
}

.step-bar-title{
  font-weight:600;
}

/* hamburger più visibile */

.step-bar-menu{
  width:48px;              /* un po’ più largo, ma vedi tu */
  height:100%;             /* 👈 ora occupa tutta l’altezza della barra blu */
  border-radius:0;         /* bordi allineati con la step-bar */
  border:none;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.25);
  cursor:pointer;
  padding:0;
}


.step-bar-menu span{
  display:block;
  width:16px;
  height:12px;
  position:relative;
}
.step-bar-menu span::before,
.step-bar-menu span::after,
.step-bar-menu span i{
  content:'';
  position:absolute;
  left:0; right:0;
  height:2px;
  background:#fff;
  border-radius:999px;
}
.step-bar-menu span::before{top:0;}
.step-bar-menu span::after{bottom:0;}
.step-bar-menu span i{top:5px;}

/* USCITA PAGINE VIDEO / STEP BAR VERSO DESTRA */
.page-leave-right{
  animation:pageLeaveRight .55s ease-in forwards;
}

@keyframes pageLeaveRight{
  0%{
    opacity:1;
    transform:translateX(0);
  }
  100%{
    opacity:0;
    transform:translateX(120%);
  }
}

