/* =========================================================================
 * Scheda modella — layout TAB SWITCHER + restyling completo.
 * Namespace: .mp (mondo5-profile)
 *
 * Contiene:
 *  - base .mp, variabili brand + tokens layout
 *  - header sticky .mp-top (info row + tab nav)
 *  - .mp-panel: un solo panel visibile alla volta (su desktop)
 *  - profile hero (foto + contatti + social)
 *  - details card (foto + info card tabellare)
 *  - contatti/social card XL (verticale, stretched link, glow brand hover)
 *  - sub-tab Foto/Video free vs paid
 *  - listino prezzi, payment info, bonus banner
 *  - foto grid, video grid (gratis), video offers, video paid
 *  - pagination, description, wishlist, prefooter, back-to-top
 *  - responsive: tablet <=900, portrait <=820, mobile <=640, landscape
 * ========================================================================= */

/* Evita che body con `overflow-x: hidden` (→ overflow-y:auto implicito)
   diventi scroll container: sticky di .mp-top non si aggancerebbe. Usa `clip`. */
body.mondo5-page:has(.mp) {
  overflow-x: clip !important;
  overflow-y: visible !important;
}

/* =================================================================
 * BASE — variabili + root container
 * ================================================================= */
.mp {
  --mp-primary: #e6007e;
  --mp-primary-dark: #b4005e;
  --mp-bg: #fafafc;
  --mp-surface: #fff;
  --mp-border: #eaeaf0;
  --mp-text: #1a1a1a;
  --mp-muted: #6b6b76;
  --mp-warn-bg: #fff3cd;
  --mp-warn-border: #f0d38a;
  --mp-warn-text: #5a4400;
  --mp-radius: 14px;
  --mp-shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --mp-shadow-md: 0 8px 28px rgba(0,0,0,.10);

  /* Brand colors dei provider contatti/social */
  --brand-telegram:  #229ED9;
  --brand-whatsapp:  #25D366;
  --brand-discord:   #5865F2;
  --brand-google:    #4285F4;
  --brand-teams:     #5059C9;
  --brand-signal:    #3A76F0;
  --brand-email:     #EA4335;
  --brand-twitter:   #111111;
  --brand-instagram: #E4405F;
  --brand-facebook:  #1877F2;
  --brand-web:       #e6007e;
  --brand-sms:       #27AE60;

  display: block;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 14px 48px;
  color: var(--mp-text);
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* =================================================================
 * TAB PANELS (desktop: un solo panel visibile)
 * ================================================================= */
.mp-panel            { display: none; }
.mp-panel.is-active  { display: block; }

/* .mp-profile-hero è un panel speciale: quando attivo resta in grid */
.mp-profile-hero.mp-panel                         { display: none; }
.mp-profile-hero.mp-panel.is-active               { display: grid; }
.mp-profile-hero--no-photo.mp-panel.is-active     { grid-template-columns: 1fr; }

/* Section.mp-details senza <summary>: compensa il padding-top che il summary dava */
.mp-details.mp-panel { padding-top: 22px; }

/* Panel Dettagli è grid-container: il titolo .mp-profile-block__title deve
   spannare entrambe le colonne (foto + info). */
#mp-dettagli.mp-profile-hero > .mp-profile-block__title {
  grid-column: 1 / -1;
  margin: 0 0 4px;
}

/* Scroll-margin non serve (no scroll tra tab) */
.mp-profile-hero.mp-panel { scroll-margin-top: 0; }

/* =================================================================
 * HEADER UNICO (sticky) — riga info + riga nav pills/tab
 * ================================================================= */
.mp-top {
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius);
  box-shadow: var(--mp-shadow-sm);
  margin: 0 0 18px;
  overflow: hidden;

  position: sticky;
  /* Il navbar legacy è position:fixed top:0 ma l'altezza varia per breakpoint
     (desktop ~121px, mobile ~57px). Il JS syncPad in mondo5-infinite.php misura
     l'altezza effettiva e la pubblica come --mp-topbar-h. Fallback: 122px. */
  top: var(--mp-topbar-h, 122px);
  z-index: 40;
}

