/* ==========================================================
   BLOG / SINGOLO ARTICOLO CON SIDEBAR
   ==========================================================

   Questo file gestisce layout e stile del singolo articolo
   del blog nel template Divi.

   Classi assegnate nel Theme Builder:
   - Sezione: blog-post-section
   - Riga: blog-post-layout
   - Colonna contenuto: blog-post-main blog-post-card
   - Colonna sidebar: blog-post-sidebar
   - Modulo introduzione custom: blog-single-intro
   - Modulo contenuto: blog-post-content

   Classi usate nel contenuto articolo:
   - blog-post-logo
   - blog-paypal-note
   - blog-post-note

   Obiettivo:
   - desktop: contenuto a sinistra, sidebar a destra
   - mobile: contenuto sopra, sidebar sotto
   - header articolo gestito con shortcode custom
   ========================================================== */


/* ==========================================================
   SEZIONE ESTERNA PAGINA
   ========================================================== */
.blog-post-section {
    background-color: #f9f9f6;
    padding: 50px 20px;
    color: #2f2f2f;
}


/* ==========================================================
   RIGA PRINCIPALE A 2 COLONNE
   ========================================================== */
.et_pb_row.blog-post-layout {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 30px !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 !important;
}


/* ==========================================================
   COLONNA CONTENUTO ARTICOLO
   ========================================================== */
.et_pb_row.blog-post-layout > .et_pb_column.blog-post-main {
    flex: 0 0 68% !important;
    width: 68% !important;
    max-width: 68% !important;
    margin: 0 !important;
    box-sizing: border-box;
}


/* ==========================================================
   COLONNA SIDEBAR
   ========================================================== */
.et_pb_row.blog-post-layout > .et_pb_column.blog-post-sidebar {
    flex: 0 0 32% !important;
    width: 32% !important;
    max-width: 32% !important;
    margin: 0 !important;
    box-sizing: border-box;
}


/* ==========================================================
   CARD ARTICOLO
   ========================================================== */
.blog-post-card {
    background-color: #ffffff;
    padding: 30px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
    border: 1px solid #eceae4;
}


/* ==========================================================
   RESET MODULI DIVI NELLA CARD
   ========================================================== */
.blog-post-card .et_pb_module {
    margin-bottom: 0 !important;
}

.blog-post-card .et_pb_module + .et_pb_module {
    margin-top: 25px !important;
}


/* ==========================================================
   HEADER CUSTOM SINGOLO ARTICOLO
   ==========================================================

   Modulo Codice con classe:
   - blog-single-intro

   Contenuto atteso:
   <div class="blog-breadcrumb">[wpseo_breadcrumb]</div>
   <div class="blog-single-header"><h1>[single_post_title]</h1></div>
   <div class="blog-single-meta">[single_post_meta]</div>
   ========================================================== */
.blog-single-intro {
    margin-bottom: 30px;
}

/* breadcrumb */
.blog-single-intro .blog-breadcrumb {
    font-size: 13px;
    line-height: 1.5;
    color: #888;
    margin-bottom: 12px;
}

.blog-single-intro .blog-breadcrumb a {
    color: #d97b66;
    text-decoration: none;
}

.blog-single-intro .blog-breadcrumb a:hover {
    color: #c46d58;
    text-decoration: underline;
}

/* titolo */
.blog-single-intro .blog-single-header h1 {
    font-size: 32px;
    line-height: 1.25;
    color: #2f2f2f;
    margin: 0 0 10px;
}

/* meta custom singolo */
.blog-single-intro .blog-single-meta,
.blog-single-intro .custom-single-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    line-height: 1.6;
    color: #8a867d;
    margin: 0;
}

/* data */
.blog-single-intro .blog-single-meta .meta-date,
.blog-single-intro .custom-single-meta .meta-date {
    font-size: 12px;
    color: #a5a199;
    letter-spacing: 0.2px;
}

