/* MEP – elenchi delle pagine del sito (viaggi, partenze, destinazioni). Font del tema, colori MasterClass. */
.mep-e {
  --mep-magenta: #BB1A8B; --mep-blu: #2E62A8; --mep-navy: #1B3358; --mep-soft: #F1F7FB; --mep-rosa: #FBF3F8; --mep-bordo: #E3EAF2;
  --mep-radius: 0 10px 0 10px; --mep-shadow: 0 14px 40px rgba(27, 51, 88, .10);
  color: var(--mep-navy);
}
.mep-e *, .mep-e *::before, .mep-e *::after { box-sizing: border-box; }
.mep-e .mep-ico { width: 18px; height: 18px; flex: 0 0 auto; }
.mep-e-empty { text-align: center; color: var(--mep-navy); }

/* pulsanti: forma del tema */
.mep-e-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: var(--mep-radius); background: var(--mep-magenta); color: #fff !important; font-weight: 700; font-size: 14px; line-height: 1.2; text-decoration: none !important; border: 2px solid var(--mep-magenta); transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.mep-e-btn:hover { background: var(--mep-blu); border-color: var(--mep-blu); }
.mep-e-btn--ghost { background: #fff; color: var(--mep-navy) !important; border-color: var(--mep-bordo); }
.mep-e-btn--ghost:hover { background: #fff; border-color: var(--mep-magenta); color: var(--mep-magenta) !important; }

/* stato */
.mep-e-badge { display: inline-block; padding: 6px 12px; border-radius: 0 8px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .3px; line-height: 1.2; white-space: nowrap; background: var(--mep-soft); color: var(--mep-blu); }
.mep-e-badge--aperte { background: var(--mep-magenta); color: #fff; }
.mep-e-badge--ultimi_posti { background: #F6E7F1; color: var(--mep-magenta); box-shadow: inset 0 0 0 1.5px var(--mep-magenta); }
.mep-e-badge--chiuse, .mep-e-badge--bozza { background: #EEF1F5; color: #67728A; }
.mep-e-badge--sold_out { background: #D7263D; color: #fff; }

/* filtri */
.mep-e-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin: 0 0 34px; padding: 16px 18px; background: var(--mep-soft); border-radius: 0 18px 0 18px; }
.mep-e-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mep-e-chips button { appearance: none; border: 1.5px solid var(--mep-bordo); background: #fff; color: var(--mep-navy); padding: 9px 16px; border-radius: 0 10px 0 10px; font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2; cursor: pointer; transition: all .15s; }
.mep-e-chips button:hover { border-color: var(--mep-magenta); color: var(--mep-magenta); background: #fff; }
.mep-e-chips button.is-on { background: var(--mep-navy); border-color: var(--mep-navy); color: #fff; }
.mep-e-selects { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.mep-e-selects label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 600; color: var(--mep-navy); }
.mep-e-selects select { min-width: 130px; height: 40px; padding: 0 30px 0 12px; border: 1.5px solid var(--mep-bordo) !important; border-radius: 0 10px 0 10px !important; background-color: #fff !important; color: var(--mep-navy); font: inherit; font-size: 14px; }
.mep-e-switch input { width: 18px; height: 18px; accent-color: var(--mep-magenta); margin: 0; }
.mep-e-none { text-align: center; padding: 30px 0 0; }
.mep-e-none a { color: var(--mep-magenta); font-weight: 700; }

/* schede viaggio */
.mep-e-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 30px; }
.mep-e-grid > .mep-e-card { flex: 0 1 calc((100% - 60px) / 3); }
@media (max-width: 1024px) { .mep-e-grid > .mep-e-card { flex-basis: calc((100% - 30px) / 2); } }
@media (max-width: 680px) { .mep-e-grid > .mep-e-card { flex-basis: 100%; } }
.mep-e-card { display: flex; flex-direction: column; background: #fff; border-radius: 0 28px 0 28px; overflow: hidden; box-shadow: var(--mep-shadow); transition: transform .2s, box-shadow .2s; min-width: 0; }
.mep-e-card[hidden] { display: none; }
.mep-e-card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(27, 51, 88, .16); }
.mep-e-card__img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--mep-soft); }
.mep-e-card__img img:not(.mep-e-flag) { width: 100%; height: 100% !important; object-fit: cover; transition: transform .5s; }
.mep-e-card:hover .mep-e-card__img img:not(.mep-e-flag) { transform: scale(1.05); }
.mep-e-badges { position: absolute; left: 16px; top: 16px; right: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.mep-e-badges .mep-e-badge { box-shadow: 0 6px 18px rgba(0, 0, 0, .15); }
.mep-e-card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.mep-e-card__area { font-size: 13px; font-weight: 700; color: var(--mep-blu); letter-spacing: .4px; margin-bottom: 4px; }
.mep-e .mep-e-card__title { margin: 0 0 10px; font-size: 28px; line-height: 1.15; }
.mep-e .mep-e-card__title a { color: var(--mep-navy); text-decoration: none; }
.mep-e .mep-e-card__title a:hover { color: var(--mep-magenta); }
.mep-e-card__text { margin: 0 0 14px; font-size: 15px; line-height: 1.55; color: #4a5872; }
.mep-e-facts { list-style: none; margin: 0 0 18px; padding: 14px 0 0; border-top: 1px solid var(--mep-bordo); display: grid; gap: 8px; }
.mep-e-facts li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; margin: 0; }
.mep-e-facts .mep-ico { color: var(--mep-magenta); }
.mep-e-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mep-e-price { font-size: 22px; font-weight: 700; color: var(--mep-navy); white-space: nowrap; }
.mep-e-price small { font-size: 13px; font-weight: 600; color: #67728A; }

/* tabella partenze */
.mep-e-tab { overflow: hidden; border-radius: 0 22px 0 22px; box-shadow: var(--mep-shadow); background: #fff; }
.mep-e-tab table { width: 100%; border-collapse: collapse; margin: 0; border: 0; }
.mep-e-tab th { background: var(--mep-navy); color: #fff; text-align: left; font-size: 13px; font-weight: 700; letter-spacing: .5px; padding: 16px 18px; border: 0; }
.mep-e-tab td { padding: 16px 18px; border: 0; border-top: 1px solid var(--mep-bordo); vertical-align: middle; font-size: 15px; line-height: 1.4; background: #fff; }
.mep-e-tab tbody tr:hover td { background: #FAFCFE; }
.mep-e-tab td a { color: var(--mep-navy); text-decoration: none; }
.mep-e-tab td small { display: block; color: #67728A; font-size: 13px; margin-top: 2px; }
.mep-e-tab__go { text-align: right; }
.mep-e-tab__ind td { background: var(--mep-rosa) !important; }
@media (max-width: 860px) {
  .mep-e-tab { box-shadow: none; background: transparent; border-radius: 0; overflow: visible; }
  .mep-e-tab thead { display: none; }
  .mep-e-tab table, .mep-e-tab tbody, .mep-e-tab tr, .mep-e-tab td { display: block; width: 100%; }
  .mep-e-tab tr { margin: 0 0 16px; border-radius: 0 18px 0 18px; overflow: hidden; box-shadow: var(--mep-shadow); background: #fff; }
  .mep-e-tab td { display: flex; justify-content: space-between; gap: 14px; text-align: right; padding: 11px 16px; border-top: 1px solid var(--mep-bordo); }
  .mep-e-tab td:first-child { border-top: 0; }
  .mep-e-tab td::before { content: attr(data-l); font-weight: 700; color: #67728A; font-size: 13px; text-align: left; }
  .mep-e-tab td.mep-e-tab__go { display: block; }
  .mep-e-tab td.mep-e-tab__go::before { content: none; }
  .mep-e-tab__go .mep-e-btn { width: 100%; }
}

/* destinazioni */
.mep-e-dests { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.mep-e-dests > .mep-e-dest { flex: 0 1 calc((100% - 72px) / 4); }
@media (max-width: 1024px) { .mep-e-dests > .mep-e-dest { flex-basis: calc((100% - 24px) / 2); } }
@media (max-width: 520px) { .mep-e-dests > .mep-e-dest { flex-basis: 100%; } }
.mep-e-dest { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 0 28px 0 28px; overflow: hidden; color: #fff !important; text-decoration: none !important; background: var(--mep-navy); box-shadow: var(--mep-shadow); }
.mep-e-dest > img:not(.mep-e-flag) { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; transition: transform .6s; }
.mep-e-dest::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(27, 51, 88, .92) 0%, rgba(27, 51, 88, .35) 45%, rgba(27, 51, 88, 0) 70%); }
.mep-e-dest:hover > img:not(.mep-e-flag) { transform: scale(1.06); }
.mep-e-dest__in { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 24px; display: flex; flex-direction: column; gap: 4px; }
.mep-e-dest__area { font-size: 13px; font-weight: 700; letter-spacing: .5px; opacity: .85; }
.mep-e-dest__title { font-size: 32px; line-height: 1.1; font-weight: 700; }
.mep-e-dest__anni { margin-top: 8px; align-self: flex-start; font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 0 8px 0 8px; background: var(--mep-magenta); }
.mep-e-dest__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 14px; font-weight: 700; opacity: 0; transform: translateY(6px); transition: all .25s; }
.mep-e-dest:hover .mep-e-dest__go { opacity: 1; transform: none; }
.mep-e-dest { aspect-ratio: 4 / 5; }
.mep-e-dest--past img { filter: saturate(.8); }
.mep-e-dest__title { font-size: 28px !important; }
.mep-e-dest--past .mep-e-dest__anni { background: rgba(255, 255, 255, .18); backdrop-filter: blur(4px); }
@media (hover: none) { .mep-e-dest__go { opacity: 1; transform: none; } }
.mep-e-dest__go--on { opacity: 1; transform: none; }
.mep-e-card--soon .mep-e-card__img img { filter: saturate(.85); }
.mep-e-card--soon .mep-e-card__title { color: var(--mep-navy); }
.mep-e-dests--attuali > .mep-e-dest { flex-basis: calc((100% - 48px) / 3); aspect-ratio: 5 / 6; }
@media (max-width: 1024px) { .mep-e-dests--attuali > .mep-e-dest { flex-basis: calc((100% - 24px) / 2); } }
@media (max-width: 520px) { .mep-e-dests--attuali > .mep-e-dest { flex-basis: 100%; } }

/* griglia compatta (home): 5 per riga */
.mep-e-griglia--compatto .mep-e-grid { gap: 18px; }
.mep-e-griglia--compatto .mep-e-grid > .mep-e-card { flex-basis: calc((100% - 72px) / 5); border-radius: 0 20px 0 20px; }
.mep-e-griglia--compatto .mep-e-card__img { aspect-ratio: 16 / 11; }
.mep-e-griglia--compatto .mep-e-badges { left: 10px; top: 10px; right: 10px; gap: 4px; }
.mep-e-griglia--compatto .mep-e-badges .mep-e-badge { font-size: 10.5px; padding: 4px 8px; }
.mep-e-griglia--compatto .mep-e-card__body { padding: 16px 16px 18px; }
.mep-e-griglia--compatto .mep-e-card__area { display: none; }
.mep-e-griglia--compatto .mep-e-card__title { font-size: 21px !important; margin-bottom: 8px; }
.mep-e-griglia--compatto .mep-e-card__text { font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.mep-e-griglia--compatto .mep-e-facts { border: 0; padding: 0; margin: 0 0 10px; gap: 4px; }
.mep-e-griglia--compatto .mep-e-facts li { font-size: 13px; gap: 7px; }
.mep-e-griglia--compatto .mep-e-facts li:first-child { display: none; }
.mep-e-griglia--compatto .mep-e-facts .mep-ico { width: 15px; height: 15px; }
.mep-e-griglia--compatto .mep-e-card__foot { flex-direction: column; align-items: flex-start; gap: 8px; }
.mep-e-griglia--compatto .mep-e-price { font-size: 17px; }
.mep-e-griglia--compatto .mep-e-btn { padding: 0; background: none; border: 0; color: var(--mep-magenta) !important; font-size: 14px; }
.mep-e-griglia--compatto .mep-e-btn:hover { background: none; color: var(--mep-blu) !important; }
@media (max-width: 1100px) { .mep-e-griglia--compatto .mep-e-grid > .mep-e-card { flex-basis: calc((100% - 36px) / 3); } }
@media (max-width: 760px) { .mep-e-griglia--compatto .mep-e-grid > .mep-e-card { flex-basis: calc((100% - 18px) / 2); } }
@media (max-width: 480px) { .mep-e-griglia--compatto .mep-e-grid > .mep-e-card { flex-basis: 100%; } }

/* calendario presentazioni */
.mep-cal { --pres: #BB1A8B; --onl: #2E62A8; background: #fff; border-radius: 0 28px 0 28px; box-shadow: var(--mep-shadow); padding: 26px 26px 22px; position: relative; }
.mep-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mep-cal__month { font-size: 22px; font-weight: 700; text-transform: capitalize; color: var(--mep-navy); }
.mep-cal__nav { appearance: none; width: 40px; height: 40px; border: 1.5px solid var(--mep-bordo); background: #fff; color: var(--mep-navy); border-radius: 0 10px 0 10px; font-size: 22px; line-height: 1; cursor: pointer; padding: 0; }
.mep-cal__nav:hover { border-color: var(--mep-magenta); color: var(--mep-magenta); background: #fff; }
.mep-cal__dow, .mep-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.mep-cal__dow span { text-align: center; font-size: 12px; font-weight: 700; color: #67728A; letter-spacing: .4px; padding-bottom: 4px; }
.mep-cal__d { display: grid; place-items: center; aspect-ratio: 5 / 4; border-radius: 0 10px 0 10px; font-size: 15px; font-weight: 600; color: var(--mep-navy); background: #F7FAFD; border: 0; padding: 0; font-family: inherit; }
.mep-cal__d.is-empty { background: transparent; }
.mep-cal__d.is-today { box-shadow: inset 0 0 0 1.5px var(--mep-navy); }
button.mep-cal__d { cursor: pointer; color: #fff; font-weight: 800; position: relative; transition: transform .15s, box-shadow .15s; }
button.mep-cal__d.is-presenza { background: var(--pres); }
button.mep-cal__d.is-online { background: var(--onl); }
button.mep-cal__d:hover { transform: scale(1.08); box-shadow: 0 8px 18px rgba(27, 51, 88, .25); }
button.mep-cal__d::after { content: ''; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .85); }
.mep-cal__legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 16px 0 6px; font-size: 13px; font-weight: 600; color: var(--mep-navy); }
.mep-cal__legend span, .mep-cal__list button { display: flex; align-items: center; gap: 8px; }
.mep-cal i { display: inline-block; flex: 0 0 auto; width: 12px; height: 12px; border-radius: 0 4px 0 4px; }
.mep-cal i.is-presenza { background: var(--pres); }
.mep-cal i.is-online { background: var(--onl); }
.mep-cal__list { list-style: none; margin: 10px 0 0; padding: 12px 0 0; border-top: 1px solid var(--mep-bordo); display: grid; gap: 6px; }
.mep-cal__list li { margin: 0; }
.mep-cal__list button { width: 100%; text-align: left; appearance: none; border: 0; background: transparent; padding: 8px 6px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 14px; color: var(--mep-navy); line-height: 1.4; }
.mep-cal__list button:hover { background: var(--mep-soft); color: var(--mep-navy); }
.mep-cal__list button span { flex: 1; }
.mep-cal__list em { font-style: normal; font-weight: 700; color: var(--mep-magenta); white-space: nowrap; font-size: 13px; }
.mep-cal__none { font-size: 14px; color: #67728A; padding: 6px; }
.mep-cal__modal { position: fixed; inset: 0; z-index: 99999; background: rgba(15, 30, 55, .55); display: grid; place-items: center; padding: 20px; }
.mep-cal__modal[hidden] { display: none; }
.mep-cal__box { position: relative; width: min(460px, 100%); background: #fff; border-radius: 0 28px 0 28px; padding: 30px 30px 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.mep-cal__close { position: absolute; right: 14px; top: 12px; width: 38px; height: 38px; border: 0; background: var(--mep-soft); color: var(--mep-navy); font-size: 24px; line-height: 1; border-radius: 0 10px 0 10px; cursor: pointer; padding: 0; }
.mep-cal__close:hover { background: var(--mep-magenta); color: #fff; }
.mep-cal__tag { display: inline-block; padding: 5px 11px; border-radius: 0 8px 0 8px; font-size: 12px; font-weight: 700; color: #fff; }
.mep-cal__tag.is-presenza { background: var(--pres); }
.mep-cal__tag.is-online { background: var(--onl); }
.mep-e .mep-cal__t { margin: 12px 0 10px; font-size: 26px; line-height: 1.2; color: var(--mep-navy); }
.mep-cal__body p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.55; color: #33405a; }
.mep-cal__body strong { color: var(--mep-navy); }
.mep-cal__when strong { display: inline-block; }
.mep-cal__when strong::first-letter { text-transform: uppercase; }
.mep-cal__body .mep-e-btn { margin-top: 6px; }
.mep-cal--vuoto { text-align: center; }
.mep-cal__modal { --pres: #BB1A8B; --onl: #2E62A8; }
.mep-cal__pdf { display: inline-flex; margin-top: 12px; font-size: 14px; font-weight: 700; color: var(--mep-magenta) !important; text-decoration: underline; }

/* mobile: il calendario non deve allargare la pagina (i pulsanti del tema hanno padding e larghezze minime) */
.mep-cal { max-width: 100%; overflow: hidden; }
.mep-cal__dow, .mep-cal__grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mep-cal .mep-cal__d, .mep-cal .mep-cal__nav, .mep-cal__close { min-width: 0 !important; padding: 0 !important; margin: 0; line-height: 1 !important; letter-spacing: 0 !important; text-transform: none !important; }
.mep-cal__list button { min-width: 0 !important; white-space: normal !important; letter-spacing: 0 !important; text-transform: none !important; }
@media (max-width: 520px) {
  .mep-cal { padding: 18px 14px 16px; }
  .mep-cal__dow, .mep-cal__grid { gap: 4px; }
  .mep-cal__d { font-size: 13px; aspect-ratio: 1; }
  .mep-cal__month { font-size: 18px; }
  .mep-cal__list em { display: none; }
}
/* mobile: blocchi con icona centrati in tutto il sito */
@media (max-width: 767px) {
  .elementor-widget-icon-box .elementor-icon-box-wrapper { text-align: center !important; }
  .elementor-widget-icon-box .elementor-icon-box-icon { margin-left: auto !important; margin-right: auto !important; }
}
/* schede destinazione: altezza esplicita (Safari ignora aspect-ratio negli elementi flex che vanno a capo) */
.mep-e-dests { align-items: flex-start; }
@media (max-width: 1024px) {
  .mep-e-dests > .mep-e-dest { aspect-ratio: auto; height: 380px; }
}
@media (max-width: 520px) {
  .mep-e-dests--attuali > .mep-e-dest, .mep-e-dests--tutte > .mep-e-dest { height: 340px; }
  .mep-e-dests--passate { gap: 12px; }
  .mep-e-dests--passate > .mep-e-dest { flex-basis: calc((100% - 12px) / 2); height: 230px; border-radius: 0 18px 0 18px; }
  .mep-e-dests--passate .mep-e-dest__in { padding: 14px; }
  .mep-e-dests--passate .mep-e-dest__title { font-size: 20px !important; }
  .mep-e-dests--passate .mep-e-dest__area { font-size: 11px; }
  .mep-e-dests--passate .mep-e-dest__anni { font-size: 11px; padding: 4px 8px; }
}

/* viaggio privato */
.mep-e-badge--privato { display: inline-flex; align-items: center; gap: 5px; background: #fff; color: var(--mep-navy); }
.mep-e-badge--mini.mep-e-badge--privato { background: var(--mep-soft); }
.mep-e-badge--mini { display: flex; width: max-content; margin-top: 6px; font-size: 11px; padding: 4px 8px; }

/* scheda viaggio su misura */
.mep-e-badge--misura { background: var(--mep-blu); color: #fff; }

/* filtri: azzera */
.mep-e-none { text-align: center; }
.mep-e-none p { margin: 0 0 12px; }
.mep-e-none .mep-e-reset { border: 0; cursor: pointer; margin-right: 6px; }
.mep-e-reset--link { background: none !important; border: 0 !important; padding: 0 !important; color: var(--mep-magenta) !important; font-weight: 700; font-size: 13px; text-decoration: underline; cursor: pointer; }
.mep-e-reset[hidden] { display: none !important; }

/* bandierina del paese: in alto a destra sulla foto */
.mep-e-flag { position: absolute !important; top: 16px; right: 16px; left: auto !important; bottom: auto !important; inset: 16px 16px auto auto; z-index: 2; display: block; width: 30px !important; height: 22px !important; max-width: none; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 4px 12px rgba(0, 0, 0, .25); transform: none !important; }
.mep-e-griglia--compatto .mep-e-flag { top: 10px; right: 10px; inset: 10px 10px auto auto; width: 26px !important; height: 19px !important; }
.mep-e-card__img { position: relative; }
.mep-e-badges { right: 60px !important; }
/* l'area (Europa, Asia…) non compare più sulle schede: c'è la bandierina; resta solo nei filtri */
.mep-e-card__area, .mep-e-dest__area { display: none !important; }
