/*
Theme Name: ZipGrid
Description: A modular WordPress theme with block editor disabled
Version: 1.0.0
Author: Your Name
Text Domain: zipgrid
*/

/* ===== FONT FACE DECLARATIONS ===== */
@font-face {
    font-family: 'Ra Mono';
    src: url('fonts/ra-mono/Ra-Mono.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Spacing */
    --gap: 20px;
    --gap-small: 10px;
    --gap-large: 40px;
    
    /* Color Palette */
    --primary: #00a86b;
    --primary-dark: #008f5a;
    --secondary: #2d3748;
    --accent: #00d4aa;
    --success: #00a86b;
    --error: #e53e3e;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f7fafc;
    --gray-100: #edf2f7;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #a0aec0;
    --gray-500: #718096;
    --gray-600: #4a5568;
    --gray-700: #2d3748;
    --gray-800: #1a202c;
    --gray-900: #171923;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Ra Mono', 'Courier New', Courier, monospace;
    --font-mono-alt: 'Courier New', Courier, monospace;
    --font-body: 'Ra Mono', 'Courier New', Courier, monospace;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    margin: 0;
    padding: 0 2rem;
    color: var(--gray-700);
    background: var(--white);
}

/* ===== TYPOGRAPHY ===== */
p {
    margin-bottom: 1.3rem;
}

p:last-child {
    margin-bottom: 0;
}

p strong,
li strong {
    background: rgba(255, 255, 0, 0.3);
    padding: 0.1rem 0.3rem;
    padding-top: 0.3rem;
    border-radius: 3px;
    color: var(--gray-800);
    display: inline-block;
    vertical-align: middle;
    line-height: 1.2;
}

/* ===== LISTS ===== */
ul, ol {
    margin: 1.3rem 0;
    padding: 0 0 0 2rem;
    color: var(--gray-700);
    font-family: inherit;
    font-size: 1em;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

ul ul, ol ul, ul ol, ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    margin-left: 1.5rem;
}

/* ===== LAYOUT ===== */
#page {
    margin: 0;
    padding: 0;
    max-width: none;
}

/* ===== GRID SYSTEM ===== */
.grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

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

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

/* Framework grid for side-by-side layout */
.framework-grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: 1fr;
    align-items: stretch;
}

