/* =========================================================
   STILE CARD ORIZZONTALI (Condiviso tra Associazioni, Case Editrici, Librerie)
========================================================= */

.libreria-horizontal-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(216, 196, 10, 0.3);
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.libreria-horizontal-card:hover {
    transform: translateY(-5px);
    border-color: #D8C40A;
}

.lib-logo-container {
    flex: 0 0 160px;
    height: 110px;
    background: #ffffff;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 8px;
}

.lib-logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lib-content {
    flex: 1;
    padding: 0 30px;
}

.lib-content h3 {
    color: #D8C40A;
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-family: "Raleway", sans-serif;
    font-weight: 600;
}

.lib-content p {
    color: #e0e0e0;
    margin-bottom: 0;
    font-family: "Poppins", sans-serif;
    font-size: 0.95rem;
}

.btn-custom {
    display: inline-block;
    background-color: transparent;
    border: 1px solid #D8C40A;
    color: #D8C40A;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    font-family: "Roboto", sans-serif;
    white-space: nowrap;
}

.btn-custom:hover {
    background-color: #D8C40A;
    color: #001900;
}

/* =========================================================
   GESTIONE SFONDO UNIFORME E SPAZIATURA FINALE
   Per tutte le pagine che usano questo CSS
========================================================= */

/* 1. SFONDO GRADIENTE SUL BODY */
body.about-page {
    background: linear-gradient(180deg, #001900 0%, #000d00 100%);
    min-height: 100vh;
    margin: 0;
}

/* 2. MAIN - Nessuno sfondo aggiuntivo */
.main {
    background-color: transparent !important;
}

/* 3. DISATTIVA IL PSEUDO-ELEMENTO CHE CAUSA LO SFONDO NERO */
#associazioni.section-bg::before,
#case-editrici.section-bg::before,
#librerie-cristiane.section-bg::before {
    display: none !important;
    content: none !important;
    background: transparent !important;
}

/* 4. SEZIONI - Sfondo trasparente e padding corretto */
#associazioni.section-bg,
#case-editrici.section-bg,
#librerie-cristiane.section-bg {
    background: transparent !important;
    padding-top: 40px;
    padding-bottom: 25px !important;  /* 25px di spazio dal footer */
    position: relative;
}

/* 5. ULTIMA CARD - Rimuove margine inferiore */
.libreria-horizontal-card:last-of-type {
    margin-bottom: 0 !important;
}

/* 6. ULTIMO CONTAINER - Rimuove padding extra */
#associazioni .container:last-child,
#case-editrici .container:last-child,
#librerie-cristiane .container:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 7. SECTION TITLE - Stile e padding ridotto */
.section-title {
    padding-bottom: 20px !important;
}

.section-title h2 {
    color: #ffffff;
    font-family: "Raleway", sans-serif;
    margin-top: 20px;
}

.section-title p {
    color: #b0c4b0;
}

/* =========================================================
   MOBILE RESPONSIVE
========================================================= */
@media (max-width: 768px) {
    .libreria-horizontal-card {
        flex-direction: column;
        text-align: center;
    }
    .lib-content {
        padding: 20px 0;
    }
    .lib-logo-container {
        margin-bottom: 10px;
    }
}