/* separatore tra data e categorie */
.blog-single-intro .blog-single-meta .meta-sep,
.blog-single-intro .custom-single-meta .meta-sep {
    color: #c4c0b6;
    margin: 0 2px;
}

/* badge categorie */
.blog-single-intro .blog-single-meta .meta-badge,
.blog-single-intro .custom-single-meta .meta-badge {
    display: inline-block;
    background-color: #f3f2ed;
    color: #6f6b62 !important;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    padding: 5px 10px;
    border-radius: 20px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.blog-single-intro .blog-single-meta .meta-badge:hover,
.blog-single-intro .custom-single-meta .meta-badge:hover {
    background-color: #e6e3db;
    color: #4f4c45 !important;
}

/* pallino tra categorie */
.blog-single-intro .blog-single-meta .cat-dot,
.blog-single-intro .custom-single-meta .cat-dot {
    display: inline-block;
    margin: 0 4px;
    color: #c4c0b6;
    font-size: 10px;
    line-height: 1;
    vertical-align: middle;
}


/* ==========================================================
   IMMAGINE IN EVIDENZA
   ========================================================== */
.blog-post-card .et_pb_post_featured_image {
    margin-bottom: 0 !important;
}

.blog-post-card .et_pb_post_featured_image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}


/* ==========================================================
   CONTENUTO ARTICOLO
   ========================================================== */
.blog-post-content,
.blog-post-content .et_pb_text_inner {
    font-size: 14px;
    color: #2f2f2f;
}

.blog-post-content .et_pb_text_inner > *:first-child {
    margin-top: 0;
}

.blog-post-content .et_pb_text_inner > *:last-child {
    margin-bottom: 0;
}

/* primo paragrafo più editoriale */
.blog-post-content p:first-of-type {
    font-size: 18px;
    line-height: 1.75;
    color: #4a4a4a;
}

/* paragrafi */
.blog-post-content p {
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 18px;
}

/* titoli */
.blog-post-content h2 {
    font-size: 30px;
    line-height: 1.25;
    color: #d97b66;
    margin-top: 42px;
    margin-bottom: 18px;
}

.blog-post-content h3 {
    font-size: 22px;
    line-height: 1.35;
    color: #d97b66;
    margin-top: 30px;
    margin-bottom: 14px;
}

.blog-post-content h4 {
    font-size: 18px;
    line-height: 1.4;
    color: #2f2f2f;
    margin-top: 22px;
    margin-bottom: 10px;
}

/* liste */
.blog-post-content ul,
.blog-post-content ol {
    margin: 24px 0;
    padding-left: 24px;
}

.blog-post-content li {
    font-size: 14px;
    line-height: 1.85;
    margin-bottom: 10px;
}

/* link */
.blog-post-content a {
    color: #d97b66;
    text-decoration: underline;
}

.blog-post-content a:hover {
    color: #c46d58;
}

/* strong */
.blog-post-content strong {
    font-weight: 700;
}

/* citazioni */
.blog-post-content blockquote {
    background: #f7f8f4;
    border-left: 4px solid #d97b66;
    padding: 22px;
    margin: 32px 0;
    border-radius: 8px;
    font-style: italic;
}

/* immagini nel contenuto */
.blog-post-content img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 32px 0;
    border-radius: 8px;
}

/* hr */
.blog-post-content hr {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 35px 0;
}

/* tabelle */
.blog-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 14px;
}

.blog-post-content th,
.blog-post-content td {
    border: 1px solid #e5e5e5;
    padding: 10px 12px;
    text-align: left;
}

.blog-post-content th {
    background-color: #f9f9f6;
    color: #2f2f2f;
    font-weight: 700;
}


/* ==========================================================
   LOGO ARTICOLO
   ========================================================== */
.blog-post-logo {
    text-align: center;
    margin-bottom: 15px;
}

