/* ============================================
   METROPLAN — template.css
   ============================================ */

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

:root {
    --mp-black:       #0a0a0a;
    --mp-white:       #ffffff;
    --mp-gray:        #888888;
    --mp-light:       #f0f0f0;
    --mp-border:      1px solid #0a0a0a;
    --mp-border-soft: 0.5px solid #d0d0d0;
    --font-cond:      'Barlow Condensed', sans-serif;
    --font-body:      'Barlow', sans-serif;
    --header-h:       90px;
    --cat-h:          48px;
}

html { font-size: 18px; scroll-behavior: smooth; }

body.mp-body {
    background: var(--mp-white);
    color: var(--mp-black);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }

/* ── HEADER ─────────────────────────────────── */
.mp-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    border-bottom: none;
}

/* Trasparente: com_content (home + blog categorie) */
.mp-header--transparent {
    background: transparent;
    border-bottom: none;
}

/* Solid: com_tags, pagine statiche — sfondo bianco, testo nero */
.mp-header--solid {
    background: var(--mp-white);
    border-bottom: var(--mp-border-soft);
}
.mp-header--solid .mp-logo-main,
.mp-header--solid .mp-logo-abbr,
.mp-header--solid .mp-logo-sub       { color: var(--mp-black); }
.mp-header--solid .mp-cat            { color: rgba(0,0,0,0.5); }
.mp-header--solid .mp-cat:hover      { color: var(--mp-black); border-bottom-color: rgba(0,0,0,0.4); }
.mp-header--solid .mp-cat.active     { color: var(--mp-black); background: #f5e642; }
.mp-header--solid .mp-sep            { color: rgba(0,0,0,0.2); }

.mp-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    height: var(--header-h);
}

/* ── LOGO ───────────────────────────────────── */
.mp-logo a {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    text-decoration: none;
}
.mp-logo-main,
.mp-logo-abbr {
    font-family: var(--font-cond);
    font-weight: 900;
    font-size: 42px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1;
}
.mp-logo-sub {
    font-family: var(--font-cond);
    font-weight: 200;
    font-size: 22px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1;
}

/* ── CATEGORIE ──────────────────────────────── */
.mp-categories {
    border-top: none;
    padding: 0 40px;
    height: var(--cat-h);
    display: flex;
    align-items: center;
}
.mp-categories-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mp-cat {
    font-family: var(--font-cond);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s;
    text-decoration: none;
    padding: 2px 0;
    border-bottom: 1.5px solid transparent;
}
.mp-cat:hover {
    color: #fff;
    border-bottom: 1.5px solid rgba(255,255,255,0.6);
    text-decoration: none;
}
.mp-cat.active {
    color: var(--mp-black);
    background: #f5e642;
    border-bottom: none;
    padding: 2px 6px;
    text-decoration: none;
}
.mp-sep {
    font-size: 14px;
    color: rgba(255,255,255,0.3);
    font-weight: 200;
    flex-shrink: 0;
    padding: 0 2px;
    user-select: none;
}

/* ── MAIN ───────────────────────────────────── */
/* Il contenuto parte sempre da top:0 — l'header fixed galleggia sopra */
.mp-main {
    margin: 0;
    padding: 0;
}
/* com_content: blog portfolio + griglia categorie — scorre sotto header trasparente */
.mp-main--portfolio {
    min-height: 0;
    padding: 0;
}
/* com_tags: griglia tag — header solid, inizia sotto l'header */
.mp-main--grid {
    padding-top: calc(var(--header-h) + var(--cat-h));
}
/* Contatti: header solid, nessun padding extra — la mappa riempie l'altezza */
.mp-main--contatti {
    padding-top: calc(var(--header-h) + var(--cat-h));
    display: flex;
    flex-direction: column;
}

