/* =============================================================================
 * Booster · Blog (blog.html) și pagina de articol (articol-*.html)
 *
 * Conținutul e cel din pagina „Blog" a clientului: titlul, filtrele pe
 * subiecte, articolul recomandat și cele șase articole.
 * Designul e al site-ului: antetul paginii de cazuri (cazuri.css), filtrele
 * sunt opțiunile din planificator (.chip), cardurile au rama albă a cardurilor
 * de caz de pe pagina principală, cu fotografii de pe Unsplash și etichetele
 * în culorile serviciilor.
 * Doar articolul recomandat are deocamdată pagina lui; celelalte carduri nu
 * sunt linkuri. Pagina de articol folosește aceleași carduri, la final.
 * ========================================================================== */

/* Antetul e .cases-hero din cazuri.css; eticheta stă deasupra titlului, iar
   titlul, mai lung decât cel al cazurilor, are loc pe două rânduri. */
.blog-hero .eyebrow {
    margin-bottom: 12px;
}

.blog-hero .cases-hero__title {
    max-width: 66rem;
}

/* -----------------------------------------------------------------------------
 * Filtrele: opțiunile din planificator, centrate sub antet
 * -------------------------------------------------------------------------- */

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    margin: 40px 0 0;
    padding: 0;
    border: 0;
}

.blog-filters[hidden] {
    display: none;
}

/* -----------------------------------------------------------------------------
 * Articolele: rama albă a cardurilor de caz de pe pagina principală, cu o
 * fotografie pe tot cadrul; eticheta are culorile cardului de servicii
 * (648:205 … 648:300), iar fundalul lui ține locul pozei până se încarcă.
 * -------------------------------------------------------------------------- */

.blog-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.post {
    --tag-bg: #f5cdb2;
    --tag-ink: #8a4426;
    --media: #fbe3d0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 14.586px;
    border-radius: 36.464px;
    background-color: #ffffff;
    box-shadow: var(--shadow-card);
}

.post[hidden] {
    display: none;
}

.post__media {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 220px;
    padding: 20px;
    overflow: hidden;
    border-radius: 24.309px;
    background: var(--media);
}

.post__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

.post__tag {
    position: relative;
    padding: 6px 12px;
    border-radius: 6px;
    background-color: var(--tag-bg);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: normal;
    color: var(--tag-ink);
}

.post__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 0 10px 10px;
}