/* Riga 1: avatar + nome/pills + cta preferite */
.mp-top__info {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
}
.mp-top__avatar {
  position: relative;
  display: block;
  width: 58px; height: 58px;
  border-radius: 50%;
  overflow: hidden;
  background: #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  flex-shrink: 0;
}
.mp-top__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mp-top__avatar--placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #e6007e 0%, #7a003f 100%);
  color: #fff; font-size: 1.7rem; font-weight: 800;
}
.mp-top__dot {
  position: absolute; bottom: 2px; right: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #25d366; border: 2px solid #fff;
}
.mp-top__main {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 6px 14px;
  min-width: 0;
}
.mp-top__name {
  margin: 0;
  font-size: 3rem;
  font-weight: 800;
  color: var(--mp-primary);
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}
.mp-top__facts {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.mp-top__facts li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: #fafafc;
  border: 1px solid var(--mp-border);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--mp-text);
}
.mp-top__facts strong {
  color: var(--mp-primary);
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.mp-top__fav {
  flex-shrink: 0;
  white-space: nowrap;
  align-self: start;
  margin-top: 4px;
}

/* Separatore tra riga 1 e riga 2 */
.mp-top__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 10px;
  background: #fafafc;
  border-top: 1px solid var(--mp-border);
}
.mp-top__nav a {
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}
.mp-top__nav a:hover { background: #fff0f7; color: var(--mp-primary); }

/* Tab bar: stato attivo */
.mp-top__nav--tabs .mp-tab { cursor: pointer; }
.mp-top__nav--tabs .mp-tab.is-active,
.mp-top__nav--tabs .mp-tab.is-active:hover {
  background: var(--mp-primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

/* =================================================================
 * PROFILE HERO (foto + contatti + social)
 * ================================================================= */
.mp-profile-hero {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: 20px;
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius);
  padding: 20px;
  box-shadow: var(--mp-shadow-sm);
  margin: 0 0 16px;
  scroll-margin-top: 170px;
}
.mp-profile-hero--no-photo { grid-template-columns: 1fr; }
.mp-profile-hero__photo {
  border-radius: 12px;
  overflow: hidden;
  background: #eee;
  aspect-ratio: 4 / 5;
  max-height: 620px;
  align-self: start;
}
.mp-profile-hero__photo a { display: block; width: 100%; height: 100%; }
.mp-profile-hero__photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease;
}
.mp-profile-hero__photo:hover img { transform: scale(1.03); }
.mp-profile-hero__info {
  display: flex; flex-direction: column; gap: 16px;
  min-width: 0;
}

.mp-profile-block {
  background: #fafafc;
  border: 1px solid var(--mp-border);
  border-radius: 12px;
  padding: 16px 18px;
}
.mp-profile-block__title {
  margin: 0 0 14px;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--mp-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-left: 12px;
  position: relative;
}
.mp-profile-block__title::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px; border-radius: 2px;
  background: var(--mp-primary);
}

.mp-contacts--hero,
.mp-social-list--hero {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* =================================================================
 * PANEL DETTAGLI — foto grande a sinistra + info card a destra.
 * Layout esteso (foto 640px max), per dare prominenza al profilo.
 * ================================================================= */
#mp-dettagli.mp-profile-hero {
  grid-template-columns: minmax(290px, 408px) 1fr;
  gap: 28px;
  padding: 24px;
}
#mp-dettagli .mp-profile-hero__photo {
  max-height: 544px;
  aspect-ratio: 4 / 5;
}

.mp-detail-card {
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: 14px;
  padding: 24px 24px 20px;
  box-shadow: var(--mp-shadow-sm);
}

.mp-detail-name {
  margin: 0 0 18px;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--mp-text);
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.mp-detail-online {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 0 3px rgba(37,211,102,.25);
}

.mp-detail-facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.mp-detail-facts li {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px dashed var(--mp-border);
  font-size: 1.35rem;
}
.mp-detail-facts li:last-child { border-bottom: none; }
.mp-detail-facts li strong {
  min-width: 180px;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--mp-primary);
}
.mp-detail-facts li span {
  color: var(--mp-text);
  font-weight: 500;
}

/* =================================================================
 * ACTIONS BAR (3 bottoni sotto hero)
 * ================================================================= */
.mp-actions-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.mp-actions-bar .mp-btn {
  flex: 1;
  min-width: 200px;
  justify-content: center;
}
.mp-actions-bar--inline {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--mp-border);
}

/* =================================================================
 * BOTTONI
 * ================================================================= */
