/*
Theme Name: UI Medical Blog
Theme URI: https://uimedicalmarketing.com/blog/
Author: UI Medical Marketing
Author URI: https://uimedicalmarketing.com/
Description: Custom blog theme for UI Medical Marketing — matches the main site design system.
Version: 1.0.0
Text Domain: uimedical-blog
*/

/* ============================================================
   DESIGN SYSTEM — Root Variables
   ============================================================ */
:root {
    /* Brand palette */
    --blue:        #0038D0;
    --blue-deep:   #002CA6;
    --cyan:        #009DDC;
    --blue-light:  #DEEBF8;
    --navy:        #0A1A3A;
    --navy-2:      #0E2350;
    --ink:         #1E293B;
    --gray-50:     #F8FAFC;
    --gray-100:    #F1F5F9;
    --gray-200:    #E6ECF3;
    --gray-300:    #D5DEEA;
    --gray-500:    #64748B;
    --gray-600:    #52617A;

    /* Accent */
    --accent:   #0038D0;
    --accent-2: #009DDC;

    /* Layout */
    --radius:    18px;
    --radius-sm: 12px;
    --radius-lg: 26px;
    --sec-pad:   128px;
    --max:       1240px;

    /* Typography */
    --font-head: "Schibsted Grotesk", system-ui, sans-serif;
    --font-body: "Hanken Grotesk", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;

    /* Shadows */
    --sh-sm:   0 1px 2px rgba(10,26,58,.06), 0 1px 1px rgba(10,26,58,.04);
    --sh-md:   0 4px 14px rgba(10,26,58,.07), 0 1px 3px rgba(10,26,58,.05);
    --sh-lg:   0 18px 48px -12px rgba(10,26,58,.16), 0 6px 18px -8px rgba(10,26,58,.10);
    --sh-xl:   0 40px 80px -24px rgba(10,26,58,.28), 0 12px 32px -12px rgba(10,26,58,.16);
    --sh-blue: 0 18px 40px -12px rgba(0,56,208,.42);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: #FFF;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,h2,h3,h4 {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.06;
    letter-spacing: -.02em;
    margin: 0;
    text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.wrap {
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 32px;
}

.section {
    padding-top: var(--sec-pad);
    padding-bottom: var(--sec-pad);
    position: relative;
}

.bg-tint      { background: var(--gray-50); }
.bg-tint-blue { background: linear-gradient(180deg, var(--blue-light), #EFF5FC 60%, #FFF); }

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 1.5px;
    background: var(--accent);
    display: inline-block;
}

.sec-head     { max-width: 900px; }
.sec-head.center { margin: 0 auto; text-align: center; }
.sec-head h2  { font-size: clamp(25px, 3vw, 38px); margin-top: 20px; }
.sec-head p   { margin-top: 20px; font-size: 18px; color: var(--gray-600); line-height: 1.65; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 15.5px;
    letter-spacing: -.01em;
    padding: 15px 26px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, background .2s, color .2s;
    white-space: nowrap;
}

.btn .icon { width: 17px; height: 17px; }

.btn--primary {
    background: var(--accent);
    color: #FFF;
    box-shadow: var(--sh-blue);
}

.btn--primary:hover {
    background: var(--blue-deep);
    transform: translateY(-2px);
    box-shadow: 0 22px 48px -12px rgba(0,56,208,.50);
}

.btn--outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--gray-200);
}

.btn--outline:hover {
    background: rgba(0,56,208,.05);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.btn--sm {
    padding: 10px 20px;
    font-size: 14px;
}

/* ============================================================
   SITE HEADER
   ============================================================ */
.site_header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 80px;
    display: flex;
    align-items: center;
    transition: height .3s, background .3s, box-shadow .3s, border-color .3s;
    border-bottom: 1px solid transparent;
}

.site_header.scrolled {
    height: 68px;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom-color: var(--gray-200);
    box-shadow: 0 1px 3px rgba(10,26,58,.04);
}

.site_nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Brand / Logo */
.nav_brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.nav_brand svg {
    height: 32px;
    width: auto;
    transition: opacity .2s;
}

.nav_brand:hover svg { opacity: .8; }