/* ── FOOTER ─────────────────────────────────── */
.mp-footer {
    border-top: var(--mp-border);
    padding: 20px 40px;
}
.mp-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mp-footer-left,
.mp-footer-right {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #aaa;
    font-weight: 300;
}
.mp-footer-right a { color: #aaa; }
.mp-footer-right a:hover { color: var(--mp-black); }

/* ── SYSTEM MESSAGES ────────────────────────── */
#system-message-container { padding: 0; margin: 0; }
.mp-main--portfolio #system-message-container { display: none; }
.alert {
    padding: 14px 18px;
    margin-bottom: 14px;
    border-left: 3px solid var(--mp-black);
    font-size: 15px;
}
.alert-error   { border-color: #c00; }
.alert-warning { border-color: #e07000; }
.alert-info    { border-color: #0066cc; }

/* ── PORTFOLIO LIST ─────────────────────────── */

.portfolio-list {
    display: block;
    margin: 0;
    padding: 0;
    /* spazio in fondo alla lista */
    padding-bottom: 6vh;
}

/* Spazio tra i progetti: lo spazio del testo sotto l'immagine è già sufficiente */
.portfolio-item + .portfolio-item {
    margin-top: 0;
}

.portfolio-item {
    position: relative;
    display: block;
    width: 100%;
}

.portfolio-item__media {
    position: relative;
    display: block;
    width: 100%;
    height: 75vh;
    min-height: 375px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #111;
    overflow: hidden;
}

.portfolio-item__link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

.portfolio-item__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 30%,
        rgba(0, 0, 0, 0.72) 100%
    );
    transition: background 0.4s ease;
}
.portfolio-item__link:hover .portfolio-item__overlay {
    background: linear-gradient(
        to bottom,
        transparent 10%,
        rgba(0, 0, 0, 0.85) 100%
    );
}

.portfolio-item__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 3rem;
    color: #fff;
    z-index: 2;
    overflow: hidden;
}

.portfolio-item__category {
    display: block;
    font-family: var(--font-body);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 0.6rem;
}

/* Il wrapper h2 ha altezza fissa per non saltare durante la scala */
.portfolio-item__title {
    font-family: var(--font-cond);
    font-size: clamp(1.75rem, 3.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    margin: 0 0 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    /* altezza fissa = evita layout shift quando il testo è grande */
    height: 1.1em;
    display: flex;
    align-items: flex-end;
    overflow: visible;
}

/* Lo span interno è quello che JS scala e muove */
.portfolio-item__title-inner {
    display: inline-block;
    transform-origin: left bottom;
    will-change: transform, opacity;
    /* stato iniziale: invisibile e grande — JS lo porta a 1 */
    opacity: 0;
    transform: scale(1.7) translateY(-60px);
    white-space: nowrap;
}

.portfolio-item__meta {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.55;
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

/* ── Testo articolo sotto l'immagine ─────────── */
.portfolio-item__text {
    width: 100%;
    padding: 2.5rem 3rem;
    background: var(--mp-white);
}

.portfolio-item__text p {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
    color: #222;
    margin-bottom: 1.2em;
}
.portfolio-item__text p:last-child { margin-bottom: 0; }

.portfolio-item__text h2,
.portfolio-item__text h3 {
    font-family: var(--font-cond);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 1.5em 0 0.5em;
    color: var(--mp-black);
}
.portfolio-item__text h2 { font-size: 1.4rem; }
.portfolio-item__text h3 { font-size: 1.1rem; }

/* ── Accessibilità: no-motion ────────────────── */
@media (prefers-reduced-motion: reduce) {
    .portfolio-item__title-inner {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 1100px) {
    .mp-logo-main { font-size: 32px; }
    .mp-logo-sub  { font-size: 17px; }
    .mp-cat       { font-size: 12px; }
}

@media (max-width: 900px) {
    .mp-header-inner { padding: 0 20px; }
    .mp-categories   { padding: 0 20px; overflow-x: auto; }
    .mp-categories-inner { justify-content: flex-start; gap: 4px; }


    .mp-logo-main { font-size: 26px; }
    .mp-logo-sub  { font-size: 13px; }

    .portfolio-item__media {
        height: 75svh;
        min-height: 315px;
    }
    .portfolio-item__content { padding: 1.5rem 1.25rem; }
    .portfolio-item__text    { padding: 1.5rem 1.25rem; }
    .portfolio-list { padding-bottom: 4vh; }

    .mp-footer { padding: 18px 20px; }
    .mp-footer-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (max-width: 600px) {
    .mp-logo-sub { display: none; }

    .portfolio-item__media {
        height: 56svh;
        min-height: 270px;
    }
    .portfolio-item__title {
        font-size: clamp(1.5rem, 7vw, 2.2rem);
        height: auto;
        overflow: visible;
    }
    /* Su mobile niente animazione: CSS forza visibilità */
    .portfolio-item__title-inner {
        opacity: 1 !important;
        transform: none !important;
        white-space: normal;
    }
    .portfolio-list { padding-bottom: 3vw; }
}

/* ── SINGOLO PROGETTO — HERO ───────────────────────────── */

.proj-hero {
    position: relative;
    width: 100%;
    height: 65vh;
    min-height: 360px;
    max-height: 700px;
    background-size: cover;
    background-position: center;
    background-color: #111;
    overflow: hidden;
}

.proj-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 20%,
        rgba(0, 0, 0, 0.72) 100%
    );
}

.proj-hero__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 3.5rem;
    color: #fff;
    z-index: 2;
}

.proj-hero__cats {
    display: none;
}

.proj-hero__cat {
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.65;
}

.proj-hero__sep {
    margin: 0 0.4rem;
    opacity: 0.35;
    font-size: 0.68rem;
}

.proj-hero__title {
    font-family: var(--font-cond);
    font-size: clamp(1.6rem, 3vw, 3rem);
    font-weight: 900;
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0;
}

.proj-hero__meta {
    display: none;
}

.proj-hero__zoom {
    position: absolute;
    bottom: 2rem;
    right: 3.5rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    transition: background 0.2s;
}
.proj-hero__zoom:hover { background: rgba(255,255,255,0.25); }

/* ── DATI PROGETTO — barra orizzontale ─────────────────── */

.proj-data-bar {
    border-bottom: var(--mp-border-soft);
    background: var(--mp-white);
}

.proj-data-bar__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
}

.proj-data-bar__item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 2rem 2.5rem;
    border-right: var(--mp-border-soft);
    min-width: 140px;
}

