/* ============================================================
   CMDB Single News Article — stylesheet
   Extracted from single.php <style> block.
   ============================================================ */

.cmdbsp-page {
    background: var(--brand-bg);
    display: block !important;
}

.cmdbsp-page div {
    display: block !important;
}

.cmdbsp-page .entry-content img,
.cmdbsp-page .entry-content figure { max-width: 100%; }

/* ── Hero ──────────────────────────────────────────────────── */
.cmdbsp-hero {
    position: relative;
    min-height: 680px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
}

.cmdbsp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    animation: cmdbspHeroZoom 18s ease-in-out infinite alternate;
}

.cmdbsp-hero-overlay {
    position: absolute !important;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(18,18,22,.30) 0%, rgba(18,18,22,.20) 48%, rgba(18,18,22,.10) 100%),
        linear-gradient(180deg, rgba(18,18,22,.10) 0%, #121216 100%);
}

.cmdbsp-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 8rem 3% 5rem;
}

.cmdbsp-breadcrumbs {
    margin-bottom: 1.5rem;
}

.cmdbsp-breadcrumbs,
.cmdbsp-breadcrumbs a,
.cmdbsp-breadcrumbs p {
    color: var(--main-body);
    font-size: .85rem;
}

.cmdbsp-hero-content {
    max-width: 860px;
}

.cmdbsp-kicker {
    display: inline-flex;
    margin-bottom: 1rem;
    padding: .45rem .8rem;
    border-radius: 999px;
    color: var(--brand-blue);
    background: rgba(0,255,224,.08);
    border: 1px solid rgba(0,255,224,.18);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.cmdbsp-title {
    margin: 0 0 1.25rem;
    color: var(--main-color);
    font-size: clamp(2.8rem, 6vw, 6rem);
    line-height: .95;
    letter-spacing: -0.055em;
}

.cmdbsp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-bottom: 1rem;
}

.cmdbsp-meta span,
.cmdbsp-cats a {
    display: inline-flex;
    padding: .45rem .7rem;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    color: var(--main-body);
    font-size: 0.8em;
    text-decoration: none;
}

.cmdbsp-cats {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-bottom: 1.25rem;
}

.cmdbsp-cats a:hover {
    color: var(--brand-blue);
}

/* ── Share widget ───────────────────────────────────────────── */
.cmdbsp-share {
    position: relative;
    display: inline-block;
}

.cmdbsp-share-toggle {
    border: 0;
    cursor: pointer;
    padding: .8rem 1rem;
    border-radius: 999px;
    color: #fff;
    background: var(--brand-color);
    font-weight: 800;
}

.cmdbsp-share-dropdown {
    display: none;
    position: absolute;
    left: 0;
    bottom: calc(100% + .8rem);
    gap: .5rem;
    padding: .65rem;
    border-radius: 999px;
    background: var(--brand-bgalt);
    border: 1px solid var(--app-bg-border);
    box-shadow: 0 14px 35px rgba(0,0,0,.3);
    width: 172px;
    margin: 15px 0;
}

.cmdbsp-share-dropdown.is-open {
    display: flex;
}

.cmdbsp-share-dropdown a {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--main-color);
    background: rgba(255,255,255,.06);
    text-decoration: none;
}

/* ── Layout ─────────────────────────────────────────────────── */
.cmdbsp-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 3% 6rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2rem;
    align-items: start;
}

.cmdbsp-main {
    min-width: 0;
}

/* ── Article content ────────────────────────────────────────── */
.cmdbsp-article-content {
    background: var(--brand-bgalt);
    border: 1px solid var(--app-bg-border);
    border-radius: 28px;
    padding: clamp(1.5rem, 3vw, 3rem);
    box-shadow: 0 14px 35px rgba(0,0,0,.2);
}

.cmdbsp-article-content #article-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    max-height: none !important;
}

.cmdbsp-article-content .entry-content {
    flex-direction: column;
}

