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

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

/* ——— ESQUERRA ——— */
.esquerra {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1vh, 12px);
    overflow: hidden;
    margin: clamp(10px, 1.8vh, 20px) 0;
}

.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;
    overflow-y: auto;
    flex: none;
    max-height: 80%;
}

.titol_interior {
    font-size: clamp(0.78rem, 0.85vw, 0.92rem);
    font-weight: bold;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #5d2e0a;
    text-align: center;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    margin-top: clamp(8px, 1.2vh, 16px);
    padding-bottom: 4px;
    border-bottom: 1px solid #e5e0d8;
    margin-bottom: clamp(10px, 1.5vh, 18px);
}

.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: auto;
    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;
    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 ——— */
.dreta {
    flex: 3;
    height: 100%;
    overflow-y: auto;
}

/* ——— GALERIA ——— */
.caixa_fotos {
    height: 100%;
    overflow-y: auto;
    padding: clamp(8px, 1vh, 15px);
}

.fotos {
    display: grid;
    grid-template-columns: repeat(auto-fill, clamp(160px, 14vw, 220px));
    row-gap: clamp(24px, 3vh, 40px);
    column-gap: clamp(10px, 1vw, 15px);
    justify-content: center;
    padding: 10px;
}

.fotos a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 10px;
    width: 100%;
}

.fotos img {
    width: 100%;
    height: clamp(160px, 14vw, 220px);
    object-fit: contain;
    background-color: white;
    padding: 2px;
    border: 6px solid white;
    outline: 1.5px solid #4a2408;
    box-shadow: 8px 12px 20px rgba(0,0,0,0.35);
    margin-bottom: 8px;
    transition: box-shadow 0.2s, outline-color 0.2s;
}

.fotos a:hover img {
    outline-color: #5d2e0a;
    box-shadow: 10px 15px 30px rgba(0,0,0,0.5);
}

.fotos span {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background-color: #f4f1ea;
    color: #5d2e0a;
    font-size: clamp(0.72rem, 0.75vw, 0.85rem);
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    border-radius: 4px;
    border: 1px solid #e5ddd4;
    transition: all 0.25s ease;
}

.fotos a:hover span {
    background-color: #5d2e0a;
    color: #ffffff;
    border-color: #4a2408;
}

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

    .esquerra { overflow: visible; }

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

    .dreta {
        height: auto;
        overflow: visible;
    }

    .fotos {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 24px;
    }

    .fotos img { height: 140px; }
}