.proj-data-bar__item:last-child {
    border-right: none;
}

.proj-data-bar__item--wide {
    flex: 1;
    min-width: 200px;
}

.proj-data-bar__item--desc {
    flex: 2;
    min-width: 280px;
    border-right: none;
}

.proj-data-bar__label {
    font-family: var(--font-body);
    font-size: 0.56rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #aaa;
}

.proj-data-bar__value {
    font-family: var(--font-cond);
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--mp-black);
    line-height: 1.3;
}

.proj-data-bar__value--desc {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 300;
    text-transform: none;
    letter-spacing: 0;
    color: #444;
    line-height: 1.7;
}

.proj-data-bar__activities {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.proj-data-bar__activities li {
    font-family: var(--font-cond);
    font-size: 0.82rem;
    font-weight: 300;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #333;
    padding-left: 0.8rem;
    position: relative;
    line-height: 1.4;
}

.proj-data-bar__activities li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: #ccc;
    font-size: 0.65rem;
    top: 0.1em;
}

/* ── Griglia mosaico ───────────────────────────────────── */

.proj-mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background: var(--mp-white);
}

.proj-cell {
    position: relative;
    overflow: hidden;
    background: var(--mp-white);
    aspect-ratio: 3 / 2;
}

.proj-cell--wide {
    grid-column: span 2;
    aspect-ratio: 16 / 7;
}

.proj-cell--normal {
    grid-column: span 1;
}

.proj-cell--empty {
    grid-column: span 3;
    background: var(--mp-white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-family: var(--font-cond);
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    aspect-ratio: unset;
    min-height: 260px;
}

/* Bottone wrapper immagine */
.proj-cell__btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: zoom-in;
}

.proj-cell img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.4s ease;
    filter: brightness(0.92);
    pointer-events: none;
}

.proj-cell__btn:hover img {
    transform: scale(1.03);
    filter: brightness(1);
}

/* ── Testo articolo (fuori dalla griglia) ──────────────── */

.proj-body {
    border-top: var(--mp-border-soft);
}

.proj-body__inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 5rem 2rem 6rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
    color: #222;
}

.proj-body__inner p            { margin-bottom: 1.2em; }
.proj-body__inner p:last-child { margin-bottom: 0; }
.proj-body__inner h2,
.proj-body__inner h3 {
    font-family: var(--font-cond);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 2em 0 0.6em;
}
.proj-body__inner h2 { font-size: 1.4rem; }
.proj-body__inner h3 { font-size: 1.1rem; }

/* ── Lightbox ──────────────────────────────────────────── */

.mp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-lightbox[hidden] { display: none; }

.mp-lightbox__stage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
}

.mp-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
}

.mp-lightbox__close,
.mp-lightbox__prev,
.mp-lightbox__next {
    position: fixed;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    font-family: var(--font-cond);
    transition: color 0.15s;
    z-index: 1001;
    line-height: 1;
}

.mp-lightbox__close:hover,
.mp-lightbox__prev:hover,
.mp-lightbox__next:hover { color: var(--mp-white); }

.mp-lightbox__close {
    top: 24px;
    right: 32px;
    font-size: 2.2rem;
    font-weight: 300;
}

.mp-lightbox__prev,
.mp-lightbox__next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    font-weight: 300;
    padding: 16px;
}

.mp-lightbox__prev { left: 16px; }
.mp-lightbox__next { right: 16px; }

.mp-lightbox__counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-cond);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.4);
    user-select: none;
}

/* ── Responsive progetto ────────────────────────────────── */

