/* Audio guide page — scoped under .agx / .agx-player to stay clear of Divi. */
:root {
  --agx-yellow: #f3bf1e;
  --agx-yellow-dark: #d9a50b;
  --agx-ink: #31302d;
  --agx-muted: #6b6a66;
  --agx-line: #ebe9e4;
  --agx-soft: #faf8f3;
  --agx-radius: 18px;
  --agx-font: "Montserrat", Helvetica, Arial, sans-serif;
}

.agx, .agx-player { font-family: var(--agx-font); color: var(--agx-ink); -webkit-font-smoothing: antialiased; }
.agx *, .agx-player * { box-sizing: border-box; }
.agx button, .agx-player button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.agx-i { width: 1em; height: 1em; flex: none; }

.agx { max-width: 880px; margin: 0 auto; padding: 8px 16px 56px; }

/* Hero: contained card below the site header */
.agx-hero { position: relative; overflow: hidden; max-width: 848px; min-height: 400px; margin: 112px auto 0; border-radius: var(--agx-radius); display: flex; align-items: flex-end; background: var(--agx-ink); font-family: var(--agx-font); box-shadow: 0 18px 40px -18px rgba(49, 48, 45, .55); }
.agx-hero * { box-sizing: border-box; }
.agx-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.agx-hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 19, 17, 0) 25%, rgba(20, 19, 17, .55) 60%, rgba(20, 19, 17, .88) 100%); }
.agx-hero__body { position: relative; width: 100%; padding: 28px; color: #fff; }
.agx-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--agx-yellow); color: var(--agx-ink); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.agx-eyebrow .agx-i { font-size: 15px; }
.agx-hero .agx-title { color: #fff; font-family: var(--agx-font); font-size: clamp(34px, 7vw, 54px); font-weight: 800; line-height: 1.05; margin: 14px 0 10px; padding: 0; letter-spacing: -.01em; }
.agx-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 22px; padding: 0 !important; font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .9); }
.agx-meta li { display: inline-flex; align-items: center; gap: 6px; padding: 0; }
.agx-meta .agx-i { color: var(--agx-yellow); font-size: 16px; }
.agx-hero .agx-cta { font-family: inherit; cursor: pointer; }
.agx-cta { display: inline-flex; align-items: center; gap: 10px; border: 0; background: var(--agx-yellow); color: var(--agx-ink); font-size: 16px; font-weight: 700; padding: 15px 26px 15px 20px; border-radius: 999px; box-shadow: 0 8px 22px -8px rgba(243, 191, 30, .8); transition: transform .15s ease, background .15s ease; }
.agx-cta:hover { background: #ffcc2e; transform: translateY(-1px); }
.agx-cta:active { transform: scale(.98); }
.agx-cta .agx-i { font-size: 22px; }
.agx-cta.is-playing .agx-ic-play { display: none; }
.agx-cta.is-playing .agx-ic-pause { display: block; }

/* Body */
.agx-body { padding: 28px 0 0; }
.agx-desc { font-size: 16px; line-height: 1.7; color: #4a4945; max-width: 680px; }
.agx-desc p { padding: 0; margin: 0 0 1em; }
.agx-desc strong { color: var(--agx-ink); }
.agx .agx-h2 { font-family: var(--agx-font); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--agx-muted); margin: 26px 0 12px; padding: 0; }

/* Track list */
.agx-tracks { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 10px; }
.agx-tracks li { padding: 0; }
.agx-track { width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; background: #fff; border: 1px solid var(--agx-line); border-radius: 14px; padding: 14px 18px 14px 14px; color: var(--agx-ink); transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.agx-track:hover { border-color: #d8d4ca; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .25); }
.agx-track.is-active { border-color: var(--agx-yellow); background: var(--agx-soft); box-shadow: 0 0 0 1px var(--agx-yellow) inset; }
.agx-track__btn { position: relative; width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--agx-soft); border: 1px solid var(--agx-line); display: grid; place-items: center; font-size: 20px; transition: background .15s ease; }
.agx-track__num { font-weight: 700; font-size: 16px; }
.agx-track__play, .agx-track__pause { display: none; }
.agx-track:hover .agx-track__num, .agx-track.is-active .agx-track__num { display: none; }
.agx-track:hover .agx-track__play, .agx-track.is-active:not(.is-playing) .agx-track__play { display: block; }
.agx-track.is-playing .agx-track__play { display: none; }
.agx-track.is-playing .agx-track__pause { display: block; }
.agx-track.is-active .agx-track__btn, .agx-track:hover .agx-track__btn { background: var(--agx-yellow); border-color: var(--agx-yellow); }
.agx-track__main { flex: 1; min-width: 0; display: grid; gap: 8px; }
.agx-track__name { font-weight: 700; font-size: 16px; }
.agx-track__bar { height: 4px; border-radius: 4px; background: var(--agx-line); overflow: hidden; }
.agx-track__fill { display: block; height: 100%; background: var(--agx-yellow); border-radius: 4px; transition: width .3s linear; }
.agx-track__dur { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--agx-muted); font-variant-numeric: tabular-nums; }
.agx-track__done { display: none; color: #2f9e5b; font-size: 18px; }
.agx-track.is-done .agx-track__done { display: inline-flex; }

/* Tips */
.agx-tips { margin-top: 28px; background: var(--agx-soft); border-radius: 14px; padding: 18px 20px; }
.agx .agx-tips h3 { font-family: var(--agx-font); font-size: 15px; font-weight: 700; margin: 0 0 8px; padding: 0; color: var(--agx-ink); }
.agx-tips ul { list-style: disc; margin: 0; padding: 0 0 0 18px !important; font-size: 14px; line-height: 1.7; color: #4a4945; }
.agx-tips li { padding: 0; }

/* Sticky player */
.agx-player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100000; padding: 0 12px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; animation: agx-up .25s ease-out; }
.agx-player[hidden] { display: none; }
@keyframes agx-up { from { transform: translateY(100%); } to { transform: none; } }
.agx-player__inner { position: relative; pointer-events: auto; max-width: 880px; margin: 0 auto; background: var(--agx-ink); color: #fff; border-radius: 18px; padding: 12px 16px 14px; box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .55); }
.agx-player__seek { display: flex; align-items: center; gap: 10px; }
.agx-time { font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; min-width: 42px; }
.agx-time:last-child { text-align: right; }
.agx-player__seek input[type="range"] { --p: 0%; flex: 1; -webkit-appearance: none; appearance: none; height: 22px; background: transparent; margin: 0; padding: 0; border: 0; }
.agx-player__seek input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--agx-yellow) var(--p), rgba(255, 255, 255, .22) var(--p)); }
.agx-player__seek input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--agx-yellow) var(--p), rgba(255, 255, 255, .22) var(--p)); }
.agx-player__seek input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.agx-player__seek input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 0; }
.agx-player__row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.agx-player__thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.agx-player__text { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.agx-player__text strong { font-size: 15px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agx-player__text span { font-size: 13px; color: rgba(255, 255, 255, .65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agx-player__ctrls { display: flex; align-items: center; gap: 4px; }
.agx-ctl { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: #fff; display: grid; place-items: center; font-size: 24px; padding: 0; transition: background .15s ease; }
.agx-ctl:hover { background: rgba(255, 255, 255, .1); }
.agx-ctl--main { width: 54px; height: 54px; background: var(--agx-yellow); color: var(--agx-ink); font-size: 26px; margin: 0 4px; }
.agx-ctl--main:hover { background: #ffcc2e; }
.agx-ic-pause, .agx-player.is-playing .agx-ic-play { display: none; }
.agx-player.is-playing .agx-ic-pause { display: block; }
.agx-speed { border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: #fff; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 6px 10px; min-width: 52px; margin-left: 4px; }
.agx-speed:hover { border-color: #fff; }
.agx-close { position: absolute; top: -12px; right: -6px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--agx-ink); background: #fff; color: var(--agx-ink); display: grid; place-items: center; font-size: 16px; padding: 0; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.agx-close:hover { background: var(--agx-yellow); }
.agx-hero button:focus-visible, .agx button:focus-visible, .agx-player button:focus-visible, .agx-player input:focus-visible { outline: 3px solid var(--agx-yellow); outline-offset: 2px; }

/* header reduced to logo + flag: keep the flag visible on mobile too */
#top-menu-nav, #top-menu { display: block !important; }
#et_mobile_nav_menu { display: none !important; }
#main-header .logo_container { height: auto !important; position: static !important; }
#main-header { background: #fff !important; box-shadow: 0 1px 0 var(--agx-line) !important; }
#main-header .container { display: flex !important; align-items: center; justify-content: space-between; min-height: 84px; }
#main-header #logo { height: 62px !important; max-height: none !important; width: auto !important; }
#et-top-navigation { padding: 0 !important; float: none !important; flex: none; }
#top-menu .lang-item-it { display: inline-block !important; padding: 0 !important; }
#top-menu .lang-item-it a { padding: 0 !important; display: block; }
#top-menu .lang-item-it img { width: 28px !important; min-width: 28px; height: 28px; display: block; }

body.agx-has-player #main-footer, body.agx-has-player footer.et-l--footer { padding-bottom: 150px; }

@media (max-width: 640px) {
  .agx { padding: 16px 12px 40px; }
  .agx-hero { min-height: 360px; margin: 96px 12px 0; border-radius: 16px; }
  .agx-hero__body { padding: 20px; }
  .agx-hero .agx-cta { font-family: inherit; cursor: pointer; }
.agx-cta { width: 100%; justify-content: center; }
  .agx-track { padding: 12px 14px 12px 12px; gap: 12px; }
  .agx-player { padding: 0 8px calc(8px + env(safe-area-inset-bottom)); }
  .agx-player__inner { padding: 10px 12px 12px; }
  .agx-hide-sm, .agx-player__thumb { display: none; }
  .agx-player__text strong { font-size: 14px; }
  .agx-ctl { width: 40px; height: 40px; }
  .agx-ctl--main { width: 50px; height: 50px; }
  .agx-speed { min-width: 46px; padding: 6px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .agx-player { animation: none; }
  .agx-cta, .agx-track, .agx-track__fill { transition: none; }
}