.cmdbsp-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 18px;
    margin: 1.5rem 0;
}

/* ── Media & share sections ─────────────────────────────────── */
.cmdbsp-media-section,
.cmdbsp-share-bottom {
    margin-top: 2rem;
    background: var(--brand-bgalt);
    border: 1px solid var(--app-bg-border);
    border-radius: 28px;
    padding: clamp(1.5rem, 3vw, 2rem);
}

.cmdbsp-section-heading span {
    display: inline-flex;
    margin-bottom: .75rem;
    padding: .4rem .75rem;
    border-radius: 999px;
    color: var(--brand-blue);
    background: rgba(0,255,224,.08);
    border: 1px solid rgba(0,255,224,.18);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.cmdbsp-section-heading h2 {
    margin: 0 0 1.5rem;
    color: var(--main-color);
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.05;
}

.cmdbsp-video {
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--app-bg-border);
    background: #000;
}

.cmdbsp-video iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
}

.cmdbsp-share-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
}

.cmdbsp-share-bottom h4 {
    width: 100%;
    margin: 0 0 .5rem;
    color: var(--main-color);
}

.cmdbsp-share-bottom a {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 800;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.cmdbsp-sidebar {
    position: sticky;
    top: 2rem;
    display: grid;
    gap: 1.25rem;
}

.cmdbsp-panel {
    padding: 1.4rem;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(61,126,255,.08), rgba(255,0,91,.05)),
        var(--brand-bgalt);
    border: 1px solid var(--app-bg-border);
    box-shadow: 0 14px 35px rgba(0,0,0,.2);
}

.cmdbsp-panel h2 {
    margin: 0 0 1rem;
    color: var(--main-color);
    font-size: 1.25rem;
}

.cmdbsp-panel p {
    color: var(--main-body);
    line-height: 1.7;
}

.cmdbsp-promo img {
    width: 100%;
    display: block;
    border-radius: 18px;
    margin-bottom: 1rem;
}

.cmdbsp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .85rem 1.2rem;
    border-radius: 999px;
    color: #fff;
    background: var(--brand-color);
    text-decoration: none;
    font-weight: 800;
    transition: transform .25s ease, box-shadow .25s ease;
}

.cmdbsp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 35px rgba(255,0,91,.24);
}

.cmdbsp-cat-list,
.cmdbsp-trend-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cmdbsp-cat-list li + li,
.cmdbsp-trend-list li + li {
    margin-top: .65rem;
}

.cmdbsp-cat-list a {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem .95rem;
    border-radius: 14px;
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.05);
    color: var(--main-body);
    text-decoration: none;
}

.cmdbsp-cat-list a:hover {
    color: var(--main-color);
    background: var(--list-item-hover);
}

.cmdbsp-cat-list em {
    font-style: normal;
    color: var(--brand-blue);
}

.cmdbsp-trend-list a {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: .85rem;
    align-items: start;
    color: var(--main-body);
    text-decoration: none;
}

.cmdbsp-trend-list strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--brand-blue);
    background: rgba(0,255,224,.08);
    border: 1px solid rgba(0,255,224,.16);
}

.cmdbsp-trend-list span {
    line-height: 1.35;
    font-weight: 700;
}

.cmdbsp-trend-list a:hover span {
    color: var(--main-color);
}

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes cmdbspHeroZoom {
    from { transform: scale(1.02); }
    to   { transform: scale(1.08); }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .cmdbsp-layout {
        grid-template-columns: 1fr;
    }

    .cmdbsp-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cmdbsp-cta {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .cmdbsp-hero {
        min-height: 560px;
    }

    .cmdbsp-hero-inner {
        padding: 7rem 5% 3rem;
    }

    .cmdbsp-layout {
        padding: 3rem 5% 5rem;
    }

    .cmdbsp-sidebar {
        grid-template-columns: 1fr;
    }

    .cmdbsp-title {
        font-size: clamp(2.4rem, 12vw, 4rem);
    }
}