/* Nav list */
.nav_list {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav_link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-body);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink);
    padding: 9px 16px;
    border-radius: 999px;
    background: transparent;
    border: none;
    transition: color .2s, background .2s;
}

.nav_link:hover,
.nav_link[aria-expanded="true"] {
    color: var(--accent);
    background: rgba(0,56,208,.06);
}

.nav_chev {
    transition: transform .25s;
    flex-shrink: 0;
}

.nav_link[aria-expanded="true"] .nav_chev {
    transform: rotate(180deg);
}

/* Nav CTA */
.nav_cta {
    margin-left: 12px;
    padding: 11px 22px;
    font-size: 14px;
}

/* Dropdown panels */
.nav_item { position: relative; }

.nav_panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 220px;
    background: #FFF;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--sh-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s, transform .2s, visibility .2s;
    z-index: 110;
}

.nav_panel.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.nav_panel--wide { min-width: 480px; }

.nav_panel--sm { min-width: 240px; }

.nav_item--drop-right .nav_panel {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(8px);
}

.nav_item--drop-right .nav_panel.open {
    transform: translateX(0) translateY(0);
}

.nav_panel_inner { padding: 24px; }

.nav_panel_head {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-100);
}

.nav_panel_title {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 15px;
    color: var(--navy);
}

.nav_panel_tagline {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 3px;
}

.nav_panel_grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.nav_panel_list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav_panel_link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--ink);
    transition: background .15s, color .15s;
}

.nav_panel_link:hover {
    background: var(--gray-50);
    color: var(--accent);
}

.nav_panel_arr {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--gray-50);
    color: var(--gray-500);
    flex-shrink: 0;
    transition: background .15s, color .15s;
}

.nav_panel_link:hover .nav_panel_arr {
    background: rgba(0,56,208,.08);
    color: var(--accent);
}

.nav_panel_arr .icon { width: 11px; height: 11px; }

/* Mobile hamburger */
.nav_burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 120;
}

.nav_burger_bar {
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}

.nav_burger.active .nav_burger_bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav_burger.active .nav_burger_bar:nth-child(2) {
    opacity: 0;
}

.nav_burger.active .nav_burger_bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile drawer */
.nav_drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 340px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: #FFF;
    z-index: 200;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    box-shadow: -8px 0 40px rgba(10,26,58,.12);
}

.nav_drawer[aria-hidden="false"] {
    transform: translateX(0);
}

.nav_drawer_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
}

.nav_drawer_brand svg {
    height: 26px;
    width: auto;
}

.nav_drawer_close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    color: var(--ink);
    cursor: pointer;
    transition: background .15s;
}

.nav_drawer_close:hover {
    background: var(--gray-100);
}

.nav_drawer_close .icon { width: 16px; height: 16px; }

.nav_drawer_body { padding: 16px 24px 32px; }

.nav_drawer_link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
	border: none;
    background: none;
    /*border-bottom: 1px solid var(--gray-100);*/
    transition: color .15s;
}

.nav_drawer_link:hover { color: var(--accent); }

.nav_drawer_sub {
    display: none;
    padding: 4px 0 12px 16px;
}

.nav_drawer_sub.open { display: block; }

.nav_drawer_sub a {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: var(--gray-600);
    transition: color .15s;
}

.nav_drawer_sub a:hover { color: var(--accent); }

.nav_drawer_cta {
    margin-top: 24px;
    width: 100%;
    justify-content: center;
}

/* Overlay */
.nav_overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,26,58,.35);
    z-index: 190;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}

.nav_overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site_footer {
    background: var(--navy);
    color: rgba(255,255,255,.6);
    padding: 80px 0 0;
}

.footer_grid {
    display: grid;
    grid-template-columns: 1.5fr .7fr 1.1fr 1.15fr;
    gap: 48px;
}

/* Footer brand column */
.footer_brand svg {
    height: 50px;
    width: auto;
}

.footer_brand_text {
    margin-top: 20px;
    font-size: 14.5px;
    line-height: 1.65;
    color: rgba(255,255,255,.55);
}

