/* ============================================================
   EFESTO - Project Detail Page Styles
   ============================================================ */

/* --- Project Hero with Full-Width Image --- */
.proj-hero {
    position: relative;
    height: clamp(400px, 55vh, 650px);
    overflow: hidden;
    margin-top: 60px;
}

.proj-hero-img {
    position: absolute;
    inset: 0;
}

.proj-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.proj-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 24, 22, .15) 0%,
        rgba(26, 24, 22, .5) 60%,
        rgba(26, 24, 22, .85) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-xl) var(--gutter);
}

.proj-hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

.proj-hero .breadcrumb {
    margin-bottom: var(--space-md);
}

.proj-hero .breadcrumb a,
.proj-hero .breadcrumb span {
    color: rgba(255, 255, 255, .5);
}

.proj-hero .breadcrumb a:hover {
    color: var(--white);
}

.proj-hero-tag {
    display: inline-block;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--green-light);
    background: rgba(26, 92, 46, .3);
    padding: .4em 1em;
    border-radius: 3px;
    margin-bottom: var(--space-sm);
    backdrop-filter: blur(8px);
}

.proj-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 400;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: .5rem;
}

.proj-hero h1 em {
    font-style: italic;
    color: var(--green-light);
}

.proj-hero-loc {
    font-size: 1rem;
    color: rgba(255, 255, 255, .6);
    margin-top: .3rem;
}

/* --- Project Meta Bar --- */
.proj-meta-bar {
    background: var(--white);
    border-bottom: 1px solid var(--grey-100);
    padding: var(--space-md) 0;
}

.proj-meta-grid {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.proj-meta-item {
    text-align: center;
}

.proj-meta-label {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--grey-400);
    margin-bottom: .3rem;
}

.proj-meta-value {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--grey-800);
}

/* --- Project Description --- */
.proj-desc {
    max-width: 820px;
    margin: 0 auto;
}

.proj-desc-intro {
    font-size: clamp(1.05rem, 1.3vw, 1.2rem);
    color: var(--grey-600);
    line-height: 1.9;
    margin-bottom: var(--space-lg);
    font-weight: 400;
}

.proj-desc-body {
    font-size: .95rem;
    color: var(--grey-500);
    line-height: 1.9;
}

.proj-desc-body p + p {
    margin-top: var(--space-sm);
}

/* --- Highlight Box --- */
.proj-highlight {
    background: var(--green-pale);
    border-left: 4px solid var(--green);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-md) var(--space-md) var(--space-md) calc(var(--space-md) + 4px);
    margin: var(--space-lg) 0;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.proj-highlight h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--green-dark);
    margin-bottom: var(--space-sm);
    font-weight: 400;
}

.proj-highlight ul {
    list-style: none;
    padding: 0;
}

.proj-highlight ul li {
    font-size: .9rem;
    color: var(--grey-600);
    line-height: 1.8;
    padding-left: 1.5rem;
    position: relative;
}

.proj-highlight ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .6em;
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
}

/* --- Product Specs Grid --- */
.proj-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.proj-spec-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    border: 1px solid var(--grey-100);
    transition: all var(--fast);
}

.proj-spec-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--green-soft);
}

.proj-spec-num {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--green);
    line-height: 1;
    margin-bottom: .3rem;
}

.proj-spec-label {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--grey-400);
    margin-bottom: var(--space-xs);
}

.proj-spec-desc {
    font-size: .85rem;
    color: var(--grey-500);
    line-height: 1.7;
}

/* --- Benefits List --- */
.proj-benefits {
    max-width: 820px;
    margin: 0 auto;
}

.proj-benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.proj-benefit {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: background var(--fast);
}

.proj-benefit:hover {
    background: var(--green-pale);
}

.proj-benefit-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--green-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--fast);
}

.proj-benefit:hover .proj-benefit-icon {
    background: var(--green);
}

.proj-benefit-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--green);
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke var(--fast);
}

.proj-benefit:hover .proj-benefit-icon svg {
    stroke: var(--white);
}

.proj-benefit-text h4 {
    font-size: .85rem;
    font-weight: 600;
    color: var(--grey-800);
    margin-bottom: .15rem;
}

.proj-benefit-text p {
    font-size: .8rem;
    color: var(--grey-500);
    line-height: 1.6;
}

/* --- Photo Gallery --- */
.proj-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.proj-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    aspect-ratio: 4 / 3;
    cursor: pointer;
}

.proj-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease);
}

.proj-gallery-item:hover img {
    transform: scale(1.06);
}