@media (max-width: 900px) {
    .proj-hero { height: 55vh; min-height: 300px; max-height: 500px; }
    .proj-hero__content { padding: 1.5rem 1.5rem; }
    .proj-hero__zoom    { bottom: 1.5rem; right: 1.5rem; }

    .proj-data-bar__inner { flex-direction: column; }
    .proj-data-bar__item  { border-right: none; border-bottom: var(--mp-border-soft); }
    .proj-data-bar__item:last-child { border-bottom: none; }

    .proj-mosaic { grid-template-columns: repeat(2, 1fr); gap: 2px; }
    .proj-cell--wide   { grid-column: span 2; aspect-ratio: 16 / 7; }
    .proj-cell--normal { grid-column: span 1; aspect-ratio: 3 / 2; }
}

@media (max-width: 600px) {
    .proj-hero { height: 50vh; min-height: 260px; max-height: 400px; }
    .proj-hero__title { font-size: clamp(1.4rem, 6vw, 2.2rem); }

    .proj-data-bar__item { padding: 1.2rem 1.5rem; }

    .proj-mosaic { grid-template-columns: repeat(2, 1fr); gap: 2px; }
    .proj-cell--wide   { grid-column: span 2; aspect-ratio: 16 / 7; }
    .proj-cell--normal { grid-column: span 1; aspect-ratio: 3 / 2; }

    .mp-lightbox__stage { padding: 60px 40px; }
    .mp-lightbox__prev  { left: 4px; }
    .mp-lightbox__next  { right: 4px; }
}


/* ============================================
   METROPLAN — Griglia Progetti (4 colonne)
   Appendere in fondo a template.css
   ============================================ */

/* --- Intestazione categoria --- */
.mp-grid-header {
    padding: 14px 16px 12px;
}

.mp-grid-breadcrumb {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mp-black);
    line-height: 1;
}

.mp-grid-sep {
    color: #ccc;
    margin: 0 8px;
    font-weight: 200;
}

/* --- Griglia 4 colonne --- */
.mp-project-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

/* --- Singola card --- */
.mp-grid-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    border-right: var(--mp-border-soft);
    border-bottom: var(--mp-border-soft);
    background: #111;
}

.mp-grid-card:nth-child(4n) {
    border-right: none;
}

.mp-grid-card__link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

/* --- Immagine --- */
.mp-grid-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.72);
    transition: transform 0.45s ease, filter 0.3s ease;
    position: absolute;
    inset: 0;
}

.mp-grid-card__img--empty {
    position: absolute;
    inset: 0;
    background: #222;
}

.mp-grid-card__link:hover .mp-grid-card__img {
    transform: scale(1.05);
    filter: brightness(0.5);
}

/* --- Testo sovrapposto --- */
.mp-grid-card__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Rif. — bold condensed grande */
.mp-grid-card__rif {
    font-family: var(--font-cond);
    font-weight: 700;
    font-size: 1.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1;
}

/* Progetto — leggero sotto */
.mp-grid-card__title {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.5rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.2;
}

/* --- Paginazione --- */
.mp-pagination {
    padding: 24px 40px;
    border-top: var(--mp-border-soft);
    display: flex;
    justify-content: center;
    gap: 4px;
}

.mp-pagination a,
.mp-pagination span {
    font-family: var(--font-cond);
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 12px;
    border: var(--mp-border-soft);
    color: var(--mp-black);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.mp-pagination a:hover {
    background: var(--mp-black);
    color: var(--mp-white);
    text-decoration: none;
}

.mp-pagination .active span,
.mp-pagination .current {
    background: var(--mp-black);
    color: var(--mp-white);
}

/* --- Responsive --- */
@media (max-width: 1200px) {
    .mp-project-grid { grid-template-columns: repeat(3, 1fr); }
    .mp-grid-card:nth-child(4n) { border-right: var(--mp-border-soft); }
    .mp-grid-card:nth-child(3n) { border-right: none; }
}

@media (max-width: 800px) {
    .mp-project-grid { grid-template-columns: repeat(2, 1fr); }
    .mp-grid-card:nth-child(3n) { border-right: var(--mp-border-soft); }
    .mp-grid-card:nth-child(2n) { border-right: none; }
    .mp-grid-card__rif   { font-size: 1.4rem; }
    .mp-grid-card__title { font-size: 1.1rem; }
}

@media (max-width: 500px) {
    .mp-project-grid { grid-template-columns: 1fr; }
    .mp-grid-card { border-right: none; }
    .mp-grid-card__rif   { font-size: 1.2rem; }
    .mp-grid-card__title { font-size: 1rem; }
}
/* ── Link esterno — data bar progetto ───────────────────── */
.proj-data-bar__item--link { align-self: center; min-width: 160px; }
.proj-data-bar__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-cond);
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mp-black);
    text-decoration: none;
    border-bottom: 1px solid var(--mp-black);
    padding-bottom: 1px;
    transition: opacity 0.15s;
    line-height: 1.3;
}
.proj-data-bar__link:hover { opacity: 0.55; text-decoration: none; }
.proj-data-bar__link-icon  { flex-shrink: 0; opacity: 0.6; position: relative; top: -1px; }

