﻿/* =========================================================
   DINAMIKCRM BLOG
   Final / Consolidated / Optimized
   ========================================================= */


/* =========================================================
   HERO
   ========================================================= */

.dc-blog-hero {
    padding-top: 40px;
    padding-bottom: 20px;
}

    .dc-blog-hero .dc-page-hero-content {
        max-width: 760px;
    }

        .dc-blog-hero .dc-page-hero-content h1 {
            max-width: 760px;
            margin-top: 10px;
            font-size: clamp(38px, 4vw, 52px);
            line-height: 1.05;
        }

        .dc-blog-hero .dc-page-hero-content p {
            max-width: 680px;
            margin-top: 16px;
            font-size: 17px;
            line-height: 1.55;
        }


/* =========================================================
   BLOG LIST PAGE
   ========================================================= */

.dc-blog-page {
    padding: 36px 0 96px;
}

.dc-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--dc-space-lg);
}


/* =========================================================
   SEARCH
   ========================================================= */

.dc-blog-search {
    margin-bottom: 28px;
}

.dc-blog-search-field {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 8px 8px 18px;
    background: var(--dc-surface);
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius-lg);
    box-shadow: var(--dc-shadow-sm);
    transition: border-color .2s ease, box-shadow .2s ease;
}

    .dc-blog-search-field:focus-within {
        border-color: var(--dc-primary);
    }

    .dc-blog-search-field > i {
        color: var(--dc-text-muted);
        font-size: 14px;
    }

    .dc-blog-search-field input {
        width: 100%;
        min-width: 0;
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--dc-text);
        font: inherit;
    }

        .dc-blog-search-field input::placeholder {
            color: var(--dc-text-muted);
        }

    .dc-blog-search-field button {
        min-height: 42px;
        padding: 0 20px;
        border: 0;
        border-radius: var(--dc-radius-md);
        background: var(--dc-primary);
        color: #fff;
        font-weight: 600;
        cursor: pointer;
        transition: transform .2s ease, box-shadow .2s ease;
    }

        .dc-blog-search-field button:hover {
            transform: translateY(-1px);
        }


/* =========================================================
   SEARCH AUTOCOMPLETE
   ========================================================= */

.dc-blog-search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 50;
    display: none;
    max-height: 360px;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--dc-surface);
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius-lg);
    box-shadow: var(--dc-shadow-md);
    text-align: left;
}

    .dc-blog-search-suggestions.is-visible {
        display: block;
    }

    .dc-blog-search-suggestions a {
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 100%;
        padding: 12px 16px;
        color: var(--dc-text);
        background: transparent;
        border-bottom: 1px solid var(--dc-border);
        text-align: left;
        text-decoration: none;
        transition: color .2s ease, background-color .2s ease;
    }

        .dc-blog-search-suggestions a:last-child {
            border-bottom: 0;
        }

        .dc-blog-search-suggestions a:hover,
        .dc-blog-search-suggestions a.is-active {
            background: var(--dc-bg-soft);
        }

    .dc-blog-search-suggestions strong {
        color: var(--dc-text);
        font-size: 13px;
        font-weight: 700;
        line-height: 1.4;
    }

    .dc-blog-search-suggestions span {
        color: var(--dc-text-muted);
        font-size: 11px;
        line-height: 1.4;
    }

    .dc-blog-search-suggestions a:hover strong,
    .dc-blog-search-suggestions a.is-active strong {
        color: var(--dc-primary);
    }


/* =========================================================
   SEARCH SUMMARY
   ========================================================= */

.dc-blog-search-summary {
    margin: 0 0 28px;
    color: var(--dc-text-muted);
    text-align: center;
    font-size: 14px;
}

    .dc-blog-search-summary strong,
    .dc-blog-search-summary span {
        color: var(--dc-text);
    }

    .dc-blog-search-summary a {
        margin-left: 12px;
        color: var(--dc-primary);
        font-weight: 600;
    }


/* =========================================================
   CATEGORIES
   ========================================================= */