.footer_social {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.footer_social_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: transparent;
    color: rgba(255,255,255,.5);
    transition: background .2s, color .2s, border-color .2s;
}

.footer_social_btn:hover {
    background: var(--cyan);
    color: #FFF;
    border-color: var(--cyan);
}

.footer_social_btn .icon { width: 17px; height: 17px; }

/* Footer columns */
.footer_col_title {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #FFF;
    margin-bottom: 20px;
    padding-bottom: 12px;
    position: relative;
}

.footer_col_title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), transparent);
    border-radius: 2px;
}

.footer_links li { margin-bottom: 10px; }

.footer_links a {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-size: 14px;
    color: rgba(255,255,255,.58);
    transition: color .2s, gap .2s;
}

.footer_links a::before {
    content: "→";
    color: var(--cyan);
    font-size: 12px;
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: width .2s, opacity .2s;
}

.footer_links a:hover {
    color: #FFF;
    gap: 6px;
}

.footer_links a:hover::before {
    opacity: 1;
    width: 14px;
}

/* Footer bottom bar */
.footer_bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0;
    margin-top: 64px;
    border-top: 1px solid rgba(255,255,255,.08);
    font-size: 13px;
    color: rgba(255,255,255,.4);
}

.footer_location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer_location .icon {
    width: 14px;
    height: 14px;
    color: var(--cyan);
}

/* ============================================================
   BLOG HERO SECTION
   ============================================================ */
.blog_hero {
    background: linear-gradient(180deg, var(--blue-light), #EFF5FC 60%, #FFF);
    padding: 120px 0 60px;
    text-align: center;
}

.blog_hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    margin-top: 20px;
}

.blog_hero p {
    margin-top: 16px;
    font-size: 18px;
    color: var(--gray-600);
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.65;
}

/* Category hero variation */
.blog_hero--category { padding-bottom: 40px; }

.blog_hero--category .category_badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,56,208,.08);
    color: var(--accent);
    padding: 8px 18px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

/* ============================================================
   BLOG GRID / CARDS
   ============================================================ */
.blog_section {
    padding: 60px 0 var(--sec-pad);
}

.blog_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.blog_card {
    background: #FFF;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s;
    display: flex;
    flex-direction: column;
}

.blog_card:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-lg);
}

.blog_card_img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--gray-100);
}

.blog_card_img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s cubic-bezier(.2,.7,.3,1);
}

.blog_card:hover .blog_card_img img {
    transform: scale(1.04);
}

.blog_card_cat {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--accent);
    color: #FFF;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    z-index: 2;
    transition: background .2s;
}

.blog_card:hover .blog_card_cat {
    background: var(--blue-deep);
}

.blog_card_body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog_card_title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 18px;
    color: var(--navy);
    line-height: 1.3;
    letter-spacing: -.01em;
    margin-bottom: 10px;
    transition: color .2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog_card:hover .blog_card_title { color: var(--accent); }

.blog_card_title a {
    color: inherit;
}

.blog_card_excerpt {
    font-size: 14.5px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.blog_card_meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
    font-size: 13px;
    color: var(--gray-500);
}

.blog_card_date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog_card_date .icon { width: 14px; height: 14px; }

.blog_card_readmore {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    color: var(--accent);
    font-size: 13px;
    transition: gap .2s;
}

.blog_card:hover .blog_card_readmore { gap: 8px; }

.blog_card_readmore .icon { width: 14px; height: 14px; }

/* No posts fallback */
.blog_empty {
    text-align: center;
    padding: 80px 0;
}

.blog_empty h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.blog_empty p {
    color: var(--gray-500);
    font-size: 16px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.blog_pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--gray-200);
}

.blog_pagination a,
.blog_pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 14px;
    border-radius: 999px;
    border: 1px solid var(--gray-200);
    color: var(--ink);
    background: #FFF;
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}

