/* DesktopNerds Blog - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0062c6;
    --secondary-color: #0a0e27;
    --body-bg-color: #070b29;
    --header-color: #58abff;
    /* --primary-color: #a855f7; */
    --accent-color: #d7adff;
    --danger-accent-color: #d7132e;
    --textarea-bg: #1c2338;
    --textarea-color: #f0f2f5;
    --success-color: #39ff14;
    --warning-color: #c18e01;
    --light-bg: #1a1f3a;
    --dark-text: #09092d;
    --light-text: #e5ebfa;
    --border-color: #2a2f50;
    --posts-td-color: #2a2f50;
    --hover-color: #d7adff;
    --card-background: #1c2338;
    /* --shadow: 0 4px 15px rgba(168, 85, 247, 0.2); */
    --shadow: 0 4px 15px rgba(0, 98, 198, 0.5);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--light-text);
    background-color: var(--body-bg-color);
}

/* ==================== HEADER & NAVIGATION ==================== */

.header {
    background-color: var(--secondary-color);
    color: white;
    padding: 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    /* max-width: 1200px; */
    margin: 0 auto;
    width: 100%;
}

.logo img {
    cursor: pointer;
    max-width: 50%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-family: 'Courier New', monospace;
    font-weight: 800;
    font-size: 1.0rem;
}

.nav-links a:hover {
    color: var(--light-text);
}

.user-info {
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Small categories row under header */
.sub-categories {
    background: rgba(20, 24, 44, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    gap: 14px;
    align-items: center;
}

.sub-categories .container {
    padding: 6px 2rem;
}

.sub-categories a {
    color: var(--light-text);
    opacity: 0.85;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 4px 6px;
}

.sub-categories a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ==================== BUTTONS ==================== */

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.btn:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--hover-color);
}

.btn-danger {
    background-color: var(--danger-accent-color);
}

.btn-danger:hover {
    background-color: var(--hover-color);
}

.btn-warning {
    background-color: var(--warning-color);
}

.btn-warning:hover {
    background-color: var(--hover-color);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* ==================== ALERTS ==================== */

.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-error {
    background-color: #fdeef0;
    color: #c0392b;
    border-left-color: var(--accent-color);
}

.alert-success {
    background-color: #eafaf1;
    color: #27ae60;
    border-left-color: var(--success-color);
}

.alert-info {
    background-color: #0a1f2e;
    color: #00f7ff;
    border-left-color: var(--accent-color);
}

.alert-warning {
    background-color: #fef5e7;
    color: #d68910;
    border-left-color: var(--warning-color);
}

/* ==================== CONTAINER ==================== */

.container {
    max-width: 80vw;
    margin: 0 auto;
    padding: 2rem;
}

.container>h1 {
    font-size: 2.0rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

/* ==================== BREADCRUMBS ==================== */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--light-text);
}

.breadcrumbs * {
    display: inline-flex;
    align-items: center;
}

.breadcrumbs *+*::before {
    content: '›';
    margin: 0 0.5rem;
    color: var(--border-color);
    font-weight: 600;
}

.breadcrumbs a {
    color: var(--accent-color);
    text-decoration: none;
    padding: 0.15rem 0.35rem;
    border-radius: 6px;
    transition: all 0.12s ease-in-out;
}

.breadcrumbs a:hover {
    color: var(--hover-color);
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
}

.breadcrumbs span {
    color: var(--light-text);
    opacity: 0.9;
    padding: 0.15rem 0.35rem;
}

@media (max-width: 640px) {
    .breadcrumbs {
        font-size: 0.85rem;
    }
}

/* ==================== CONTACT ==================== */
.contact-info {
    background: var(--card-background);
    color: var(--light-text);
    padding: 2rem;
    border-radius: 8px;
    /* box-shadow: var(--shadow); */
}

/* ==================== FORMS ==================== */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.login-box {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px #000000b2;
}

.login-box h2 {
    text-align: center;
    color: var(--light-text);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px #000000b2;
}

.form-group-login {
    color: var(--light-text);
}

.form-group-login input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.95rem;
    background-color: #141a2a;
    color: var(--light-text);
    width: 100%;
}

.form-group-login input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 247, 255, 0.15);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--light-text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--light-text);
    background-color: var(--card-background);
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 247, 255, 0.15);
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: var(--light-text);
    font-size: 0.85rem;
}