/* Grid items equal height */
.grid > .module {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.framework-grid > .module,
.framework-grid > .area {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* Ensure area wrapper doesn't interfere with grid */
.framework-grid .area {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Ensure the module inside the area also stretches */
.framework-grid .area .module {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.framework-grid .module.framework-visualiser .module-content {
  display: flex;
}

/* ===== MODULES ===== */
.module {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.5rem;
    margin: var(--gap) 0;
    box-shadow: 0 2px 16px 4px rgb(0 0 0 / 0.06), 0 1px 8px 2px rgb(0 0 0 / 0.08);
    transition: all var(--transition-normal);
}

.module:hover {
    box-shadow: 2px 4px 20px 6px rgb(0 0 0 / 0.08), 1px 2px 12px 3px rgb(0 0 0 / 0.12);
    transform: translateY(-1px);
}

.module:last-child:not(.footer) {
    margin-bottom: 0;
}

/* Module variants */
.module.article {
    font-size: 1rem;
    padding: 2.5rem;
}

.module.footer {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--gray-800);
    color: var(--white);
    border: none;
}

.module.category {
    border-left: 4px solid var(--accent);
}

.module.page {
    border-left: 4px solid var(--success);
}

.module.search {
    border-left: 4px solid var(--primary);
}

.module.error {
    border-left: 4px solid var(--error);
}

/* ===== BOXES ===== */
.box {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 0 0 var(--gap) 0;
    box-shadow: var(--shadow);
    transition: all var(--transition-fast);
}

.box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.box:last-child {
    margin-bottom: 0;
}

/* Box headers */
.box-header {
    position: relative;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: #e8f2f8;
    border-radius: 6px;
    color: var(--gray-800);
    font-family: var(--font-mono-alt);
    font-weight: 600;
    border-bottom: 1px solid var(--gray-200);
}

.box-header h1,
.box-header h2,
.box-header h3,
.box-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: inherit;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.box-content {
    line-height: 1.7;
    color: var(--gray-700);
}

/* ===== POST CONTENT ===== */
.post-box {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.post-box:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.single-post {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.post-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
    font-family: var(--font-mono-alt);
}

.post-title a {
    color: var(--gray-900);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.post-title a:hover {
    color: var(--primary);
}

.post-meta {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    font-family: var(--font-mono);
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.post-meta span::before {
    content: '>';
    color: var(--primary);
    margin-right: 0.25rem;
}

.post-excerpt {
    margin-bottom: 1.5rem;
    color: var(--gray-600);
    line-height: 1.7;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary);
    border-radius: 6px;
    transition: all var(--transition-fast);
    display: inline-block;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.read-more:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}

/* ===== LOGO & NAVIGATION ===== */
.logo {
    color: var(--primary);
}

.logo .box-header h1,
.logo .box-header h2,
.logo .box-header h3,
.logo .box-header h4 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.025em;
    font-family: var(--font-mono);
}

.logo .box-header h1 a,
.logo .box-header h2 a,
.logo .box-header h3 a,
.logo .box-header h4 a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.logo .box-header h1 a:hover,
.logo .box-header h2 a:hover,
.logo .box-header h3 a:hover,
.logo .box-header h4 a:hover {
    opacity: 0.9;
}

.logo .box-content {
    margin: 0;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 400;
}

.navigation {
    color: var(--primary);
}

.navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

.navigation a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all var(--transition-fast);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.navigation a:hover {
    background: rgba(0, 168, 107, 0.1);
    transform: translateY(-1px);
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }

.hidden { display: none; }
.visible { display: block; }

/* ===== MODULE HEADERS ===== */
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: #e8f2f8;
    border-radius: 6px;
    color: var(--gray-800);
    font-family: var(--font-mono-alt);
    font-weight: 600;
}

.module-header h1,
.module-header h2,
.module-header h3,
.module-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: inherit;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Module header color variants */
.module-header.blue {
    background: #617594;
    color: var(--white);
}

.module-header.green {
    background: #10b981;
    color: var(--white);
}

.module-header.red {
    background: #ef4444;
    color: var(--white);
}

/* ===== MODULE BUTTONS ===== */
.module-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.module-button,
.module-tab {
    padding: 0.5rem 1rem;
    background: var(--gray-200);
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    color: var(--gray-700);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.module-button:hover,
.module-tab:hover {
    background: var(--gray-100);
    transform: translateY(-1px);
}

.module-button.active,
.module-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.module-button.active:hover,
.module-tab.active:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ===== TABBED MODULES ===== */
.tabbed .module-content {
    position: relative;
    transition: height var(--transition-slow);
    overflow: hidden;
}

.module-content {
    font-size: 0.95rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.tab-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--gray-700);
    font-family: var(--font-mono);
}

.tab-content > p:first-child,
.tab-content > ul:first-child,
.tab-content > ol:first-child {
    margin-top: 0;
}

.tabbed .tab-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
    line-height: 1.7;
    color: var(--gray-700);
}

.tabbed .tab-content.active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

/* ===== FRAMEWORK NODES ===== */
.upstream-box,
.downstream-box {
    padding-bottom: 1rem;
}

/* Simple approach - add margin to grid containers that have upstream/downstream nodes */
.grid.grid-2 {
    margin-bottom: var(--gap) !important;
}

/* When only one module is present in grid-2, make it full width */
.grid.grid-2 > .module:only-child {
    grid-column: 1 / -1;
}

/* Style for "none" text in upstream/downstream modules */
.upstream-nodes .box-content p:only-child,
.downstream-nodes .box-content p:only-child {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--gray-500);
    margin: 2rem 0;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
}

/* Override grid margin for upstream/downstream nodes */
.grid > .module.upstream-nodes,
.grid > .module.downstream-nodes {
    margin-bottom: var(--gap) !important;
}

/* Add margin to the area containing upstream/downstream nodes */
.area:has(.upstream-nodes),
.area:has(.downstream-nodes) {
    margin-bottom: var(--gap) !important;
}

/* Alternative approach for broader browser support */
.area.area-100:has(.grid) {
    margin-bottom: var(--gap) !important;
}

/* Simple approach - add margin to area-100 containers */
.area.area-100 {
    margin-bottom: var(--gap) !important;
}

/* More specific approach - target grid containers with upstream/downstream nodes */
.grid:has(.upstream-nodes),
.grid:has(.downstream-nodes) {
    margin-bottom: var(--gap) !important;
}

.single-box {
    grid-column: 1 / -1;
    max-width: 100%;
}

.upstream-box .box-header h1,
.upstream-box .box-header h2,
.upstream-box .box-header h3,
.upstream-box .box-header h4,
.downstream-box .box-header h1,
.downstream-box .box-header h2,
.downstream-box .box-header h3,
.downstream-box .box-header h4 {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.upstream-list,
.downstream-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.upstream-list li,
.downstream-list li {
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.upstream-list li:last-child,
.downstream-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0.5rem;
}

/* Ghost nodes styling */
.upstream-list li.ghost-node a,
.downstream-list li.ghost-node a {
    color: #9b2c2c;
    pointer-events: none;
    cursor: default;
    text-decoration: none;
}

.upstream-list a,
.downstream-list a {
    color: var(--gray-700);
    text-decoration: none;
    font-family: var(--font-mono);
    display: block;
    width: 100%;
}

/* ===== TOOLTIPS ===== */
.tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--gray-500);
    color: var(--white);
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: help;
    transition: background-color var(--transition-fast);
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.tooltip-trigger:hover {
    background: var(--gray-600);
    transform: translate(-50%, -50%);
}

.tooltip {
    position: fixed;
    display: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
    z-index: 9999;
    max-width: 50vw;
    min-width: 300px;
}

.tooltip-content {
    background: var(--gray-800);
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    line-height: 1.4;
    text-align: left;
}

.tooltip-arrow {
    position: absolute;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border: 6px solid transparent;
}

.tooltip.is-above .tooltip-arrow {
    top: 100%;
    border-top-color: var(--gray-800);
}

.tooltip.is-below .tooltip-arrow {
    bottom: 100%;
    border-bottom-color: var(--gray-800);
}

/* ===== BREADCRUMBS ===== */
.module.breadcrumb-module {
    margin: 0;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.module.breadcrumb-module:hover {
    box-shadow: var(--shadow-md);
}

.breadcrumb-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.breadcrumb-item {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-weight: 500;
}

.breadcrumb-item:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--gray-400);
    font-weight: normal;
}

