/* ============================================
   CanAge Ghost Theme - Design System
   WCAG AAA Compliant (7:1 contrast minimum)
   ============================================ */

/* CSS Custom Properties (Design Tokens) */
:root {
    /* Brand Colors */
    --canage-red: #C8102E;
    --canage-red-dark: #a00d24;
    --canage-red-light: #e83a54;
    --canage-teal-dark: #005a64;
    --canage-teal-light: #05bcd4;
    --canage-cyan-bg: #b3ebf2;
    
    /* Text Colors (WCAG AAA - 7:1+) */
    --text-primary: #1a1a1a;
    --text-secondary: #3d3d3d;
    --text-muted: #595959;
    --text-inverse: #ffffff;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-light: #f5f5f5;
    --bg-dark: #2d2d2d;
    --bg-darker: #1a1a1a;
    
    /* Border Colors */
    --border-light: #e5e5e5;
    --border-grey: #d1d1d1;
    --border-dark: #404040;
    
    /* Typography */
    --font-primary: 'Raleway', sans-serif;
    --font-body: 'Inclusive Sans', sans-serif;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1.125rem;
    --text-lg: 1.25rem;
    --text-xl: 1.5rem;
    --text-2xl: 1.75rem;
    --text-3xl: 2.25rem;
    --text-4xl: 3rem;
    --text-5xl: 3.75rem;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Layout */
    --container-max: 1320px;
    --container-narrow: 750px;
    --header-height: 70px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --text-primary: #f5f5f5;
    --text-secondary: #d1d1d1;
    --text-muted: #a0a0a0;
    --text-inverse: #1a1a1a;
    
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-light: #2d2d2d;
    --bg-dark: #121212;
    --bg-darker: #0a0a0a;
    
    --border-light: #404040;
    --border-grey: #525252;
    --border-dark: #666666;
    
    --canage-cyan-bg: #1a3a3f;
}

/* Dark Mode - Header Tier 1 (Ticker Bar) Specific Fixes */
[data-theme="dark"] .header-tier-1 {
    background: #0a0a0a;
}

[data-theme="dark"] .ticker-label {
    color: #ff6b7a;  /* Lighter, more accessible red for dark mode */
}

[data-theme="dark"] .ticker-item {
    color: #e5e5e5;
}

[data-theme="dark"] .ticker-item:hover {
    color: var(--canage-teal-light);
}

[data-theme="dark"] .header-social a {
    color: #e5e5e5;
}

[data-theme="dark"] .header-social a:hover {
    color: var(--canage-teal-light);
}

/* Dark Mode - Header Tier 2 (Logo Bar) */
[data-theme="dark"] .header-tier-2 {
    background: var(--bg-primary);
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .site-logo .site-title-text {
    color: #ff6b7a;
}

[data-theme="dark"] .header-btn {
    color: var(--text-secondary);
}

[data-theme="dark"] .header-btn:hover {
    color: #ff6b7a;
}

/* Dark Mode - Header Tier 3 (Navigation) */
[data-theme="dark"] .header-tier-3 {
    background: var(--bg-primary);
    border-bottom-color: #ff6b7a;
}

[data-theme="dark"] .nav-item > a {
    color: var(--text-primary);
}

[data-theme="dark"] .nav-item > a:hover,
[data-theme="dark"] .nav-item > a:focus {
    color: #ff6b7a;
}

/* Dark Mode - Mega Menu */
[data-theme="dark"] .mega-menu {
    background: var(--bg-secondary);
    border-top-color: var(--border-light);
}

[data-theme="dark"] .mega-menu-column h6 {
    color: #ff6b7a;
}

[data-theme="dark"] .mega-menu-column a {
    color: var(--text-secondary);
}

[data-theme="dark"] .mega-menu-column a:hover {
    color: #ff6b7a;
}

[data-theme="dark"] .mega-menu-featured {
    background: var(--bg-light);
}

[data-theme="dark"] .mega-featured-post h6 a:hover {
    color: #ff6b7a;
}

/* Dark Mode - Mobile Menu */
[data-theme="dark"] .mobile-menu {
    background: var(--bg-primary);
}

[data-theme="dark"] .mobile-menu-close {
    color: var(--text-primary);
}

[data-theme="dark"] .mobile-nav a {
    color: var(--text-primary);
}

[data-theme="dark"] .mobile-nav a:hover {
    color: #ff6b7a;
}

[data-theme="dark"] .mobile-nav > ul > li {
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .submenu-toggle {
    color: var(--text-muted);
}

[data-theme="dark"] .mobile-menu-footer {
    border-top-color: var(--border-light);
}

[data-theme="dark"] .mobile-social a {
    color: var(--text-secondary);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

h1 { font-size: clamp(2.5rem, 5vw, var(--text-5xl)); }
h2 { font-size: clamp(2rem, 4vw, var(--text-4xl)); }
h3 { font-size: clamp(1.5rem, 3vw, var(--text-3xl)); }
h4 { font-size: clamp(1.25rem, 2.5vw, var(--text-2xl)); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    margin-bottom: var(--space-md);
    max-width: 75ch;
}

a {
    color: var(--canage-teal-dark);
    text-decoration: underline;
    transition: color var(--transition-fast);
}

a:hover, a:focus {
    color: var(--canage-red);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    background: var(--canage-red);
    color: var(--text-inverse);
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    z-index: 10000;
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    top: var(--space-md);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Focus Styles */
:focus-visible {
    outline: 3px solid var(--canage-teal-light);
    outline-offset: 2px;
}

/* ============================================
   Layout Components
   ============================================ */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--canage-red);
    color: var(--text-inverse);
    border-color: var(--canage-red);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--canage-red-dark);
    border-color: var(--canage-red-dark);
    color: var(--text-inverse);
}

.btn-secondary {
    background: transparent;
    color: var(--canage-teal-dark);
    border-color: var(--canage-teal-dark);
}

.btn-secondary:hover, .btn-secondary:focus {
    background: var(--canage-teal-dark);
    color: var(--text-inverse);
}

.btn-primary-small {
    background: var(--canage-red);
    color: var(--text-inverse);
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-xs);
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.btn-primary-small:hover {
    background: var(--canage-red-dark);
    color: var(--text-inverse);
}

.btn-cta {
    background: var(--canage-red);
    color: var(--text-inverse);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-base);
    text-decoration: none;
}

