/* ==========================================================================
   STILE DEDICATO ALLA PAGINA OPERA (Visualizzazione Testo da DB)
   ========================================================================== */

/* Contenitore Principale */
.container-opera {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
    background-color: var(--primary-bg);
}

/* Titolo dell'Opera */
.opera-title {
    font-family: var(--heading-font);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 200;
    line-height: 1.2;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-color);
}

/* Sottotitolo dell'Opera */
.opera-subtitle {
    font-family: var(--body-font);
    font-size: 1rem;
    color: #666;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 25px;
}

/* Linea di separazione orizzontale */
.container-opera hr {
    border: 0;
    height: 2px;
    background-color: rgba(0, 0, 0, 0.05);
    margin: 30px 0;
}

/* Corpo del Testo (Il racconto o la poesia) */
.opera-content {
    font-family: var(--body-font);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    text-align: justify;
    hyphens: auto;
    white-space: pre-line; /* Mantiene gli andare a capo del database */
    margin: 40px auto;
    max-width: 650px;
    padding: 0 10px;
}
/* --- GESTIONE DEI NUOVI MEDIA (IMMAGINI E VIDEO) --- */

.opera-media-content {
    width: 100%;
    margin: 30px auto;
    display: flex;
    justify-content: center;
}

/* Stile per l'immagine a schermo intero */
.media-image-box {
    width: 100%;
    max-width: 800px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.responsive-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
}

/* Stile responsive per il video (mantiene i 16:9) */
.media-video-box {
    position: relative;
    width: 100%;
    max-width: 800px;
    padding-bottom: 56.25%; /* Rapporto 16:9 */
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 2px;
}

.responsive-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Testo descrittivo sotto i media */
.opera-description {
    font-family: var(--body-font);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    text-align: justify;
    max-width: 650px;
    margin: 20px auto 40px;
}

.btn-container {
    margin-top: 40px;
}

/* Il bottone "Torna ai Progetti" */
.btn-view {
    display: inline-block;
    padding: 15px 40px;
    background-color: transparent;
    color: var(--text-color) !important;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    border: 1px solid var(--text-color);
    cursor: pointer;
    margin-top: 10px;
}


/* Effetto hover sul bottone */
.btn-view:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .container-opera {
        margin: 40px auto;
    }
    
    .opera-content {
        font-size: 1rem;
        text-align: justify;
        text-align-last: center;
    }

    .btn-view {
        padding: 12px 30px;
        font-size: 0.75rem;
        width: 100%;
        max-width: 300px;
    }
}