.post-form {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    /* box-shadow: var(--shadow); */
    box-shadow: inset 0 0 5px 2px #111111;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.tags-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

/* ==================== DASHBOARD ==================== */

.dashboard-actions {
    margin-bottom: 2rem;
}

select#per_page {
    background-color: var(--card-background);
    color: var(--light-text);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 0.85rem;
}

.posts-list {
    /* background: white; */
    /* border-radius: 8px; */
    /* box-shadow: var(--shadow); */
    overflow: hidden;
}

.posts-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 5px;
    color: var(--light-text);
    display: block;
    overflow-x: auto;
}

.posts-table thead {
    border-bottom: 2px solid var(--border-color);
}

.posts-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.85rem;
}

/* ==================== PRODUCTS GRID (public) ==================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    transition: transform 0.18s, box-shadow 0.18s;
    max-width: 25rem;
}

/* Featured product styles */
.product-card.featured {
    border: 2px solid #ffd24d;
    background: linear-gradient(180deg, rgba(255, 210, 77, 0.04), rgba(255, 210, 77, 0.02));
    box-shadow: 0 10px 30px rgba(255, 210, 77, 0.08);
    transform: translateY(-4px);
}

.product-card {
    position: relative;
}

.product-card.retired {
    position: relative;
    /* de-emphasize color while keeping content readable */
    filter: grayscale(60%);
}

/* Full-card grey overlay for retired products */
.product-card.retired::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(130, 130, 130, 0.45);
    border-radius: 10px;
    z-index: 4;
    /* sit above content but below ribbon */
    pointer-events: none;
}

/*
.product-card.retired .product-actions .btn {
    display: none;
} */

/* ensure retired ribbon sits above overlay */
.product-card .ribbon.retired {
    background: #828282;
    color: #fff;
    z-index: 6;
}

.badge.retired {
    background: #828282;
    color: #fff;
}

.product-card .ribbon {
    position: absolute;
    top: 12px;
    left: -46px;
    width: 160px;
    background: #ffd24d;
    color: #111;
    text-align: center;
    transform: rotate(-45deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    font-weight: 700;
    padding: 6px 0;
    z-index: 5;
}

.product-card.featured .product-actions .btn-primary {
    background-color: #ffb020;
    border-color: #ffb020;
}

.badge {
    display: inline-block;
    background: #ffd24d;
    color: #111;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 700;
    margin-left: 0.5rem;
    font-size: 0.75rem;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.product-thumb {
    position: relative;
    /* width: 100%; */
    /* height: 160px; */
    background: linear-gradient(135deg, #12131a, #1b2030);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
}

.product-thumb img {
    /* width: 100%; */
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-body {
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 140px;
}

.product-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-meta {
    color: var(--light-text);
    opacity: 0.25;
    font-size: 0.85rem;
}

.product-excerpt {
    color: var(--light-text);
    opacity: 0.9;
    font-size: 0.92rem;
    line-height: 1.35;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.product-actions .btn {
    padding: 0.45rem 0.7rem;
    font-size: 0.9rem;
}

@media (max-width: 520px) {
    .product-thumb {
        height: 120px;
    }
}

/* small helper for truncated text */
.muted {
    color: var(--light-text);
    opacity: 0.7;
}

.posts-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--card-background);
    font-size: 0.75rem;
}

.posts-table td:first-child {
    padding: 1rem;
    border-left-style: solid;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-color: var(--border-color);
}

.posts-table td:last-child {
    padding: 1rem;
    border-right-style: solid;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border-color: var(--border-color);
}

.posts-table td form {
    margin: 0;
}

/* ==================== RELATED POSTS ==================== */
.related-posts {
    background: var(--card-background);
    color: var(--light-text);
    padding: 1rem 1.2rem;
    margin: 1.5rem 0;
    border-top: 1px solid var(--border-color);
}

.related-posts h3 {
    margin-bottom: 0.6rem;
    color: var(--primary-color);
    font-size: 1.05rem;
}

.related-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.related-list li {
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    transition: background 0.15s ease, transform 0.12s ease;
}

.related-list li:hover {
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-2px);
}

.related-list a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 600;
}

.related-meta {
    color: var(--accent-color);
    font-size: 0.85rem;
    margin-left: 0.45rem;
}

@media (max-width: 700px) {
    .related-list {
        gap: 0.35rem;
    }

    .related-posts h3 {
        font-size: 1rem;
    }
}


/* ==================== BLOG LAYOUT ==================== */

.blog-layout {
    display: grid;
    /* Left: News, Center: Posts, Right: Tags */
    grid-template-columns: 240px 1fr 260px;
    gap: 2rem;
    width: 100%;
    align-items: start;
}

.blog-posts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    order: 1;
    align-items: start;
}