.btn-cta:hover {
    background: var(--canage-red-dark);
    color: var(--text-inverse);
}

/* ============================================
   Header - 3 Tier Structure
   ============================================ */
.site-header {
    position: relative;
    z-index: 1000;
}

/* Tier 1: Utility Bar */
.header-tier-1 {
    background: var(--bg-darker);
    color: var(--text-inverse);
    padding: var(--space-xs) 0;
    font-size: var(--text-sm);
}

.utility-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-lg);
}

.trending-ticker {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
    overflow: hidden;
}

.ticker-label {
    font-weight: 600;
    white-space: nowrap;
    color: var(--canage-red);
}

.ticker-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: flex;
    gap: var(--space-xl);
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    color: var(--text-inverse);
    text-decoration: none;
    opacity: 0.9;
}

.ticker-item:hover {
    color: var(--canage-teal-light);
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.header-social {
    display: flex;
    gap: var(--space-md);
}

.header-social a {
    color: var(--text-inverse);
    opacity: 0.8;
    text-decoration: none;
}

.header-social a:hover {
    opacity: 1;
    color: var(--canage-teal-light);
}

/* Tier 2: Logo + Info */
.header-tier-2 {
    background: var(--bg-primary);
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--border-light);
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-xl);
}

.site-logo img {
    max-height: 60px;
    width: auto;
}

.site-logo .site-title-text {
    font-family: var(--font-primary);
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--canage-red);
    text-decoration: none;
}

.header-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: var(--text-xl);
    cursor: pointer;
    padding: var(--space-sm);
    transition: color var(--transition-fast);
}

.header-btn:hover {
    color: var(--canage-red);
}

.menu-toggle {
    display: none;
}

/* Tier 3: Navigation (Sticky) */
.header-tier-3 {
    background: var(--bg-primary);
    border-bottom: 3px solid var(--canage-red);
    position: sticky;
    top: 0;
    z-index: 999;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.primary-nav {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-item > a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-lg);
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color var(--transition-fast);
}

.nav-item > a:hover,
.nav-item > a:focus {
    color: var(--canage-red);
}

.nav-item > a i {
    font-size: var(--text-xs);
    transition: transform var(--transition-fast);
}

.nav-item.has-mega-menu:hover > a i {
    transform: rotate(180deg);
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: 998;
}

.nav-item.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-xl);
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: var(--space-xl);
}

.mega-menu-column h6 {
    color: var(--canage-red);
    font-size: var(--text-sm);
    text-transform: uppercase;
    margin-bottom: var(--space-md);
}

.mega-menu-column ul {
    list-style: none;
}

.mega-menu-column li {
    margin-bottom: var(--space-sm);
}

.mega-menu-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.mega-menu-column a:hover {
    color: var(--canage-red);
}

.mega-menu-featured {
    background: var(--bg-light);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
}

.mega-featured-post img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