.blog_pagination a:hover {
    background: rgba(0,56,208,.06);
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.blog_pagination .current {
    background: var(--accent);
    color: #FFF;
    border-color: var(--accent);
}

.blog_pagination .dots {
    border: none;
    background: none;
    color: var(--gray-500);
    min-width: 24px;
    padding: 0;
}

.blog_pagination .prev,
.blog_pagination .next {
    gap: 6px;
}

.blog_pagination .icon { width: 16px; height: 16px; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.single_hero {
    position: relative;
    aspect-ratio: 21 / 8;
    max-height: 420px;
    overflow: hidden;
    background: var(--gray-100);
}

.single_hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single_hero_overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(10,26,58,.55));
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--gray-500);
    padding: 20px 0 0;
}

.breadcrumbs a {
    color: var(--gray-500);
    transition: color .2s;
}

.breadcrumbs a:hover { color: var(--accent); }

.breadcrumbs .sep {
    color: var(--gray-300);
    font-size: 11px;
}

.breadcrumbs .current_crumb {
    color: var(--ink);
    font-weight: 500;
}

/* Single post content */
.single_layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    padding: 48px 0 var(--sec-pad);
}

.single_header {
    margin-bottom: 40px;
}

.single_cat_badge {
    display: inline-block;
    background: rgba(0,56,208,.08);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.single_header h1 {
    font-size: clamp(26px, 3.5vw, 40px);
    margin-bottom: 20px;
    line-height: 1.12;
}

.single_meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--gray-500);
}

.single_meta_item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.single_meta_item .icon { width: 15px; height: 15px; }

.single_meta_divider {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: var(--gray-300);
}

/* Post content typography */
.single_content {
    font-size: 17px;
    line-height: 1.75;
    color: var(--ink);
}

.single_content h2 {
    font-size: clamp(22px, 2.5vw, 28px);
    margin: 48px 0 16px;
}

.single_content h3 {
    font-size: clamp(18px, 2vw, 22px);
    margin: 36px 0 12px;
}

.single_content p {
    margin-bottom: 20px;
}

.single_content img {
    border-radius: var(--radius);
    margin: 32px 0;
}

.single_content ul,
.single_content ol {
    padding-left: 24px;
    margin-bottom: 20px;
    list-style: disc;
}

.single_content ol { list-style: decimal; }

.single_content li {
    margin-bottom: 8px;
    line-height: 1.65;
}

.single_content blockquote {
    margin: 32px 0;
    padding: 24px 28px;
    border-left: 3px solid var(--accent);
    background: var(--gray-50);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--gray-600);
}

.single_content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s;
}

.single_content a:hover { color: var(--blue-deep); }

.single_content pre {
    background: var(--navy);
    color: #e2e8f0;
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 14px;
    margin: 28px 0;
}

.single_content code {
    background: rgba(0,56,208,.06);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: .9em;
}

.single_content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Share buttons */
.single_share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-200);
}

.single_share_label {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 14px;
    color: var(--navy);
    margin-right: 4px;
}

.share_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--gray-200);
    background: #FFF;
    color: var(--gray-600);
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}

.share_btn:hover {
    background: var(--accent);
    color: #FFF;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.share_btn .icon { width: 17px; height: 17px; }

/* Post navigation */
.single_nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--gray-200);
}

.single_nav_item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    transition: border-color .2s, box-shadow .2s;
}

.single_nav_item:hover {
    border-color: var(--accent);
    box-shadow: var(--sh-sm);
}

.single_nav_item--next { text-align: right; }

.single_nav_label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gray-500);
}

.single_nav_title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 15px;
    color: var(--navy);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Related posts */
.related_section {
    background: var(--gray-50);
    padding: var(--sec-pad) 0;
}

.related_section .sec-head {
    margin-bottom: 48px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { position: sticky; top: 100px; }

.sidebar_widget {
    background: #FFF;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.sidebar_widget_title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 16px;
    color: var(--navy);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

/* Search widget */
.sidebar_search {
    display: flex;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
    transition: border-color .2s;
}

.sidebar_search:focus-within { border-color: var(--accent); }

.sidebar_search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 18px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ink);
    background: transparent;
}

.sidebar_search input::placeholder { color: var(--gray-500); }

.sidebar_search button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    background: none;
    border: none;
    color: var(--gray-500);
    transition: color .2s;
}

.sidebar_search button:hover { color: var(--accent); }

.sidebar_search button .icon { width: 16px; height: 16px; }

