/* =============================================
   AUCA_AGUDES.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;
}

.foto-esquerra {
    width: 100%;
    max-height: clamp(35vh, 40vh, 45vh);
    object-fit: cover;
    background-color: white;
    padding: 4px;
    border: 15px solid white;
    outline: 2px solid #4a2408;
    margin-bottom: clamp(8px, 1.2vh, 15px);
    flex-shrink: 0;
}

.caixa-text {
    width: 100%;
    flex: none;
    max-height: 35%;
    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.6;
    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 {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

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

.foto-auca.activa {
    display: block;
}

/* ——— 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;
}

.visor-botons {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 8px 0;
}

.visor-nav {
    background-color: rgba(93,46,10,0.75);
    color: #fff;
    border: 1.5px solid #4a2408;
    font-size: 1.2rem;
    padding: 6px 20px;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 4px 6px 12px rgba(0,0,0,0.3);
    transition: background 0.2s ease;
    user-select: none;
}

.visor-nav:hover {
    background-color: #5d2e0a;
}

.btn-tancar {
    flex-shrink: 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; }

/* ——— FLETXES ——— */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(93,46,10,0.75);
    color: #ffffff;
    border: 1.5px solid #4a2408;
    font-size: clamp(1.4rem, 1.5vw, 1.8rem);
    padding: clamp(8px, 1vh, 12px) clamp(14px, 1.5vw, 20px);
    cursor: pointer;
    z-index: 100;
    border-radius: 8px;
    box-shadow: 4px 6px 12px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    user-select: none;
}

.prev { left: 10px; }
.next { right: 10px; }

.nav-btn:hover {
    background-color: #5d2e0a;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 6px 10px 18px rgba(0,0,0,0.5);
}

.nav-btn:active {
    transform: translateY(-50%) scale(0.95);
    background-color: #4a2408;
}

/* ——— RESPONSIVE ——— */

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

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

    .foto-esquerra {
        max-height: 250px;
        width: auto;
    }

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

    .centre { height: 500px; }

    .foto-auca {
        max-height: 450px;
        border-width: 8px;
    }

    .nav-btn {
        font-size: 1.5rem;
        padding: 10px 15px;
    }

    .prev { left: 5px; }
    .next { right: 5px; }

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