/* ==========================================================================
   HostingWalay Blog — Frontend styles
   Matches main HostingWalay design tokens (navy, blue, yellow, soft).
   ========================================================================== */

:root {
    --navy: #152455;
    --blue: #2c5cf5;
    --blue-dark: #1e3eb8;
    --yellow: #ffc522;
    --green: #22c55e;
    --text: #1a2238;
    --muted: #64748b;
    --border: #e5e9f2;
    --soft: #f5f7fb;
    --gold: #F0B429;
    --white: #ffffff;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-pill: 999px;
    --shadow-sm: 0 2px 6px rgba(16,23,41,.05);
    --shadow-md: 0 8px 24px rgba(16,23,41,.08);
    --shadow-lg: 0 16px 40px rgba(16,23,41,.12);
    --max-w: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: var(--blue-dark); }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }

/* ============ TOPBAR ============ */
.topbar {
    background: var(--navy);
    color: rgba(255,255,255,.85);
    font-size: 13px;
    padding: 8px 0;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar a { color: rgba(255,255,255,.85); display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: var(--yellow); }
.tb-left, .tb-right { display: flex; align-items: center; gap: 18px; }
.tb-sep { width: 1px; height: 14px; background: rgba(255,255,255,.2); }
.tb-wa { background: #25D366; padding: 4px 10px; border-radius: var(--r-pill); color: #fff !important; }
@media (max-width: 720px) { .hide-sm { display: none !important; } }

/* ============ HEADER ============ */
.hw-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky; top: 0; z-index: 50;
}
.nav-wrap { display: flex; align-items: center; gap: 32px; padding: 16px 24px; }
.logo { font-weight: 800; font-size: 22px; color: var(--navy); }
.logo-accent { color: var(--blue); }
.primary-nav { display: flex; gap: 20px; flex: 1; align-items: center; flex-wrap: nowrap; }
.primary-nav a {
    color: var(--text); font-weight: 500; font-size: 14.5px;
    padding: 8px 0; border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.primary-nav a:hover, .primary-nav a.active { color: var(--blue); border-color: var(--blue); }
.primary-nav .cta-link {
    background: var(--blue); color: #fff; padding: 8px 16px;
    border-radius: var(--r-pill); border: none; margin-left: auto;
}
.primary-nav .cta-link:hover { background: var(--blue-dark); color: #fff; }
.search-form { display: flex; align-items: center; background: var(--soft); border-radius: var(--r-pill); overflow: hidden; }
.search-form input { border: 0; background: transparent; padding: 8px 16px; font-size: 14px; width: 200px; outline: none; }
.search-form button { background: transparent; border: 0; padding: 8px 14px; color: var(--muted); cursor: pointer; }
.mobile-toggle { display: none; background: none; border: 0; font-size: 22px; color: var(--navy); cursor: pointer; }
.mobile-nav { display: none; flex-direction: column; padding: 16px 24px; background: var(--soft); border-top: 1px solid var(--border); }
.mobile-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.mobile-nav .m-search input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--r-pill); margin-top: 12px; }
@media (max-width: 920px) {
    .primary-nav, .search-form { display: none; }
    .mobile-toggle { display: block; margin-left: auto; }
    .mobile-nav.open { display: flex; }
}

/* ============ HERO ============ */
.hero-blog {
    background: linear-gradient(135deg, var(--navy) 0%, #1e3eb8 100%);
    color: #fff; padding: 80px 0 100px;
}
.hero-blog .pill {
    background: rgba(255,197,34,.18); color: var(--yellow);
    padding: 6px 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600;
    display: inline-block; margin-bottom: 18px;
}
.hero-blog h1 {
    font-size: clamp(28px, 4vw, 48px); font-weight: 800;
    line-height: 1.15; margin: 0 0 14px; max-width: 800px;
}
.hero-blog p { font-size: 18px; color: rgba(255,255,255,.85); max-width: 680px; margin: 0; }

/* ============ SECTION HEADS ============ */
.section-head { margin: 0 0 28px; }
.section-head h2 { font-size: 28px; font-weight: 700; margin: 0 0 6px; color: var(--navy); }
.section-head p { color: var(--muted); margin: 0; }

/* ============ FEATURED + GRID ============ */
.featured-strip { padding: 60px 0 30px; background: var(--soft); }
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.content-grid { padding: 60px 0 80px; }
.two-col { display: grid; grid-template-columns: 1fr 320px; gap: 48px; }
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
@media (max-width: 980px) {
    .two-col { grid-template-columns: 1fr; }
    .featured-grid { grid-template-columns: 1fr; }
    .post-grid { grid-template-columns: 1fr; }
}

/* ============ POST CARD ============ */
.post-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
    overflow: hidden; transition: transform .2s, box-shadow .2s;
    display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-img-link { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--soft); }
.card-img-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .card-img-link img { transform: scale(1.04); }
.card-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--border); font-size: 40px; }
.card-cat {
    position: absolute; top: 12px; left: 12px;
    color: #fff; padding: 4px 12px; border-radius: var(--r-pill);
    font-size: 12px; font-weight: 600; letter-spacing: .3px;
}
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-title { margin: 0 0 10px; font-size: 18px; font-weight: 700; line-height: 1.35; }
.card-title a { color: var(--navy); }
.card-title a:hover { color: var(--blue); }
.card-excerpt { color: var(--muted); font-size: 14px; margin: 0 0 14px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.meta-author { display: inline-flex; align-items: center; gap: 6px; }
.meta-author img { width: 22px; height: 22px; border-radius: 50%; }
.meta-author a { color: var(--text); font-weight: 500; }
.meta-sep { color: var(--border); }

/* ============ POST SINGLE ============ */
.post-single { padding: 60px 0; }
.post-header { max-width: 820px; margin: 0 auto 32px; padding: 0 24px; }
.post-header.post-header-left { text-align: left; }
.post-cat-link {
    display: inline-block; color: #fff; padding: 6px 14px;
    border-radius: var(--r-pill); font-size: 13px; font-weight: 600; margin-bottom: 18px;
}
.post-cat-link:hover { color: #fff; opacity: .9; }
.post-single h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.2; color: var(--navy); margin: 0 0 16px; font-weight: 800; }
.post-lead { font-size: 18px; color: var(--muted); margin: 0 0 24px; max-width: 720px; }
.post-byline { display: inline-flex; align-items: center; gap: 12px; text-align: left; }
.post-byline img { width: 48px; height: 48px; border-radius: 50%; }
.author-name { font-weight: 600; color: var(--text); }
.byline-meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.post-hero-img { padding: 30px 0; }
.post-hero-img img { border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.post-body-grid { padding: 30px 24px; }

/* Anchor scroll offset (so heading isn't hidden under sticky header) */
.post-content h2,
.post-content h3 { scroll-margin-top: 100px; }

/* ============ TL;DR BOX (AEO) ============ */
.tldr-box {
    background: linear-gradient(135deg, #fef9e7 0%, #fff8d6 100%);
    border-left: 4px solid var(--yellow);
    border-radius: var(--r-md);
    padding: 20px 24px;
    margin: 0 0 32px;
    box-shadow: var(--shadow-sm);
    position: relative;
}
.tldr-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--navy); color: var(--yellow);
    padding: 4px 12px; border-radius: var(--r-pill);
    font-size: 11px; font-weight: 700; letter-spacing: .5px;
    margin-bottom: 12px;
}
.tldr-box h2 {
    font-size: 18px !important; color: var(--navy) !important;
    margin: 0 0 8px !important; font-weight: 700;
}
.tldr-box p {
    font-size: 16px; color: var(--text); margin: 0; line-height: 1.7;
    font-weight: 500;
}

/* ============ KEY FACTS CARDS (AEO) ============ */
.key-facts { margin: 0 0 36px; }
.kf-heading {
    font-size: 16px !important; color: var(--navy) !important;
    margin: 0 0 16px !important; display: flex; align-items: center; gap: 8px;
    text-transform: uppercase; letter-spacing: .5px; font-weight: 700;
}
.kf-heading i { color: var(--yellow); }
.kf-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
@media (max-width: 720px) { .kf-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .kf-grid { grid-template-columns: 1fr; } }
.kf-card {
    background: linear-gradient(135deg, var(--soft), #fff);
    border: 1px solid var(--border); border-radius: var(--r-md);
    padding: 16px 14px; text-align: center;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.kf-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--blue); }
.kf-value {
    font-size: 22px; font-weight: 800; color: var(--blue);
    line-height: 1.1; margin-bottom: 6px;
}
.kf-label {
    font-size: 12px; color: var(--muted); font-weight: 500;
    line-height: 1.4;
}

/* ============ FAQ SECTION (AEO) ============ */
.faq-section {
    margin: 40px 0 0;
    padding: 28px 0 0;
    border-top: 1px solid var(--border);
}
.faq-section h2 {
    font-size: 22px !important; color: var(--navy) !important;
    margin: 0 0 20px !important; display: flex; align-items: center; gap: 10px;
}
.faq-section h2 i { color: var(--blue); }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--r-md); overflow: hidden;
    transition: border-color .15s;
}
.faq-item[open] { border-color: var(--blue); box-shadow: var(--shadow-sm); }
.faq-item summary {
    cursor: pointer; list-style: none;
    padding: 16px 20px;
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 600; color: var(--navy); font-size: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--soft); }
.faq-q { flex: 1; padding-right: 16px; }
.faq-chev {
    color: var(--muted); font-size: 13px; flex-shrink: 0;
    transition: transform .2s;
}
.faq-item[open] .faq-chev { transform: rotate(180deg); color: var(--blue); }
.faq-a {
    padding: 0 20px 20px;
    color: var(--text); font-size: 15px; line-height: 1.7;
    border-top: 1px solid var(--border);
    margin-top: -1px; padding-top: 16px;
}