/* Categories widget */
.sidebar_cat_list li {
    margin-bottom: 6px;
}

.sidebar_cat_list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--ink);
    transition: background .15s, color .15s;
}

.sidebar_cat_list a:hover {
    background: rgba(0,56,208,.05);
    color: var(--accent);
}

.sidebar_cat_count {
    background: var(--gray-100);
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    min-width: 28px;
    text-align: center;
}

/* Recent posts widget */
.sidebar_recent_item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.sidebar_recent_item:last-child { border-bottom: none; }

.sidebar_recent_thumb {
    width: 72px;
    height: 54px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-100);
}

.sidebar_recent_thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar_recent_title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 14px;
    color: var(--navy);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}

.sidebar_recent_item:hover .sidebar_recent_title { color: var(--accent); }

.sidebar_recent_date {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* CTA widget */
.sidebar_cta {
    background: linear-gradient(145deg, var(--navy), var(--navy-2));
    border-color: transparent;
    color: #FFF;
    text-align: center;
}

.sidebar_cta .sidebar_widget_title {
    color: #FFF;
    border-bottom-color: rgba(255,255,255,.1);
}

.sidebar_cta p {
    font-size: 14px;
    color: rgba(255,255,255,.65);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ============================================================
   SEARCH RESULTS
   ============================================================ */
.search_header {
    background: var(--gray-50);
    padding: 120px 0 48px;
    text-align: center;
}

.search_header h1 {
    font-size: clamp(26px, 3.5vw, 38px);
    margin-top: 16px;
}

.search_query {
    color: var(--accent);
}

.search_count {
    font-size: 16px;
    color: var(--gray-500);
    margin-top: 12px;
}

/* Search form in search page */
.search_form_wrap {
    max-width: 560px;
    margin: 28px auto 0;
}

.search_form {
    display: flex;
    border: 2px solid var(--gray-200);
    border-radius: 999px;
    overflow: hidden;
    transition: border-color .2s;
    background: #FFF;
}

.search_form:focus-within { border-color: var(--accent); }

.search_form input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 24px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--ink);
}

.search_form input::placeholder { color: var(--gray-500); }

.search_form button {
    background: var(--accent);
    border: none;
    color: #FFF;
    padding: 0 24px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s;
}

.search_form button:hover { background: var(--blue-deep); }

/* ============================================================
   404 PAGE
   ============================================================ */
.error_page {
    text-align: center;
    padding: 160px 0 var(--sec-pad);
}

.error_code {
    font-family: var(--font-head);
    font-size: clamp(80px, 15vw, 160px);
    font-weight: 700;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}

.error_page h1 {
    font-size: clamp(24px, 3vw, 36px);
    margin-bottom: 16px;
}

.error_page p {
    font-size: 17px;
    color: var(--gray-500);
    max-width: 460px;
    margin: 0 auto 32px;
    line-height: 1.65;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1080px) {
    :root { --sec-pad: 96px; }

    .blog_grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .single_layout { grid-template-columns: 1fr; gap: 48px; }
    .sidebar { position: static; }
    .footer_grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 980px) {
    .nav_list,
    .nav_cta { display: none; }
    .nav_burger { display: flex; }
}

@media (max-width: 768px) {
    .blog_grid { grid-template-columns: 1fr; gap: 20px; }
    .single_hero { aspect-ratio: 16 / 9; }
    .single_nav { grid-template-columns: 1fr; }
    .footer_grid { grid-template-columns: 1fr; gap: 36px; }
    .footer_bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 620px) {
    :root { --sec-pad: 72px; }
    .wrap { padding: 0 20px; }

    .blog_hero { padding: 100px 0 40px; }
    .blog_hero h1 { font-size: 28px; }

    .blog_card_body { padding: 18px; }
    .blog_card_title { font-size: 16px; }

    .single_header h1 { font-size: 24px; }
    .single_content { font-size: 16px; }

    .blog_pagination a,
    .blog_pagination span { min-width: 36px; height: 36px; font-size: 13px; padding: 0 10px; }
}

/* ============================================================
   UTILITY: Screen-reader only
   ============================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Icon helper */
.icon {
    display: inline-block;
    vertical-align: middle;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