.breadcrumb-current {
    color: var(--gray-300);
    font-weight: 600;
}

/* ===== FRAMEWORK BROWSER ===== */
.framework-browser {
    font-family: var(--font-mono);
}

.framework-browser-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category-button {
    background: var(--gray-200);
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    padding: 0.75rem 1.5rem;
    color: var(--gray-700);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.4;
    text-align: center;
}

.category-button:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    transform: translateY(-1px);
}

.category-button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.category-button.active:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.category-name {
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
}

.category-count {
    font-size: 0.7rem;
    opacity: 0.8;
    font-weight: normal;
}

/* Posts Container */
.posts-container {
    position: relative;
    min-height: 100px;
}

.posts-list {
    display: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.posts-list.active {
    display: block;
    opacity: 1;
}

.post-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.post-item {
    margin: 0;
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    background: var(--white);
    transition: all var(--transition-fast);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.post-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.post-link {
    color: var(--gray-800);
    text-decoration: none;
    padding: 0.6rem 0.875rem;
    display: block;
    width: 100%;
    height: 100%;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    transition: all var(--transition-fast);
    font-family: var(--font-mono-alt);
    overflow-wrap: break-word;
    word-break: keep-all;
    hyphens: none;
}

.post-link:hover {
    background-color: var(--color-accent);
    color: var(--color-background);
    transform: translateY(-1px);
}

/* Current post highlighting in framework browser */
.post-item.current-post {
    border: 1px solid var(--gray-200) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transform: none !important;
    cursor: default !important;
}

.post-item.current-post:hover {
    border: 1px solid var(--gray-200) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transform: none !important;
}

.post-item.current-post .post-link {
    background-color: #fff9c4 !important;
    color: #333 !important;
    font-weight: 600;
    border-radius: 4px;
    cursor: default !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.post-item.current-post .post-link:hover {
    background-color: #fff9c4 !important;
    color: #333 !important;
    transform: none !important;
    border: none !important;
    box-shadow: none !important;
    cursor: default !important;
}

.no-posts {
    color: var(--gray-500);
    font-style: italic;
    margin: 0;
    font-size: 0.85rem;
    padding: 1rem;
    text-align: center;
}

/* Section Headers for Framework Browser */
.posts-section {
    margin-bottom: 2rem;
}

.posts-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0.25rem 0 0.5rem 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== POSTS BROWSER ===== */
.posts-browser-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 1rem;
}

.category-tab {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    line-height: 1.2;
}

.category-tab:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--gray-800);
}