/* ============ TABLE OF CONTENTS ============ */
.toc {
    background: linear-gradient(180deg, #f8fafc 0%, var(--soft) 100%);
    border: 1px solid var(--border);
    border-left: 4px solid var(--blue);
    border-radius: var(--r-md);
    padding: 0;
    margin: 0 0 36px;
    overflow: hidden;
}
.toc summary {
    list-style: none; cursor: pointer;
    padding: 16px 20px;
    display: flex; align-items: center; gap: 12px;
    font-weight: 700; color: var(--navy);
    user-select: none;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary i.fa-list-ul { color: var(--blue); font-size: 16px; }
.toc-title { flex: 1; font-size: 15px; }
.toc-count { font-size: 12px; color: var(--muted); font-weight: 500; }
.toc-chev { color: var(--muted); transition: transform .2s; font-size: 12px; }
.toc[open] .toc-chev { transform: rotate(180deg); }
.toc-list {
    list-style: none; padding: 4px 20px 18px; margin: 0;
    border-top: 1px solid var(--border);
    counter-reset: toc;
}
.toc-list li { margin: 4px 0; position: relative; padding-left: 28px; }
.toc-list li.toc-h2 {
    counter-increment: toc;
    font-weight: 500; font-size: 14px;
}
.toc-list li.toc-h2::before {
    content: counter(toc); position: absolute; left: 0; top: 2px;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--blue); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
}
.toc-list li.toc-h3 {
    padding-left: 40px; font-size: 13px; color: var(--muted);
}
.toc-list li.toc-h3::before {
    content: '›'; position: absolute; left: 26px; top: 0;
    color: var(--border); font-size: 16px;
}
.toc-list a {
    color: var(--text); text-decoration: none;
    transition: color .15s; padding: 4px 0; display: inline-block;
}
.toc-list a:hover { color: var(--blue); }
.toc-list a.active { color: var(--blue); font-weight: 600; }
.toc-list li.toc-h2 a.active { color: var(--blue); }

.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }

