﻿/* =========================================================
   LIBRI / BOOKS
   Editorial presentation for Libri.aspx + Libri_dettagli.aspx
   ========================================================= */

.books-page,
.book-detail-page{
    padding:58px 0 76px;
}

.books-wrap{
    max-width:1000px;
    margin:0 auto;
    padding-left:32px;
    padding-right:32px;
}

.books-header{
    max-width:760px;
    margin:0 0 48px;
    padding-bottom:34px;
    border-bottom:1px solid var(--ink);
}

.books-header h1,
.book-detail-header h1{
    font-family:var(--font-serif);
    font-weight:500;
    letter-spacing:-0.015em;
    color:var(--ink);
}

.books-header h1{
    margin:8px 0 14px;
    font-size:clamp(38px,5vw,52px);
    line-height:1.08;
}

.books-header p{
    max-width:680px;
    margin:0;
    font-family:var(--font-serif);
    font-size:19px;
    line-height:1.55;
    color:var(--text-soft);
}

/* GridView reset */
.books-grid,
.books-grid tbody,
.books-grid tr,
.books-grid td{
    display:block;
    width:100%;
}

.books-grid{
    border:0!important;
    border-collapse:collapse;
    background:transparent!important;
}

.books-grid td{
    padding:0!important;
    border:0!important;
    background:transparent!important;
}

/* Book index rows */
.book-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:36px;
    align-items:center;
    padding:28px 0;
    border-top:1px solid var(--line);
}

.books-grid tr:last-child .book-row{
    border-bottom:1px solid var(--line);
}

.book-labels{
    min-height:15px;
    margin-bottom:6px;
}

.book-new{
    display:inline-block;
    font-family:var(--font-mono);
    font-size:10.5px;
    line-height:1;
    letter-spacing:.07em;
    text-transform:uppercase;
    color:var(--wine);
}

.book-title{
    margin:0 0 7px;
    font-family:var(--font-serif);
    font-size:24px;
    line-height:1.25;
    font-weight:500;
}

.book-title a{
    color:var(--ink);
    text-decoration:none;
}

.book-title a:hover{
    color:var(--wine);
}

.book-meta{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:5px;
    font-family:var(--font-sans);
    font-size:13.5px;
    line-height:1.5;
    color:var(--text-soft);
}

.book-publisher{
    display:inline-flex;
    gap:5px;
    align-items:center;
}

.book-meta-separator{
    color:var(--line);
}

.book-row-actions{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:7px;
    min-width:145px;
}

.book-action{
    font-family:var(--font-sans);
    font-size:13.5px;
    font-weight:500;
    color:var(--sage-deep)!important;
    text-decoration:none!important;
    border-bottom:1px solid var(--sage);
    white-space:nowrap;
}

.book-action:hover{
    color:var(--ink)!important;
    border-color:var(--ink);
}

.book-action-secondary{
    font-size:12.5px;
    color:var(--text-soft)!important;
    border-color:var(--line);
}

/* Detail page */
.book-back{
    margin-bottom:34px;
}

.book-back a,
.book-detail-footer a{
    font-family:var(--font-sans);
    font-size:13px;
    font-weight:500;
    color:var(--sage-deep);
    text-decoration:none;
    border-bottom:1px solid var(--sage);
}

.book-detail-view,
.book-detail-view tbody,
.book-detail-view tr,
.book-detail-view td{
    display:block;
    width:100%;
}

.book-detail-view{
    border:0!important;
    background:transparent!important;
}

.book-detail-view td{
    padding:0!important;
    border:0!important;
    background:transparent!important;
}

.book-detail-header{
    max-width:820px;
    margin-bottom:42px;
    padding-bottom:32px;
    border-bottom:1px solid var(--ink);
}

.book-detail-header h1{
    margin:8px 0 12px;
    font-size:clamp(30px,4vw,42px);
    line-height:1.15;
}

.book-detail-publisher{
    font-family:var(--font-sans);
    font-size:13.5px;
    color:var(--text-soft);
}

.book-detail-grid{
    display:grid;
    grid-template-columns:240px minmax(0,1fr);
    gap:56px;
    align-items:start;
}

.book-cover-column{
    position:relative;
}

.book-cover{
    display:block;
    width:100%;
    max-width:240px;
    height:auto;
    object-fit:contain;
    box-shadow:0 8px 28px rgba(32,36,31,.10);
}

.book-detail-content{
    min-width:0;
}

.book-detail-section{
    padding:0 0 38px;
    margin:0 0 38px;
    border-bottom:1px solid var(--line);
}

.book-detail-section:last-child{
    margin-bottom:0;
}

.book-rich-text{
    margin-top:12px;
    font-family:var(--font-sans);
    font-size:15.5px;
    line-height:1.78;
    color:var(--text-soft);
}

.book-rich-text p{
    margin:0 0 17px;
}

.book-rich-text p:last-child{
    margin-bottom:0;
}

.book-rich-text a{
    color:var(--sage-deep);
    border-bottom:1px solid var(--sage);
}

.book-detail-footer{
    margin-top:54px;
    padding-top:26px;
    border-top:1px solid var(--ink);
}

@media(max-width:760px){
    .books-page,
    .book-detail-page{
        padding:42px 0 58px;
    }

    .books-wrap{
        padding-left:20px;
        padding-right:20px;
    }

    .books-header{
        margin-bottom:34px;
    }

    .books-header p{
        font-size:17.5px;
    }

    .book-row{
        grid-template-columns:1fr;
        gap:15px;
        padding:24px 0;
    }

    .book-row-actions{
        align-items:flex-start;
        min-width:0;
    }

    .book-detail-grid{
        grid-template-columns:1fr;
        gap:34px;
    }

    .book-cover{
        max-width:200px;
    }

    .book-detail-header{
        margin-bottom:32px;
    }

    .book-rich-text{
        font-size:15px;
        line-height:1.72;
    }
}


/* Simplified Libri heading: avoid repeating LIBRI twice. */
.books-header-simple{
    padding-bottom:30px;
}
.books-header-simple .kicker{
    display:block;
    margin-bottom:12px;
}
.books-header-simple p{
    margin-top:0;
}


@media(max-width:760px){
    .book-download-actions{
        align-items:flex-start;
    }
}


/* Book detail download options */
.book-download-section{
    border-bottom:none;
    padding-bottom:0;
}

.book-download-intro{
    margin:10px 0 18px;
    font-family:var(--font-sans);
    font-size:14px;
    line-height:1.6;
    color:var(--text-soft);
}

.book-detail-downloads{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:4px;
}

.book-download-button{
    display:inline-block;
    width:auto!important;
    min-width:150px;
    padding:12px 20px;
    background:var(--sage-deep)!important;
    border:1px solid var(--sage-deep)!important;
    color:var(--paper)!important;
    border-radius:3px;
    font-family:var(--font-sans);
    font-size:13.5px;
    font-weight:600;
    text-align:center;
    text-decoration:none!important;
}

.book-download-button:hover,
.book-download-button:focus{
    background:var(--ink)!important;
    border-color:var(--ink)!important;
    color:var(--paper)!important;
}

@media(max-width:560px){
    .book-detail-downloads{
        display:block;
    }

    .book-download-button{
        display:block;
        width:100%!important;
        margin-bottom:10px;
    }
}
