/* ==================================================
   SANTA CROCE - OPERE D'ARTE
   GRAFICA PUBBLICA
   Versione 0.2
   ================================================== */


/* ==================================================
   ELENCO DELLE OPERE
   ================================================== */

.sc-opere-lista {
    width: min(1180px, calc(100vw - 80px));
    max-width: none;

    /* Centra l’intera area opere rispetto al contenitore della pagina.
       Il margine negativo viene calcolato in modo simmetrico quando
       la galleria è più larga della colonna WordPress/Astra. */
    margin-left: calc((100% - min(1180px, calc(100vw - 80px))) / 2);
    margin-right: calc((100% - min(1180px, calc(100vw - 80px))) / 2);
}



/* INTRODUZIONE DELLA COLLEZIONE */
.sc-collezione-introduzione {
    width: 100%;
    margin: 0 0 34px;
    font-size: 1.05em;
    line-height: 1.75;
}

.sc-collezione-introduzione p:last-child {
    margin-bottom: 0;
}

/* SINGOLA SCHEDA */

.sc-opera-scheda {
    display: grid;
    grid-template-columns: minmax(300px, 36%) minmax(0, 64%);
    gap: 36px;

    width: 100%;

    padding: 42px 0;

    border-top: 1px solid rgba(127, 29, 39, 0.22);
}


/* niente linea sulla prima opera */

.sc-opera-scheda:first-child {
    border-top: 0;
    padding-top: 0;
}


/* ==================================================
   COLONNA FOTOGRAFIE
   ================================================== */

.sc-opera-foto {
    min-width: 0;
    text-align: center;
}


/* FOTO PRINCIPALE */

.sc-opera-principale {
    display: block;

    width: auto;
    max-width: 100%;

    height: auto;
    max-height: 650px;

    margin: 0 auto;

    object-fit: contain;

    cursor: zoom-in;
    opacity: 1;
    transition: opacity 0.7s ease-in-out;
}

.sc-arte-principale.sc-fade-out {
    opacity: 0;
}


/* ==================================================
   MINIATURE
   ================================================== */

.sc-opera-miniature {
    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap: 10px;

    margin-top: 16px;
}


.sc-opera-miniature img {
    display: block;

    width: 76px;
    height: 76px;

    padding: 3px;

    box-sizing: border-box;

    object-fit: cover;

    background: #ffffff;

    border: 1px solid #d5c69f;

    cursor: zoom-in;

    transition:
        border-color 0.2s ease,
        transform 0.2s ease;
}


.sc-opera-miniature img:hover {
    border-color: #8b1e27;

    transform: translateY(-2px);
}


/* ==================================================
   TESTO DELL'OPERA
   ================================================== */

.sc-opera-testo {
    min-width: 0;
}


/* AUTORE */

.sc-opera-autore {
    margin: 0 0 6px;

    font-size: 13px;
    font-weight: 700;

    letter-spacing: 1.1px;

    text-transform: uppercase;

    color: #8b1e27;
}


/* TITOLO */

.sc-opera-testo h2 {
    margin: 0 0 5px;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 31px;
    line-height: 1.2;

    font-weight: 700;

    color: #7f1d27;
}


/* DATA */

.sc-opera-data {
    margin: 0 0 20px;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 18px;

    font-style: italic;

    color: #6b5a4c;
}


/* ==================================================
   DATI TECNICI
   ================================================== */

.sc-opera-dati {
    margin: 18px 0 25px;

    padding: 15px 0;

    border-top: 1px solid #d8c8a2;
    border-bottom: 1px solid #d8c8a2;
}


.sc-opera-dati p {
    margin: 5px 0;

    line-height: 1.55;
}


.sc-opera-dati strong {
    color: #7f1d27;
}


/* ==================================================
   DESCRIZIONE
   ================================================== */

.sc-opera-descrizione {
    font-size: 16px;

    line-height: 1.75;

    color: #333333;

    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}


.sc-opera-descrizione p {
    margin: 0 0 17px;
}


.sc-opera-descrizione p:last-child {
    margin-bottom: 0;
}


/* ==================================================
   PAGINA GENERALE DELLE COLLEZIONI
   ================================================== */

.sc-arte-gallery {
    display: grid;

    grid-template-columns: 310px minmax(0, 1fr);

    gap: 45px;

    width: 100%;

    align-items: start;
}


/* ==================================================
   BOX / MENU DELLE COLLEZIONI
   ================================================== */

.sc-arte-menu {
    display: flex;

    flex-direction: column;

    gap: 12px;
}


