/* ===== Schede Contenuto – v1.0.2 ===== */

#sc-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    font-family: inherit;
}

.sc-card {
    margin-bottom: 52px;
    padding-bottom: 44px;
    border-bottom: 5px solid #63a6ff;
}
.sc-card:last-child { border-bottom: none; }

.sc-card__title {
    font-size: 2.6rem;
    font-weight: 700;
    margin: 0 0 22px;
    line-height: 1.25;
    color: #1a1a1a;
    text-align: center;
}

/* ---- Corpo: [foto-sx] [testo] [foto-dx] ---- */
.sc-card__body {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.sc-card__photo {
    flex: 0 0 190px;
    max-width: 190px;
    text-align: center;
}
.sc-card__photo img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
    object-fit: cover;
    cursor: zoom-in;
    transition: opacity 0.2s, transform 0.2s;
}
.sc-card__photo img:hover { opacity: 0.88; transform: scale(1.02); }

.sc-card__photo-label {
    margin-top: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
}
.sc-card__photo-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: #f0f0f0;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.8rem;
}

.sc-card__text {
    flex: 1 1 0;
    min-width: 0;
    font-size: 1rem;
    line-height: 1.75;
    color: #333;
}
.sc-card__text p:first-child { margin-top: 0; }
.sc-card__text p:last-child  { margin-bottom: 0; }

/* ---- Gallery ---- */
.sc-gallery {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ddd;
}
.sc-gallery__title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin: 0 0 12px;
    display: none;
}
.sc-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
}
.sc-gallery__item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
}
.sc-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.18s, transform 0.22s;
}
.sc-gallery__item:hover img { opacity: 0.82; transform: scale(1.06); }

/* ---- Lightbox ---- */
#sc-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.91);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 16px;
    box-sizing: border-box;
    cursor: zoom-out;
}
#sc-lightbox.sc-lb-open { display: flex; }

#sc-lb-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}
#sc-lb-img {
    max-width: 88vw;
    max-height: 83vh;
    border-radius: 4px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.7);
    object-fit: contain;
    cursor: default;
    animation: sc-lb-in 0.22s ease;
    display: block;
}
@keyframes sc-lb-in {
    from { opacity: 0; transform: scale(0.93); }
    to   { opacity: 1; transform: scale(1); }
}

#sc-lb-counter {
    color: rgba(255,255,255,0.65);
    font-size: 0.85rem;
    margin-top: 12px;
    letter-spacing: 0.05em;
}

#sc-lb-close {
    position: fixed;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.75;
    padding: 4px 10px;
    transition: opacity 0.15s;
    z-index: 100001;
}
#sc-lb-close:hover { opacity: 1; }

.sc-lb-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    padding: 14px 18px;
    border-radius: 4px;
    z-index: 100001;
    transition: background 0.18s;
    line-height: 1;
}
.sc-lb-arrow:hover { background: rgba(255,255,255,0.26); }
#sc-lb-prev { left: 10px; }
#sc-lb-next { right: 10px; }
.sc-lb-hidden { display: none !important; }

/* ---- Status / spinner ---- */
.sc-status {
    text-align: center;
    padding: 24px 0;
    color: #777;
    font-size: 0.9rem;
}
.sc-spinner {
    display: inline-block;
    width: 26px;
    height: 26px;
    border: 3px solid #e0e0e0;
    border-top-color: #555;
    border-radius: 50%;
    animation: sc-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes sc-spin { to { transform: rotate(360deg); } }

/* ---- Responsive ---- */
@media (max-width: 700px) {
    .sc-card__body { flex-direction: column; gap: 14px; }
    .sc-card__photo {
        flex: none;
        max-width: 100%;
        width: 100%;
        display: flex;
        align-items: flex-start;
        gap: 12px;
        text-align: left;
    }
    .sc-card__photo img { width: 130px; flex: 0 0 130px; }
    .sc-card__photo-label { margin-top: 0; align-self: center; }
    .sc-card__title { font-size: 1.6rem; }
    .sc-gallery__grid { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
    .sc-lb-arrow { padding: 10px 13px; font-size: 1.5rem; }
}