.mp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 1.15rem; font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .1s ease, background .15s ease, border-color .15s ease;
  cursor: pointer;
  line-height: 1.2;
}
.mp-btn:hover { transform: translateY(-1px); }
.mp-btn--primary {
  background: var(--mp-primary); color: #fff; border-color: var(--mp-primary);
}
.mp-btn--primary:hover { background: var(--mp-primary-dark); border-color: var(--mp-primary-dark); color: #fff; }
.mp-btn--ghost {
  background: #fff; color: #333; border-color: var(--mp-border);
}
.mp-btn--ghost:hover { background: #fff0f7; border-color: var(--mp-primary); color: var(--mp-primary); }
.mp-btn--ghost i { color: var(--mp-primary); }
.mp-btn--block { width: 100%; }

/* =================================================================
 * BADGE
 * ================================================================= */
.mp-badge {
  display: inline-block; padding: 10px 16px; border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 500; margin: 0;
}
.mp-badge--warn {
  background: var(--mp-warn-bg); color: var(--mp-warn-text); border: 1px solid var(--mp-warn-border);
}

/* =================================================================
 * SEZIONI generiche
 * ================================================================= */
.mp-section {
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius);
  padding: 22px;
  margin: 0 0 16px;
  box-shadow: var(--mp-shadow-sm);
  scroll-margin-top: 170px;
}
.mp-section__title {
  margin: 0 0 18px;
  font-size: 1.45rem; font-weight: 700;
  color: var(--mp-text);
  display: flex; align-items: center; gap: 10px;
}
.mp-section__title::before {
  content: ''; display: inline-block;
  width: 4px; height: 22px; border-radius: 2px;
  background: var(--mp-primary);
}

/* =================================================================
 * BONUS BANNER
 * ================================================================= */
.mp-bonus-banner {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #fff0f7 0%, #ffe2ee 100%);
  border: 1px solid #ffd0e3;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.mp-bonus-banner i { color: var(--mp-primary); font-size: 1.5rem; }
.mp-bonus-banner a { color: var(--mp-primary); font-weight: 700; text-decoration: none; }
.mp-bonus-banner a:hover { text-decoration: underline; }

/* =================================================================
 * LISTINO PREZZI
 * ================================================================= */
.mp-prices {
  display: flex; flex-direction: column;
  gap: 10px;
}
.mp-price {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.mp-price:hover {
  border-color: var(--mp-primary);
  box-shadow: var(--mp-shadow-md);
}
.mp-price__amount {
  font-size: 1.95rem; font-weight: 800; color: var(--mp-primary);
  line-height: 1;
  display: flex; align-items: baseline; gap: 6px;
  justify-content: flex-start;
}
.mp-price__amount span { font-size: 1.5rem; font-weight: 700; }
.mp-price__amount input {
  width: 78px;
  font-size: 1.6rem; font-weight: 800; color: var(--mp-primary);
  border: 2px solid var(--mp-border); border-radius: 8px;
  padding: 4px 8px;
  background: #fff;
}
.mp-price__amount input:focus { outline: none; border-color: var(--mp-primary); }
.mp-price__desc {
  font-size: 1.18rem; color: var(--mp-text);
  line-height: 1.5;
  word-break: break-word;
  min-width: 0;
}
.mp-price__desc img { max-width: 100%; height: auto; border-radius: 6px; }
.mp-price .mp-btn--block { width: auto; min-width: 140px; }

.mp-price--custom { background: #fafafc; border-style: dashed; }
.mp-price--wish {
  background: linear-gradient(90deg, #fff7fb 0%, #fff0f7 100%);
  border-color: #ffd0e3;
}
.mp-price__icon {
  display: flex; align-items: center; justify-content: flex-start;
}
.mp-price__icon i {
  font-size: 2rem; color: var(--mp-primary);
}

/* =================================================================
 * PAYMENT INFO
 * ================================================================= */
.mp-payment-info {
  margin-top: 18px;
  padding: 16px;
  background: #fafafc;
  border: 1px solid var(--mp-border);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--mp-muted);
}
.mp-payment-info ul { margin: 0 0 12px; padding-left: 20px; }
.mp-payment-methods {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 12px;
}
.mp-payment-methods img { height: 26px; width: auto; }
.mp-payment-info p { margin: 4px 0; }

/* =================================================================
 * DETAILS / ACCORDION (residuo legacy — summary collassabile)
 * ================================================================= */
.mp-details {
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius);
  margin: 0 0 16px;
  box-shadow: var(--mp-shadow-sm);
  overflow: hidden;
  scroll-margin-top: 170px;
}
.mp-details > summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-size: 1.25rem; font-weight: 700;
  color: var(--mp-text);
  position: relative;
  user-select: none;
  display: flex; align-items: center; gap: 10px;
}
.mp-details > summary::-webkit-details-marker { display: none; }
.mp-details > summary::before {
  content: ''; display: inline-block;
  width: 4px; height: 22px; border-radius: 2px;
  background: var(--mp-primary);
}
.mp-details > summary::after {
  content: '+';
  margin-left: auto;
  width: 26px; height: 26px; line-height: 22px;
  border-radius: 50%;
  background: var(--mp-primary); color: #fff;
  text-align: center; font-size: 1.2rem; font-weight: 700;
  transition: transform .2s ease, background .15s ease;
}
.mp-details[open] > summary::after { content: '−'; }
.mp-details > *:not(summary) { padding: 0 22px 22px; }

/* =================================================================
 * CONTATTI — Option A: card verticale con icona XL colorata,
 * label + valore sotto, card interamente cliccabile (stretched link),
 * glow del colore brand al hover.
 * ================================================================= */
.mp-rileva {
  padding: 14px;
  margin-bottom: 14px;
  background: #fff8f0;
  border: 1px solid #f0d38a;
  border-radius: 10px;
  font-size: 0.95rem;
}
.mp-rileva p { margin: 0 0 6px; }
.mp-rileva__form {
  display: flex; gap: 8px; margin-top: 10px;
  flex-wrap: wrap;
}
.mp-rileva__form input {
  flex: 1; min-width: 180px;
  padding: 10px 14px;
  border: 1px solid var(--mp-border);
  border-radius: 999px;
  font-size: 0.95rem;
}
.mp-rileva__form input:focus { outline: none; border-color: var(--mp-primary); }

/* Grid contatti/social: card più grandi 220px+ per dare spazio all'icona XL */
.mp-contacts,
.mp-contacts--hero,
.mp-social-list,
.mp-social-list--hero {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;

  /* Default brand vars (fallback primary). Override per modifier sotto. */
  --brand-color: var(--mp-primary);
  --brand-tint:  rgba(230, 0, 126, 0.08);
  --brand-glow:  rgba(230, 0, 126, 0.40);
}

/* Card contatto: layout verticale, icona XL con glow */
.mp-contact {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 14px;
  padding: 28px 16px 20px;
  background: linear-gradient(180deg, #fff 0%, #fafafc 100%);
  border: 1px solid var(--mp-border);
  border-radius: 18px;
  min-height: 220px;
  transition: transform .22s ease, box-shadow .28s ease, border-color .22s ease;
}
.mp-contact:hover {
  transform: translateY(-4px);
  border-color: var(--brand-color);
  box-shadow: 0 18px 44px var(--brand-glow);
}
.mp-contact--gated { display: none; }

/* Icona XL: 96px box, svg 60px dentro. Glow brand via drop-shadow sul SVG. */
.mp-contact__ico {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: var(--brand-tint);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .22s ease, background .22s ease;
  flex-shrink: 0;
  color: var(--brand-color);
}
.mp-contact__ico svg {
  width: 60px;
  height: 60px;
  display: block;
  filter: drop-shadow(0 4px 10px var(--brand-glow));
  transition: filter .28s ease, transform .22s ease;
}
.mp-contact:hover .mp-contact__ico { transform: scale(1.08); }
.mp-contact:hover .mp-contact__ico svg {
  filter: drop-shadow(0 8px 22px var(--brand-glow));
}

/* Meta (label + value) sotto l'icona */
.mp-contact__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  width: 100%;
  margin-top: auto;
}
.mp-contact__label {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: var(--brand-color);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mp-contact__value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--mp-text);
  text-decoration: none;
  opacity: 0.82;
  transition: opacity .15s ease, color .15s ease;
  word-break: break-word;
  max-width: 100%;
}
.mp-contact:hover .mp-contact__value {
  opacity: 1;
  color: var(--mp-text);
}

/* Stretched link: l'intera card diventa cliccabile.
 * Il <a class="mp-contact__value"> estende il suo hitbox a tutta la card
 * con un pseudo-element assoluto. Funziona per tutti i contatti tranne
 * email (dove il value è <span> + link inline generato via JS antispam). */
a.mp-contact__value::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 1;
}