.proj-gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(26, 24, 22, 0);
    transition: background .3s;
}

.proj-gallery-item:hover::after {
    background: rgba(26, 24, 22, .1);
}

/* Featured gallery item */
.proj-gallery-item.featured {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
}

/* --- Service Section in Project --- */
.proj-service-content {
    max-width: 820px;
    margin: 0 auto;
}

.proj-service-content p {
    font-size: .95rem;
    color: var(--grey-500);
    line-height: 1.9;
    margin-bottom: var(--space-sm);
}

.proj-service-list {
    list-style: none;
    padding: 0;
    margin-top: var(--space-sm);
}

.proj-service-list li {
    font-size: .9rem;
    color: var(--grey-600);
    line-height: 1.8;
    padding-left: 1.8rem;
    position: relative;
    margin-bottom: .4rem;
}

.proj-service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .65em;
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
}

/* --- Lightbox --- */
.proj-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(26, 24, 22, .95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all .3s;
    cursor: zoom-out;
}

.proj-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.proj-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
}

.proj-lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, .1);
    color: var(--white);
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s;
}

.proj-lightbox-close:hover {
    background: rgba(255, 255, 255, .2);
}

/* --- Reference Page: Real Project Cards --- */
.ref-projects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.ref-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid var(--grey-100);
    transition: all var(--fast);
    display: flex;
    flex-direction: column;
}

.ref-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--green-soft);
}

.ref-card-img {
    height: 320px;
    overflow: hidden;
}

.ref-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s var(--ease);
}

.ref-card:hover .ref-card-img img {
    transform: scale(1.04);
}

.ref-card-body {
    padding: var(--space-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ref-card-tag {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--green);
    background: var(--green-pale);
    padding: .3em .8em;
    border-radius: 3px;
    display: inline-block;
    width: fit-content;
    margin-bottom: .6rem;
}

.ref-card-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--grey-800);
    margin-bottom: .4rem;
    line-height: 1.2;
}

.ref-card-loc {
    font-size: .85rem;
    color: var(--grey-400);
    margin-bottom: var(--space-sm);
}

.ref-card-excerpt {
    font-size: .85rem;
    color: var(--grey-500);
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ref-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--grey-100);
}

.ref-card-stats {
    display: flex;
    gap: var(--space-md);
}

.ref-card-stat {
    text-align: center;
}

.ref-card-stat-num {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--green);
    line-height: 1;
}

.ref-card-stat-label {
    font-size: .6rem;
    color: var(--grey-400);
    text-transform: uppercase;
    letter-spacing: .1em;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .proj-hero {
        height: clamp(350px, 45vh, 500px);
    }

    .proj-meta-grid {
        gap: var(--space-lg);
    }

    .proj-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .proj-benefits-grid {
        grid-template-columns: 1fr;
    }

    .proj-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .proj-gallery-item.featured {
        grid-column: span 2;
        grid-row: span 1;
        aspect-ratio: 16 / 9;
    }

    .ref-projects {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .proj-hero {
        height: clamp(300px, 50vh, 400px);
    }

    .proj-hero-overlay {
        padding: var(--space-lg) var(--gutter);
    }

    .proj-meta-grid {
        gap: var(--space-md);
    }

    .proj-gallery-grid {
        grid-template-columns: 1fr 1fr;
    }

    .proj-gallery-item.featured {
        grid-column: span 2;
        aspect-ratio: 16 / 10;
    }

    .ref-projects {
        grid-template-columns: 1fr;
    }

    .ref-card-img {
        height: 240px;
    }
}

@media (max-width: 480px) {
    .proj-hero {
        height: 300px;
    }

    .proj-meta-grid {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: flex-start;
    }

    .proj-meta-item {
        text-align: left;
        display: flex;
        gap: .5rem;
        align-items: baseline;
    }

    .proj-gallery-grid {
        grid-template-columns: 1fr;
    }

    .proj-gallery-item.featured {
        grid-column: span 1;
    }

    .proj-specs-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   REFERENCE PAGE — Stile studio architettura
   ============================================================ */

/* Hero con mappa Italia */
.ref-hero-map {
    position: relative;
    padding-top: 70px;
    padding-bottom: var(--space-lg);
    overflow: hidden;
}

.ref-hero-map-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.ref-hero-map-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .88);
    z-index: 1;
}

.ref-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
}

.ref-hero-text .section-label {
    margin-top: var(--space-sm);
}

.ref-hero-text h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    margin-bottom: var(--space-sm);
}