/* ============================================
   MENU STUDIO — trigger + overlay
   ============================================ */

/* ── Wrapper destra header ───────────────────── */
.mp-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ── Trigger: pallino con cerchi concentrici ─── */
.mp-studio-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 102;
}

.mp-studio-toggle svg {
    display: block;
    overflow: visible;
}

/* Dot centrale */
.mp-toggle-dot {
    fill: #fff;
    transition: fill 0.25s ease;
}

/* Anelli */
.mp-toggle-ring {
    fill: none;
    transition: stroke 0.25s ease;
}
.mp-toggle-ring--outer { stroke: rgba(255, 255, 255, 0.30); }
.mp-toggle-ring--inner { stroke: rgba(255, 255, 255, 0.55); }

/* Hover: diventa giallo */
.mp-studio-toggle:hover .mp-toggle-dot          { fill: #f5e642; }
.mp-studio-toggle:hover .mp-toggle-ring--inner  { stroke: rgba(245, 230, 66, 0.7); }
.mp-studio-toggle:hover .mp-toggle-ring--outer  { stroke: rgba(245, 230, 66, 0.3); }

/* Stato overlay aperto: adatta colori a sfondo bianco */
.mp-studio-toggle.is-open .mp-toggle-dot         { fill: #0a0a0a; }
.mp-studio-toggle.is-open .mp-toggle-ring--inner { stroke: rgba(10, 10, 10, 0.45); }
.mp-studio-toggle.is-open .mp-toggle-ring--outer { stroke: rgba(10, 10, 10, 0.18); }

/* Su header solid il toggle è già scuro di default */
/* Su header bianco il pallino diventa nero */
.mp-header--solid .mp-toggle-dot         { fill: #0a0a0a; }
.mp-header--solid .mp-toggle-ring--inner { stroke: rgba(10, 10, 10, 0.45); }
.mp-header--solid .mp-toggle-ring--outer { stroke: rgba(10, 10, 10, 0.18); }

.mp-header--solid .mp-studio-toggle:hover .mp-toggle-dot         { fill: #f5e642; }
.mp-header--solid .mp-studio-toggle:hover .mp-toggle-ring--inner { stroke: rgba(245, 230, 66, 0.9); }
.mp-header--solid .mp-studio-toggle:hover .mp-toggle-ring--outer { stroke: rgba(245, 230, 66, 0.4); }

/* Blocca scroll quando overlay è aperto */
body.mp-overlay-open { overflow: hidden; }

/* ── Overlay fullscreen ──────────────────────── */
.mp-studio-overlay {
    position: fixed;
    inset: 0;
    z-index: 101;
    background: #fff;
    display: flex;
    flex-direction: column;

    /* Partenza: cerchio a raggio zero centrato sul trigger (alto-destra) */
    clip-path: circle(0% at calc(100% - 52px) 52px);
    transition: clip-path 0.65s cubic-bezier(0.77, 0, 0.175, 1);
    pointer-events: none;
}

.mp-studio-overlay.is-open {
    clip-path: circle(170% at calc(100% - 52px) 52px);
    pointer-events: all;
}

/* ── X chiudi ────────────────────────────────── */
.mp-studio-overlay__close {
    position: absolute;
    top: 28px;
    right: 36px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-cond);
    font-size: 2.4rem;
    font-weight: 200;
    line-height: 1;
    color: #0a0a0a;
    padding: 8px;
    opacity: 0;
    transition: opacity 0.2s ease 0.35s, color 0.15s;
    z-index: 103;
}

.mp-studio-overlay.is-open .mp-studio-overlay__close {
    opacity: 1;
}

.mp-studio-overlay__close:hover { color: #888; }

/* ── Contenuto centrale ──────────────────────── */
.mp-studio-overlay__inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 80px 48px;
}

/* Label "Studio" sopra la lista */
.mp-studio-overlay__label {
    font-family: var(--font-cond);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #bbb;
    margin-bottom: 40px;
}

/* ── Lista voci ──────────────────────────────── */
.mp-studio-overlay__nav {
    list-style: none;
}

.mp-studio-overlay__nav li {
    border-top: 0.5px solid #e8e8e8;
    overflow: hidden;
}

.mp-studio-overlay__nav li:last-child {
    border-bottom: 0.5px solid #e8e8e8;
}

.mp-studio-overlay__nav a {
    display: block;
    padding: 18px 0;
    font-family: var(--font-cond);
    font-weight: 900;
    font-size: clamp(2.2rem, 4.5vw, 4rem);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #0a0a0a;
    text-decoration: none;

    /* Entrata animata — stato iniziale */
    transform: translateY(70px);
    opacity: 0;
    transition:
        transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
        opacity   0.4s ease,
        padding-left 0.2s ease,
        color     0.15s ease;
}

/* Stagger per voce */
.mp-studio-overlay__nav li:nth-child(1) a { transition-delay: 0.06s; }
.mp-studio-overlay__nav li:nth-child(2) a { transition-delay: 0.11s; }
.mp-studio-overlay__nav li:nth-child(3) a { transition-delay: 0.16s; }
.mp-studio-overlay__nav li:nth-child(4) a { transition-delay: 0.21s; }
.mp-studio-overlay__nav li:nth-child(5) a { transition-delay: 0.26s; }
.mp-studio-overlay__nav li:nth-child(6) a { transition-delay: 0.31s; }
.mp-studio-overlay__nav li:nth-child(7) a { transition-delay: 0.36s; }
.mp-studio-overlay__nav li:nth-child(8) a { transition-delay: 0.41s; }

/* Stato aperto: voci entrano */
.mp-studio-overlay.is-open .mp-studio-overlay__nav a {
    transform: translateY(0);
    opacity: 1;
}

/* Hover: piccolo indent */
.mp-studio-overlay__nav a:hover {
    padding-left: 14px;
    text-decoration: none;
    color: #0a0a0a;
}

/* ── Footer overlay ──────────────────────────── */
.mp-studio-overlay__footer {
    padding: 24px 80px;
    border-top: 0.5px solid #e8e8e8;
    display: flex;
    gap: 40px;
    align-items: center;
}

.mp-studio-overlay__contact {
    font-family: var(--font-cond);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}
a.mp-studio-overlay__contact:hover { color: #0a0a0a; text-decoration: none; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
    .mp-studio-overlay__inner  { padding: 90px 40px 40px; }
    .mp-studio-overlay__footer { padding: 20px 40px; }
}

@media (max-width: 600px) {
    .mp-studio-overlay__inner  { padding: 80px 24px 32px; }
    .mp-studio-overlay__footer { padding: 18px 24px; flex-direction: column; gap: 8px; }
    .mp-studio-overlay__nav a  { font-size: clamp(1.8rem, 8vw, 2.8rem); padding: 14px 0; }
}


/* ============================================
   CHI SIAMO — griglia persone + articolo singolo
   ============================================ */

/* ── Main con padding sotto header solid ────── */
.mp-main--people {
    padding-top: calc(var(--header-h) + var(--cat-h));
}

/* ── Griglia 6 colonne, centrata ───────────────── */
.mp-people-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    padding: 48px 40px 64px;
}

/* ── Card persona ────────────────────────────── */
.mp-person-card {
    width: calc(100% / 6);
    padding: 0 12px 0 0;
}

.mp-person-card__link {
    display: block;
    text-decoration: none;
    color: var(--mp-black);
}

.mp-person-card__link:hover { text-decoration: none; }

/* Immagine verticale 2:3 */
.mp-person-card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #e8e8e8;
    margin-bottom: 14px;
}

.mp-person-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    filter: grayscale(20%);
    transition: transform 0.45s ease, filter 0.3s ease;
}