.post__title {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.post__text {
    font-size: 1rem;
    line-height: 1.55;
    color: rgba(32, 32, 32, 0.75);
    text-wrap: pretty;
}

.post__meta {
    margin-top: auto;
    padding-top: 6px;
    font-size: 0.875rem;
    color: var(--ink-muted);
}

/* Culorile serviciilor; Meta Ads are un roz, ca să nu semene cu Google Ads. */
.post--meta {
    --tag-bg: #f6cfc9;
    --tag-ink: #8a3f37;
    --media: linear-gradient(146deg, #fce6e2 8%, #f2b5ab 118%);
}

.post--crm {
    --tag-bg: #dfd0f0;
    --tag-ink: #5e4a85;
    --media: linear-gradient(148.417deg, #ede4f7 2.076%, #d3bdec 99.636%);
}

.post--seo {
    --tag-bg: #cbd9f0;
    --tag-ink: #3e5480;
    --media: linear-gradient(144.758deg, #e1e9f7 3.842%, #a9bfe5 117.9%);
}

.post--raport {
    --tag-bg: #f5e3a8;
    --tag-ink: #7a6218;
    --media: linear-gradient(149.393deg, #fbf0ce 6.754%, #f1d788 122.42%);
}

.post--web {
    --tag-bg: #d3e3c2;
    --tag-ink: #4f6b45;
    --media: linear-gradient(146.882deg, #e6eedc 10.615%, #c0daa0 106%);
}

/* Articolul recomandat: pe tot rândul, cu fotografia în stânga și eticheta
   portocalie peste ea. */
.post--feature {
    --media: var(--surface-page);
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 18px 48px;
}

.post--feature .post__media {
    align-items: flex-start;
    min-height: 340px;
    padding: 24px;
}

.post__label {
    position: relative;
    padding: 7px 12px;
    border-radius: 6px;
    background-color: var(--brand-orange);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: normal;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
}

.post--feature .post__body {
    gap: 16px;
    padding: 24px 40px 24px 0;
}

.post--feature .post__meta {
    margin-top: 0;
    padding-top: 0;
    font-weight: 500;
    color: var(--brand-orange);
}

.post--feature .post__title {
    font-size: clamp(1.75rem, 1.25rem + 1.3vw, 2.5rem);
    line-height: 1.12;
    letter-spacing: -0.025em;
}

.post--feature .post__text {
    max-width: 34rem;
    font-size: var(--text-lead);
}

/* Titlul articolului recomandat e linkul și acoperă tot cardul, ca la
   cardurile de caz de pe pagina principală. */
.post--feature {
    position: relative;
    transition: transform var(--duration) var(--ease);
}

.post--feature:has(.post__link):hover {
    transform: translateY(-4px);
}

.post__link::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.post__link:focus-visible {
    outline: none;
}

.post__link:focus-visible::after {
    outline: 2px solid var(--brand-orange);
    outline-offset: 3px;
}

.post__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-weight: 500;
    color: var(--brand-orange);
}

/* =============================================================================
 * Pagina de articol
 * ========================================================================== */

/* Bara de sus: înapoi la blog, ca pe paginile de caz */
.article-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: clamp(7rem, 4.5rem + 4vw, 9.5rem);
    font-size: 0.875rem;
    color: var(--ink-muted);
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    transition: color var(--duration) var(--ease);
}

.article-back:hover {
    color: var(--brand-orange);
}

/* Antetul: eticheta (culorile Google Ads ale cardului), titlul și rezumatul,
   centrate */
.article-hero {
    --tag-bg: #f5cdb2;
    --tag-ink: #8a4426;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-top: 40px;
    text-align: center;
}

.article-hero__title {
    max-width: 62rem;
    font-size: clamp(2.25rem, 1.4rem + 2.6vw, 4rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.article-hero__lead {
    max-width: 44rem;
    font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
    line-height: 1.5;
    color: var(--ink-lead);
    text-wrap: pretty;
}

/* Fotografia, cât containerul */
.article-cover {
    margin-top: 48px;
}

.article-cover__photo {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    border-radius: 34.09px;
    background-color: var(--surface-page);
}

/* Cuprinsul rămâne lângă text cât se citește */
.article-layout {
    display: grid;
    grid-template-columns: 15rem minmax(0, 44rem);
    justify-content: center;
    gap: 64px;
    margin-top: clamp(3rem, 2rem + 3vw, 5rem);
}

.article-toc {
    position: sticky;
    top: 32px;
    align-self: start;
    padding: 24px;
    border-radius: 22.73px;
    background-color: var(--surface-page);
}

.article-toc__title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ink-muted);
}

.article-toc ol {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
    counter-reset: toc;
}

.article-toc li {
    display: flex;
    gap: 10px;
    font-size: 0.9375rem;
    line-height: 1.4;
    counter-increment: toc;
}

.article-toc li::before {
    content: counter(toc, decimal-leading-zero);
    flex: none;
    font-weight: 600;
    color: var(--brand-orange);
}

.article-toc a {
    transition: color var(--duration) var(--ease);
}

.article-toc a:hover {
    color: var(--brand-orange);
}

/* Textul */
.article-body {
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(32, 32, 32, 0.85);
}

.article-body > * + * {
    margin-top: 20px;
}

.article-body__intro {
    font-size: 1.3125rem;
    line-height: 1.55;
    color: var(--ink);
}

.article-body h2 {
    margin-top: 56px;
    font-size: clamp(1.5rem, 1.2rem + 0.9vw, 2rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ink);
    scroll-margin-top: 32px;
}

.article-body h2 + * {
    margin-top: 16px;
}

.article-body strong {
    font-weight: 500;
    color: var(--ink);
}

.article-body ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Steluța de la listele cardurilor de servicii; rândul rămâne text obișnuit,
   ca bucățile îngroșate să curgă în frază. */
.article-body ul li {
    position: relative;
    padding-left: 26px;
}

.article-body ul li::before {
    content: '';
    position: absolute;
    top: 0.5em;
    left: 0;
    width: 11.2px;
    height: 14px;
    background: url('../img/decor/bullet-black.svg') no-repeat 0 0 / 100% 100%;
}

/* Exemplul din proiecte: caseta crem, cu cifrele cazului */
.article-body .article-case {
    margin-top: 48px;
    padding: clamp(24px, 1rem + 1.5vw, 36px);
    border-radius: 22.73px;
    background-color: var(--surface-page);
}

.article-case > * + * {
    margin-top: 12px;
}

.article-case__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-orange);
}

.article-case__title {
    font-size: 1.375rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--ink);
}

.article-case p:not([class]) {
    font-size: 1rem;
    line-height: 1.6;
}

.article-case .article-case__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.article-case__stats div {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-end;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    background-color: #ffffff;
}

.article-case__stats dt {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--ink-muted);
}

