/* =====================================================================
   Universal Hub Spot — Blog (Guides · Stories & History · Fun Facts)
   Dark premium layout aligned with Hubs & Profiles. CLS-safe (fixed ratios).
   ===================================================================== */

html body.uhs-blog-body,
body.uhs-blog-body {
    background: #0B0E14 !important;
}

body.uhs-blog-body .site-content,
body.uhs-blog-body #content,
body.uhs-blog-body .ast-container,
body.uhs-blog-body #primary,
body.uhs-blog-body .main-content {
    background: #0B0E14 !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}

.uhs-blog {
    --bl-bg: #0B0E14;
    --bl-surface: #111621;
    --bl-surface2: #161C2A;
    --bl-border: rgba(148, 163, 184, 0.14);
    --bl-text: #E2E8F0;
    --bl-muted: #94A3B8;
    --bl-heading: #F8FAFC;
    position: relative;
    color: var(--bl-text);
    background:
        radial-gradient(900px 420px at 15% -5%, rgba(var(--bl-rgb), 0.16), transparent 60%),
        radial-gradient(700px 380px at 95% 10%, rgba(var(--bl-rgb), 0.08), transparent 60%),
        var(--bl-bg);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    padding: 88px 20px 72px;
    box-sizing: border-box;
    overflow-x: clip;
}

.uhs-blog *,
.uhs-blog *::before,
.uhs-blog *::after {
    box-sizing: border-box;
}

.uhs-blog a {
    color: var(--bl-accent2, var(--bl-accent));
    text-decoration: none;
}

.uhs-bl-article,
.uhs-bl-index-hero,
.uhs-bl-filters,
.uhs-bl-count,
.uhs-bl-grid--index,
.uhs-bl-empty {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

.uhs-bl-kicker {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bl-accent2, var(--bl-accent));
}

/* ---------- HERO ---------- */
.uhs-bl-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    margin-bottom: 44px;
}

.uhs-bl-hero-media {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(var(--bl-rgb), 0.28);
    box-shadow: 0 24px 60px -24px rgba(var(--bl-rgb), 0.45);
    background: var(--bl-surface);
}

.uhs-bl-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.uhs-bl-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.uhs-bl-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: #fff !important;
    background: rgba(var(--bl-rgb), 0.85);
    border: 1px solid rgba(var(--bl-rgb), 0.9);
}

.uhs-bl-badge--type {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--bl-border);
    color: var(--bl-text) !important;
}

.uhs-bl-title {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
    font-weight: 800;
    color: var(--bl-heading);
    letter-spacing: -0.02em;
}

.uhs-bl-lead {
    margin: 0 0 22px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--bl-muted);
}

.uhs-bl-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--bl-muted);
    line-height: 1.45;
}

.uhs-bl-meta strong {
    color: var(--bl-heading);
}

.uhs-bl-meta-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: block;
}

/* ---------- LAYOUT & TOC ---------- */
.uhs-bl-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px);
    justify-content: center;
    gap: 40px;
}

.uhs-bl-layout.has-toc {
    grid-template-columns: 250px minmax(0, 760px);
}

.uhs-bl-toc {
    position: sticky;
    top: 96px;
    align-self: start;
    background: var(--bl-surface);
    border: 1px solid var(--bl-border);
    border-radius: 16px;
    padding: 16px 18px;
    font-size: 14px;
}

.uhs-bl-toc summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--bl-heading);
    list-style: none;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.1em;
}

.uhs-bl-toc summary::-webkit-details-marker {
    display: none;
}

.uhs-bl-toc ol {
    margin: 0;
    padding: 0 0 0 18px;
    display: grid;
    gap: 8px;
}

.uhs-bl-toc a {
    color: var(--bl-muted) !important;
    line-height: 1.4;
}

.uhs-bl-toc a:hover {
    color: var(--bl-heading) !important;
}

/* ---------- CONTENT TYPOGRAPHY ---------- */
.uhs-bl-content {
    font-size: 18px;
    line-height: 1.75;
    color: var(--bl-text);
    min-width: 0;
}