.dc-blog-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 36px;
}

    .dc-blog-categories a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        padding: 0 14px;
        color: var(--dc-text-muted);
        background: var(--dc-surface);
        border: 1px solid var(--dc-border);
        border-radius: 999px;
        font-size: 12px;
        font-weight: 700;
        text-decoration: none;
        transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
    }

        .dc-blog-categories a:hover {
            color: var(--dc-primary);
            background: var(--dc-surface-alt);
            border-color: var(--dc-primary);
            transform: translateY(-1px);
        }

        .dc-blog-categories a.is-active {
            color: #fff;
            background: var(--dc-primary);
            border-color: var(--dc-primary);
        }


/* =========================================================
   BLOG CARD
   ========================================================= */

.dc-blog-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: var(--dc-surface);
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius-xl);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

    .dc-blog-card:hover {
        border-color: rgba(37, 99, 235, .35);
        box-shadow: var(--dc-shadow-sm);
        transform: translateY(-2px);
    }

.dc-blog-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--dc-bg-soft);
}

    .dc-blog-card-image img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .25s ease;
    }

.dc-blog-card:hover .dc-blog-card-image img {
    transform: scale(1.025);
}

.dc-blog-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 28px;
}

.dc-blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--dc-space-sm);
    margin-bottom: var(--dc-space-md);
    color: var(--dc-text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.dc-blog-card h2,
.dc-blog-card h3 {
    margin: 0;
    color: var(--dc-text);
    font-size: 21px;
    line-height: 1.35;
}

    .dc-blog-card h2 a,
    .dc-blog-card h3 a {
        color: var(--dc-text);
        text-decoration: none;
    }

        .dc-blog-card h2 a:hover,
        .dc-blog-card h3 a:hover {
            color: var(--dc-primary);
        }

.dc-blog-card p {
    flex: 1;
    margin: var(--dc-space-md) 0 var(--dc-space-lg);
    color: var(--dc-text-muted);
    font-size: 14px;
    line-height: 1.7;
}

.dc-blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--dc-space-sm);
    width: fit-content;
    margin-top: auto;
    color: var(--dc-primary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.dc-blog-empty {
    padding: 64px 24px;
    text-align: center;
    background: var(--dc-bg-soft);
    border: 1px solid var(--dc-border);
    border-radius: var(--dc-radius-xl);
}

    .dc-blog-empty > i {
        margin-bottom: 18px;
        color: var(--dc-text-muted);
        font-size: 32px;
    }

    .dc-blog-empty h2 {
        margin: 0 0 10px;
    }

    .dc-blog-empty p {
        max-width: 560px;
        margin: 0 auto 20px;
        color: var(--dc-text-muted);
    }

    .dc-blog-empty a {
        color: var(--dc-primary);
        font-weight: 600;
    }


/* =========================================================
   PAGINATION
   ========================================================= */

.dc-blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 48px;
}

.dc-blog-pagination-pages {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .dc-blog-pagination-pages a,
    .dc-blog-pagination-pages span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: var(--dc-surface);
        border: 1px solid var(--dc-border);
        border-radius: var(--dc-radius-md);
        color: var(--dc-text);
        font-size: 14px;
        font-weight: 600;
        text-decoration: none;
    }

        .dc-blog-pagination-pages a:hover {
            border-color: var(--dc-primary);
            color: var(--dc-primary);
        }

    .dc-blog-pagination-pages .is-active {
        border-color: var(--dc-primary);
        background: var(--dc-primary);
        color: #fff;
    }

.dc-blog-pagination-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--dc-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

    .dc-blog-pagination-nav:hover {
        color: var(--dc-primary);
    }


/* =========================================================
   BLOG DETAIL
   ========================================================= */

.dc-blog-detail {
    padding: 88px 0 96px;
}

