/* =============================================
   COM_FER_RELLOTGE.CSS
   ============================================= */

.cos_interior {
    display: flex;
    gap: clamp(20px, 2.5vw, 40px);
    height: 100%;
    overflow: hidden;
}

/* ——— ESQUERRA ——— */
.esquerra {
    flex: 1;
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: clamp(10px, 1.5vh, 18px) clamp(6px, 1vh, 10px);
    margin: clamp(10px, 1.8vh, 20px) 0;
    max-height: 90vh;
    border: 1px solid #e5e0d8;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.15);
}

.caixa_texte {
    font-size: clamp(0.78rem, 0.82vw, 0.92rem);
    line-height: 1.6;
    color: #555;
    background: #fdfcfb;
    padding: clamp(10px, 1.2vh, 15px);
    border: 1px solid #e5e0d8;
    border-radius: 4px;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.15);
    overflow-y: auto;
    flex: none;
    min-height: 4vh;
    max-height: 40vh;
}

.titol_interior {
    font-size: clamp(0.86rem, 0.94vw, 1.01rem);
    font-weight: bold;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #000000;
    text-align: center;
    padding: 10px;
    background: #f7f1eb;
    border: 1px solid #e5e0d8;
    border-radius: 4px;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.15);
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    margin-bottom: 4px;
}

.descripcio_autor {
    text-align: justify;
    text-indent: 1.5em;
}

/* ——— BOTONS ——— */
.panell_botons {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.fila_boto {
    display: flex;
}

.fila_boto a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(6px, 0.8vh, 8px) 10px;
    border: 1px solid #d5c9b8;
    border-radius: 4px;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.15);
    background-color: #f0ece6;
    color: #555;
    text-decoration: none;
    font-size: clamp(0.70rem, 0.72vw, 0.80rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all 0.25s ease;
}

.fila_boto a:hover {
    background-color: #e5ddd4;
    border-color: #b8ac9e;
    color: #333;
}

/* ——— DRETA: PÀGINES DOC ——— */
.dreta {
    flex: 3;
    height: 100%;
    overflow-y: auto;
    padding: 10px 4px;
}

.pagines-doc {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 8px;
}

.pagines-doc img {
    width: 100%;
    max-width: 700px;
    height: auto;
    border: 6px solid white;
    outline: 1px solid #d5c9b8;
    box-shadow: 8px 12px 8px rgba(0,0,0,0.3);
    cursor: zoom-in;
    transition: box-shadow 0.2s;
}

.pagines-doc img:hover {
    box-shadow: 0 6px 20px rgba(93,46,10,0.25);
}

/* ——— VISOR ZOOM ——— */
.visor-zoom {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.visor-zoom.visible {
    display: flex;
}

.visor-zoom-imatge {
    width: 90vw;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
}

.visor-zoom-hint {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    font-family: Georgia, serif;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.1em;
    pointer-events: none;
}

.visor-zoom-imatge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 10px solid #fff;
    outline: 2px solid #d5c9b8;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    transform-origin: center center;
    user-select: none;
    pointer-events: none;
}

/* ——— RESPONSIVE ——— */
@media (max-width: 768px) {
    .cos_interior {
        flex-direction: column;
        height: auto;
        overflow: visible;
        padding: 20px 0;
    }

    .esquerra { overflow: visible; }

    .dreta {
        height: 80vh;
    }
}
