/* ── FOTO STAFF ────────────────────────────── */
.staff-hero {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 360px;
    max-height: 560px;
    overflow: hidden;
}

.staff-hero img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.staff-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.55) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px 48px;
}

.staff-hero-title {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    color: var(--color-white);
    margin: 0;
}

/* ── STORIA ───────────────────────────────────────── */
.story-section {
    background: var(--color-white);
    padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 40px) clamp(24px, 3vw, 32px);
    max-width: 800px;
    margin: 0 auto;
}

.story-section .section-label,
.story-section .section-title {
    text-align: center;
}

.story-text {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
    text-align: justify;
    padding-bottom: 20px;
}

.story-text::first-letter {
    font-size: 3.4em;
    font-weight: 700;
    color: var(--color-secondary);
    float: left;
    line-height: 0.85;
    padding: 0.06em 0.08em 0 0;
}

/* ── VALORI ──────────────────────────────────────────*/
.values-section {
    background: var(--color-cream);
    padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 40px) clamp(24px, 3vw, 32px);
    position: relative;
    overflow: hidden;
}

.values-list {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    color: inherit;
    flex-direction: column;
}

.value-item {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 0 22px;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.value-item:last-child {
    border-bottom: none;
}

.value-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 4px;
}

.value-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
}

.value-number {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    line-height: 1;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    opacity: 0.8;
    margin-top: 8px;
    min-width: unset;
}

.value-line {
    width: 1px;
    height: 92px;
    margin-top: 8px;
    background: linear-gradient(
        to bottom,
        color-mix(in srgb, var(--color-primary) 80%, transparent),
        transparent
    );
}


.value-item:last-child .value-line {
    display: none;
}

.value-content {
    padding-top: 2px;
    font-style: italic;
}

.value-item h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: none;
    letter-spacing: 0.01em;
    font-style: italic;
}

.value-item p {
    font-size: 14px;
    line-height: 1.75;
    color: inherit;
}

@media (max-width: 600px) {
    .value-item {
        grid-template-columns: 36px 1fr;
        gap: 0 16px;
    }
}

/* ── GALLERIA (stile masonry) ──────────────────────────────*/
.gallery-section {
    background: var(--color-white);
    padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 40px) clamp(24px, 3vw, 32px);
    position: relative;
}

.gallery-sentinel {
    width: 100%;
    height: 1px;
}

.gallery-masonry {
    column-count: 3;
    column-gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
    overflow-anchor: none;
}

.gallery-item {
    margin-bottom: 18px;
    break-inside: avoid;
    border-radius: 7px;
    overflow: hidden;
    transition: var(--responsive-transition);
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-back-to-top {
    position: sticky;
    bottom: 24px;
    left: 100%;
    transform: translateX(calc(-100% - 24px));

    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;

    z-index: 5;
}

.gallery-back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.gallery-back-to-top:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.gallery-back-to-top .material-symbols-outlined {
    font-size: 26px;
}

@media (max-width: 550px) {
    .gallery-back-to-top {
        width: 44px;
        height: 44px;
        bottom: 16px;
        transform: translateX(calc(-100% - 16px));
    }

    .gallery-back-to-top .material-symbols-outlined {
        font-size: 22px;
    }
}

/* ── TOGGLE LAYOUT ──────────────────────────────*/
.gallery-toggle-btn {
    background: var(--color-primary);
    border: none;
    color: var(--color-white);
    width: 42px;
    height: 42px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 20px auto;
    transition: var(--responsive-transition);
}

.gallery-toggle-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--color-white);
}

/* Modalità SCROLL galleria */
.gallery-masonry.scroll-mode {
    column-count: 1;
    display: flex;
    overflow-x: auto;
    gap: 18px;
    scroll-snap-type: x mandatory;
}

.gallery-masonry.scroll-mode .gallery-item {
    min-width: 300px;
    scroll-snap-align: start;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.gallery-header .section-title {
    margin-bottom: 0;
}


/* ── RESPONSIVE ───────────────────────────────────── */
/* sotto i 900px */
@media (max-width: 900px) {
    .gallery-masonry {
        column-count: 2;
    }
}

/* sotto i 600px */
@media (max-width: 600px) {
    .staff-hero-overlay {
        padding: 24px 24px;
    }

    .gallery-masonry {
        column-count: 1;
    }
}

/* sotto i 500px */
/* scroll orizzontale galleria */
@media (max-width: 500px) {
    .gallery-masonry {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        column-count: unset;
        gap: 12px;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .gallery-back-to-top {
        display: none;
    }

    .gallery-item {
        flex: 0 0 auto;
        width: 70%;
        max-width: 260px;
        margin-bottom: 0;
        scroll-snap-align: start;
    }

    .gallery-item img {
        height: 220px;
        object-fit: cover;
    }

    .gallery-masonry::-webkit-scrollbar {
        display: none;
    }
    .gallery-masonry {
        scrollbar-width: none;
    }
}