.dc-blog-detail-header {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.dc-blog-detail-meta {
    display: flex;
    justify-content: center;
    gap: var(--dc-space-md);
    margin-bottom: var(--dc-space-lg);
    color: var(--dc-text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.dc-blog-detail-header h1 {
    margin: 0;
    color: var(--dc-text);
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -1.5px;
}

.dc-blog-detail-header > p {
    max-width: 680px;
    margin: var(--dc-space-lg) auto 0;
    color: var(--dc-text-muted);
    font-size: 17px;
    line-height: 1.75;
}

.dc-blog-detail-image {
    max-width: 1000px;
    margin: 56px auto 0;
    overflow: hidden;
    background: var(--dc-bg-soft);
    border-radius: var(--dc-radius-xl);
}

    .dc-blog-detail-image img {
        display: block;
        width: 100%;
        height: auto;
    }


/* =========================================================
   DETAIL CONTENT
   ========================================================= */

.dc-blog-detail-content {
    max-width: 760px;
    margin: 64px auto 0;
    color: var(--dc-text);
    font-size: 16px;
    line-height: 1.8;
}

    .dc-blog-detail-content h2 {
        margin: 48px 0 18px;
        color: var(--dc-text);
        font-size: 30px;
        line-height: 1.25;
    }

    .dc-blog-detail-content h3 {
        margin: 36px 0 14px;
        color: var(--dc-text);
        font-size: 22px;
        line-height: 1.35;
    }

    .dc-blog-detail-content p {
        margin: 0 0 24px;
        color: var(--dc-text-muted);
    }

    .dc-blog-detail-content ul,
    .dc-blog-detail-content ol {
        margin: 0 0 24px;
        padding-left: 24px;
    }

    .dc-blog-detail-content li {
        margin-bottom: 8px;
        color: var(--dc-text-muted);
    }

    .dc-blog-detail-content a {
        color: var(--dc-primary);
        text-decoration: underline;
        text-underline-offset: 2px;
    }

    .dc-blog-detail-content img {
        max-width: 100%;
        height: auto;
    }


/* =========================================================
   DETAIL VIDEO
   ========================================================= */

.dc-blog-video {
    position: relative;
    width: 100%;
    margin: 30px 0;
    padding-top: 56.25%;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--dc-border);
    border-radius: 16px;
}

    .dc-blog-video iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
    }


/* =========================================================
   DETAIL KEYWORDS
   ========================================================= */

.dc-blog-detail-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 760px;
    margin: 36px auto 0;
}

    .dc-blog-detail-keywords a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        padding: 0 14px;
        color: var(--dc-text-muted);
        background: var(--dc-surface);
        border: 1px solid var(--dc-border);
        border-radius: 999px;
        font-size: 12px;
        font-weight: 700;
        text-decoration: none;
        transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
    }

        .dc-blog-detail-keywords a:hover {
            color: var(--dc-primary);
            background: var(--dc-surface-alt);
            border-color: var(--dc-primary);
            transform: translateY(-1px);
        }


/* =========================================================
   RELATED POSTS
   ========================================================= */

.dc-blog-related {
}

.dc-blog-related-head {
    max-width: 720px;
    margin-bottom: 28px;
}

    .dc-blog-related-head h2 {
        margin: 10px 0;
        color: var(--dc-text);
        font-size: 30px;
        font-weight: 750;
        line-height: 1.2;
        letter-spacing: -.02em;
    }

    .dc-blog-related-head p {
        margin: 0;
        color: var(--dc-text-muted);
        font-size: 16px;
        line-height: 1.7;
    }

.dc-blog-related .dc-blog-card-content h3 {
    margin: 0;
}

    .dc-blog-related .dc-blog-card-content h3 a {
        color: var(--dc-text);
        text-decoration: none;
    }

        .dc-blog-related .dc-blog-card-content h3 a:hover {
            color: var(--dc-primary);
        }


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .dc-blog-page {
        padding-bottom: 72px;
    }

    .dc-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dc-blog-detail {
        padding: 72px 0;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    /* Hero */

    .dc-blog-hero {
        padding-top: 32px;
        padding-bottom: 28px;
    }

        .dc-blog-hero .dc-page-hero-content h1 {
            font-size: 36px;
            line-height: 1.06;
        }

        .dc-blog-hero .dc-page-hero-content p {
            margin-top: 14px;
            font-size: 16px;
        }


    /* Page */

    .dc-blog-page {
        padding: 28px 0 56px;
    }

    .dc-blog-grid {
        grid-template-columns: 1fr;
    }


    /* Search */

    .dc-blog-search-field {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 14px;
    }

        .dc-blog-search-field button {
            grid-column: 1 / -1;
            width: 100%;
        }

    .dc-blog-search-suggestions {
        max-height: 300px;
    }

        .dc-blog-search-suggestions a {
            padding: 11px 14px;
        }

    .dc-blog-search-summary {
        text-align: left;
    }


    /* Categories */

    .dc-blog-categories {
        gap: 6px;
        margin-top: 14px;
        margin-bottom: 28px;
    }

        .dc-blog-categories a {
            min-height: 32px;
            padding: 0 12px;
            font-size: 11px;
        }


    /* Cards */

    .dc-blog-card-content {
        padding: 24px;
    }


    /* Pagination */

    .dc-blog-pagination {
        flex-wrap: wrap;
        gap: 14px;
    }

    .dc-blog-pagination-pages {
        order: -1;
        justify-content: center;
        width: 100%;
    }


    /* Detail */

    .dc-blog-detail {
        padding: 56px 0;
    }

    .dc-blog-detail-header {
        text-align: left;
    }

    .dc-blog-detail-meta {
        justify-content: flex-start;
    }

    .dc-blog-detail-header h1 {
        letter-spacing: -1px;
    }

    .dc-blog-detail-image {
        margin-top: 40px;
    }

    .dc-blog-detail-content {
        margin-top: 44px;
    }


    /* Keywords */

    .dc-blog-detail-keywords {
        gap: 6px;
        margin-top: 28px;
    }

        .dc-blog-detail-keywords a {
            min-height: 32px;
            padding: 0 12px;
            font-size: 11px;
        }


    /* Related */

    .dc-blog-related {
        margin-top: 44px;
        padding-top: 36px;
    }

    .dc-blog-related-head h2 {
        font-size: 25px;
    }
}

