/* ==========================================================================
   Schede articoli del blog: Blog-Fashion.html (#blogGrid) e "Continua a leggere"
   negli articoli (.related-section). Stesso design delle schede dei caroselli
   di about.html (.gt-card): copertina a tutta larghezza, data/meta arancione,
   titolo scuro, sollevamento al passaggio del mouse.
   data-reveal sulla scheda: compare quando entra nello schermo (js/logo-grid.js)
   ========================================================================== */

#blogGrid .blog-entry,
.related-section .blog-entry {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 0;
    background: #fff;
    border: 1px solid #f1ece6;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 30px -18px rgba(16, 42, 67, .35);
    transition: opacity .8s ease, transform .6s cubic-bezier(.2, .8, .2, 1), box-shadow .45s ease;
}

    #blogGrid .blog-entry:hover,
    .related-section .blog-entry:hover {
        transform: translateY(-6px);
        box-shadow: 0 24px 44px -22px rgba(239, 127, 54, .5);
    }

/* copertina: lo stile inline del contenitore ha un raggio proprio, qui lo azzero */
#blogGrid .blog-entry > div:first-child,
.related-section .blog-entry > div:first-child {
    position: relative;
    border-radius: 0 !important;
    background: #f7f9fc;
}

    #blogGrid .blog-entry > div:first-child::before,
    .related-section .blog-entry > div:first-child::before {
        content: "";
        position: absolute;
        inset: 55% 0 0;
        z-index: 1;
        background: linear-gradient(to top, rgba(20, 16, 12, .4), rgba(20, 16, 12, 0));
        pointer-events: none;
    }

    #blogGrid .blog-entry > div:first-child img,
    .related-section .blog-entry > div:first-child img {
        transition: transform .6s cubic-bezier(.2, .8, .2, 1);
    }

#blogGrid .blog-entry:hover > div:first-child img,
.related-section .blog-entry:hover > div:first-child img {
    transform: scale(1.06);
}

/* categoria sulla copertina (pagina Blog): pillola arancione in basso a sinistra */
#blogGrid > [data-cat] .blog-entry > div:first-child::after {
    position: absolute;
    left: 16px;
    bottom: 14px;
    z-index: 2;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    color: #fff;
    background: linear-gradient(135deg, #fbb468, #ef7f36);
    border-radius: 30px;
    padding: 5px 13px;
    box-shadow: 0 8px 18px -8px rgba(239, 127, 54, .9);
}

#blogGrid > [data-cat="marketplace"] .blog-entry > div:first-child::after { content: "Marketplace"; }
#blogGrid > [data-cat="ai"] .blog-entry > div:first-child::after { content: "Intelligenza Artificiale"; }
#blogGrid > [data-cat="pos"] .blog-entry > div:first-child::after { content: "Cassa & POS"; }
#blogGrid > [data-cat="kpi"] .blog-entry > div:first-child::after { content: "Report & KPI"; }
#blogGrid > [data-cat="assistenza"] .blog-entry > div:first-child::after { content: "Assistenza Clienti"; }

/* testo */
#blogGrid .blog-entry .text,
.related-section .blog-entry .text {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 22px 24px 24px !important;
    text-align: left;
}

/* "Articolo in evidenza", "Novità" */
.blog-entry .text .badge.badge-dark {
    align-self: flex-start;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #21c6db;
    background: #e6f9fb;
    border-radius: 30px;
    padding: 5px 12px;
    margin-bottom: 12px !important;
}

#blogGrid .blog-entry .text .meta,
.related-section .blog-entry .text .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-bottom: 8px;
}

    #blogGrid .blog-entry .text .meta > div,
    .related-section .blog-entry .text .meta > div,
    #blogGrid .blog-entry .text .meta > div a,
    .related-section .blog-entry .text .meta > div a {
        margin: 0;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: #ef7f36;
    }

        #blogGrid .blog-entry .text .meta > div a:hover {
            color: #d9681f;
        }

        #blogGrid .blog-entry .text .meta [class^="ion-"],
        .related-section .blog-entry .text .meta [class^="ion-"] {
            color: #21c6db;
            font-size: 14px;
        }

#blogGrid .blog-entry .text .heading,
.related-section .blog-entry .text .heading {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -.01em;
    margin: 0 0 10px;
}

.related-section .blog-entry .text .heading {
    font-size: 17px;
}

    #blogGrid .blog-entry .text .heading a,
    .related-section .blog-entry .text .heading a {
        color: #2f2f35;
        transition: color .25s ease;
    }

#blogGrid .blog-entry:hover .text .heading a,
.related-section .blog-entry:hover .text .heading a {
    color: #ef7f36;
}

#blogGrid .blog-entry .text p {
    flex: 1 1 auto;
    font-size: 15px;
    line-height: 1.7;
    color: #6b6b73;
    margin: 0 0 16px;
}

/* "Leggi l'articolo": la freccia si allontana al passaggio del mouse */
#blogGrid .blog-entry .text .read,
.related-section .blog-entry .text .read {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 6px;
    font-size: 14.5px;
    font-weight: 500;
    color: #ef7f36;
    transition: gap .25s ease;
}

#blogGrid .blog-entry:hover .text .read,
.related-section .blog-entry:hover .text .read {
    gap: 8px;
}

/* comparsa allo scroll */
.blog-entry[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
}

    .blog-entry[data-reveal].is-in {
        opacity: 1;
        transform: none;
    }

/* seconda colonna leggermente in ritardo, finché la comparsa non è finita */
#blogGrid > :nth-child(even) .blog-entry[data-reveal]:not(.is-settled),
.related-section .row > :nth-child(2) .blog-entry[data-reveal]:not(.is-settled) {
    transition-delay: .12s;
}

.related-section .row > :nth-child(3) .blog-entry[data-reveal]:not(.is-settled) {
    transition-delay: .24s;
}

#blogGrid .blog-entry[data-reveal].is-in:hover,
.related-section .blog-entry[data-reveal].is-in:hover {
    transform: translateY(-6px);
}

@media (max-width: 767.98px) {
    #blogGrid .blog-entry,
    .related-section .blog-entry {
        border-radius: 18px;
    }

    .related-section .blog-entry {
        margin-bottom: 24px;
    }

    #blogGrid .blog-entry .text,
    .related-section .blog-entry .text {
        padding: 18px 18px 20px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-entry[data-reveal] { opacity: 1; transform: none; }
    #blogGrid .blog-entry, .related-section .blog-entry,
    #blogGrid .blog-entry > div:first-child img, .related-section .blog-entry > div:first-child img { transition: none; }
}
