/* ---- HERO BANNER ---- */

.HeroBanner {
    background: linear-gradient(135deg, #1a4a7a 0%, #2c6fa8 60%, #5bb8d4 100%);
    color: white;
    padding: 36px 28px;
    border-radius: 10px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.HeroTesto h1 {
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 10px;
}

.HeroTesto p {
    font-size: 0.9rem;
    color: #cce4f7;
    max-width: 440px;
    line-height: 1.6;
}

.LogoHero {
    max-height: 60px;
    width: auto;
    margin-bottom: 14px;
    display: block;
}

.HeroBot {
    padding: 12px 26px;
    background: #e8a020;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-block;
    text-decoration: none;
}

.HeroBot:hover { background: #d4911a; color: white; }

/* ---- SEZIONE ---- */

.SezioneTitle {
    font-size: 1rem;
    font-weight: 900;
    color: #1a4a7a;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 3px solid #5bb8d4;
    display: block;
}

/* ---- GRIGLIA LIBRI ---- */

.GrigliaLibri {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.CardLibro {
    background: #fff;
    border: 1px solid #e0e8f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
}

.CardLibro:hover {
    box-shadow: 0 6px 20px rgba(26,74,122,0.13);
    transform: translateY(-3px);
}

.CardImmagine {
    position: relative;
    background: #e8f0f8;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.CardImmagine img {
    max-height: 190px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.BadgeEsaurito {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #c0392b;
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 3px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1;
}

.BadgeNovita {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #27ae60;
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 3px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1;
}

.CardTesto {
    padding: 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.CardSoggetto {
    font-size: 0.65rem;
    color: #5bb8d4;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.CardTitolo {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a4a7a;
    line-height: 1.3;
    flex: 1;
}

.CardTitolo a { color: #1a4a7a; }
.CardTitolo a:hover { color: #5bb8d4; }

.CardAutore {
    font-size: 0.75rem;
    color: #666;
}

.CardPrezzo {
    font-size: 1rem;
    font-weight: 900;
    color: #1a4a7a;
    margin-top: 4px;
}

.CardFooter {
    padding: 0 12px 12px 12px;
}

.BotDettaglio {
    display: block;
    width: 100%;
    padding: 8px;
    background: #e8a020;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s;
}

.BotDettaglio:hover { background: #d4911a; color: white; }

.BotEsaurito {
    display: block;
    width: 100%;
    padding: 8px;
    background: #e0e0e0;
    color: #999;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
}

/* ---- RESPONSIVE ---- */

@media only screen and (min-width: 500px) {
    .GrigliaLibri {
        grid-template-columns: repeat(4, 1fr);
    }

    .HeroBanner {
        flex-direction: row;
    }
}

@media only screen and (max-width: 499px) {
    .HeroBanner {
        flex-direction: column;
        text-align: center;
    }

    .HeroTesto h1 { font-size: 1.3rem; }
}