/* Brand palette per ogni provider — CSS vars raccolgono color/tint/glow.
   Le card leggono --brand-color / --brand-tint / --brand-glow. */
.mp-contact--telegram,  .mp-social--telegram  { --brand-color: var(--brand-telegram);  --brand-tint: rgba(34,158,217,.10);  --brand-glow: rgba(34,158,217,.45); }
.mp-contact--whatsapp,  .mp-social--whatsapp  { --brand-color: var(--brand-whatsapp);  --brand-tint: rgba(37,211,102,.10);  --brand-glow: rgba(37,211,102,.45); }
.mp-contact--discord                          { --brand-color: var(--brand-discord);   --brand-tint: rgba(88,101,242,.10);  --brand-glow: rgba(88,101,242,.45); }
.mp-contact--google                           { --brand-color: var(--brand-google);    --brand-tint: rgba(66,133,244,.10);  --brand-glow: rgba(66,133,244,.45); }
.mp-contact--teams                            { --brand-color: var(--brand-teams);     --brand-tint: rgba(80,89,201,.10);   --brand-glow: rgba(80,89,201,.45);  }
.mp-contact--signal                           { --brand-color: var(--brand-signal);    --brand-tint: rgba(58,118,240,.10);  --brand-glow: rgba(58,118,240,.45); }
.mp-contact--email                            { --brand-color: var(--brand-email);     --brand-tint: rgba(234,67,53,.10);   --brand-glow: rgba(234,67,53,.40);  }
.mp-social--facebook                          { --brand-color: var(--brand-facebook);  --brand-tint: rgba(24,119,242,.10);  --brand-glow: rgba(24,119,242,.45); }
.mp-social--instagram                         { --brand-color: var(--brand-instagram); --brand-tint: rgba(228,64,95,.10);   --brand-glow: rgba(228,64,95,.45);  }
.mp-social--twitter                           { --brand-color: var(--brand-twitter);   --brand-tint: rgba(17,17,17,.08);    --brand-glow: rgba(17,17,17,.35);   }
.mp-social--web                               { --brand-color: var(--brand-web);       --brand-tint: rgba(230,0,126,.08);   --brand-glow: rgba(230,0,126,.40);  }
.mp-social--sms                               { --brand-color: var(--brand-sms);       --brand-tint: rgba(39,174,96,.10);   --brand-glow: rgba(39,174,96,.45);  }