.mp-person-card__img--empty {
    position: absolute;
    inset: 0;
    background: #d0d0d0;
}

.mp-person-card__link:hover .mp-person-card__img {
    transform: scale(1.04);
    filter: grayscale(0%);
}

/* Nome sotto la foto */
.mp-person-card__info {
    padding: 0 0 4px;
}

.mp-person-card__name {
    font-family: var(--font-cond);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mp-black);
    line-height: 1.2;
    transition: opacity 0.2s;
}

.mp-person-card__link:hover .mp-person-card__name {
    opacity: 0.6;
}

/* ── Articolo singolo persona ────────────────── */
.mp-person-single {
    padding: calc(var(--header-h) + var(--cat-h) + 64px) 40px 80px;
}

.mp-person-single__inner {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 64px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}

/* Foto verticale fissa */
.mp-person-single__img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    object-position: top center;
}

.mp-person-single__img--empty {
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #d0d0d0;
    display: block;
}

/* Colonna destra */
.mp-person-single__right {
    padding-top: 8px;
}

.mp-person-single__name {
    font-family: var(--font-cond);
    font-weight: 900;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--mp-black);
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: var(--mp-border-soft);
}

.mp-person-single__bio {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.85;
    color: #333;
}

.mp-person-single__bio p            { margin-bottom: 1.1em; }
.mp-person-single__bio p:last-child { margin-bottom: 0; }