.article-case__stats dd {
    margin: 0;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.article-case .article-case__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--brand-orange);
}

/* Lista de verificare: chenarul punctat portocaliu, cu bife */
.article-body .article-check {
    margin-top: 48px;
    padding: clamp(24px, 1rem + 1.5vw, 36px);
    border: 2px dashed var(--brand-orange);
    border-radius: 22.73px;
}

.article-body .article-check__title {
    margin-top: 0;
    font-size: 1.375rem;
}

.article-check ol {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}

.article-check li {
    display: flex;
    gap: 14px;
    font-size: 1.0625rem;
    line-height: 1.55;
}

.article-check li::before {
    content: '';
    flex: none;
    width: 24px;
    height: 24px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--brand-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* Mai multe din blog: cardurile blogului */
.article-more {
    margin-top: clamp(5rem, 3rem + 4vw, 8rem);
}

.article-more__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.article-more__title {
    font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.article-more .blog-list {
    margin-top: 32px;
}

/* Finalul: chenarul punctat, la distanța de pe pagina de cazuri */
.page-blog .cta {
    margin-top: clamp(6rem, 3rem + 6vw, 10rem);
    margin-bottom: var(--section-gap);
}

/* -----------------------------------------------------------------------------
 * Ecrane înguste
 * -------------------------------------------------------------------------- */

@media (max-width: 1023px) {
    .blog-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-layout {
        grid-template-columns: minmax(0, 44rem);
        gap: 40px;
    }

    .article-toc {
        position: static;
    }

    .article-more .post:nth-child(3) {
        display: none;
    }

    .post--feature {
        grid-template-columns: minmax(0, 1fr);
    }

    .post--feature .post__media {
        min-height: 280px;
    }

    .post--feature .post__body {
        padding: 6px 10px 12px;
    }
}

@media (max-width: 640px) {
    .blog-filters {
        justify-content: flex-start;
    }

    .article-cover {
        margin-top: 32px;
    }

    .article-cover__photo {
        aspect-ratio: 4 / 3;
        border-radius: 20px;
    }

    .article-body {
        font-size: 1.0625rem;
    }

    .article-body__intro {
        font-size: 1.1875rem;
    }

    .article-case .article-case__stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .article-more .post:nth-child(3) {
        display: flex;
    }

    .blog-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .post {
        border-radius: 30px;
    }

    .post__media {
        min-height: 190px;
    }

    .post--feature .post__media {
        min-height: 230px;
        padding: 18px;
    }
}