/* Email: stretched link disabilitato (value è span). Il link inline #pemail a rimane cliccabile */
.mp-contact--email .mp-contact__value   { opacity: 1; }
.mp-contact--email #pemail a            { color: inherit; text-decoration: none; font-weight: 600; }
.mp-contact--email:hover #pemail a      { color: var(--brand-email); }

/* Online badge */
.mp-contact__on {
  background: #25d366; color: #fff;
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-style: normal;
  letter-spacing: 0.04em;
}

/* =================================================================
 * SOCIAL — stesso layout verticale dei contatti, stesso glow brand.
 * Brand vars (--brand-color/tint/glow) definite insieme ai contatti sopra.
 * ================================================================= */
.mp-social-list li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 12px;
  padding: 28px 16px 20px;
  background: linear-gradient(180deg, #fff 0%, #fafafc 100%);
  border: 1px solid var(--mp-border);
  border-radius: 18px;
  min-height: 220px;
  font-size: 1.05rem;
  transition: transform .22s ease, box-shadow .28s ease, border-color .22s ease;

  /* reset grid del v1 legacy */
  grid-template-columns: none;
  grid-template-rows: none;
  column-gap: 0;
  row-gap: 0;
}
.mp-social-list li:hover {
  transform: translateY(-4px);
  border-color: var(--brand-color);
  box-shadow: 0 18px 44px var(--brand-glow);
}

.mp-social__ico {
  grid-row: auto;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: var(--brand-tint);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .22s ease, background .22s ease;
  flex-shrink: 0;
  color: var(--brand-color);
}
.mp-social__ico svg {
  width: 60px;
  height: 60px;
  display: block;
  filter: drop-shadow(0 4px 10px var(--brand-glow));
  transition: filter .28s ease, transform .22s ease;
}
.mp-social-list li:hover .mp-social__ico { transform: scale(1.08); }
.mp-social-list li:hover .mp-social__ico svg {
  filter: drop-shadow(0 8px 22px var(--brand-glow));
}

.mp-social-list strong {
  color: var(--brand-color);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  margin-top: auto;
}
.mp-social-list a {
  color: var(--mp-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  opacity: 0.82;
  transition: opacity .15s ease, color .15s ease;
  max-width: 100%;
  word-break: break-word;
}
.mp-social-list li:hover a { opacity: 1; color: var(--mp-text); }

/* Stretched link per social (il <a> è sempre presente) */
.mp-social-list a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 1;
}

/* =================================================================
 * SUB-TAB (Foto/Video: free vs paid)
 * ================================================================= */
.mp-subnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--mp-border);
}
.mp-subtab {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #555;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.mp-subtab:hover {
  background: #f3f3f6;
  color: var(--mp-primary);
}
.mp-subtab.is-active,
.mp-subtab.is-active:hover {
  background: var(--mp-primary);
  color: #fff;
  border-color: var(--mp-primary);
}
.mp-subpanel            { display: none; }
.mp-subpanel.is-active  { display: block; }

/* =================================================================
 * SUBHEAD (titoletti interni a details)
 * ================================================================= */
.mp-subhead {
  display: flex; align-items: center; gap: 10px;
  margin: 6px 0 14px;
  font-size: 1.35rem; font-weight: 700;
  color: var(--mp-text);
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--mp-border);
}
.mp-subhead i { color: var(--mp-primary); font-size: 1.3rem; }
.mp-subhead--paid { margin-top: 24px; }
.mp-subhead--paid::after {
  content: 'A PAGAMENTO';
  margin-left: auto;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--mp-primary);
  background: #fff0f7;
  border: 1px solid #ffd0e3;
  padding: 3px 10px;
  border-radius: 999px;
}

/* =================================================================
 * FOTO GRID
 * ================================================================= */
.mp-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(182px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}
.mp-photo-grid__item {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: #eee;
  border: 1px solid var(--mp-border);
  transition: transform .15s ease, box-shadow .15s ease;
}
.mp-photo-grid__item:hover {
  transform: translateY(-2px);
  box-shadow: var(--mp-shadow-md);
}
.mp-photo-grid__item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease;
}
.mp-photo-grid__item:hover img { transform: scale(1.06); }