.ref-hero-text h1 em {
    color: var(--green);
}

.ref-hero-text > p {
    font-size: .95rem;
    color: var(--grey-500);
    line-height: 1.8;
    max-width: 450px;
    margin-bottom: var(--space-md);
}

.ref-hero-counter {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--grey-200);
}

.ref-hero-counter strong {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--green);
    line-height: 1;
}

.ref-hero-counter span {
    font-size: .8rem;
    color: var(--grey-400);
    text-transform: uppercase;
    letter-spacing: .1em;
}

/* Mappa SVG */
.ref-hero-map-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.italy-svg {
    width: 100%;
    max-width: 340px;
    height: auto;
}

.region {
    fill: var(--grey-100);
    stroke: var(--white);
    stroke-width: 1.5;
    cursor: pointer;
    transition: fill .3s ease;
}

.region:hover {
    fill: var(--green-soft);
}

.region.active {
    fill: var(--green-pale);
    stroke: var(--green);
    stroke-width: 2;
}

.region-sardegna {
    fill: var(--green-pale);
    stroke: var(--green);
    stroke-width: 2;
}

/* Dot cantieri */
.map-dot {
    fill: var(--green);
    stroke: var(--white);
    stroke-width: 2;
    cursor: pointer;
    transition: r .3s ease;
}

.map-dot:hover {
    r: 8;
}

.map-label {
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 600;
    fill: var(--grey-600);
    letter-spacing: .03em;
    pointer-events: none;
}

/* Filtro regioni sticky */
.ref-filter-wrap {
    position: sticky;
    top: 56px;
    z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--grey-100);
    padding: var(--space-sm) 0;
}

.ref-filters {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.ref-select-label {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--grey-500);
    white-space: nowrap;
}

.ref-select {
    font-family: var(--font-body);
    font-size: .85rem;
    font-weight: 500;
    color: var(--grey-700);
    background: var(--white);
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-sm);
    padding: .6em 2.5em .6em 1em;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' fill='none' stroke='%231A5C2E' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .8em center;
    cursor: pointer;
    transition: border-color var(--fast);
    min-width: 220px;
}

.ref-select:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-pale);
}

@media (max-width: 480px) {
    .ref-filters { flex-wrap: wrap; gap: .5rem; }
    .ref-select { min-width: 0; width: 100%; }
    .ref-info { min-width: 0; }
}

/* Descrizione progetto (pagina reference) */
.ref-desc {
    font-size: .88rem;
    color: var(--grey-500);
    line-height: 1.8;
    margin-bottom: var(--space-sm);
}

/* Spacing tra blocchi nella lista */
.ref-list .ref-block {
    margin-bottom: var(--space-xl);
}

.ref-list .ref-block:last-of-type {
    margin-bottom: 0;
}

/* Animazione hide/show */
.ref-item {
    transition: opacity .4s ease;
}

.ref-item.hidden {
    display: none;
}

/* Coming soon */
.ref-coming-soon {
    padding: var(--space-xl) 0;
}

.ref-coming-soon-inner {
    text-align: center;
    padding: var(--space-xl);
    background: var(--off-white);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--grey-200);
}

.ref-coming-soon-inner svg {
    color: var(--green);
    margin-bottom: var(--space-sm);
}

.ref-coming-soon-inner h3 {
    font-size: 1.3rem;
    margin-bottom: .5rem;
}

.ref-coming-soon-inner p {
    font-size: .9rem;
    color: var(--grey-400);
    max-width: 450px;
    margin: 0 auto var(--space-md);
    line-height: 1.7;
}

/* Lista progetti */
.ref-list {
    padding: var(--space-2xl) 0;
}

.ref-item {
    margin-bottom: var(--space-2xl);
}

.ref-item:last-child {
    margin-bottom: 0;
}

/* Immagine — piena, pulita */
.ref-item-img {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.ref-item-img img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .8s var(--ease-out);
}

.ref-item-img:hover img {
    transform: scale(1.02);
}

/* Footer — didascalia architettonica */
.ref-item-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-lg);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--grey-100);
}

.ref-item-meta {
    flex: 1;
}

.ref-item-tag {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: .4rem;
    display: block;
}

.ref-item-footer h2 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    margin-bottom: .2rem;
}

.ref-item-footer h2 a {
    color: var(--grey-800);
    transition: color var(--fast);
}

.ref-item-footer h2 a:hover {
    color: var(--green);
}

.ref-item-loc {
    font-size: .85rem;
    color: var(--grey-400);
}