/* Ensure each post preview fills its grid cell and keeps internal layout */
.blog-posts .post-preview {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.sidebar {
    order: 2;
}

.left-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.left-sidebar .sidebar-widget {
    padding: 1rem;
}

.blog-posts {
    flex: 1 1 auto;
}

.site-news {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.site-news .news-item {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent);
    padding: 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.site-news .news-link {
    display: block;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 0.3rem;
}

.site-news .news-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.site-news .news-excerpt {
    color: rgba(229, 235, 250, 0.7);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.site-news .news-empty {
    color: rgba(229, 235, 250, 0.6);
}

.tech-feed {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tech-feed .feed-news-item {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent);
    padding: 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.tech-feed li a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.tech-feed li a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.post-preview {
    background: var(--card-background);
    padding: 1.25rem;
    border-radius: 8px;
    /* box-shadow: var(--shadow); */
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.post-preview h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.post-preview h2 a {
    color: var(--header-color);
    text-decoration: none;
}

.post-preview h2 a:hover {
    color: var(--accent-color);
}

.post-meta {
    color: #e5ebfa4a;
    font-size: 0.75rem;
    font-style: italic;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    float: right;
    margin-left: 1rem;
    align-items: flex-end;
}

/* Small metadata (dates, bylines) */
.small-meta {
    color: rgba(229, 235, 250, 0.6);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.post-date,
.post-author {
    display: inline-block;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    min-height: 1rem;
}

.tag-badge {
    display: inline-block;
    background-color: #eee;
    color: var(--primary-color);
    padding: 0.15rem 0.4rem;
    border-radius: 15px;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid var(--primary-color);
}

.tag-badge:hover {
    background-color: var(--primary-color);
    color: white;
}

.post-excerpt {
    color: var(--light-text);
    margin-bottom: 1rem;
    line-height: 1.25;
    font-size: 0.85rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.85rem;
}

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

.post-full {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: inset 0 0 5px 2px #111111;
    /* box-shadow: var(--shadow); */
}

.post-full img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-full h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.post-toc {
    margin: 1rem 0 1.25rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.post-toc h2 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--primary-color);
}

.post-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.post-toc .toc-item {
    margin: 0;
    line-height: 1.4;
}

.post-toc .toc-item+.toc-item {
    margin-top: 0.35rem;
}

.post-toc .toc-item.h3 {
    padding-left: 1rem;
}

.post-toc .toc-item.h4 {
    padding-left: 2rem;
}

.post-toc a {
    text-decoration: none;
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--header-color);
}

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

.post-toc a.active {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--header-color);
}

.post-content {
    margin-top: 1rem;
    margin-bottom: 1rem;
    /* line-height: 1.8; */
    color: var(--light-text);
    white-space: pre-line;
    font-size: 0.85rem;
}

.post-content hr {
    border: 1px solid #2a2f5070;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: none;
}

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

/* Keep pre-wrap for plain text, but ensure structured HTML (lists, tables) render normally */
.post-content ul,
.post-content ol,
.post-content li,
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content table,
.post-content th,
.post-content td {
    white-space: normal;
}

.post-content h1 {
    font-size: 1.4rem;
    /* margin-top: 1rem; */
    /* margin-bottom: 1rem; */
    text-shadow: 1px 1px 2px #000000b2;
}

.post-content h2 {
    font-size: 1.2rem;
    /* margin-top: 1.5rem; */
    /* margin-bottom: 1rem; */
    text-shadow: 1px 1px 2px #000000b2;
}

.post-content h3 {
    font-size: 1.0rem;
    /* margin-top: 1.2rem; */
    /* margin-bottom: 0.8rem; */
    text-shadow: 1px 1px 2px #000000b2;
}

.post-content h4 {
    font-size: 0.9rem;
    /* margin-top: 1rem; */
    /* margin-bottom: 0.5rem; */
    text-shadow: 1px 1px 2px #000000b2;
}

/* Tightened spacing for headings and paragraphs to avoid large gaps */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    /* margin-top: 0.6rem; */
    /* margin-bottom: 0.2rem; */
    color: var(--header-color);
    text-shadow: 1px 1px 2px #000000b2;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    scroll-margin-top: 110px;
}

.post-content p {
    margin: 0 0 0.85rem 0;
}

.post-content ul,
.post-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.post-content ul,
.post-content ol,
.post-content li {
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.post-content table {
    margin-bottom: 1rem;
    border-color: var(--secondary-color);
    border-width: 2px;
}

.post-content td {
    padding: 0.3rem;
    border-radius: 5px;
    border-color: var(--secondary-color);
    border-width: 2px;
    background-color: var(--posts-td-color);
}

.post-content code {
    background-color: var(--border-color);
    padding: 5px;
    border-radius: 10px;
}

/* setup modern scrollbar y and x for post-content */
.post-content {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.post-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.post-content::-webkit-scrollbar-track {
    background: transparent;
}

.post-content::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
    border: 2px solid transparent;
}

.post-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Product page styles */
.product-full {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    /* box-shadow: var(--shadow); */
}

/* Heart Button Styles */
.heart-btn {
    background: none;
    border: none;
    color: #e5ebfa;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.heart-btn:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

.heart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.heart-btn.hearted,
.heart-btn[data-hearted="true"] {
    color: #ff4757;
}

.heart-btn i {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.heart-btn:hover i {
    transform: scale(1.1);
}

.heart-btn.hearted i,
.heart-btn[data-hearted="true"] i {
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(0.95);
    }

    75% {
        transform: scale(1.1);
    }
}

.heart-count {
    font-weight: 600;
    min-width: 1.5rem;
    text-align: left;
}

/* Heart button in post-meta */
.post-meta .heart-btn {
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
}

.post-meta .heart-btn i {
    font-size: 1rem;
}

/* Heart button in post-actions */
.post-actions .heart-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--card-background);
}

.post-actions .heart-btn:hover {
    border-color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(0, 0, 0, 0.9);
    color: #e5ebfa;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #ff4757;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 300px;
    font-size: 0.9rem;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== SIDEBAR ==================== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: 8px;
    /* box-shadow: var(--shadow); */
}

.sidebar-widget h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-shadow: 1px 1px 2px #000000b2;
}

.tag-list {
    list-style: none;
}

.tag-list li {
    margin-bottom: 0.5rem;
}

.tag-list a {
    display: block;
    padding: 0.25rem 0.50rem;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.tag-list a:hover,
.tag-list a.active {
    background-color: var(--primary-color);
    color: white;
}

/* ==================== SEARCH ==================== */

.search-section {
    margin-bottom: 2rem;
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: 8px;
    /* box-shadow: var(--shadow); */
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.95rem;
    background-color: #141a2a;
    color: var(--light-text);
}

.search-form input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 247, 255, 0.15);
}