.category-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.category-tab.active:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
}

.category-tab .category-name {
    font-weight: 600;
}

.category-tab .category-count {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: normal;
}

/* Enhanced Post Boxes */
.posts-module .post-box {
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: var(--gray-900);
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem;
}

.posts-module .post-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.posts-module .post-title {
    font-size: 1.1rem;
    margin: 0;
    color: inherit;
    font-family: var(--font-mono-alt);
    line-height: 1.3;
    display: flex;
    align-items: center;
    height: 100%;
}

.posts-module .post-excerpt {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.posts-module .post-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-family: var(--font-mono);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: auto;
}

.posts-module .post-date {
    font-weight: 500;
}

.posts-module .post-categories {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ===== AREA CONTAINERS ===== */
.area {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
}

.area.mt-2 {
    margin-top: var(--gap) !important;
}

/* Area width variants */
.area.area-025 {
    width: 25%;
    margin-left: auto;
    margin-right: auto;
}

.area.area-050 {
    width: 50%;
    margin-left: auto;
    margin-right: auto;
}

.area.area-075 {
    width: 75%;
    margin-left: auto;
    margin-right: auto;
}

.area.area-100 {
    width: 100%;
}

/* ===== CATEGORY NAVIGATION ===== */
.module.header {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    background: var(--gray-700);
    color: var(--white);
    border: none;
}

.header-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap);
}
.header-row > .logo-link {
    align-self: center;
}
.header-row > .category-container {
    margin-left: auto;
    align-items: flex-end;
}

.logo-link,
.logo-link:link,
.logo-link:visited,
.logo-link:hover,
.logo-link:active {
    text-decoration: none;
    color: inherit;
}

.module.header .category-box {
    margin-bottom: 0;
}

.category-box {
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: var(--gray-900);
}

.category-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-box.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.category-box.active .box-header h1,
.category-box.active .box-header h2,
.category-box.active .box-header h3,
.category-box.active .box-header h4 {
    color: var(--white);
}

.category-box .box-header h1,
.category-box .box-header h2,
.category-box .box-header h3,
.category-box .box-header h4 {
    font-size: 1rem;
    margin: 0;
    text-align: center;
    color: inherit;
}

/* ===== SECTION HEADER ===== */
.section-header {
    background: var(--gray-700);
    color: var(--primary);
    border: none;
    text-align: center;
}

.section-header .module-header {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
    border: none;
}