/* Stats */
.ref-item-stats {
    display: flex;
    gap: var(--space-lg);
    padding-top: .3rem;
}

.ref-item-stat {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.ref-item-stat strong {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--green);
    line-height: 1.2;
}

.ref-item-stat span {
    font-size: .6rem;
    color: var(--grey-400);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: .1rem;
}

/* Link */
.ref-item-link {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--green);
    white-space: nowrap;
    align-self: center;
    transition: gap var(--fast);
    display: inline-flex;
    align-items: center;
    gap: .4em;
}

.ref-item-link:hover {
    gap: .8em;
}

/* Responsive reference */
@media (max-width: 1024px) {
    .ref-hero-grid {
        grid-template-columns: 1fr;
    }

    .ref-hero-map-wrap {
        max-width: 280px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .italy-svg {
        max-width: 240px;
    }
}

/* ============================================================
   REFERENCE PAGE — Legacy styles (kept for compatibility)
   ============================================================ */

/* Progetto block */
.ref-page-project {
    padding: var(--space-2xl) 0;
}

.ref-page-project-alt {
    background: var(--off-white);
}

.ref-page-block {
    display: grid;
    grid-template-columns: auto .45fr 1fr;
    gap: 0;
    align-items: start;
}

.ref-page-block-reverse {
    grid-template-columns: 1fr .45fr auto;
}

.ref-page-block-reverse .ref-page-label {
    order: 3;
    border-left: 1px solid var(--grey-200);
    border-right: none;
}

.ref-page-block-reverse .ref-page-info {
    order: 2;
}

.ref-page-block-reverse .ref-page-visual {
    order: 1;
}

/* Etichetta verticale */
.ref-page-label {
    writing-mode: vertical-lr;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) .8rem;
    border-right: 1px solid var(--grey-200);
    position: relative;
    align-self: stretch;
}

.ref-page-num {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--grey-300);
    letter-spacing: .1em;
    transform: rotate(180deg);
}

.ref-page-label::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 40px;
    background: var(--green);
}

.ref-page-block:not(.ref-page-block-reverse) .ref-page-label::after {
    right: -1px;
    top: var(--space-lg);
}

.ref-page-block-reverse .ref-page-label::after {
    left: -1px;
    top: var(--space-lg);
}

/* Info */
.ref-page-info {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ref-page-tag {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: var(--space-sm);
}

.ref-page-info h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    margin-bottom: .5rem;
}

.ref-page-info h2 em {
    color: var(--green);
}

.ref-page-loc {
    font-size: .85rem;
    color: var(--grey-400);
    margin-bottom: var(--space-sm);
}

.ref-page-desc {
    font-size: .88rem;
    color: var(--grey-500);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.ref-page-stats {
    display: flex;
    gap: var(--space-lg);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--grey-100);
    margin-bottom: var(--space-md);
}

.ref-page-stat {
    display: flex;
    flex-direction: column;
}

.ref-page-stat strong {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--green);
    line-height: 1.2;
}

.ref-page-stat span {
    font-size: .6rem;
    color: var(--grey-400);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: .15rem;
}

/* Visual — immagine principale + thumbnails */
.ref-page-visual {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.ref-page-main-img {
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.ref-page-main-img img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    display: block;
    transition: transform .8s var(--ease-out);
}

.ref-page-block:hover .ref-page-main-img img {
    transform: scale(1.02);
}

.ref-page-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xs);
}

.ref-page-thumb {
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.ref-page-thumb img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    transition: transform .6s var(--ease-out);
}

.ref-page-thumb:hover img {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 1024px) {
    .ref-page-block,
    .ref-page-block-reverse {
        grid-template-columns: 1fr;
    }

    .ref-page-label {
        writing-mode: horizontal-tb;
        border-right: none;
        border-bottom: 1px solid var(--grey-200);
        padding: .6rem 0;
        justify-content: flex-start;
    }

    .ref-page-block-reverse .ref-page-label {
        border-left: none;
        border-bottom: 1px solid var(--grey-200);
        order: 1;
    }

    .ref-page-block-reverse .ref-page-visual {
        order: 2;
    }

    .ref-page-block-reverse .ref-page-info {
        order: 3;
    }

    .ref-page-num {
        transform: none;
    }

    .ref-page-label::after {
        display: none;
    }

    .ref-page-info {
        padding: var(--space-md) 0;
    }
}

@media (max-width: 768px) {
    .ref-page-thumbs {
        grid-template-columns: repeat(3, 1fr);
        gap: .3rem;
    }
}