.dc-blog-detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.dc-blog-meta-chip {
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.dc-blog-meta-chip-category {
    border-color: rgba(34, 92, 255, .18);
    background: rgba(34, 92, 255, .07);
    color: var(--primary);
}

/* =========================================================
   BLOG SHARE
   ========================================================= */

.dc-blog-share {
    margin-top: 48px;
    margin-bottom: 32px;
    padding: 22px;
    border: 1px solid var(--dc-border);
    border-radius: 18px;
    background: var(--dc-surface);
}

.dc-blog-share-head {
    margin-bottom: 16px;
}

    .dc-blog-share-head strong,
    .dc-blog-share-head span {
        display: block;
    }

    .dc-blog-share-head strong {
        margin-bottom: 5px;
        color: var(--dc-text);
        font-size: 1rem;
        font-weight: 750;
        line-height: 1.35;
    }

    .dc-blog-share-head span {
        color: var(--dc-text-muted);
        font-size: .9rem;
        line-height: 1.55;
    }


/* Actions */

.dc-blog-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.dc-blog-share-button {
    min-height: 40px;
    padding: 8px 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--dc-text);
    background: var(--dc-bg);
    border: 1px solid var(--dc-border);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

    .dc-blog-share-button:hover {
        color: var(--dc-primary);
        background: var(--dc-primary-soft);
        border-color: rgba(37, 99, 235, .30);
        box-shadow: var(--dc-shadow-sm);
        transform: translateY(-1px);
    }

    .dc-blog-share-button:focus-visible {
        outline: 2px solid var(--dc-primary);
        outline-offset: 2px;
    }

    .dc-blog-share-button i {
        flex: 0 0 auto;
        font-size: .95rem;
    }


    /* Copied state */

    .dc-blog-share-button.is-copied {
        color: var(--dc-primary);
        background: var(--dc-primary-soft);
        border-color: var(--dc-primary);
    }


    /* Brand hover accents */

    .dc-blog-share-button[data-share-provider="linkedin"]:hover {
        color: #0a66c2;
    }

    .dc-blog-share-button[data-share-provider="whatsapp"]:hover {
        color: #128c7e;
    }

    .dc-blog-share-button[data-share-provider="x"]:hover {
        color: var(--dc-text);
    }


/* =========================================================
   BLOG SHARE MOBILE
   ========================================================= */

@media (max-width: 640px) {

    .dc-blog-share {
        margin-top: 38px;
        padding: 18px;
        border-radius: 16px;
    }

    .dc-blog-share-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .dc-blog-share-button {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding: 8px 10px;
    }

        .dc-blog-share-button[data-share-provider="copy"] {
            grid-column: 1 / -1;
        }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 430px) {

    .dc-blog-share {
        padding: 16px;
    }

    .dc-blog-share-actions {
        grid-template-columns: 1fr;
    }

    .dc-blog-share-button[data-share-provider="copy"] {
        grid-column: auto;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .dc-blog-share-button {
        transition: none;
    }

        .dc-blog-share-button:hover {
            transform: none;
        }
}