/* ==================== FOOTER ==================== */

.footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    min-height: 100px;
    color: var(--light-text);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-content p {
    margin: 0;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.footer-social-link {
    margin-right: 0.7em;
    font-size: 1.8em;
    color: #FFFFFF;
    display: inline-block;
    vertical-align: middle;
    transition: color 0.2s;
}

.footer-social-link:last-child {
    margin-right: 0;
}

.footer-social-link:hover {
    color: #1183fe;
    /* or your preferred hover color */
}

@media (max-width: 768px) {
    .footer-links {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .footer-content p {
        font-size: 0.9rem;
    }
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .blog-layout {
        grid-template-columns: 1fr;
    }

    .container {
        max-width: 100%;
        padding: 1rem;
    }

    .container>h1 {
        font-size: 1.8rem;
    }

    .post-preview {
        padding: 1.5rem;
    }

    .post-full {
        padding: 1.5rem;
    }

    .post-full h1 {
        font-size: 1.6rem;
    }

    .posts-table {
        font-size: 0.9rem;
        display: block;
        overflow-x: auto;
    }

    .posts-table th,
    .posts-table td {
        padding: 0.7rem;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form button {
        width: 100%;
    }

    .post-actions {
        flex-direction: column;
    }

    .post-actions .btn {
        width: 100%;
        text-align: center;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .tags-selection {
        gap: 0.5rem;
    }

    .checkbox-label {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .post-preview h2 {
        font-size: 1.3rem;
    }

    .post-preview {
        padding: 1rem;
    }

    .container>h1 {
        font-size: 1.5rem;
    }

    .nav-links {
        font-size: 0.85rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.3rem;
    }
}

/* ==================== EDITOR TOOLBAR ==================== */

.editor-toolbar {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: var(--card-background);
    /* border: 1px solid var(--border-color); */
    border-radius: 4px 4px 0 0;
    flex-wrap: wrap;
    align-items: center;
}

.toolbar-btn {
    padding: 0.4rem 0.6rem;
    background-color: var(--primary-color);
    border: 1px solid var(--border-color);
    color: var(--light-text);
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 35px;
    text-align: center;
}

.toolbar-btn:hover {
    background-color: var(--secondary-color);
    color: var(--light-text);
    border-color: var(--secondary-color);
}

.toolbar-btn:active {
    background-color: var(--secondary-color);
    color: var(--light-text);
    border-color: var(--secondary-color);
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border-color);
    margin: 0 0.25rem;
}

.content-editor {
    border-radius: 0 0 4px 4px;
    border: 1px solid var(--border-color);
    border-top: none;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ==================== DOWNLOADS/TOOLS SECTION ==================== */

.tools-intro {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 2rem;
}

.downloads-section {
    margin-bottom: 3rem;
}

.downloads-section h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.download-card {
    background: var(--card-background);
    border-radius: 8px;
    /* box-shadow: var(--shadow); */
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.download-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.download-header {
    padding: 1.5rem;
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
}

.download-header h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    word-break: break-word;
    text-shadow: 1px 1px 2px #000000b2;
}

.download-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--light-text);
}

.download-count {
    font-weight: 600;
    color: var(--primary-color);
}

.download-uploader {
    font-style: italic;
}

.download-date {
    font-size: 0.8rem;
}

.download-description {
    padding: 1rem 1.5rem;
    flex-grow: 1;
    color: var(--light-text);
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-line;
}

.download-description ul,
.download-description ol,
.download-description li {
    white-space: normal;
}

.download-size {
    padding: 0 1.5rem;
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.download-actions {
    padding: 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-color);
}

.download-actions .btn {
    flex: 1;
    min-width: 100px;
    text-align: center;
}

.download-actions form {
    flex: 1;
    min-width: 100px;
}

.download-actions button {
    width: 100%;
}

/* ==================== DOWNLOADS RESPONSIVE ==================== */

@media (max-width: 768px) {
    .downloads-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .download-header {
        padding: 1rem;
    }

    .download-header h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .download-description {
        padding: 0.75rem 1rem;
    }

    .download-size {
        padding: 0 1rem;
    }

    .download-actions {
        padding: 1rem;
        gap: 0.25rem;
    }

    .download-actions .btn {
        min-width: 80px;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .downloads-grid {
        grid-template-columns: 1fr;
    }

    .downloads-section h2 {
        font-size: 1.4rem;
    }

    .download-header h3 {
        font-size: 1rem;
    }

    .download-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .download-actions .btn,
    .download-actions button {
        width: 100%;
        min-width: unset;
    }

    .download-actions form {
        width: 100%;
    }
}

/* ==================== CODE BLOCK COPY BUTTON ==================== */

pre {
    position: relative;
}

.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 12px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
    z-index: 10;
}

pre:hover .code-copy-btn {
    opacity: 1;
}

.code-copy-btn:hover {
    background-color: #555;
}

.code-copy-btn.copied {
    background-color: #28a745;
}

/* ==================== CONTACT FORM ==================== */

.contact-form {
    max-width: 600px;
    margin: 2rem auto;
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    /* box-shadow: var(--shadow); */
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--light-text);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--textarea-bg);
    color: var(--textarea-color);
    font-family: inherit;
    font-size: 1rem;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 98, 198, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form small {
    display: block;
    margin-top: 0.25rem;
    color: #999;
    font-size: 0.85rem;
}

.contact-info {
    max-width: 600px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: var(--light-bg);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* ==================== COMMENTS SECTION ==================== */

.comments-section {
    /* max-width: 900px; */
    margin: 3rem auto;
    padding: 2rem;
    background-color: var(--card-background);
    border-radius: 8px;
    border-top: 3px solid var(--primary-color);
}

.comments-section h2 {
    margin-bottom: 1.5rem;
    color: var(--light-text);
    font-size: 1.8rem;
}

.comments-section h3 {
    margin-bottom: 1rem;
    color: var(--light-text);
    font-size: 1.3rem;
}

.comments-list {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.no-comments {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

.comment {
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    padding: 1rem;
    font-size: 0.85rem;
    background-color: var(--light-bg);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.comment-header strong {
    color: var(--accent-color);
    font-size: 1rem;
}

.comment-date {
    color: #999;
    font-size: 0.85rem;
}

.comment-body {
    color: var(--textarea-color);
    line-height: 1.6;
    word-wrap: break-word;
}

/* Comment Form */

.comment-form-wrapper {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-form .form-group {
    display: flex;
    flex-direction: column;
}

.comment-form label {
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--light-text);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--textarea-bg);
    color: var(--textarea-color);
    font-family: inherit;
    font-size: 1rem;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 98, 198, 0.1);
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.comment-form small {
    color: #999;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* ==================== ADMIN COMMENTS PAGE ==================== */

.admin-panel {
    padding: 2rem 0;
}

.admin-panel h1 {
    margin-bottom: 2rem;
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-nav {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-box {
    background-color: var(--card-background);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #999;
    font-size: 0.9rem;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-buttons .btn {
    padding: 0.6rem 1.2rem;
}

.table-wrapper {
    overflow-x: auto;
    background-color: var(--card-background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background-color: var(--light-bg);
    border-bottom: 2px solid var(--border-color);
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    color: var(--accent-color);
    font-weight: 600;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--textarea-color);
    word-wrap: break-word;
}

.admin-table tbody tr:hover {
    background-color: var(--light-bg);
}

.admin-table tbody tr.pending {
    background-color: rgba(255, 190, 11, 0.05);
}

.admin-table tbody tr.approved {
    background-color: rgba(57, 255, 20, 0.05);
}

.admin-table tbody tr.disapproved {
    background-color: rgba(255, 77, 77, 0.05);
    opacity: 0.75;
}

.panel-table {
    width: 100%;
    border-collapse: collapse;
}

.panel-table thead {
    background-color: var(--light-bg);
    border-bottom: 2px solid var(--border-color);
}

.panel-table th {
    text-align: center;
    color: var(--accent-color);
    font-weight: 600;
}

.panel-table td {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    color: var(--textarea-color);
    word-wrap: break-word;
}

.panel-table tbody tr:hover {
    background-color: var(--light-bg);
}

.author-cell {
    max-width: 150px;
}

.comment-text-cell {
    max-width: 300px;
}

.comment-preview {
    color: var(--textarea-color);
    word-wrap: break-word;
    margin-bottom: 0.5rem;
}

.comment-details {
    /* cursor: pointer; */
    color: var(--primary-color);
    /* user-select: none; */
}

.comment-details summary {
    font-size: 0.9rem;
    outline: none;
    margin-bottom: 0.5rem;
}

.comment-details summary:hover {
    text-decoration: underline;
}

.comment-details p {
    margin: 0.5rem 0;
    color: var(--textarea-color);
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 0.5rem;
    background-color: var(--textarea-bg);
    border-radius: 4px;
}

.comment-details small {
    color: #999;
    font-size: 0.8rem;
}

.date-cell {
    font-size: 0.9rem;
    color: #999;
}

.status-cell {
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background-color: rgba(57, 255, 20, 0.2);
    color: var(--success-color);
}

.badge-warning {
    background-color: rgba(255, 190, 11, 0.2);
    color: var(--warning-color);
}

.badge-danger {
    background-color: rgba(255, 77, 77, 0.2);
    color: var(--danger-color);
}

.draft-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.3rem 0.6rem;
    background-color: rgba(255, 190, 11, 0.2);
    color: var(--warning-color);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.news-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #1b4b72;
    color: #dff3ff;
}

.planned-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    background: #69721b;
    color: #dff3ff;
}

.published-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.3rem 0.6rem;
    background-color: rgba(57, 255, 20, 0.2);
    color: var(--success-color);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.actions-cell {
    text-align: center;
    /* display: flex; */
    gap: 0.5rem;
    justify-content: center;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 2rem !important;
}

.link {
    color: var(--primary-color);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* ==================== PAGINATION ==================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1rem 0;
    padding: 1.5rem;
    background-color: var(--card-background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    background-color: var(--primary-color);
    color: var(--light-text);
    text-decoration: none;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
}

.page-link:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

.page-info {
    color: var(--light-text);
    font-weight: 500;
    padding: 0.5rem 1rem;
    background-color: var(--secondary-color);
    border-radius: 6px;
}

/* ==================== SORTING ==================== */

.sort-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.sort-link:hover {
    background-color: rgba(0, 98, 198, 0.2);
    color: var(--primary-color);
}

.posts-table th {
    padding: 0;
}

.posts-table th .sort-link {
    display: flex;
    width: 100%;
    padding: 1rem;
}

@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
        min-width: 36px;
    }

    .page-info {
        order: -1;
        width: 100%;
        text-align: center;
    }

    .admin-table {
        font-size: 0.9rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
    }

    .comment-text-cell {
        max-width: 150px;
    }

    .actions-cell {
        flex-direction: column;
    }

    .btn-sm {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-buttons .btn {
        width: 100%;
    }

    .comments-section {
        padding: 1rem;
    }

    .comment-form-wrapper {
        padding: 1rem;
    }
}

/* ==================== CATEGORIES ==================== */
/* Categories landing page styles (keeps dark theme) */
.categories-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    color: var(--light-text);
}

.categories-container h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.categories-subtitle {
    opacity: 0.8;
    margin-bottom: 30px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--card-background);
    border-radius: 10px;
    padding: 22px;
    text-decoration: none;
    color: inherit;
    transition: all 0.18s ease;
    border-left: 4px solid transparent;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.category-card:hover {
    transform: translateY(-6px);
    background: #263255;
}

.category-icon {
    font-size: 28px;
    width: 100px;
    display: block;
    margin-bottom: 12px;
}

.category-card h2 {
    margin: 0 0 8px;
}

.category-card p {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* Accent Colors */
.windows {
    border-left-color: #3b82f6;
}

.linux {
    border-left-color: #22c55e;
}

.security {
    border-left-color: #ef4444;
}

.homelab {
    border-left-color: #8b5cf6;
}

.hardware {
    border-left-color: #f97316;
}

.software {
    border-left-color: #06b6d4;
}

.troubleshooting {
    border-left-color: #eab308;
}

.explainers {
    border-left-color: #ec4899;
}

.windowsexplained {
    border-left-color: #6366f1;
}

.forensics {
    border-left-color: #242564;
}

/* ==================== POLICY PAGES ==================== */

.policy-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #151a28;
    color: var(--light-text);
}

.policy-container h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px #000000b2;
}

.last-updated {
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 2rem;
}

.policy-container section {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.policy-container section:last-child {
    border-bottom: none;
}

.policy-container h2 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
    text-shadow: 1px 1px 2px #000000b2;
}

.policy-container h3 {
    color: var(--header-color);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    margin-top: 0.75rem;
}

.policy-container p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--light-text);
}

.policy-container ul,
.policy-container ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: var(--light-text);
}

.policy-container li {
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

.policy-container strong {
    color: var(--header-color);
    font-weight: 600;
}

@media (max-width: 768px) {
    .policy-container {
        padding: 1.5rem;
        max-width: 100%;
    }

    .policy-container h1 {
        font-size: 2rem;
    }

    .policy-container h2 {
        font-size: 1.4rem;
    }

    .policy-container h3 {
        font-size: 1.1rem;
    }

    .policy-container section {
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }

    .toast-notification {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: calc(100% - 2rem);
    }
}

/* Collapse two-column posts grid to single column on smaller screens */
@media (max-width: 1000px) {
    .blog-posts {
        grid-template-columns: 1fr;
    }
}

/* Disable sticky header on small / narrow viewports to avoid covering content */
@media (max-width: 640px) {
    .header {
        position: static !important;
    }
}