.blog-post-logo img {
    display: inline-block !important;
    width: auto !important;
    max-width: 180px !important;
    height: auto !important;
    margin: 0 auto !important;
    border-radius: 0 !important;
}


/* ==========================================================
   PAYPAL NOTE
   ========================================================== */
.blog-paypal-note {
    margin-top: 15px;
}

.blog-paypal-note img {
    display: inline-block !important;
    width: auto !important;
    max-width: none !important;
    height: 28px !important;
    margin: 0 0 0 8px !important;
    vertical-align: middle;
    border-radius: 0 !important;
}


/* ==========================================================
   BOX INFO / CTA NEL CONTENUTO
   ========================================================== */
.blog-post-content .blog-post-note {
    background: #f7f8f4;
    border-left: 4px solid #d97b66;
    padding: 22px;
    margin: 32px 0;
    border-radius: 8px;
}

.blog-post-content .blog-post-note h3,
.blog-post-content .blog-post-note h4 {
    color: #d97b66;
    margin-top: 0;
    margin-bottom: 10px;
}

.blog-post-content .blog-post-note p:last-child {
    margin-bottom: 0;
}


/* ==========================================================
   BOTTONI NEL CONTENUTO E SIDEBAR
   ========================================================== */
.blog-post-content .btn-text,
.blog-post-sidebar .btn-text {
    display: inline-block;
    background-color: #d97b66;
    color: #ffffff !important;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.blog-post-content .btn-text:hover,
.blog-post-sidebar .btn-text:hover {
    background-color: #c46d58;
    color: #ffffff !important;
    text-decoration: none;
}


/* ==========================================================
   SIDEBAR
   ========================================================== */
.blog-post-sidebar .et_pb_module,
.blog-post-sidebar .blog-sidebar-box,
.blog-post-sidebar .blog-sidebar-posts {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
    border: 1px solid #eceae4;
    margin-bottom: 20px !important;
    transition: all 0.2s ease;
}

.blog-post-sidebar .et_pb_module:hover,
.blog-post-sidebar .blog-sidebar-box:hover,
.blog-post-sidebar .blog-sidebar-posts:hover {
    transform: translateY(-2px);
}

.blog-post-sidebar h3 {
    font-size: 18px;
    line-height: 1.35;
    color: #d97b66;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eceae4;
}

.blog-post-sidebar a {
    color: #d97b66;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-post-sidebar a:hover {
    color: #c46d58;
    text-decoration: underline;
}

/* lista sezioni più pulita */
.blog-sidebar-links {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.blog-sidebar-links li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.blog-sidebar-links li::before {
    content: "–";
    position: absolute;
    left: 0;
    top: 0;
    color: #d97b66;
}

.blog-sidebar-links li:last-child {
    margin-bottom: 0;
}


/* ==========================================================
   MODULO BLOG IN SIDEBAR
   ========================================================== */
.blog-post-sidebar .et_pb_post {
    margin-bottom: 20px !important;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.blog-post-sidebar .et_pb_post:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0;
    border-bottom: none;
}

.blog-post-sidebar .entry-title,
.blog-post-sidebar .et_pb_post h2 {
    font-size: 18px;
    line-height: 1.45;
    margin-bottom: 8px;
}

.blog-post-sidebar .post-meta,
.blog-post-sidebar .et_pb_post .post-meta {
    font-size: 12px;
    color: #8b8b8b;
    line-height: 1.5;
    margin-bottom: 0;
}

.blog-post-sidebar .post-content,
.blog-post-sidebar .et_pb_post_content {
    font-size: 13px;
    line-height: 1.6;
    color: #666;
    margin-top: 8px;
}


/* ==========================================================
   CTA SIDEBAR PIÙ FORTE
   ========================================================== */
.blog-post-sidebar .btn-text {
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    border-radius: 8px;
    letter-spacing: 0.3px;
}


/* ==========================================================
   RESPONSIVE TABLET / MOBILE
   ========================================================== */
@media (max-width: 980px) {
    .et_pb_row.blog-post-layout {
        display: block !important;
        max-width: 900px !important;
    }

    .et_pb_row.blog-post-layout > .et_pb_column.blog-post-main,
    .et_pb_row.blog-post-layout > .et_pb_column.blog-post-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }

    .blog-post-sidebar {
        margin-top: 45px !important;
    }

    .blog-post-sidebar .et_pb_module:first-child,
    .blog-post-sidebar .blog-sidebar-box:first-child,
    .blog-post-sidebar .blog-sidebar-posts:first-child {
        margin-top: 0 !important;
    }
}


/* ==========================================================
   RESPONSIVE MOBILE STRETTO
   ========================================================== */
@media (max-width: 600px) {
    .blog-post-section {
        padding: 30px 15px;
    }

    .blog-post-card {
        padding: 20px 18px;
    }

    .blog-post-card .et_pb_module + .et_pb_module {
        margin-top: 20px !important;
    }

    .blog-single-intro .blog-single-header h1 {
        font-size: 26px;
    }

    .blog-post-content p:first-of-type {
        font-size: 16px;
    }

    .blog-post-content h2 {
        font-size: 24px;
    }

    .blog-post-content h3 {
        font-size: 20px;
    }

    .blog-post-content h4 {
        font-size: 17px;
    }

    .blog-post-logo img {
        max-width: 150px !important;
    }

    .blog-paypal-note img {
        height: 24px !important;
    }

    .blog-post-sidebar .et_pb_module,
    .blog-post-sidebar .blog-sidebar-box,
    .blog-post-sidebar .blog-sidebar-posts {
        padding: 18px;
        margin-bottom: 18px !important;
    }

    .blog-post-sidebar h3 {
        font-size: 18px;
    }

    .blog-post-sidebar .entry-title,
    .blog-post-sidebar .et_pb_post h2 {
        font-size: 16px;
    }
}


/* ==========================================================
   DISTACCO TRA ARTICOLO E SIDEBAR SU MOBILE
   ========================================================== */
@media (max-width: 980px) {
    .et_pb_row.blog-post-layout > .et_pb_column.blog-post-sidebar {
        margin-top: 55px !important;
    }

    .et_pb_row.blog-post-layout > .et_pb_column.blog-post-sidebar .et_pb_module:first-child {
        margin-top: 0 !important;
    }
}



/* ==========================================================
   SHARE SOCIAL PREMIUM
   ========================================================== */

.blog-share {
    margin-top: 45px;
    padding-top: 24px;
    border-top: 1px solid #e5e5e5;
}

.blog-share-title {
    font-size: 18px;
    font-weight: 600;
    color: #2f2f2f;
    margin-bottom: 16px;
}

.blog-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* base bottone */
.blog-share .share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

/* icona cerchio */
.blog-share .share-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* immagine icona */
.blog-share .share-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* ======================
   FACEBOOK
   ====================== */
.blog-share .share-btn.facebook {
    background-color: #eef4ff;
    color: #1877f2 !important;
}

.blog-share .share-btn.facebook .share-icon {
    background-color: #1877f2;
}

.blog-share .share-btn.facebook:hover {
    background-color: #e2edff;
}

/* ======================
   WHATSAPP
   ====================== */
.blog-share .share-btn.whatsapp {
    background-color: #eefaf3;
    color: #1fa855 !important;
}

.blog-share .share-btn.whatsapp .share-icon {
    background-color: #25d366;
}

.blog-share .share-btn.whatsapp:hover {
    background-color: #e2f6ea;
}

/* ======================
   EMAIL
   ====================== */
.blog-share .share-btn.email {
    background-color: #f5f3ef;
    color: #6f6b62 !important;
}

.blog-share .share-btn.email .share-icon {
    background-color: #6f6b62;
}

.blog-share .share-btn.email:hover {
    background-color: #ece7de;
}