.mp-person-single__bio h2,
.mp-person-single__bio h3 {
    font-family: var(--font-cond);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 1.8em 0 0.5em;
    color: var(--mp-black);
}
.mp-person-single__bio h2 { font-size: 1.1rem; }
.mp-person-single__bio h3 { font-size: 0.95rem; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1200px) {
    .mp-person-card { width: calc(100% / 4); }
}

@media (max-width: 900px) {
    .mp-people-grid {
        padding: 32px 20px 48px;
    }
    .mp-person-card { width: calc(100% / 3); }
    .mp-person-single {
        padding: calc(var(--header-h) + var(--cat-h) + 40px) 20px 60px;
    }
    .mp-person-single__inner {
        grid-template-columns: 260px 1fr;
        gap: 40px;
    }
}

@media (max-width: 700px) {
    .mp-person-card { width: 50%; }
    .mp-person-single__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .mp-person-single__img {
        max-width: 280px;
    }
}

/* ── Frecce navigazione persona — bordi articolo, in basso ─ */

.mp-person-single {
    position: relative;
}

.mp-person-nav__arrow-btn {
    position: absolute;
    bottom: 80px;
    z-index: 10;
    background: none;
    border: none;
    color: var(--mp-black);
    font-size: 2rem;
    font-weight: 200;
    font-family: var(--font-cond);
    text-decoration: none;
    line-height: 1;
    transition: opacity 0.2s;
    opacity: 0.35;
    user-select: none;
}

.mp-person-nav__arrow-btn:hover {
    opacity: 1;
    text-decoration: none;
}

.mp-person-nav__arrow-btn--prev { left: 40px; }
.mp-person-nav__arrow-btn--next { right: 40px; }

@media (max-width: 900px) {
    .mp-person-nav__arrow-btn--prev { left: 20px; }
    .mp-person-nav__arrow-btn--next { right: 20px; }
}

@media (max-width: 700px) {
    .mp-person-nav__arrow-btn { bottom: 40px; font-size: 1.6rem; }
    .mp-person-nav__arrow-btn--prev { left: 16px; }
    .mp-person-nav__arrow-btn--next { right: 16px; }
}

/* ============================================
   LOGHI PARTNER / CLIENTI
   ============================================ */

.mp-loghi-page {
    padding-top: calc(var(--header-h) + var(--cat-h) + 64px);
    padding-bottom: 80px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
}

.mp-loghi-intro {
    margin-bottom: 56px;
    padding-bottom: 40px;
    border-bottom: var(--mp-border-soft);
}

.mp-loghi-intro__title {
    font-family: var(--font-cond);
    font-weight: 900;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--mp-black);
    margin-bottom: 1.2rem;
}

.mp-loghi-intro__text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.8;
    color: #444;
    max-width: 640px;
}

.mp-loghi-intro__text p            { margin-bottom: 1em; }
.mp-loghi-intro__text p:last-child { margin-bottom: 0; }

.mp-loghi-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.mp-loghi-grid__item {
    width: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 32px;
    border-right: var(--mp-border-soft);
    border-bottom: var(--mp-border-soft);
}

.mp-loghi-grid__item:nth-child(5n) {
    border-right: none;
}

.mp-loghi-grid__img {
    display: block;
    width: auto;
    height: 56px;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.45);
    transition: filter 0.35s ease;
}

.mp-loghi-grid__item:hover .mp-loghi-grid__img {
    filter: grayscale(0%) opacity(1);
}

.mp-loghi-empty {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 300;
    color: #aaa;
    letter-spacing: 0.08em;
    padding: 40px 0;
}

@media (max-width: 1000px) {
    .mp-loghi-grid__item { width: 25%; }
    .mp-loghi-grid__item:nth-child(5n) { border-right: var(--mp-border-soft); }
    .mp-loghi-grid__item:nth-child(4n) { border-right: none; }
}

@media (max-width: 700px) {
    .mp-loghi-grid__item { width: 33.333%; padding: 28px 20px; }
    .mp-loghi-grid__item:nth-child(4n) { border-right: var(--mp-border-soft); }
    .mp-loghi-grid__item:nth-child(3n) { border-right: none; }
    .mp-loghi-grid__img { height: 44px; }
    .mp-loghi-page { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 480px) {
    .mp-loghi-grid__item { width: 50%; padding: 24px 16px; }
    .mp-loghi-grid__item:nth-child(3n) { border-right: var(--mp-border-soft); }
    .mp-loghi-grid__item:nth-child(2n) { border-right: none; }
    .mp-loghi-grid__img { height: 38px; }
}

/* ============================================
   PAGINA CONTATTI
   ============================================ */

.mp-contatti {
    display: grid;
    grid-template-columns: 1fr 400px;
    flex: 1;
    min-height: calc(100vh - var(--header-h) - var(--cat-h));
}

/* ── Mappa (colonna sinistra) ────────────────── */
.mp-contatti__map {
    position: relative;
    overflow: hidden;
    background: #e8e8e8;
}

.mp-contatti__map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(15%) contrast(1.02);
}

