/* =========================================================
   MAPPAGO DESIGN SYSTEM 2.0
   Fondazione globale mobile-first e utility-first.
   Le classi legacy restano compatibili; i nuovi componenti
   usano prefisso mp- per applicazione progressiva.
========================================================= */

:root {
    --mp-font-ui: "Plus Jakarta Sans", Inter, Arial, sans-serif;
    --mp-font-premium: "Cormorant Garamond", Georgia, serif;

    --mp-ink: #10202B;
    --mp-muted: #667075;
    --mp-bg: #F7F4EE;
    --mp-surface: #FFFFFF;
    --mp-surface-soft: #F1ECE3;
    --mp-line: rgba(16, 32, 43, .12);
    --mp-dark: #081621;
    --mp-gold: #C8AA64;
    --mp-action: #0F6B4F;
    --mp-action-dark: #084936;
    --mp-whatsapp: #25D366;
    --mp-danger: #B42318;
    --mp-warning: #B7791F;
    --mp-success: #0F6B4F;

    --mp-space-1: 4px;
    --mp-space-2: 8px;
    --mp-space-3: 12px;
    --mp-space-4: 16px;
    --mp-space-5: 20px;
    --mp-space-6: 24px;
    --mp-space-8: 32px;
    --mp-space-10: 40px;
    --mp-space-12: 48px;
    --mp-space-16: 64px;

    --mp-radius-xs: 6px;
    --mp-radius-sm: 8px;
    --mp-radius-md: 12px;
    --mp-radius-lg: 16px;
    --mp-radius-xl: 24px;
    --mp-radius-pill: 999px;

    --mp-shadow-sm: 0 8px 24px rgba(16, 32, 43, .08);
    --mp-shadow-md: 0 18px 46px rgba(16, 32, 43, .12);
    --mp-shadow-soft: 0 1px 0 rgba(16, 32, 43, .08), 0 12px 30px rgba(16, 32, 43, .08);

    --mp-container: 1180px;
    --mp-container-detail: 1080px;
    --mp-header-height: 64px;
    --mp-bottom-action-height: 76px;

    --mp-z-header: 9999;
    --mp-z-bottom-action: 9990;
    --mp-z-modal: 10000;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

a {
    color: inherit;
}

img, svg, video {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: rgba(15, 107, 79, .14);
}

button,
[role="button"],
input,
select,
textarea,
a.mp-btn,
.mp-touch-target {
    min-height: 48px;
}

.mp-page-with-bottom-action {
    padding-bottom: calc(var(--mp-bottom-action-height) + env(safe-area-inset-bottom) + var(--mp-space-5));
}

.mp-container,
.container {
    width: min(100% - 32px, var(--mp-container));
    margin-inline: auto;
}

.mp-container--detail {
    width: min(100% - 32px, var(--mp-container-detail));
    margin-inline: auto;
}

.mp-section {
    padding-block: var(--mp-space-8);
}

.mp-section--tight {
    padding-block: var(--mp-space-5);
}

.mp-section-title {
    margin: 0 0 var(--mp-space-4);
    color: var(--mp-ink);
    font-family: var(--mp-font-ui);
    font-size: clamp(20px, 5vw, 28px);
    line-height: 1.15;
    letter-spacing: 0;
}

.mp-section-kicker {
    margin: 0 0 var(--mp-space-2);
    color: var(--mp-muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.mp-btn,
.btn-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--mp-space-2);
    min-height: 48px;
    padding: 0 var(--mp-space-5);
    border: 1px solid transparent;
    border-radius: var(--mp-radius-md);
    font-family: var(--mp-font-ui);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.mp-btn:active,
.btn-view:active {
    transform: translateY(1px);
}

.mp-btn--primary {
    background: var(--mp-action);
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 107, 79, .18);
}

.mp-btn--primary:hover {
    background: var(--mp-action-dark);
}

.mp-btn--secondary {
    background: var(--mp-surface);
    color: var(--mp-ink);
    border-color: var(--mp-line);
}

.mp-btn--secondary:hover {
    border-color: rgba(16, 32, 43, .24);
    box-shadow: var(--mp-shadow-sm);
}

.mp-btn--ghost {
    min-height: 40px;
    padding-inline: 0;
    background: transparent;
    color: var(--mp-ink);
    border-color: transparent;
    box-shadow: none;
}

.mp-btn--whatsapp {
    background: var(--mp-whatsapp);
    color: #062C1D;
}

.mp-chip,
.mp-info-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius-pill);
    background: rgba(255, 255, 255, .78);
    color: var(--mp-ink);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.1;
    white-space: nowrap;
}