.mp-photo-grid__item--locked::before,
.mp-photo-grid__item--pack::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.65) 100%);
  z-index: 1;
  pointer-events: none;
}
.mp-photo-grid__item--locked img {
  filter: blur(6px) brightness(.9);
}
.mp-photo-grid__overlay {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: var(--mp-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.mp-photo-grid__price {
  position: absolute;
  left: 8px; right: 8px; bottom: 8px;
  z-index: 2;
  padding: 6px 8px;
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.mp-photo-grid__price s { opacity: .7; margin-right: 3px; }

.mp-photo-grid__item--pack {
  grid-column: span 2;
  grid-row: span 2;
  background: linear-gradient(135deg, #e6007e 0%, #7a003f 100%);
  border-color: var(--mp-primary);
}
.mp-photo-grid__item--pack img {
  opacity: .35;
  mix-blend-mode: luminosity;
}
.mp-photo-grid__item--pack .mp-photo-grid__price {
  font-size: 0.98rem;
  line-height: 1.35;
}

/* =================================================================
 * VIDEO GRATIS
 * ================================================================= */
.mp-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 0 0 14px;
}
.mp-video-card {
  background: #fafafc;
  border: 1px solid var(--mp-border);
  border-radius: 12px;
  overflow: hidden;
}
.mp-video-card__player {
  aspect-ratio: 16 / 10;
  background: #000;
}
.mp-video-card__player video {
  width: 100%; height: 100%; display: block;
  object-fit: cover;
  background: #000;
}
.mp-video-card__desc {
  margin: 0;
  padding: 10px 14px 12px;
  font-size: 0.88rem;
  color: var(--mp-text);
  line-height: 1.4;
}

/* =================================================================
 * VIDEO OFFERS (bundle sconti)
 * ================================================================= */
.mp-video-offers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.mp-video-offer {
  position: relative;
  display: block;
  padding: 14px 16px 14px 18px;
  background: linear-gradient(135deg, #fff0f7 0%, #ffe2ee 100%);
  border: 1px solid #ffd0e3;
  border-radius: 12px;
  text-decoration: none;
  color: var(--mp-text);
  transition: transform .1s ease, box-shadow .15s ease, border-color .15s ease;
  overflow: hidden;
}
.mp-video-offer:hover {
  transform: translateY(-2px);
  border-color: var(--mp-primary);
  box-shadow: var(--mp-shadow-md);
}
.mp-video-offer__badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--mp-primary); color: #fff;
  font-size: 0.75rem; font-weight: 800;
  padding: 3px 10px; border-radius: 999px;
  letter-spacing: 0.02em;
}
.mp-video-offer__price {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 6px;
  font-size: 1.1rem;
}
.mp-video-offer__price s { color: var(--mp-muted); font-size: 0.9rem; }
.mp-video-offer__price strong {
  color: var(--mp-primary); font-size: 1.45rem; font-weight: 800;
}
.mp-video-offer__desc {
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--mp-text);
}
.mp-video-offer__desc b { color: var(--mp-primary); }

/* =================================================================
 * VIDEO A PAGAMENTO
 * ================================================================= */
.mp-video-paid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 0 0 14px;
}
.mp-video-paid {
  background: #fafafc;
  border: 1px solid var(--mp-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.mp-video-paid:hover {
  border-color: var(--mp-primary);
  box-shadow: var(--mp-shadow-md);
}
.mp-video-paid__thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
}
.mp-video-paid__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(4px) brightness(.75);
  transition: transform .3s ease;
}
.mp-video-paid__thumb::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.5) 100%);
}
.mp-video-paid__thumb:hover img { transform: scale(1.04); }
.mp-video-paid__lock {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(230,0,126,.92);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.mp-video-paid__meta {
  padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 0.86rem;
}
.mp-video-paid__row {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  color: var(--mp-muted);
  font-size: 1rem;
}
.mp-video-paid__row b { color: var(--mp-text); font-weight: 600; }
.mp-video-paid__price {
  font-size: 1.1rem;
  color: var(--mp-primary);
  font-weight: 700;
}
.mp-video-paid__price s { color: var(--mp-muted); font-weight: 400; margin-right: 4px; }
.mp-video-paid__price b { color: var(--mp-text); font-weight: 600; margin-right: 4px; }
.mp-video-paid__badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  background: var(--mp-primary); color: #fff;
  font-size: 0.72rem; font-weight: 800;
  border-radius: 999px;
}
.mp-video-paid__desc {
  font-size: 1.02rem;
  color: var(--mp-text);
  line-height: 1.4;
  max-height: 4.2em;
  overflow: hidden;
}

/* =================================================================
 * PAGINATION
 * ================================================================= */
.mp-pagination {
  list-style: none;
  padding: 0; margin: 10px 0 16px;
  display: flex; flex-wrap: wrap; gap: 4px;
  justify-content: center;
}
.mp-pagination li { display: inline-block; }
.mp-pagination a {
  display: inline-flex;
  align-items: center; justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 10px;
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  background: #fff;
  color: var(--mp-text);
  font-size: 0.9rem; font-weight: 600;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.mp-pagination a:hover {
  background: #fff0f7;
  border-color: var(--mp-primary);
  color: var(--mp-primary);
}
.mp-pagination a.is-active {
  background: var(--mp-primary);
  border-color: var(--mp-primary);
  color: #fff;
}

/* =================================================================
 * DESCRIZIONE (chi sono)
 * ================================================================= */
.mp-description {
  font-size: 1.22rem;
  line-height: 1.7;
}
.mp-description img { max-width: 100%; height: auto; border-radius: 10px; margin: 10px 0; }
.mp-description p { margin: 0 0 10px; }
.mp-description a { color: var(--mp-primary); }

/* =================================================================
 * WISHLIST — grid di card con progress bar.
 * ================================================================= */
.mp-wish-intro {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 22px;
  color: #333;
}
.mp-wish-intro a {
  color: var(--mp-primary);
  text-decoration: none;
  font-weight: 700;
}
.mp-wish-intro a:hover { text-decoration: underline; }

.mp-wish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  margin: 0 0 22px;
}