.post-content {
    font-size: 17px; line-height: 1.85; color: var(--text);
}
.post-content h2 { font-size: 28px; margin: 40px 0 16px; color: var(--navy); font-weight: 700; }
.post-content h3 { font-size: 22px; margin: 32px 0 12px; color: var(--navy); font-weight: 700; }
.post-content p { margin: 0 0 20px; }
.post-content a { color: var(--blue); text-decoration: underline; }
.post-content img { border-radius: var(--r-md); margin: 24px 0; box-shadow: var(--shadow-sm); }
.post-content ul, .post-content ol { padding-left: 24px; margin: 0 0 20px; }
.post-content li { margin: 8px 0; }
.post-content blockquote {
    border-left: 4px solid var(--blue); padding: 12px 20px;
    background: var(--soft); margin: 24px 0; font-style: italic; color: var(--text);
    border-radius: 0 var(--r-md) var(--r-md) 0;
}
.post-content code {
    background: var(--soft); padding: 2px 6px; border-radius: 4px;
    font-family: 'Menlo', 'Monaco', monospace; font-size: 14px; color: var(--navy);
}
.post-content pre { background: #0f172a; color: #e2e8f0; padding: 20px; border-radius: var(--r-md); overflow-x: auto; margin: 24px 0; }
.post-content pre code { background: transparent; color: inherit; padding: 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.post-content th { background: var(--soft); font-weight: 600; }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0; }
.tag-pill { background: var(--soft); color: var(--text); padding: 6px 14px; border-radius: var(--r-pill); font-size: 13px; }
.tag-pill:hover { background: var(--blue); color: #fff; }

.share-block { display: flex; align-items: center; gap: 12px; padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 32px 0; }
.share-block span { font-weight: 600; color: var(--muted); }
.share-block a { width: 38px; height: 38px; border-radius: 50%; background: var(--soft); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.share-block a:hover { background: var(--blue); color: #fff; }

.author-card { display: flex; gap: 20px; padding: 28px; background: var(--soft); border-radius: var(--r-lg); margin: 32px 0; }
.author-card img { width: 80px; height: 80px; border-radius: 50%; }
.author-card h5 { margin: 0 0 8px; color: var(--navy); font-size: 18px; }
.author-card p { color: var(--muted); margin: 0 0 8px; }

.related-posts { margin-top: 48px; }
.related-posts h3 { font-size: 22px; color: var(--navy); margin: 0 0 20px; }

/* ============ COMMENTS ============ */
.comments-section { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.comments-section h3 { font-size: 22px; color: var(--navy); margin: 0 0 24px; }
.comments-list { margin-bottom: 32px; }
.comment { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.comment.reply { margin-left: 30px; padding-top: 18px; }
.comment img { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }
.c-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.c-head b { color: var(--navy); }
.c-date { color: var(--muted); font-size: 12px; }
.c-body p { margin: 0; }
.comment-replies { margin-top: 12px; }
.comment-form { background: var(--soft); padding: 28px; border-radius: var(--r-lg); position: relative; }
.comment-form h4 { margin: 0 0 18px; color: var(--navy); }
.comment-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.comment-form input, .comment-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); font-family: inherit; font-size: 15px; margin-bottom: 12px; background: #fff; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--blue); }
.comment-form button { background: var(--blue); color: #fff; border: 0; padding: 12px 24px; border-radius: var(--r-pill); font-weight: 600; cursor: pointer; }
.comment-form button:hover { background: var(--blue-dark); }
.comment-form small { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; }

/* ============ CAT/TAG/AUTHOR HERO ============ */
.cat-hero { background: var(--soft); padding: 60px 0; border-bottom: 1px solid var(--border); }
.cat-hero h1 { font-size: 36px; margin: 12px 0 8px; color: var(--navy); }
.cat-hero p { color: var(--muted); margin: 0 0 16px; max-width: 600px; }
.cat-count { background: #fff; color: var(--text); padding: 4px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; }

.author-hero { background: var(--soft); padding: 60px 0; text-align: center; }
.author-avatar-lg { width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 16px; box-shadow: var(--shadow-md); }
.author-socials { margin: 14px 0; }
.author-socials a { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--muted); margin: 0 4px; }
.author-socials a:hover { background: var(--blue); color: #fff; }

.search-hero { background: var(--soft); padding: 60px 0; }
.search-hero h1 { font-size: 32px; color: var(--navy); margin: 0 0 18px; }
.search-form-lg { display: flex; gap: 8px; max-width: 500px; }
.search-form-lg input { flex: 1; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--r-pill); font-size: 16px; }
.search-form-lg button { background: var(--blue); color: #fff; border: 0; padding: 14px 24px; border-radius: var(--r-pill); font-weight: 600; cursor: pointer; }

/* ============ SIDEBAR ============ */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.side-block { background: var(--soft); padding: 24px; border-radius: var(--r-lg); }
.side-block h4 { margin: 0 0 14px; color: var(--navy); font-size: 17px; }
.side-sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.side-subscribe { display: flex; flex-direction: column; gap: 8px; position: relative; }
.side-subscribe input { padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--r-sm); font-size: 14px; background: #fff; }
.side-subscribe button { background: var(--blue); color: #fff; border: 0; padding: 11px 14px; border-radius: var(--r-sm); font-weight: 600; cursor: pointer; }
.side-subscribe button:hover { background: var(--blue-dark); }
.side-cats { list-style: none; padding: 0; margin: 0; }
.side-cats li { margin: 6px 0; }
.side-cats a { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; padding: 6px 0; }
.side-cats a:hover { color: var(--blue); }
.side-cats .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.side-cats small { color: var(--muted); margin-left: auto; }
.side-popular { list-style: none; padding: 0; margin: 0; }
.side-popular li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.side-popular li:last-child { border-bottom: 0; }
.side-popular .rank { font-weight: 800; color: var(--blue); font-size: 18px; flex-shrink: 0; }
.side-popular a { color: var(--text); font-size: 14px; font-weight: 500; line-height: 1.4; }
.side-popular a:hover { color: var(--blue); }
.side-cta { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); color: #fff; padding: 24px; border-radius: var(--r-lg); }
.side-cta h4 { color: #fff; margin: 0 0 8px; }
.side-cta p { color: rgba(255,255,255,.85); margin: 0 0 16px; font-size: 14px; }
.btn-cta { background: var(--yellow); color: var(--navy); padding: 10px 18px; border-radius: var(--r-pill); font-weight: 700; display: inline-block; }
.btn-cta:hover { background: #fff; color: var(--blue); }

/* ============ PAGINATION ============ */
.pagination-wrap { margin-top: 40px; display: flex; justify-content: center; }
.pagination-wrap .pagination { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0; }
.pagination-wrap .page-item .page-link {
    padding: 8px 14px; background: #fff; border: 1px solid var(--border);
    color: var(--text); border-radius: var(--r-sm); font-weight: 500;
}
.pagination-wrap .page-item.active .page-link { background: var(--blue); color: #fff; border-color: var(--blue); }
.pagination-wrap .page-item.disabled .page-link { color: var(--muted); background: var(--soft); }

/* ============ MESSAGES ============ */
.form-msg { padding: 12px 16px; border-radius: var(--r-sm); margin: 12px 0; font-size: 14px; }
.form-msg.success { background: #dcfce7; color: #166534; }
.form-msg.error { background: #fee2e2; color: #991b1b; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; font-style: italic; }

/* ============ FOOTER ============ */
.hwf { background: var(--navy); color: rgba(255,255,255,.85); padding: 60px 0 30px; margin-top: 60px; }
.hwf-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 920px) { .hwf-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .hwf-grid { grid-template-columns: 1fr; } }
.hwf .logo-text { font-size: 22px; color: #fff; font-weight: 800; }
.hwf .desc { color: rgba(255,255,255,.7); font-size: 14px; line-height: 1.7; margin: 16px 0; }
.hwf-stats { display: flex; flex-wrap: wrap; gap: 14px; margin: 20px 0; }
.hwf-stats span { font-size: 12px; color: rgba(255,255,255,.7); }
.hwf-stats b { color: var(--yellow); }
.hwf-social { display: flex; gap: 10px; margin-top: 18px; }
.hwf-social a {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center;
    color: #fff; transition: background .2s;
}
.hwf-social a:hover { background: var(--blue); }
.hwf h6 { color: #fff; margin: 0 0 14px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.hwf ul { list-style: none; padding: 0; margin: 0 0 24px; }
.hwf ul li { margin: 8px 0; }
.hwf ul a { color: rgba(255,255,255,.7); font-size: 14px; }
.hwf ul a:hover { color: var(--yellow); }
.footer-subscribe { display: flex; gap: 8px; margin-top: 8px; position: relative; }
.footer-subscribe input { flex: 1; padding: 10px 14px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); color: #fff; border-radius: var(--r-sm); font-size: 13px; }
.footer-subscribe input::placeholder { color: rgba(255,255,255,.5); }
.footer-subscribe button { background: var(--yellow); color: var(--navy); border: 0; padding: 10px 18px; border-radius: var(--r-sm); font-weight: 700; cursor: pointer; }
.hwf-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08);
    font-size: 13px; color: rgba(255,255,255,.6); flex-wrap: wrap; gap: 12px;
}
.hwf-bottom b { color: #fff; }
.made { color: rgba(255,255,255,.6); }
.made i { color: #ef4444; }


/* =========================================================
   Search autocomplete dropdown
   Used by blog + KB. Self-contained — no shared variables.
   ========================================================= */
.hw-ac-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 80;
    max-height: 420px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 18px 40px rgba(13, 28, 64, .12), 0 2px 6px rgba(13, 28, 64, .06);
    padding: 6px;
}
.hw-ac-dropdown[hidden] { display: none !important; }
.hw-ac-empty {
    padding: 14px 14px;
    color: #64748b;
    font-size: 14px;
}
.hw-ac-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background-color .12s ease;
    border: 1px solid transparent;
}
.hw-ac-item + .hw-ac-item { margin-top: 2px; }
.hw-ac-item:hover,
.hw-ac-item.is-active {
    background: #f1f5f9;
    border-color: #e2e8f0;
}
.hw-ac-title {
    font-size: 14.5px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 4px;
    /* Defensive: never break the layout if a title is malformed */
    overflow-wrap: anywhere;
}
.hw-ac-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}
.hw-ac-meta span {
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.hw-ac-meta .hw-ac-cat { background: #e0e7ff; color: #3730a3; }
.hw-ac-meta .hw-ac-time { background: #fef3c7; color: #92400e; text-transform: none; }
.hw-ac-meta .hw-ac-diff-beginner { background: #dcfce7; color: #166534; }
.hw-ac-meta .hw-ac-diff-intermediate { background: #ffedd5; color: #9a3412; }
.hw-ac-meta .hw-ac-diff-advanced { background: #fee2e2; color: #991b1b; }
.hw-ac-excerpt {
    font-size: 12.5px;
    color: #475569;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Mobile sizing */
@media (max-width: 640px) {
    .hw-ac-dropdown { max-height: 320px; }
    .hw-ac-title { font-size: 14px; }
    .hw-ac-excerpt { -webkit-line-clamp: 1; }
}