.uhs-bl-content > *:first-child {
    margin-top: 0;
}

.uhs-bl-content p {
    margin: 0 0 1.25em;
}

.uhs-bl-content h2 {
    margin: 2em 0 0.7em;
    font-size: clamp(24px, 2.6vw, 30px);
    line-height: 1.25;
    font-weight: 800;
    color: var(--bl-heading);
    scroll-margin-top: 100px;
    letter-spacing: -0.01em;
}

.uhs-bl-content h2::before {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    border-radius: 4px;
    margin-bottom: 14px;
    background: linear-gradient(90deg, var(--bl-accent), var(--bl-accent2, var(--bl-accent)));
}

.uhs-bl-content h3 {
    margin: 1.6em 0 0.5em;
    font-size: 21px;
    color: var(--bl-heading);
    font-weight: 750;
}

.uhs-bl-content a {
    color: var(--bl-accent2, var(--bl-accent)) !important;
    text-decoration: underline;
    text-decoration-color: rgba(var(--bl-rgb), 0.45);
    text-underline-offset: 3px;
}

.uhs-bl-content strong {
    color: var(--bl-heading);
}

.uhs-bl-content ul,
.uhs-bl-content ol {
    margin: 0 0 1.4em;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.uhs-bl-content ul > li,
.uhs-bl-content ol > li {
    position: relative;
    background: var(--bl-surface);
    border: 1px solid var(--bl-border);
    border-radius: 14px;
    padding: 14px 16px 14px 46px;
    line-height: 1.6;
}

.uhs-bl-content ul > li::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 23px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bl-accent);
    box-shadow: 0 0 0 4px rgba(var(--bl-rgb), 0.18);
}

.uhs-bl-content ol {
    counter-reset: uhsbl;
}

.uhs-bl-content ol > li {
    counter-increment: uhsbl;
}

.uhs-bl-content ol > li::before {
    content: counter(uhsbl);
    position: absolute;
    left: 12px;
    top: 13px;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: var(--bl-accent);
}

.uhs-bl-content blockquote {
    margin: 1.8em 0;
    padding: 20px 24px;
    border-left: 4px solid var(--bl-accent);
    background: linear-gradient(90deg, rgba(var(--bl-rgb), 0.12), transparent);
    border-radius: 0 14px 14px 0;
    font-size: 20px;
    font-style: italic;
    color: var(--bl-heading);
}

.uhs-bl-content blockquote p:last-child {
    margin: 0;
}

.uhs-bl-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.5em;
    font-size: 15px;
    background: var(--bl-surface);
    border-radius: 14px;
    overflow: hidden;
}

.uhs-bl-content th,
.uhs-bl-content td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--bl-border);
    text-align: left;
}

.uhs-bl-content th {
    background: rgba(var(--bl-rgb), 0.14);
    color: var(--bl-heading);
}

.uhs-bl-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

/* Story: timeline feel on headings */
.uhs-bl-type-story .uhs-bl-content h2::before {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bl-accent);
    box-shadow: 0 0 0 6px rgba(var(--bl-rgb), 0.18);
}

.uhs-bl-type-story .uhs-bl-content > p:first-of-type::first-letter {
    float: left;
    font-size: 3.4em;
    line-height: 0.9;
    padding: 6px 10px 0 0;
    font-weight: 800;
    color: var(--bl-accent);
}

/* Fun Facts: numbered list becomes visual fact cards */
.uhs-bl-type-fun-fact .uhs-bl-content ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.uhs-bl-type-fun-fact .uhs-bl-content ol > li {
    padding: 52px 18px 18px;
    background: linear-gradient(160deg, rgba(var(--bl-rgb), 0.14), var(--bl-surface) 55%);
    border-color: rgba(var(--bl-rgb), 0.28);
}

.uhs-bl-type-fun-fact .uhs-bl-content ol > li::before {
    left: 18px;
    top: 16px;
    width: 28px;
    height: 28px;
    font-size: 14px;
}