.mega-featured-post h6 {
    color: var(--text-primary);
    font-size: var(--text-base);
    text-transform: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mega-featured-post h6 a {
    text-decoration: none;
    color: inherit;
}

.mega-featured-post h6 a:hover {
    color: var(--canage-red);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 2000;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    width: 100%;
    max-width: 600px;
    padding: var(--space-xl);
}

.search-close {
    position: absolute;
    top: var(--space-xl);
    right: var(--space-xl);
    background: none;
    border: none;
    color: white;
    font-size: var(--text-3xl);
    cursor: pointer;
}

.search-form {
    display: flex;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.search-form input {
    flex: 1;
    padding: var(--space-lg);
    border: none;
    font-size: var(--text-lg);
    font-family: var(--font-body);
}

.search-form input:focus {
    outline: none;
}

.search-form button {
    background: var(--canage-red);
    border: none;
    color: white;
    padding: var(--space-lg);
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-base);
    z-index: 2001;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-inner {
    padding: var(--space-xl);
}

.mobile-menu-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: none;
    border: none;
    font-size: var(--text-2xl);
    cursor: pointer;
    color: var(--text-primary);
}

.mobile-nav {
    margin-top: var(--space-2xl);
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav > ul > li {
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav a {
    display: block;
    padding: var(--space-md) 0;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-primary);
    font-weight: 600;
}

.mobile-nav a:hover {
    color: var(--canage-red);
}

.has-submenu {
    position: relative;
}

.submenu-toggle {
    position: absolute;
    right: 0;
    top: var(--space-md);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.submenu {
    display: none;
    padding-left: var(--space-lg);
}

.submenu.active {
    display: block;
}

.submenu a {
    font-weight: 400;
    font-size: var(--text-sm);
}

.mobile-menu-footer {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-light);
}

.mobile-social {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.mobile-social a {
    color: var(--text-secondary);
    font-size: var(--text-xl);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-secondary);
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-2xl);
}

.hero-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.hero-image-wrapper {
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.hero-card:hover .hero-image {
    transform: scale(1.03);
}

.hero-content {
    padding: var(--space-xl);
}

.hero-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
}

.hero-title a {
    color: inherit;
    text-decoration: none;
}

.hero-title a:hover {
    color: var(--canage-red);
}

.hero-divider {
    border: none;
    border-top: 2px solid var(--border-light);
    margin: var(--space-lg) 0;
}

.hero-excerpt {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.post-meta {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.meta-item {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.meta-item i {
    margin-right: var(--space-xs);
}

/* Hero Sidebar */
.hero-sidebar {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.section-label {
    color: var(--canage-red);
    font-size: var(--text-sm);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.story-card {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-light);
}

.story-card.first {
    padding-top: 0;
}

.story-card:last-child {
    border-bottom: none;
}

.story-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

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

.story-content h4 {
    font-size: var(--text-sm);
    margin-bottom: var(--space-xs);
    /* CSS text truncation for titles */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-content h4 a {
    color: inherit;
    text-decoration: none;
}

.story-content h4 a:hover {
    color: var(--canage-red);
}

.post-meta-small {
    display: flex;
    gap: var(--space-md);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.post-meta-small i {
    margin-right: var(--space-xs);
}

/* ============================================
   Latest News Slider
   ============================================ */
.latest-news-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-primary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: var(--text-2xl);
    margin-bottom: 0;
}

.slider-nav {
    display: flex;
    gap: var(--space-sm);
}

.slider-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-grey);
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.slider-btn:hover {
    background: var(--canage-red);
    border-color: var(--canage-red);
    color: white;
}

.latest-news-slider {
    overflow: hidden;
}

.slider-track {
    display: flex;
    gap: var(--space-lg);
    transition: transform var(--transition-base);
}

.news-card {
    flex: 0 0 calc(25% - var(--space-lg));
    min-width: 280px;
}

.news-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-md);
    height: 180px;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-title {
    font-size: var(--text-base);
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title a {
    color: inherit;
    text-decoration: none;
}

.news-title a:hover {
    color: var(--canage-red);
}

/* ============================================
   Trending Section
   ============================================ */
.trending-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-secondary);
}

.trending-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
}

.trending-card-small {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-light);
}

.trending-image {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

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

.trending-content h5 {
    font-size: var(--text-base);
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-content h5 a {
    color: inherit;
    text-decoration: none;
}

.trending-content h5 a:hover {
    color: var(--canage-red);
}

.trending-card-large {
    padding: var(--space-lg) 0;
}

.trending-image-large {
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 250px;
    margin-bottom: var(--space-lg);
}

.trending-image-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trending-content-large h4 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-md);
}

.trending-content-large h4 a {
    color: inherit;
    text-decoration: none;
}

.trending-content-large h4 a:hover {
    color: var(--canage-red);
}

.divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: var(--space-lg) 0;
}

/* ============================================
   Categories Section
   ============================================ */
.categories-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-primary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.category-column {
    background: var(--bg-secondary);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
}

.category-title {
    color: var(--canage-red);
    text-transform: uppercase;
}

.category-column hr {
    border: none;
    border-top: 2px solid var(--border-light);
    margin: var(--space-md) 0;
}

.category-card {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-light);
}

.category-card:last-of-type {
    border-bottom: none;
}

.category-image {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

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

.category-content h6 {
    font-size: var(--text-sm);
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-content h6 a {
    color: inherit;
    text-decoration: none;
}

.category-content h6 a:hover {
    color: var(--canage-red);
}

.meta-small {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.show-more-btn {
    display: inline-block;
    margin-top: var(--space-md);
    color: var(--text-inverse);
    background: var(--canage-red);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 600;
}

.show-more-btn:hover {
    background: var(--canage-red-dark);
    color: var(--text-inverse);
}

/* ============================================
   Featured Section
   ============================================ */
.featured-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-secondary);
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-2xl);
}

.featured-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.featured-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding-bottom: var(--space-lg);
}

.featured-image {
    height: 200px;
    overflow: hidden;
}

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

