/* Popup "Lavori dei nostri studenti" — overlay centrato con scale-in */
.lsp-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.28s ease;
}
.lsp-overlay.is-open { display: flex; }
.lsp-overlay.is-visible { opacity: 1; }

.lsp-card {
    background: #fff;
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.28);
    width: min(1200px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    display: flex;
    gap: 11px;
    align-items: stretch;
    transform: scale(0.94) translateY(8px);
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1.02);
    font-family: var(--font-family-paragraph, "Inter Tight", sans-serif);
}
.lsp-overlay.is-visible .lsp-card {
    transform: scale(1) translateY(0);
}

.lsp-image-col {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.lsp-image-frame {
    width: 100%;
    flex: 1 1 auto;
    min-height: 160px;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: calc(100vh - 160px);
}
.lsp-image-frame img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 160px);
    width: auto;
    height: auto;
    object-fit: contain;
}

.lsp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
}
.lsp-nav-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s;
}
.lsp-nav-btn:hover { background: rgba(0, 0, 0, 0.06); }
.lsp-nav-btn svg { width: 24px; height: 24px; display: block; }
.lsp-counter {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #000;
    flex: 1;
    text-align: center;
}

.lsp-info-col {
    flex: 1 1 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 16px;
    min-width: 0;
    gap: 16px;
    overflow-y: auto;
}

.lsp-close-row {
    display: flex;
    justify-content: flex-end;
}
.lsp-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #000;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lsp-close-btn svg { width: 24px; height: 24px; display: block; }

.lsp-text-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: #000;
    font-size: 16px;
    line-height: 1.6;
    word-break: break-word;
}
.lsp-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lsp-meta p { margin: 0; }
.lsp-meta .lsp-nome { font-weight: 700; }

.lsp-desc { margin: 0; }

.lsp-portfolio {
    text-align: right;
    text-decoration: underline;
    text-underline-position: from-font;
    font-size: 16px;
    color: #000;
    align-self: stretch;
    display: block;
}

/* Trigger sulle immagini della showcase */
[data-lsp-trigger] { cursor: zoom-in; }

/* Mobile: stack verticale */
@media (max-width: 900px) {
    .lsp-overlay { padding: 12px; }
    .lsp-card {
        flex-direction: column;
        padding: 12px;
        border-radius: 16px;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
    }
    .lsp-image-col { flex: 0 0 auto; }
    .lsp-info-col { padding: 8px 4px; }
}