.sc-arte-btn {
    display: block;

    width: 100%;

    padding: 16px 20px;

    box-sizing: border-box;

    text-align: left;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 22px;
    line-height: 1.25;

    font-weight: 700;

    color: #7f1d27;

    background: #ffffff;

    border: 1px solid #d8c8a2;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}


/* BOX sempre bianco; quello selezionato ha il bordo dorato. */

.sc-arte-btn:hover {
    background: #ffffff !important;
    color: #7f1d27 !important;
    border-color: #c5a253 !important;
}

.sc-arte-btn.active,
.sc-arte-btn.active:hover,
.sc-arte-btn.active:focus {
    background: #ffffff !important;
    color: #7f1d27 !important;
    border-color: #c5a253 !important;
    box-shadow: 0 1px 4px rgba(197, 162, 83, 0.18);
}


/* ==================================================
   FRECCETTA ↗ VERSO LA SOTTOPAGINA
   ================================================== */

.sc-arte-box-con-link {
    position: relative;
    width: 100%;
}

.sc-arte-box-con-link .sc-arte-btn {
    width: 100%;
    padding-right: 58px;
}

.sc-arte-box-link {
    position: absolute;
    top: 50%;
    right: 16px;

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    transform: translateY(-50%);
    z-index: 10;

    background: transparent;
    border: 0;
    border-radius: 0;

    color: #7f1d27;

    font-family: Arial, sans-serif;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;

    text-decoration: none;
    opacity: 0.75;

    transition:
        opacity 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.sc-arte-box-link:hover,
.sc-arte-box-link:focus {
    color: #c5a253;
    background: transparent;
    border: 0;
    opacity: 1;
    text-decoration: none;
    transform: translateY(-50%) translate(2px, -2px);
}


/* ==================================================
   SLIDER
   ================================================== */

.sc-arte-slider {
    position: relative;

    display: flex;

    align-items: center;

    justify-content: center;

    min-width: 0;

    min-height: 580px;

    padding: 0 65px 35px;

    box-sizing: border-box;
}


.sc-arte-immagine {
    width: 100%;

    text-align: center;
}


.sc-arte-principale {
    display: none;

    width: auto;
    max-width: 100%;

    height: auto;
    max-height: 620px;

    margin: 0 auto;

    object-fit: contain;

    cursor: zoom-in;
}


.sc-arte-messaggio {
    text-align: center;

    color: #777777;
}


/* ==================================================
   FRECCE SLIDER
   ================================================== */

.sc-arte-freccia {
    position: absolute;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #7f1d27;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    z-index: 5;
    appearance: none;
    -webkit-appearance: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.sc-arte-freccia:hover {
    background: transparent;
    color: #7f1d27;
    opacity: 0.72;
}

.sc-arte-prev {
    left: 5px;
}


.sc-arte-next {
    right: 5px;
}


/* CONTATORE */

.sc-arte-contatore {
    position: absolute;

    right: 0;
    bottom: 4px;
    left: 0;

    text-align: center;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 14px;

    color: #7f1d27;
}


/* ==================================================
   LIGHTBOX
   ================================================== */

.sc-opere-lightbox {
    position: fixed;

    inset: 0;

    display: none;

    align-items: center;

    justify-content: center;

    padding: 35px 75px;

    box-sizing: border-box;

    background: rgba(0, 0, 0, 0.91);

    z-index: 999999;
}


.sc-opere-lightbox.aperto {
    display: flex;
}


/* FOTO INGRANDITA */

.sc-opere-lightbox img {
    display: block;

    width: auto;
    max-width: 90vw;

    height: auto;
    max-height: 88vh;

    object-fit: contain;

    cursor: zoom-out;
}


/* ==================================================
   COMANDI LIGHTBOX
   ================================================== */

.sc-lightbox-chiudi,
.sc-lightbox-prev,
.sc-lightbox-next {
    position: absolute;

    display: flex;

    align-items: center;

    justify-content: center;

    margin: 0;
    padding: 0;

    box-sizing: border-box;

    background: #ffffff;

    color: #7f1d27;

    border: 1px solid #c5a253;
    border-radius: 50%;

    font-family: Arial, Helvetica, sans-serif;

    line-height: 1;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;
}


/* X */

.sc-lightbox-chiudi {
    top: 20px;
    right: 22px;

    width: 43px;
    height: 43px;

    font-size: 28px;
}


/* FRECCE */

.sc-lightbox-prev,
.sc-lightbox-next {
    top: 50%;

    width: 48px;
    height: 48px;

    transform: translateY(-50%);

    font-size: 21px;
}


.sc-lightbox-prev {
    left: 22px;
}


.sc-lightbox-next {
    right: 22px;
}


.sc-lightbox-chiudi:hover,
.sc-lightbox-prev:hover,
.sc-lightbox-next:hover {
    background: #7f1d27;

    color: #ffffff;
}


/* ==================================================
   TABLET
   ================================================== */

@media screen and (max-width: 900px) {

    .sc-arte-gallery {
        grid-template-columns: 250px minmax(0, 1fr);

        gap: 25px;
    }


    .sc-opera-scheda {
        gap: 30px;
    }

}


/* ==================================================
   SMARTPHONE
   ================================================== */

@media screen and (max-width: 700px) {

    .sc-opere-lista {
        width: 100%;
        max-width: 100%;
        left: auto;
        transform: none;
    }

    .sc-opera-descrizione {
        text-align: left;
        hyphens: none;
    }

    .sc-opera-scheda {
        grid-template-columns: 1fr;

        gap: 25px;

        padding: 32px 0;
    }


    .sc-opera-testo h2 {
        font-size: 27px;
    }


    .sc-arte-gallery {
        grid-template-columns: 1fr;

        gap: 25px;
    }


    .sc-arte-slider {
        min-height: 430px;

        padding-right: 52px;
        padding-left: 52px;
    }


    .sc-arte-freccia {
        width: 44px;
        height: 44px;

        font-size: 30px;
    }


    .sc-opere-lightbox {
        padding-right: 55px;
        padding-left: 55px;
    }


    .sc-lightbox-prev {
        left: 7px;
    }


    .sc-lightbox-next {
        right: 7px;
    }

}