.featured-card h5 {
    padding: var(--space-md) var(--space-lg) 0;
    font-size: var(--text-base);
}

.featured-card h5 a {
    color: inherit;
    text-decoration: none;
}

.featured-card h5 a:hover {
    color: var(--canage-red);
}

.featured-card hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: var(--space-md) var(--space-lg);
}

.featured-card .post-meta-small {
    padding: 0 var(--space-lg);
}

/* Numbered Posts */
.numbered-posts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.numbered-post {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.post-number {
    font-family: var(--font-primary);
    font-size: var(--text-4xl);
    font-weight: 800;
    color: var(--canage-red);
    line-height: 1;
}

.numbered-content h5 {
    font-size: var(--text-base);
    margin-bottom: var(--space-sm);
}

.numbered-content h5 a {
    color: inherit;
    text-decoration: none;
}

.numbered-content h5 a:hover {
    color: var(--canage-red);
}

/* Horizontal Features */
.horizontal-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.horizontal-card {
    display: flex;
    gap: var(--space-xl);
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.horizontal-image {
    flex-shrink: 0;
    width: 250px;
    height: 150px;
}

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

.horizontal-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-lg) var(--space-lg) var(--space-lg) 0;
}

.horizontal-content h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
}

.horizontal-content h3 a {
    color: inherit;
    text-decoration: none;
}

.horizontal-content h3 a:hover {
    color: var(--canage-red);
}

/* Featured Sidebar */
.featured-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.sidebar-box {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.sidebar-box h5 {
    margin-bottom: var(--space-lg);
    text-align: center;
}

/* Social Box */
.social-box .social-list {
    list-style: none;
}

.social-box .social-list li {
    margin-bottom: var(--space-sm);
}

.social-box .social-list a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.social-box .social-list a:hover {
    background: var(--canage-cyan-bg);
}

.social-box .social-list i {
    width: 20px;
    text-align: center;
}

/* Newsletter Box */
.newsletter-box {
    background: var(--canage-cyan-bg);
    text-align: center;
}

.newsletter-icon {
    font-size: var(--text-4xl);
    color: var(--canage-red);
    margin-bottom: var(--space-md);
}

.newsletter-box p {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.newsletter-form .form-group {
    display: flex;
    gap: var(--space-sm);
}

.newsletter-form input {
    flex: 1;
    padding: var(--space-md);
    border: 2px solid var(--border-grey);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--canage-teal-dark);
}

.newsletter-form button {
    background: var(--canage-red);
    border: none;
    color: white;
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.newsletter-form button:hover {
    background: var(--canage-red-dark);
}

.form-message {
    font-size: var(--text-sm);
    margin-top: var(--space-sm);
    display: none;
}

.form-message.success {
    color: green;
}

.form-message.error {
    color: var(--canage-red);
}

/* ============================================
   Popular Section
   ============================================ */
.popular-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-primary);
}

.popular-section .section-title {
    margin-bottom: var(--space-2xl);
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.popular-card {
    text-align: center;
}

.popular-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-lg);
    height: 220px;
}

.popular-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.popular-card:hover .popular-image img {
    transform: scale(1.05);
}

.popular-card h5 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-md);
}

.popular-card h5 a {
    color: inherit;
    text-decoration: none;
}

.popular-card h5 a:hover {
    color: var(--canage-red);
}

.text-center {
    text-align: center;
    justify-content: center;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    padding: var(--space-2xl) 0;
    background: var(--canage-teal-dark);
}

.cta-box {
    text-align: center;
    padding: var(--space-3xl);
}

.cta-content h2 {
    color: var(--text-inverse);
    margin-bottom: var(--space-md);
}

.cta-content p {
    color: rgba(255,255,255,0.9);
    margin-bottom: var(--space-xl);
    max-width: 100%;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

/* ============================================
   Posts Grid Section
   ============================================ */
.posts-section {
    padding: var(--space-2xl) 0;
    background: var(--bg-secondary);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.posts-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Post Card */
.post-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.post-card-image {
    height: 200px;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-muted);
    font-size: var(--text-4xl);
    text-decoration: none;
}

.post-card-content {
    padding: var(--space-lg);
}

.post-card-tag {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.post-card-tag a {
    color: var(--canage-red);
    text-decoration: none;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.post-card-tag .reading-time {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.post-card-title {
    font-size: var(--text-lg);
    margin-bottom: var(--space-sm);
}

.post-card-title a {
    color: inherit;
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--canage-red);
}

.post-card-excerpt {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-md);
}

.post-card-meta {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--canage-red);
    color: var(--text-inverse);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-sm);
}

.pagination-btn:hover {
    background: var(--canage-red-dark);
    color: var(--text-inverse);
}

.pagination-info {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ============================================
   Post Template
   ============================================ */
.post-full {
    padding-bottom: var(--space-3xl);
}

.post-header {
    padding: var(--space-2xl) 0;
    background: var(--bg-secondary);
}

.post-tag {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.post-tag a {
    color: var(--canage-red);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--text-sm);
}

.post-tag .reading-time {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.post-title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-lg);
}