.mp-chip--success { color: var(--mp-success); background: rgba(15, 107, 79, .08); }
.mp-chip--warning { color: var(--mp-warning); background: rgba(183, 121, 31, .09); }
.mp-chip--danger { color: var(--mp-danger); background: rgba(180, 35, 24, .08); }
.mp-chip--premium { color: #6B541F; background: rgba(200, 170, 100, .16); border-color: rgba(200, 170, 100, .32); }

.mp-compact-card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: var(--mp-space-3);
    min-height: 124px;
    padding: var(--mp-space-3);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius-md);
    background: var(--mp-surface);
    color: var(--mp-ink);
    text-decoration: none;
    box-shadow: var(--mp-shadow-sm);
}

.mp-compact-card__media {
    min-height: 100px;
    border-radius: var(--mp-radius-sm);
    overflow: hidden;
    background: var(--mp-surface-soft);
}

.mp-compact-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mp-compact-card__body {
    min-width: 0;
    display: grid;
    gap: 7px;
    align-content: start;
}

.mp-compact-card__title {
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 850;
}

.mp-compact-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mp-compact-card__text {
    margin: 0;
    color: var(--mp-muted);
    font-size: 13px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mp-operational-hero {
    position: relative;
    min-height: 48svh;
    display: grid;
    align-items: end;
    overflow: hidden;
    background: var(--mp-dark);
    color: #fff;
}

.mp-operational-hero__media {
    position: absolute;
    inset: 0;
}

.mp-operational-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mp-operational-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 22, 33, .12), rgba(8, 22, 33, .78));
}

.mp-operational-hero__content {
    position: relative;
    z-index: 1;
    width: min(100% - 32px, var(--mp-container-detail));
    margin-inline: auto;
    padding: calc(var(--mp-header-height) + var(--mp-space-6)) 0 var(--mp-space-6);
}

.mp-operational-hero h1 {
    max-width: 760px;
    margin: 0;
    font-family: var(--mp-font-ui);
    font-size: clamp(28px, 9vw, 48px);
    line-height: 1.05;
    letter-spacing: 0;
}

.mp-operational-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: var(--mp-space-3);
}

.mp-quick-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--mp-space-3);
}

.mp-quick-fact {
    min-width: 0;
    padding: var(--mp-space-3);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius-md);
    background: var(--mp-surface);
}

.mp-quick-fact span {
    display: block;
    margin-bottom: 4px;
    color: var(--mp-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.mp-quick-fact strong {
    display: block;
    color: var(--mp-ink);
    font-size: 15px;
    line-height: 1.2;
}

.mp-bottom-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--mp-z-bottom-action);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--mp-space-2);
    padding: var(--mp-space-2) var(--mp-space-3) calc(var(--mp-space-2) + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid var(--mp-line);
    box-shadow: 0 -12px 32px rgba(16, 32, 43, .12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.mp-bottom-action-bar .mp-btn {
    min-width: 0;
    min-height: 52px;
    padding-inline: var(--mp-space-2);
    border-radius: var(--mp-radius-md);
    font-size: 13px;
}

.mp-fallback-image {
    display: grid;
    place-items: center;
    min-height: 160px;
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius-md);
    background:
        linear-gradient(135deg, rgba(200, 170, 100, .14), transparent),
        var(--mp-surface-soft);
    color: var(--mp-muted);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.mp-empty-state {
    padding: var(--mp-space-6);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius-lg);
    background: var(--mp-surface);
    color: var(--mp-ink);
    text-align: center;
    box-shadow: var(--mp-shadow-sm);
}

.mp-empty-state h2,
.mp-empty-state h3 {
    margin: 0 0 var(--mp-space-2);
    font-size: 22px;
    line-height: 1.15;
}

.mp-empty-state p {
    max-width: 34rem;
    margin: 0 auto var(--mp-space-4);
    color: var(--mp-muted);
    font-size: 15px;
    line-height: 1.5;
}

.mp-review-summary {
    display: grid;
    gap: var(--mp-space-3);
    padding: var(--mp-space-4);
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius-md);
    background: var(--mp-surface);
    box-shadow: var(--mp-shadow-sm);
}

.mp-review-summary__score {
    display: flex;
    align-items: baseline;
    gap: var(--mp-space-2);
    color: var(--mp-ink);
}

.mp-review-summary__score strong {
    font-size: 28px;
    line-height: 1;
}

.mp-review-summary__score span {
    color: var(--mp-muted);
    font-size: 13px;
    font-weight: 700;
}