/* Nasconde la scritta OpenStreetMap nell'iframe */
.mp-contatti__map::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: #e8e8e8;
    pointer-events: none;
}

/* ── Pannello (colonna destra) ───────────────── */
.mp-contatti__panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px 52px;
    border-left: var(--mp-border-soft);
    background: var(--mp-white);
}

/* ── Indirizzo ───────────────────────────────── */
.mp-contatti__address {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: var(--mp-border-soft);
}

.mp-contatti__address-line {
    font-family: var(--font-cond);
    font-size: clamp(1.4rem, 2vw, 1.9rem);
    font-weight: 700;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--mp-black);
}

.mp-contatti__address-line--light {
    font-weight: 300;
    color: #666;
}

/* ── Link ────────────────────────────────────── */
.mp-contatti__links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mp-contatti__link-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.mp-contatti__link-label {
    font-family: var(--font-cond);
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #bbb;
    width: 48px;
    flex-shrink: 0;
}

.mp-contatti__link-value {
    font-family: var(--font-cond);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--mp-black);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s, opacity 0.15s;
}

.mp-contatti__link-value:hover {
    border-bottom-color: var(--mp-black);
    text-decoration: none;
    opacity: 0.6;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1100px) {
    .mp-contatti { grid-template-columns: 1fr 340px; }
    .mp-contatti__panel { padding: 48px 36px; }
}

@media (max-width: 800px) {
    .mp-contatti {
        grid-template-columns: 1fr;
        grid-template-rows: 50vh auto;
        height: auto;
    }
    .mp-contatti__map { min-height: 280px; }
    .mp-contatti__panel {
        border-left: none;
        border-top: var(--mp-border-soft);
        padding: 40px 24px 56px;
    }
}

@media (max-width: 500px) {
    .mp-contatti__panel { padding: 32px 20px 48px; }
    .mp-contatti__address-line { font-size: 1.3rem; }
}
/* ============================================
   HOME — SEZIONE CONTATTI (in fondo al portfolio)
   ============================================ */

.mp-home-contatti {
    display: grid;
    grid-template-columns: 1fr 400px;
    height: 60vh;
    min-height: 420px;
    max-height: 640px;
    background: var(--mp-white);
    border-top: var(--mp-border);
}

/* ── Mappa ───────────────────────────────────── */
.mp-home-contatti__map {
    position: relative;
    overflow: hidden;
    background: #e8e8e8;
}

.mp-home-contatti__map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(15%) contrast(1.02);
}

/* ── Pannello indirizzo ──────────────────────── */
.mp-home-contatti__panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 52px;
    border-left: var(--mp-border-soft);
    background: var(--mp-white);
}

.mp-home-contatti__eyebrow {
    font-family: var(--font-cond);
    font-size: 0.62rem;
    font-weight: 400;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 28px;
}

.mp-home-contatti__address {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: var(--mp-border-soft);
}

.mp-home-contatti__address-line {
    font-family: var(--font-cond);
    font-size: clamp(1.15rem, 1.8vw, 1.6rem);
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--mp-black);
}

.mp-home-contatti__address-line--light {
    font-weight: 300;
    color: #666;
}

.mp-home-contatti__links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mp-home-contatti__link-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.mp-home-contatti__link-label {
    font-family: var(--font-cond);
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #bbb;
    width: 48px;
    flex-shrink: 0;
}

.mp-home-contatti__link-value {
    font-family: var(--font-cond);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--mp-black);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s, opacity 0.15s;
}

.mp-home-contatti__link-value:hover {
    border-bottom-color: var(--mp-black);
    text-decoration: none;
    opacity: 0.6;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 900px) {
    .mp-home-contatti { grid-template-columns: 1fr 320px; }
    .mp-home-contatti__panel { padding: 36px 32px; }
}

@media (max-width: 700px) {
    .mp-home-contatti {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
    }
    .mp-home-contatti__map { height: 280px; }
    .mp-home-contatti__panel {
        border-left: none;
        border-top: var(--mp-border-soft);
        padding: 32px 24px 40px;
    }
}