.section-header .box-header h1,
.section-header .box-header h2,
.section-header .box-header h3,
.section-header .box-header h4 {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== WORDPRESS SPECIFIC ===== */
.wp-caption {
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.wp-caption img {
    width: 100%;
    height: auto;
    display: block;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
}

/* ===== PAGINATION ===== */
.pagination {
    text-align: center;
    margin-top: 2rem;
}

.page-numbers {
    display: inline-block;
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    text-decoration: none;
    color: var(--gray-700);
    border-radius: 8px;
    font-weight: 500;
    transition: all var(--transition-fast);
    font-family: var(--font-mono);
}

.page-numbers.current {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.page-numbers:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    transform: translateY(-1px);
}

.page-numbers.current:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ===== SEARCH RESULTS ===== */
.search-result {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
    transition: all var(--transition-fast);
}

.search-result:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ===== RESPONSIVE DESIGN ===== */
/* Wide screens - 2-column layout for framework grid */
@media (min-width: 1200px) {
    .framework-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1000px) {
    .header-row {
        flex-direction: column;
        align-items: center;
        gap: var(--gap);
    }
    .header-row > .logo-link,
    .header-row > .category-container {
        justify-content: center;
        margin-left: 0;
    }
    .logo-container {
        margin-left: 0 !important;
    }
    .category-container {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .category-box {
        flex: 0 0 auto;
        white-space: normal;
    }
    .prompt {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .navigation ul {
        flex-direction: column;
        gap: 1rem;
        justify-content: flex-start;
    }
    
    .logo .box-header h1,
    .logo .box-header h2,
    .logo .box-header h3,
    .logo .box-header h4 {
        font-size: 2rem;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .module-buttons {
        width: 100%;
        justify-content: flex-start;
        gap: 0.25rem;
    }
    
    .module-button,
    .module-tab {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.25rem;
    }
    
    .category-button {
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .post-list {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 8px;
    }
    
    .post-link {
        padding: 0.5rem 0.7rem;
        font-size: 0.95rem;
    }
    
    .module.breadcrumb-module {
        padding: 0.75rem 1rem;
    }
    
    .breadcrumb-content {
        font-size: 0.8rem;
        gap: 0.25rem;
    }
    
    .module.header .category-box {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Posts Browser Responsive */
    .category-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .category-tab {
        width: 100%;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .posts-module .post-title {
        font-size: 1rem;
    }
    
    .posts-module .post-excerpt {
        font-size: 0.85rem;
    }
    
    .posts-module .post-meta {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    body {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .module-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .module-button,
    .module-tab {
        width: 100%;
        text-align: center;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .post-list {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .post-link {
        padding: 0.45rem 0.6rem;
        font-size: 0.9rem;
    }
    
    /* Posts Browser Responsive */
    .category-tabs {
        gap: 0.25rem;
    }
    
    .category-tab {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .category-tab .category-count {
        font-size: 0.7rem;
    }
    
    .posts-module .post-box {
        padding: 1rem;
    }
    
    .posts-module .post-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .posts-module .post-excerpt {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
    
    .posts-module .post-meta {
        font-size: 0.7rem;
    }
}

/* ===== FRAMEWORK STATISTICS ===== */
.framework-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    align-items: stretch;
}

.framework-stats-grid .box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all var(--transition-fast);
    height: 100%;
}

.framework-stats-grid .box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.fw-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-mono);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.fw-stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-family: var(--font-mono);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* ===== ANIMATED LOGO ===== */
.logo-container {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
    cursor: default;
    margin-left: 2rem;
}
.logo-text {
    font-size: calc(1.5rem + 2vw);
    font-weight: 600;
    color: #D8DEE9;
    font-family: 'Ra Mono', monospace;
    display: flex;
    align-items: center;
    gap: 0.05rem;
}
.prompt {
    color: #A3BE8C;
    margin-right: 6px;
    font-size: calc(1.5rem + 2vw);
}
.cursor {
    background-color: #D8DEE9;
    width: 0.85rem;
    height: calc(1.5rem + 2vw);
    display: inline-block;
    vertical-align: middle;
    animation: fade-blink 2s ease-in-out infinite;
    position: relative;
    top: 1px;
    margin-left: 7px;
}
@keyframes fade-blink {
    0%, 100% {
        opacity: 0.1;
    }
    50% {
        opacity: 0.6;
    }
}
@media (max-width: 600px) {
    .prompt {
        font-size: 2rem;
    }
    .cursor {
        height: 1.8rem;
    }
}

.logo-link {
    text-decoration: none;
    color: inherit;
}
.logo-link:visited {
    color: inherit;
}

.category-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
}

.module.header .box {
    margin-bottom: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--white);
}

.module.header .box:hover {
    transform: none;
    box-shadow: none;
}

.module.header .category-box {
    margin-bottom: 0;
    background: var(--gray-600);
    border-color: var(--gray-700);
    color: var(--white);
}

.module.header .category-box:hover {
    background: #5a6c7d;
    border-color: var(--gray-600);
}

.module.header .category-box.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.module.header .category-box .box-header h1,
.module.header .category-box .box-header h2,
.module.header .category-box .box-header h3,
.module.header .category-box .box-header h4 {
    color: var(--white);
}

.module.header .logo .box-title a {
    color: var(--white);
}

.module.header .logo .box-content {
    color: var(--gray-200);
}
