/* =============================================
   AUCA_RECTORIA.CSS
   Requereix plantilla.css com a base.
   ============================================= */

/* ——— LAYOUT ——— */
.cos_interior {
    display: flex;
    gap: 5%;
    height: 100%;
    overflow: hidden;
    padding: clamp(10px, 1.8vh, 20px) 0;
}

/* ——— ESQUERRA ——— */
.esquerra {
    flex: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(6px, 1vh, 10px);
    overflow: hidden;
}

.contenidor-fotos-esquerra {
    position: relative;
    width: 100%;
    height: clamp(28vh, 32vh, 35vh);
    margin-bottom: clamp(6px, 1vh, 10px);
    background-color: white;
    padding: 4px;
    border: 12px solid white;
    outline: 1px solid #4a2408;
    overflow: hidden;
    flex-shrink: 0;
}

.foto-animada {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: black;
    transition: opacity 2s ease-in-out;
}

.foto-animada:nth-child(2) {
    animation: fadeLoop 8s infinite;
}

@keyframes fadeLoop {
    0%, 15%   { opacity: 0; }
    40%, 60%  { opacity: 1; }
    85%, 100% { opacity: 0; }
}

.caixa-text {
    width: 100%;
    flex: none;
    max-height: 40%;
    background: #fdfcfb;
    padding: clamp(10px, 1.2vh, 15px);
    border-radius: 4px;
    border: 1px solid #e5e0d8;
    text-align: justify;
    text-indent: 1.5em;
    font-size: clamp(0.82rem, 0.88vw, 0.95rem);
    line-height: 1.5;
    color: #555;
    overflow-y: auto;
    margin-bottom: clamp(6px, 1vh, 10px);
}

/* ——— BOTONS ——— */
.botons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
    margin-bottom: clamp(6px, 1vh, 10px);
}

.botons a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(6px, 0.8vh, 8px) 10px;
    border: 1px solid #d5c9b8;
    border-radius: 4px;
    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;
}

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

/* ——— CENTRE (AUCA) ——— */
.centre {
    flex: 60;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.centre_panell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.foto-auca {
    display: block;
    max-width: 95%;
    max-height: clamp(70vh, 75vh, 80vh);
    object-fit: contain;
    background-color: white;
    padding: 4px;
    border: 15px solid white;
    outline: 1px solid #4a2408;
    box-shadow: 20px 30px 60px rgba(0,0,0,0.5);
    cursor: zoom-in;
}

/* ——— VISOR ——— */
.visor {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    z-index: 1000;
}

.visor-imatge {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
    background: #fff;
}

.visor-imatge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 12px solid #fff;
    outline: 1px solid #4a2408;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    transform-origin: center center;
    user-select: none;
    pointer-events: none;
}

.btn-tancar {
    flex-shrink: 0;
    align-self: center;
    margin: 8px 0;
    padding: 6px 24px;
    border: 1px solid #d5c9b8;
    border-radius: 4px;
    background: #faf8f4;
    color: #5d2e0a;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-tancar:hover { background: #f0e6da; }

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

    .esquerra, .centre {
        flex: none;
        width: 100%;
    }

    .contenidor-fotos-esquerra { height: 250px; }

    .caixa-text {
        flex: none;
        overflow: visible;
        font-size: 1rem;
    }

    .foto-auca {
        max-height: none;
        width: 100%;
        border-width: 8px;
    }

    .visor-imatge img { border-width: 6px; }
}