.uhs-bl-ad {
    min-height: 280px;
    margin: 32px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- CTA ---------- */
.uhs-bl-cta {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px 18px;
    align-items: center;
    margin: 2em 0;
    padding: 22px 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(var(--bl-rgb), 0.2), rgba(var(--bl-rgb), 0.05));
    border: 1px solid rgba(var(--bl-rgb), 0.35);
}

.uhs-bl-cta--final {
    max-width: 1180px;
    margin: 48px auto;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 28px 32px;
}

.uhs-bl-cta-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 28px;
    background: rgba(var(--bl-rgb), 0.25);
}

.uhs-bl-cta-kicker {
    margin: 0 0 2px !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bl-accent2, var(--bl-accent));
}

.uhs-bl-cta-title {
    margin: 0 0 4px !important;
    font-size: 20px;
    font-weight: 800;
    color: var(--bl-heading);
    line-height: 1.3;
}

.uhs-bl-cta-text {
    margin: 0 !important;
    font-size: 15px;
    color: var(--bl-muted);
    line-height: 1.5;
}

.uhs-bl-cta-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.uhs-bl-cta--final .uhs-bl-cta-actions {
    grid-column: auto;
    flex-direction: column;
}

.uhs-bl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.uhs-bl-btn--primary {
    color: #fff !important;
    background: linear-gradient(135deg, var(--bl-accent), var(--bl-accent2, var(--bl-accent)));
    box-shadow: 0 10px 24px -10px rgba(var(--bl-rgb), 0.8);
}

.uhs-bl-btn--ghost {
    color: var(--bl-heading) !important;
    border: 1px solid var(--bl-border);
    background: rgba(255, 255, 255, 0.04);
}

.uhs-bl-btn:hover {
    transform: translateY(-1px);
}

/* ---------- FEATURED PROFILES ---------- */
.uhs-bl-breeds {
    max-width: 1180px;
    margin: 56px auto 0;
}

.uhs-bl-section-title {
    margin: 0 0 20px;
    font-size: 26px;
    font-weight: 800;
    color: var(--bl-heading);
}

.uhs-bl-breeds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.uhs-bl-breed {
    display: flex;
    flex-direction: column;
    background: var(--bl-surface);
    border: 1px solid var(--bl-border);
    border-radius: 18px;
    overflow: hidden;
    color: var(--bl-text) !important;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.uhs-bl-breed:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--bl-rgb), 0.5);
}

.uhs-bl-breed-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--bl-surface2);
}

.uhs-bl-breed-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.uhs-bl-breed-rating {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    color: #FCD34D;
    background: rgba(11, 14, 20, 0.78);
}

.uhs-bl-breed-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px 16px;
}

.uhs-bl-breed-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--bl-heading);
}

.uhs-bl-breed-group {
    font-size: 13px;
    color: var(--bl-muted);
}

.uhs-bl-breed-facts {
    display: grid;
    gap: 3px;
    margin: 8px 0;
    font-size: 13px;
}

.uhs-bl-breed-facts em {
    font-style: normal;
    color: var(--bl-muted);
}

.uhs-bl-breed-cta {
    margin-top: auto;
    font-size: 14px;
    font-weight: 800;
    color: var(--bl-accent2, var(--bl-accent));
}

/* ---------- AUTHOR BOX ---------- */
.uhs-bl-author {
    max-width: 1180px;
    margin: 0 auto 8px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 22px 24px;
    border-radius: 18px;
    background: var(--bl-surface);
    border: 1px solid var(--bl-border);
}

.uhs-bl-author img {
    border-radius: 14px;
    flex: 0 0 auto;
}

.uhs-bl-author-name {
    margin: 0 0 6px;
    font-weight: 800;
    color: var(--bl-heading);
    font-size: 17px;
}

.uhs-bl-author-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--bl-muted);
}

/* ---------- CARDS / LATEST ---------- */
.uhs-bl-latest {
    max-width: 1180px;
    margin: 56px auto 0;
    position: relative;
    z-index: 2;
}