@media (min-width: 680px) {
    .mp-section {
        padding-block: var(--mp-space-12);
    }

    .mp-quick-facts {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .mp-compact-card {
        grid-template-columns: 156px minmax(0, 1fr);
    }
}

@media (min-width: 960px) {
    .mp-bottom-action-bar {
        display: none;
    }

    .mp-operational-hero {
        min-height: 460px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* RESET BASE */
body, html {
    margin: 0;
    padding: 0;
    font-family: var(--mp-font-ui);
    color: var(--mp-ink);
    background: var(--mp-bg);
}

/* HEADER GENERALE */
.site-header {
    background: var(--mp-dark);
    color: #fff;
    padding: 15px;
    text-align: center;
}

/* LOGO CENTRATO */
.site-header .logo-centered img {
    height: 60px;
    margin-bottom: 10px;
}

/* RIGA LINGUE + PULSANTI */
.site-header .header-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* ===== LINGUE (HEADER) ===== */
.site-header .language-switcher {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}
.site-header .language-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border-radius: 6px;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.site-header .language-switcher a img {
    height: 24px;           /* più grande */
    width: auto;
    filter: none;            /* niente grigio */
    opacity: 1;
}
.site-header .language-switcher a:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.site-header .language-switcher a.active {
    box-shadow: 0 0 0 2px #fff inset; /* anello attivo */
    border-radius: 6px;
}

/* NAVIGAZIONE */
.site-header .header-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.site-header .header-nav a {
    color: #fff;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 1em;
    transition: background 0.3s;
}
.site-header .header-nav a:hover {
    background: rgba(255,255,255,0.2);
}

/* MAIN */
main { padding: 20px; }

/* FOOTER */
footer {
    background: var(--mp-dark);
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 15px;
    text-align: center;
}
footer img { height: 30px; margin-right: 10px; }

/* CARD LIST */
.card-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* CARD STILE */
.card {
    background: var(--mp-surface);
    border-radius: var(--mp-radius-sm);
    box-shadow: var(--mp-shadow-sm);
    padding: 20px;
    box-sizing: border-box;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--mp-shadow-md);
}

/* IMMAGINI CARD */
.card img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 15px;
    border-radius: 6px;
}

/* TITOLI E TESTO */
.card h1, .card h2 {
    margin: 0 0 15px;
    color: var(--mp-ink);
    text-align: center;
}
.card h1 { font-size: 1.8em; }
.card h2 { font-size: 1.6em; }
.card p  { font-size: 1.3em; margin: 0 0 12px; color: var(--mp-muted); }

/* PULSANTE */
.card .btn-view {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 16px;
    background: var(--mp-action);
    color: #fff;
    text-decoration: none;
    border-radius: var(--mp-radius-md);
    font-size: 1em;
    transition: background 0.3s;
}
.card .btn-view:hover { background: var(--mp-action-dark); }

/* LISTA RESPONSIVE */
@media (min-width:600px) {
    .card-list { flex-direction: row; flex-wrap: wrap; }
    .card { width: calc(50% - 20px); margin-right: 20px; }
}

/* CONTAINER GENERICO */
.container {
  max-width: var(--mp-container);
  margin: 0 auto;
  padding: 20px;
}

/* ===== Sezione bandiere in pagina dettaglio (.lang-flags) ===== */
.lang-flags{
  display:flex;
  gap:10px;
  justify-content:center;
  margin:10px 0 20px;
}
.lang-flags a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:2px;
  border-radius:6px;
  transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.lang-flags a img{
  height:24px;
  width:auto;
  filter:none;
  opacity:1;
}
.lang-flags a:hover{
  transform:translateY(-1px);
  box-shadow:0 2px 6px rgba(0,0,0,.18);
}
.lang-flags a.active{
  box-shadow:0 0 0 2px #333 inset;
  border-radius:6px;
}

/* MOBILE */
@media (max-width: 700px) {
    .site-header .header-row { flex-direction: column; align-items: center; }
    .site-header .header-nav { justify-content: center; }

    .card h1 { font-size: 1.8em; text-align: center; }
    .card h2 { font-size: 1.8em; text-align: center; }
    .card p  { font-size: 1.2em; }
    .card .btn-view { font-size: 1.2em; }

    .fav-button {
        background: #eee;
        border: 1px solid #ccc;
        padding: 8px 12px;
        font-size: 1em;
        cursor: pointer;
        border-radius: 4px;
    }
    .fav-button.active {
        background: #ffcc00;
        border-color: #e6b800;
        color: #333;
    }

    /* Bandiere più grandi su mobile */
    .site-header .language-switcher { gap: 24px; margin-bottom: 12px; }
    .site-header .language-switcher a img { height: 28px; }

    .lang-flags a img { height: 28px; }
}
.form-beauty {
  max-width: 700px;
  margin: 0 auto;
}
.form-beauty fieldset {
  border: 1px solid #ddd;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 8px;
}
.form-beauty legend {
  font-weight: bold;
  padding: 0 8px;
}
.form-row, .form-row-two {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
.form-row label, .form-row-two label {
  flex: 0 0 120px;
  align-self: center;
}
.form-row-two > div {
  flex: 1;
}
.form-row input, .form-row textarea, .form-row-two input, .form-row-two textarea {
  flex: 1;
  padding: 8px;
}
.form-actions {
  text-align: center;
  margin-top: 30px;
}
.form-actions button {
  padding: 12px 24px;
  background: #28a745;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1.05rem;
  cursor: pointer;
}
.form-actions button:hover {
  background: #218838;
}