.mp-wish {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
  transition: box-shadow .18s, transform .18s;
}
.mp-wish:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
  transform: translateY(-2px);
}

.mp-wish__img {
  background: #f7f7f9;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.mp-wish__img img,
.mp-wish__img a {
  display: block;
  width: 100%;
  height: 100%;
}
.mp-wish__img img { object-fit: contain; }

.mp-wish__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 18px;
  flex: 1;
}
.mp-wish__name {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: #222;
  line-height: 1.3;
}
.mp-wish__name a {
  color: var(--mp-primary);
  text-decoration: none;
}
.mp-wish__name a:hover { text-decoration: underline; }

.mp-wish__desc {
  font-size: 0.98rem;
  line-height: 1.5;
  color: #555;
  word-break: break-word;
}

.mp-wish__progress {
  position: relative;
  background: #ececf1;
  border-radius: 999px;
  height: 22px;
  overflow: hidden;
  margin-top: auto;
}
.mp-wish__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #1e7e34);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  min-width: 36px;
  box-sizing: border-box;
  white-space: nowrap;
  transition: width .3s ease;
}

.mp-wish__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.95rem;
  color: #444;
}

.mp-wish__regalo {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.mp-wish__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.98rem;
  color: #444;
}
.mp-wish__regalo input.importo {
  width: 70px;
  padding: 8px 10px;
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  font-size: 1rem;
  text-align: right;
}
.mp-wish__regalo .mp-btn { flex: 1; min-width: 140px; }

.mp-wish-note {
  margin: 0;
  color: #666;
  font-size: 0.92rem;
}

/* =================================================================
 * PRE-FOOTER
 * ================================================================= */
.mp-prefooter {
  margin-top: 20px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #fff0f7, #fff7fb);
  border: 1px solid #ffd0e3;
  border-radius: var(--mp-radius);
  text-align: center;
  font-weight: 700; color: var(--mp-primary);
  font-size: 1.02rem;
}

/* =================================================================
 * BACK TO TOP
 * ================================================================= */
button.mp-back-top,
.mp-back-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #e6007e !important;
  background-color: #e6007e !important;
  color: #fff !important;
  border: 2px solid #fff !important;
  box-shadow: 0 6px 22px rgba(230, 0, 126, 0.55), 0 2px 8px rgba(0,0,0,.2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700;
  line-height: 1;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, background-color .15s ease, box-shadow .15s ease, right .32s ease;
  z-index: 60;
}
.mp-back-top:hover,
button.mp-back-top:hover {
  background: #b4005e !important;
  background-color: #b4005e !important;
  box-shadow: 0 8px 28px rgba(180, 0, 94, 0.65), 0 2px 8px rgba(0,0,0,.25);
  transform: translateY(-2px);
}
.mp-back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.mp-back-top:hover.is-visible { transform: translateY(-2px); }
.mp-back-top__arrow {
  width: 22px;
  height: 22px;
  color: #fff;
  display: block;
  pointer-events: none;
}

/* =================================================================
 * RESPONSIVE
 * ================================================================= */

/* Tablet (<= 900px): hero a colonna singola */
@media (max-width: 900px) {
  .mp-profile-hero {
    grid-template-columns: 1fr;
  }
  .mp-profile-hero__photo {
    max-height: 460px;
    aspect-ratio: 16 / 11;
  }
}

/* Tablet / mobile (<= 820px): fallback scroll classico — tutti i panel visibili,
   card contatti/social più compatte, tab bar sticky autonoma. */