.uhs-hub-root .uhs-bl-latest,
.uhs-bl-latest--profile {
    padding: 0 20px;
    margin-bottom: 40px;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --bl-surface: #111621;
    --bl-border: rgba(148, 163, 184, 0.14);
    --bl-heading: #F8FAFC;
    --bl-muted: #94A3B8;
    --bl-text: #E2E8F0;
    --bl-accent: var(--hub-accent, var(--udb-accent, #38BDF8));
    --bl-rgb: var(--hub-rgb, var(--udb-accent-rgb, 56, 189, 248));
}

.uhs-bl-latest-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.uhs-bl-latest-title {
    margin: 0;
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 800;
    color: var(--bl-heading, #F8FAFC);
    line-height: 1.2;
}

.uhs-bl-latest-all {
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
    color: var(--bl-accent, #38BDF8) !important;
    text-decoration: none !important;
}

.uhs-bl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.uhs-bl-card {
    background: var(--bl-surface, #111621);
    border: 1px solid var(--bl-border, rgba(148, 163, 184, 0.14));
    border-radius: 18px;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.uhs-bl-card[hidden] {
    display: none !important;
}

.uhs-bl-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--bl-rgb), 0.5);
    box-shadow: 0 18px 40px -22px rgba(var(--bl-rgb), 0.7);
}

.uhs-bl-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit !important;
    text-decoration: none !important;
}

.uhs-bl-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #161C2A;
}

.uhs-bl-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.uhs-bl-card-type {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: rgba(11, 14, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
}

.uhs-bl-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 18px;
    flex: 1;
}

.uhs-bl-card-animal {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bl-accent);
}

.uhs-bl-card-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
    color: var(--bl-heading, #F8FAFC);
}

.uhs-bl-card-excerpt {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--bl-muted, #94A3B8);
}

.uhs-bl-card-meta {
    margin-top: auto;
    font-size: 13px;
    color: var(--bl-muted, #94A3B8);
}

/* ---------- INDEX ---------- */
.uhs-bl-index-hero {
    text-align: center;
    max-width: 820px;
    margin-bottom: 28px;
}

.uhs-bl-filters {
    display: grid;
    gap: 12px;
    justify-items: center;
    margin-bottom: 18px;
}

.uhs-bl-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.uhs-bl-chip {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--bl-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--bl-text);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
}

.uhs-bl-chip:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.uhs-bl-chip.is-active {
    background: var(--bl-accent);
    border-color: var(--bl-accent);
    color: #fff;
}

.uhs-bl-count {
    text-align: center;
    color: var(--bl-muted);
    font-size: 14px;
    margin-bottom: 22px;
}

.uhs-bl-empty {
    text-align: center;
    color: var(--bl-muted);
    padding: 40px 0;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .uhs-bl-layout.has-toc {
        grid-template-columns: minmax(0, 760px);
    }

    .uhs-bl-toc {
        position: static;
    }

    .uhs-bl-toc details:not([open]) summary {
        margin-bottom: 0;
    }
}

@media (max-width: 900px) {
    .uhs-blog {
        padding-top: 24px;
    }

    .uhs-bl-hero {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .uhs-bl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .uhs-bl-cta--final {
        grid-template-columns: auto minmax(0, 1fr);
        margin-left: 0;
        margin-right: 0;
    }

    .uhs-bl-cta--final .uhs-bl-cta-actions {
        grid-column: 1 / -1;
        flex-direction: row;
    }
}

@media (max-width: 600px) {
    .uhs-blog {
        padding: 18px 14px 56px;
    }

    .uhs-bl-content {
        font-size: 17px;
    }

    .uhs-bl-grid,
    .uhs-bl-type-fun-fact .uhs-bl-content ol {
        grid-template-columns: 1fr;
    }

    .uhs-bl-latest-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .uhs-bl-btn {
        width: 100%;
        white-space: normal;
        text-align: center;
    }

    .uhs-bl-author {
        flex-direction: column;
    }

    .uhs-bl-cta,
    .uhs-bl-cta--final {
        padding: 20px;
    }
}