.post-excerpt {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.post-meta-header {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.author-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

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

.author-name {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.author-name:hover {
    color: var(--canage-red);
}

.post-date {
    color: var(--text-muted);
    font-size: var(--text-sm);
    display: block;
}

/* Feature Image */
.post-feature-image {
    margin: var(--space-2xl) auto;
    max-width: 1000px;
    padding: 0 var(--space-lg);
}

.post-feature-image img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.post-feature-image figcaption {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-top: var(--space-md);
}

/* Post Content */
.post-content {
    padding: var(--space-xl) 0;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: var(--space-2xl);
}

.post-content p {
    margin-bottom: var(--space-lg);
}

.post-content ul,
.post-content ol {
    margin-bottom: var(--space-lg);
    margin-left: var(--space-xl);
}

.post-content li {
    margin-bottom: var(--space-sm);
}

.post-content blockquote {
    border-left: 4px solid var(--canage-red);
    padding-left: var(--space-lg);
    margin: var(--space-xl) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.post-content pre {
    background: var(--bg-dark);
    color: var(--text-inverse);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: var(--space-lg);
}

.post-content code {
    font-family: monospace;
    background: var(--bg-light);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* ============================================
   Koenig Editor - Ghost Card Styles
   ============================================ */

/* Required: Wide and Full Width Images */
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin-left: calc(50% - 42.5vw);
    margin-right: calc(50% - 42.5vw);
}

.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.kg-width-full img,
.kg-width-wide img {
    width: 100%;
}

/* Image Card */
.kg-image-card {
    margin: var(--space-xl) 0;
}

.kg-image-card img {
    margin: 0 auto;
}

.kg-image-card figcaption {
    text-align: center;
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-top: var(--space-md);
    padding: 0 var(--space-lg);
}

/* Gallery Card */
.kg-gallery-card {
    margin: var(--space-xl) 0;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
}

.kg-gallery-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.kg-gallery-image {
    flex: 1 1 0%;
    margin: 0 var(--space-xs);
}

.kg-gallery-image:first-child {
    margin-left: 0;
}

.kg-gallery-image:last-child {
    margin-right: 0;
}

.kg-gallery-image img {
    display: block;
    margin: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bookmark Card */
.kg-bookmark-card {
    margin: var(--space-xl) 0;
    width: 100%;
}

.kg-bookmark-container {
    display: flex;
    min-height: 148px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.kg-bookmark-container:hover {
    border-color: var(--canage-teal-dark);
}

.kg-bookmark-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: var(--space-lg);
}

.kg-bookmark-title {
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

.kg-bookmark-description {
    display: -webkit-box;
    overflow-y: hidden;
    margin-top: var(--space-sm);
    max-height: 48px;
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--text-muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.kg-bookmark-metadata {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: var(--space-md);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.kg-bookmark-icon {
    width: 22px;
    height: 22px;
    margin-right: var(--space-sm);
}

.kg-bookmark-author {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.kg-bookmark-publisher {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.kg-bookmark-author::after {
    content: "•";
    margin: 0 var(--space-xs);
}

.kg-bookmark-thumbnail {
    position: relative;
    flex-shrink: 0;
    width: 33%;
    max-height: 100%;
}

.kg-bookmark-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Embed/Video Card */
.kg-embed-card {
    margin: var(--space-xl) 0;
}

.kg-embed-card iframe {
    width: 100%;
}

/* Code Card */
.kg-code-card {
    margin: var(--space-xl) 0;
}

.kg-code-card pre {
    margin: 0;
}

/* Callout Card */
.kg-callout-card {
    display: flex;
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    border-radius: var(--radius-md);
    background: var(--bg-light);
}

.kg-callout-card-grey {
    background: var(--bg-light);
}

.kg-callout-card-white {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
}

.kg-callout-card-blue {
    background: #e8f4fd;
}

.kg-callout-card-green {
    background: #e6f6e6;
}

.kg-callout-card-yellow {
    background: #fff9e6;
}

.kg-callout-card-red {
    background: #fde8e8;
}

.kg-callout-card-pink {
    background: #fde8f3;
}

.kg-callout-card-purple {
    background: #f3e8fd;
}

.kg-callout-card-accent {
    background: var(--canage-cyan-bg);
}

.kg-callout-emoji {
    font-size: var(--text-xl);
    margin-right: var(--space-md);
}

.kg-callout-text {
    flex: 1;
}

/* Button Card */
.kg-button-card {
    display: flex;
    justify-content: flex-start;
    margin: var(--space-xl) 0;
}

.kg-button-card.kg-align-center {
    justify-content: center;
}

.kg-btn {
    display: inline-flex;
    align-items: center;
    padding: var(--space-sm) var(--space-xl);
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.kg-btn-accent {
    background: var(--canage-red);
    color: white;
}

.kg-btn-accent:hover {
    background: var(--canage-red-dark);
    color: white;
}

/* Toggle Card */
.kg-toggle-card {
    margin: var(--space-xl) 0;
    background: var(--bg-light);
    border-radius: var(--radius-md);
}

.kg-toggle-heading {
    display: flex;
    align-items: center;
    padding: var(--space-lg);
    cursor: pointer;
}

.kg-toggle-heading svg {
    margin-right: var(--space-md);
    transition: transform var(--transition-fast);
}

.kg-toggle-heading[aria-expanded="true"] svg {
    transform: rotate(90deg);
}

.kg-toggle-heading-text {
    font-weight: 600;
}

.kg-toggle-content {
    padding: 0 var(--space-lg) var(--space-lg);
}

/* File Card */
.kg-file-card {
    margin: var(--space-xl) 0;
}

.kg-file-card-container {
    display: flex;
    align-items: center;
    padding: var(--space-lg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
}

.kg-file-card-container:hover {
    border-color: var(--canage-teal-dark);
}

.kg-file-card-contents {
    flex: 1;
    margin-right: var(--space-lg);
}

.kg-file-card-title {
    font-weight: 600;
}

.kg-file-card-caption {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.kg-file-card-metadata {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

.kg-file-card-icon {
    width: 24px;
    height: 24px;
}

/* Audio Card */
.kg-audio-card {
    margin: var(--space-xl) 0;
}

/* Video Card */
.kg-video-card {
    margin: var(--space-xl) 0;
}

.kg-video-card video {
    width: 100%;
    border-radius: var(--radius-md);
}

/* Product Card */
.kg-product-card {
    margin: var(--space-xl) 0;
    padding: var(--space-xl);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.kg-product-card-image {
    margin-bottom: var(--space-lg);
}

.kg-product-card-image img {
    width: 100%;
    border-radius: var(--radius-sm);
}

.kg-product-card-title {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.kg-product-card-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.kg-product-card-rating {
    margin-bottom: var(--space-md);
}

.kg-product-card-button {
    display: inline-flex;
    padding: var(--space-sm) var(--space-xl);
    background: var(--canage-red);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.kg-product-card-button:hover {
    background: var(--canage-red-dark);
    color: white;
}

/* Header Card */
.kg-header-card {
    margin: var(--space-xl) 0;
    padding: var(--space-3xl);
    text-align: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.kg-header-card h2 {
    margin-bottom: var(--space-md);
}

/* NFT Card */
.kg-nft-card {
    margin: var(--space-xl) 0;
}

/* Signup Card */
.kg-signup-card {
    margin: var(--space-xl) 0;
    padding: var(--space-2xl);
    background: var(--canage-cyan-bg);
    border-radius: var(--radius-lg);
    text-align: center;
}

.kg-signup-card h2 {
    margin-bottom: var(--space-md);
}

.kg-signup-card-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-width: 400px;
    margin: var(--space-xl) auto 0;
}

.kg-signup-card-form input {
    padding: var(--space-md);
    border: 1px solid var(--border-grey);
    border-radius: var(--radius-sm);
}

.kg-signup-card-form button {
    padding: var(--space-md);
    background: var(--canage-red);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
}

/* Responsive Koenig Cards */
@media (max-width: 768px) {
    .kg-width-wide,
    .kg-width-full {
        width: 100vw;
        min-width: 100%;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
    }
    
    .kg-bookmark-container {
        flex-direction: column;
    }
    
    .kg-bookmark-thumbnail {
        width: 100%;
        min-height: 160px;
    }
    
    .kg-bookmark-thumbnail img {
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }
}

/* Post Footer */
.post-footer {
    border-top: 1px solid var(--border-light);
    padding-top: var(--space-xl);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.tags-label {
    font-weight: 600;
    margin-right: var(--space-sm);
}

.post-tags .tag {
    background: var(--bg-light);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.post-tags .tag:hover {
    background: var(--canage-cyan-bg);
    color: var(--canage-teal-dark);
}

.post-share {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.share-label {
    font-weight: 600;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    color: white;
}

.share-btn.twitter { background: #1DA1F2; }
.share-btn.facebook { background: #1877F2; }
.share-btn.linkedin { background: #0A66C2; }
.share-btn.email { background: var(--text-secondary); }

.share-btn:hover {
    opacity: 0.9;
    color: white;
}

/* Author Bio Box */
.author-bio-box {
    display: flex;
    gap: var(--space-xl);
    padding: var(--space-xl);
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.author-bio-avatar {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
}

.author-bio-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-bio-content h4 {
    margin-bottom: var(--space-sm);
}

.author-bio-content h4 a {
    color: inherit;
    text-decoration: none;
}

.author-bio-content h4 a:hover {
    color: var(--canage-red);
}

.author-location {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* Related Posts */
.related-posts {
    padding: var(--space-2xl) 0;
    background: var(--bg-secondary);
}

/* ============================================
   Page Template
   ============================================ */
.page-full {
    padding-bottom: var(--space-3xl);
}

.page-header {
    padding: var(--space-2xl) 0;
    background: var(--bg-secondary);
    text-align: center;
}

.page-title {
    font-size: var(--text-4xl);
}

.page-excerpt {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.page-feature-image {
    margin: var(--space-2xl) auto;
    max-width: 1000px;
    padding: 0 var(--space-lg);
}

.page-feature-image img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.page-content {
    padding: var(--space-2xl) 0;
}

/* ============================================
   Author Template
   ============================================ */
.author-header {
    padding: var(--space-3xl) 0;
    background: var(--bg-secondary);
}

.author-profile {
    display: flex;
    gap: var(--space-2xl);
    align-items: center;
}

.author-avatar-large {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
}

.author-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name-large {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-sm);
}

.author-bio-large {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.author-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.author-meta a,
.author-meta span {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.author-meta a:hover {
    color: var(--canage-red);
}

.author-stats {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.author-posts {
    padding: var(--space-2xl) 0;
}

/* ============================================
   Tag Template
   ============================================ */
.tag-header {
    padding: var(--space-3xl) 0;
    background: var(--bg-secondary);
    position: relative;
}

.tag-cover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}

.tag-info {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.tag-name {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-md);
}

.tag-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.tag-stats {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.tag-posts {
    padding: var(--space-2xl) 0;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--bg-darker);
    color: var(--text-inverse);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-column h5 {
    color: var(--text-inverse);
    margin-bottom: var(--space-lg);
    font-size: var(--text-lg);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: var(--text-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.footer-links a:hover {
    color: var(--canage-teal-light);
}

.footer-newsletter-text {
    color: rgba(255,255,255,0.8);
    font-size: var(--text-sm);
    margin-bottom: var(--space-lg);
}

.footer-newsletter-form .input-group {
    display: flex;
    gap: var(--space-sm);
}

.footer-newsletter-form input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
}

.footer-newsletter-form .form-message {
    color: var(--canage-teal-light);
    font-size: var(--text-sm);
    margin-top: var(--space-sm);
}

.footer-social {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--text-inverse);
    text-decoration: none;
    transition: background var(--transition-fast);
}

.footer-social a:hover {
    background: var(--canage-red);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-copyright p {
    color: rgba(255,255,255,0.6);
    font-size: var(--text-sm);
    margin: 0;
}

.footer-legal {
    display: flex;
    gap: var(--space-lg);
}

.footer-legal a {
    color: rgba(255,255,255,0.6);
    font-size: var(--text-sm);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--text-inverse);
}

.footer-powered a {
    color: rgba(255,255,255,0.6);
    font-size: var(--text-sm);
    text-decoration: none;
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 50px;
    height: 50px;
    background: var(--canage-red);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--canage-red-dark);
    transform: translateY(-3px);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 1200px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .mega-menu-inner {
        grid-template-columns: 1fr 1fr;
    }
    
    .mega-menu-featured {
        display: none;
    }
}

@media (max-width: 992px) {
    .header-tier-3 {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .trending-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .author-profile {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    :root {
        --text-base: 1.0625rem;
    }
    
    .utility-bar {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .trending-ticker {
        width: 100%;
    }
    
    .header-social {
        display: none;
    }
    
    .header-main {
        flex-wrap: wrap;
    }
    
    .header-info {
        display: none;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-cards-row {
        grid-template-columns: 1fr;
    }
    
    .numbered-posts {
        grid-template-columns: 1fr;
    }
    
    .horizontal-card {
        flex-direction: column;
    }
    
    .horizontal-image {
        width: 100%;
        height: 200px;
    }
    
    .popular-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .post-share {
        flex-wrap: wrap;
    }
    
    .author-bio-box {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-image {
        height: 250px;
    }
    
    .news-card {
        min-width: 240px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .pagination {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .back-to-top,
    .post-share,
    .related-posts {
        display: none;
    }
    
    .post-content {
        max-width: 100%;
    }
}

/* ============================================
   Dark Mode - Additional Content Styles
   ============================================ */

/* Dark Mode - Logo handling for light/dark variants */
[data-theme="dark"] .site-logo img {
    filter: brightness(0) invert(1);
    /* If user has uploaded a white logo, they can disable this filter by adding a class */
}

[data-theme="dark"] .site-logo img.no-invert {
    filter: none;
}

/* Dark Mode - Buttons */
[data-theme="dark"] .btn-primary {
    background: #ff6b7a;
    border-color: #ff6b7a;
    color: #1a1a1a;
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-primary:focus {
    background: #ff8a95;
    border-color: #ff8a95;
    color: #1a1a1a;
}

[data-theme="dark"] .btn-primary-small {
    background: #ff6b7a;
    color: #1a1a1a;
}

[data-theme="dark"] .btn-primary-small:hover {
    background: #ff8a95;
    color: #1a1a1a;
}

[data-theme="dark"] .btn-secondary {
    border-color: var(--canage-teal-light);
    color: var(--canage-teal-light);
}

[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-secondary:focus {
    background: var(--canage-teal-light);
    color: #1a1a1a;
}

/* Dark Mode - Cards and Sections */
[data-theme="dark"] .hero-card,
[data-theme="dark"] .hero-sidebar,
[data-theme="dark"] .post-card,
[data-theme="dark"] .featured-card,
[data-theme="dark"] .sidebar-box,
[data-theme="dark"] .horizontal-card {
    background: var(--bg-secondary);
}

[data-theme="dark"] .category-column {
    background: var(--bg-light);
}

/* Dark Mode - Post Card */
[data-theme="dark"] .post-card-tag a {
    color: #ff6b7a;
}

[data-theme="dark"] .post-card-title a:hover {
    color: #ff6b7a;
}

/* Dark Mode - Category and Section Titles */
[data-theme="dark"] .section-label,
[data-theme="dark"] .category-title {
    color: #ff6b7a;
}

/* Dark Mode - Show More Buttons */
[data-theme="dark"] .show-more-btn {
    background: #ff6b7a;
    color: #1a1a1a;
}

[data-theme="dark"] .show-more-btn:hover {
    background: #ff8a95;
    color: #1a1a1a;
}

/* Dark Mode - Dividers */
[data-theme="dark"] .hero-divider,
[data-theme="dark"] .category-column hr,
[data-theme="dark"] .divider {
    border-top-color: var(--border-light);
}

/* Dark Mode - Newsletter Box */
[data-theme="dark"] .newsletter-box {
    background: var(--canage-cyan-bg);
}

[data-theme="dark"] .newsletter-icon {
    color: #ff6b7a;
}

/* Dark Mode - CTA Section */
[data-theme="dark"] .cta-section {
    background: #003840;
}

[data-theme="dark"] .btn-cta {
    background: #ff6b7a;
    color: #1a1a1a;
}

[data-theme="dark"] .btn-cta:hover {
    background: #ff8a95;
    color: #1a1a1a;
}

/* Dark Mode - Post Tags */
[data-theme="dark"] .post-tag a {
    color: #ff6b7a;
}

[data-theme="dark"] .post-tags .tag {
    background: var(--bg-light);
    color: var(--text-secondary);
}

[data-theme="dark"] .post-tags .tag:hover {
    background: var(--canage-cyan-bg);
    color: var(--canage-teal-light);
}

/* Dark Mode - Author Bio */
[data-theme="dark"] .author-bio-box {
    background: var(--bg-secondary);
}

[data-theme="dark"] .author-bio-content h4 a:hover {
    color: #ff6b7a;
}

/* Dark Mode - Related Posts */
[data-theme="dark"] .related-posts {
    background: var(--bg-secondary);
}

/* Dark Mode - Page and Post Headers */
[data-theme="dark"] .post-header,
[data-theme="dark"] .page-header,
[data-theme="dark"] .tag-header,
[data-theme="dark"] .author-header {
    background: var(--bg-secondary);
}

/* Dark Mode - Footer */
[data-theme="dark"] .site-footer {
    background: #050505;
}

[data-theme="dark"] .footer-social a:hover {
    background: #ff6b7a;
}

/* Dark Mode - Pagination */
[data-theme="dark"] .pagination-btn {
    background: #ff6b7a;
    color: #1a1a1a;
}

[data-theme="dark"] .pagination-btn:hover {
    background: #ff8a95;
    color: #1a1a1a;
}

/* Dark Mode - Back to Top */
[data-theme="dark"] .back-to-top {
    background: #ff6b7a;
    color: #1a1a1a;
}

[data-theme="dark"] .back-to-top:hover {
    background: #ff8a95;
}

/* Dark Mode - Links */
[data-theme="dark"] a {
    color: var(--canage-teal-light);
}

[data-theme="dark"] a:hover,
[data-theme="dark"] a:focus {
    color: #ff6b7a;
}

/* Dark Mode - Focus States for Accessibility */
[data-theme="dark"] :focus-visible {
    outline-color: var(--canage-teal-light);
}

/* Dark Mode - Weather Widget */
[data-theme="dark"] .weather-widget {
    color: var(--text-secondary);
}

[data-theme="dark"] .weather-location {
    color: var(--text-muted);
}

/* Dark Mode - Search Overlay */
[data-theme="dark"] .search-form input {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border-grey);
}

[data-theme="dark"] .search-form button {
    background: #ff6b7a;
    color: #1a1a1a;
}

/* Dark Mode - Koenig Editor Cards */
[data-theme="dark"] .kg-callout-card-grey {
    background: var(--bg-light);
}

[data-theme="dark"] .kg-callout-card-white {
    background: var(--bg-secondary);
    border-color: var(--border-light);
}

[data-theme="dark"] .kg-bookmark-container {
    border-color: var(--border-light);
    background: var(--bg-secondary);
}

[data-theme="dark"] .kg-bookmark-container:hover {
    border-color: var(--canage-teal-light);
}

[data-theme="dark"] .kg-bookmark-title {
    color: var(--text-primary);
}

[data-theme="dark"] .kg-toggle-card {
    background: var(--bg-light);
}

[data-theme="dark"] .kg-file-card-container {
    border-color: var(--border-light);
    background: var(--bg-secondary);
}

[data-theme="dark"] .kg-file-card-container:hover {
    border-color: var(--canage-teal-light);
}

[data-theme="dark"] .kg-product-card {
    border-color: var(--border-light);
    background: var(--bg-secondary);
}

[data-theme="dark"] .kg-header-card {
    background: var(--bg-secondary);
}

[data-theme="dark"] .kg-signup-card {
    background: var(--canage-cyan-bg);
}

/* Reduced Motion */
.reduced-motion * {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
}