@media (max-width: 820px) {
  /* Classe togliata dal JS oltre ~100px di scroll (eredità legacy).
     In questa scheda il tab switcher non la usa più: la neutralizziamo sotto. */
  .mp-top.is-compact .mp-top__info { display: grid; }

  /* Mobile: info row resta visibile, .mp-top diventa statica (non sticky);
     solo la tab bar si ancora sotto la navbar globale. */
  .mp-top {
    position: static;
    overflow: visible;
    margin-bottom: 0;
    border-radius: var(--mp-radius) var(--mp-radius) 0 0;
    border-bottom: none;
  }
  .mp-top__info {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "avatar main"
      "fav    fav";
    gap: 10px 12px;
  }
  .mp-top__avatar { grid-area: avatar; }
  .mp-top__main   { grid-area: main; flex-direction: column; align-items: flex-start; }
  .mp-top__fav    { grid-area: fav; width: 100%; }
  .mp-top__name   { font-size: 1.8rem; white-space: normal; }

  .mp-top__nav--tabs {
    position: sticky;
    top: var(--mp-topbar-h, 122px);
    z-index: 39;
    background: #fafafc;
    border: 1px solid var(--mp-border);
    border-top: 1px solid var(--mp-border);
    border-radius: 0 0 var(--mp-radius) var(--mp-radius);
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
    margin: 0 0 18px;
    padding: 6px 8px;
    gap: 4px;
    /* Portrait: wrap su 2 righe (tutti i tab visibili). Landscape phone
       sovrascrive con scroll orizzontale più sotto. */
    flex-wrap: wrap;
  }
  /* Padding/font dei tab ridotti per farli stare su 2 righe senza overflow. */
  .mp-top__nav--tabs a {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  /* Panel: mostriamoli tutti (scroll classico) */
  .mp-panel                                       { display: block; }
  .mp-profile-hero.mp-panel,
  .mp-profile-hero.mp-panel.is-active             { display: grid; }
  .mp-profile-hero--no-photo.mp-panel,
  .mp-profile-hero--no-photo.mp-panel.is-active   { grid-template-columns: 1fr; }

  /* Offset per ancoraggio sotto navbar legacy + tab bar sticky.
     Tab bar wrap su 2 righe ≈ 90px, + topbar globale mobile ~57px. */
  .mp-panel { scroll-margin-top: calc(var(--mp-topbar-h, 122px) + 96px); }

  /* Hero Details: foto più compatta e centrata su portrait (era full-width). */
  .mp-profile-hero__photo {
    max-width: 280px;
    max-height: 360px;
    aspect-ratio: auto;
    margin: 0 auto;
  }
  .mp-profile-hero__photo img { object-fit: contain; }

  /* Contatti/social: card più compatte su mobile */
  .mp-contact,
  .mp-social-list li {
    min-height: 180px;
    padding: 20px 12px 16px;
  }
  .mp-contact__ico,
  .mp-social__ico { width: 76px; height: 76px; border-radius: 20px; }
  .mp-contact__ico svg,
  .mp-social__ico svg { width: 46px; height: 46px; }

  /* Sub-tab: nascondo la nav e mostro entrambi i subpanel in scroll. */
  .mp-subnav     { display: none; }
  .mp-subpanel   { display: block; }

  /* Listino: layout a 2 righe */
  .mp-price {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "amount desc"
      "btn    btn";
    gap: 10px 16px;
  }
  .mp-price__amount { grid-area: amount; }
  .mp-price__desc   { grid-area: desc; }
  .mp-price__icon   { grid-area: amount; }
  .mp-price .mp-btn--block {
    grid-area: btn;
    width: 100%; min-width: 0;
  }

  .mp-actions-bar .mp-btn { min-width: 0; }

  .mp-photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(143px, 1fr));
  }
  .mp-video-grid,
  .mp-video-paid-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile (<= 640px): margini ridotti, hero e header compatti */
@media (max-width: 640px) {
  .mp { padding: 10px 10px 32px; }

  .mp-profile-hero { padding: 14px; }
  .mp-details > summary, .mp-details > *:not(summary) {
    padding-left: 16px; padding-right: 16px;
  }

  .mp-top__nav {
    padding: 5px 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mp-top__nav::-webkit-scrollbar { display: none; }
  .mp-top__nav a { padding: 7px 12px; font-size: 0.85rem; }

  .mp-price {
    grid-template-columns: 1fr;
    grid-template-areas:
      "amount"
      "desc"
      "btn";
    text-align: center;
    padding: 16px;
  }
  .mp-price__amount { justify-content: center; font-size: 1.8rem; }
  .mp-price__icon { justify-content: center; }
  .mp-price__desc { text-align: center; }
  .mp-price .mp-btn--block { width: 100%; }

  .mp-back-top { width: 44px; height: 44px; bottom: 16px; right: 16px; }

  .mp-photo-grid__item--pack { grid-column: span 2; grid-row: span 2; }
}

/* Landscape phone (≤500px alt.): scroll orizzontale tab anche se width > 820
   (es. iPhone landscape ~844px). */
@media (max-height: 500px) and (orientation: landscape) {
  .mp-top.is-compact .mp-top__info { display: none; }
  .mp-top__nav--tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mp-top__nav--tabs::-webkit-scrollbar { display: none; }
  .mp-top__nav--tabs a { flex-shrink: 0; }
}

/* Back-to-top: quando il drawer destro è aperto, spostalo a sinistra del
   drawer per non farlo coprire. Drawer = 25vw fino a 1740px, 400px sopra. */
@media (min-width: 992px) {
  body.mondo5-page.mondo5-drawer-open .mp-back-top { right: calc(25vw + 24px); }
}
@media (min-width: 1740px) {
  body.mondo5-page.mondo5-drawer-open .mp-back-top { right: calc(400px + 24px); }
}
