/* Modern UI Enhancements for Zenvera CMS */

/* ============================================
   Minimum Width Enforcement
   ============================================ */
/* Prevent window from getting too small - enforce minimum width for admin pages */
/* This prevents FluentMenuProvider errors when window is resized too small */
html, body {
    min-width: 320px !important;
}

/* Admin pages (Settings and Content Management) need larger minimum width */
/* to prevent layout issues and FluentMenuProvider errors */
/* Using :has() selector for modern browsers */
body:has(.settings-card),
body:has(.content-management-card) {
    min-width: 800px !important;
}

/* Fallback for browsers that don't support :has() - apply to body when admin pages are loaded */
/* This will be applied via JavaScript in boot.js */
body.admin-page {
    min-width: 800px !important;
}

/* Ensure main containers maintain minimum width */
.content-management-card,
.settings-card {
    min-width: 800px !important;
    width: 100%;
}

/* ============================================
   Content Alignment with Subheader
   ============================================ */
/* Ensure main content aligns with subheader text (24px from left) */
fluent-body-content {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* ============================================
   Horizontal Scroll Arrows Visibility
   ============================================ */
/* Ensure FluentHorizontalScroll arrows are visible */
.horizontal-scroll-container {
    overflow: visible !important;
}

fluent-horizontal-scroll {
    position: relative !important;
    overflow: visible !important;
}

/* Ensure scroll buttons are visible */
fluent-horizontal-scroll::part(scroll-button),
fluent-horizontal-scroll::part(scroll-button-next),
fluent-horizontal-scroll::part(scroll-button-previous) {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    z-index: 10 !important;
}

/* Target scroll buttons directly */
fluent-horizontal-scroll button,
fluent-horizontal-scroll [role="button"],
fluent-horizontal-scroll .scroll-button,
fluent-horizontal-scroll .scroll-button-next,
fluent-horizontal-scroll .scroll-button-previous {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    z-index: 10 !important;
    position: relative !important;
}

/* Make sure the right arrow is visible and positioned correctly */
fluent-horizontal-scroll::part(scroll-button-next),
fluent-horizontal-scroll button[aria-label*="next" i],
fluent-horizontal-scroll button[aria-label*="right" i],
fluent-horizontal-scroll .scroll-button-next {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    z-index: 10 !important;
    position: absolute !important;
    right: 0 !important;
}

/* Ensure scroll container doesn't hide arrows */
#postScroll,
.both-gradient {
    overflow: visible !important;
    position: relative !important;
}

/* ============================================
   Icon Visibility on Dark Backgrounds
   ============================================ */
/* Ensure FluentUI icons inherit color from parent for visibility on dark backgrounds */
/* This is critical - FluentUI icons need explicit color inheritance */

/* Target all icon containers and ensure color inheritance */
fluent-nav-link fluent-icon,
fluent-nav-link fluent-icon svg,
fluent-icon,
fluent-icon svg,
fluent-header fluent-nav-link fluent-icon,
nav fluent-icon,
nav fluent-nav-link fluent-icon {
    color: inherit !important;
}

/* CRITICAL: Target SVG paths directly - this is the key to making icons visible */
/* FluentUI icons use SVG paths with fill attributes that need to be overridden */
fluent-nav-link fluent-icon svg path,
fluent-nav-link fluent-icon svg g path,
fluent-nav-link fluent-icon svg g,
fluent-nav-link fluent-icon svg g > path,
fluent-icon svg path,
fluent-icon svg g path,
fluent-icon svg g,
fluent-icon svg g > path,
fluent-header fluent-nav-link fluent-icon svg path,
fluent-header fluent-nav-link fluent-icon svg g path,
fluent-header fluent-nav-link fluent-icon svg g,
fluent-header fluent-nav-link fluent-icon svg g > path,
nav fluent-icon svg path,
nav fluent-nav-link fluent-icon svg path {
    fill: currentColor !important;
    stroke: currentColor !important;
    color: inherit !important;
}

/* Target SVG elements directly */
fluent-nav-link fluent-icon svg,
fluent-icon svg,
fluent-header fluent-nav-link fluent-icon svg,
nav fluent-icon svg {
    fill: currentColor !important;
    stroke: currentColor !important;
    color: inherit !important;
}

/* Additional targeting for ALL nested SVG elements - catch everything */
fluent-nav-link fluent-icon svg *,
fluent-icon svg *,
fluent-header fluent-nav-link fluent-icon svg *,
nav fluent-icon svg *,
nav fluent-nav-link fluent-icon svg * {
    fill: currentColor !important;
    stroke: currentColor !important;
}

/* Ensure icons in navigation links inherit the text color */
fluent-nav-link fluent-icon {
    color: inherit !important;
}

/* For header navigation - ensure icons use foreground color */
fluent-header fluent-nav-link,
fluent-header fluent-nav-link fluent-icon {
    color: inherit !important;
}

/* Special handling for icons in dark header backgrounds */
fluent-header[style*="background"] fluent-nav-link fluent-icon svg path,
fluent-header[style*="background"] fluent-nav-link fluent-icon svg g path,
fluent-header[style*="background"] fluent-nav-link fluent-icon svg g > path {
    fill: currentColor !important;
    stroke: currentColor !important;
}

/* Force white color for icons in headers with dark backgrounds - ULTRA AGGRESSIVE */
fluent-header fluent-nav-link {
    color: white !important;
}

fluent-header fluent-nav-link fluent-icon,
fluent-header fluent-nav-link fluent-icon svg,
fluent-header fluent-nav-link fluent-icon svg * {
    color: white !important;
    fill: white !important;
    stroke: white !important;
}

fluent-header fluent-nav-link fluent-icon svg path,
fluent-header fluent-nav-link fluent-icon svg g path,
fluent-header fluent-nav-link fluent-icon svg g > path,
fluent-header fluent-nav-link fluent-icon svg g {
    fill: white !important;
    stroke: white !important;
    color: white !important;
}

/* Also target nav elements inside headers */
fluent-header nav fluent-nav-link fluent-icon svg path,
fluent-header nav fluent-nav-link fluent-icon svg g path {
    fill: white !important;
    stroke: white !important;
}

/* ============================================
   Design Tokens & Variables
   ============================================ */
:root {
    --card-border-radius: 8px;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

/* ============================================
   Modern Card Components
   ============================================ */
.modern-card {
    background: var(--neutral-layer-1);
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow);
    padding: var(--spacing-lg);
    transition: var(--transition-smooth);
    border: none;
}

.modern-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.modern-card-header {
    background: linear-gradient(135deg, var(--accent-fill-rest) 0%, var(--accent-fill-hover) 100%);
    color: var(--neutral-foreground-on-accent-rest);
    padding: var(--spacing-md);
    border-radius: var(--card-border-radius) var(--card-border-radius) 0 0;
    margin: calc(var(--spacing-lg) * -1) calc(var(--spacing-lg) * -1) var(--spacing-md) calc(var(--spacing-lg) * -1);
    font-weight: 600;
}

/* ============================================
   Widget Styling
   ============================================ */
.modern-widget {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin-bottom: 1.5rem;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.modern-widget:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.widget-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-bottom: 1px solid #e0e0e0;
}

.widget-header fluent-icon {
    color: #0078d4;
}

.widget-title {
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.widget-content {
    padding: 1rem 1.25rem;
}

.widget-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0078d4;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.widget-link:hover {
    color: #106ebe;
    text-decoration: underline;
}

.widget-link fluent-icon {
    color: #666;
    flex-shrink: 0;
}

.widget-count {
    color: #666;
    font-size: 0.9rem;
    margin-left: auto;
}

.widget-description {
    color: #333;
    line-height: 1.6;
    font-size: 0.95rem;
}

.widget-description p {
    margin: 0 0 0.75rem 0;
}

.widget-description p:last-child {
    margin-bottom: 0;
}

.widget-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.widget-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.75rem;
    background-color: #f0f0f0;
    border-radius: 4px;
    color: #0078d4;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.widget-tag:hover {
    background-color: #e8f4f8;
    color: #106ebe;
    border-color: #0078d4;
    text-decoration: none;
}

.widget-tag fluent-icon {
    color: #0078d4;
    flex-shrink: 0;
}

.modern-widget-header {
    background: linear-gradient(135deg, var(--neutral-layer-2) 0%, var(--neutral-layer-3) 100%);
    color: var(--neutral-foreground-rest);
    padding: var(--spacing-md);
    border-radius: var(--card-border-radius) var(--card-border-radius) 0 0;
    margin: calc(var(--spacing-lg) * -1) calc(var(--spacing-lg) * -1) var(--spacing-md) calc(var(--spacing-lg) * -1);
    font-weight: 600;
    font-size: var(--type-ramp-plus-1-font-size);
}

/* ============================================
   Post Navigation
   ============================================ */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    background: var(--neutral-layer-2);
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow);
    gap: var(--spacing-md);
}

.post-navigation-prev,
.post-navigation-next {
    flex: 1;
    padding: var(--spacing-sm);
    transition: var(--transition-smooth);
    border-radius: 4px;
}

.post-navigation-prev:hover,
.post-navigation-next:hover {
    background: var(--neutral-layer-3);
}

.post-navigation-prev {
    text-align: left;
}

.post-navigation-next {
    text-align: right;
}

/* ============================================
   Post Meta Information
   ============================================ */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    align-items: center;
    margin: var(--spacing-md) 0;
    color: var(--neutral-foreground-hint);
    font-size: var(--type-ramp-minus-1-font-size);
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* ============================================
   Tags & Categories
   ============================================ */
.tags-container {
    background: var(--neutral-layer-2);
    padding: var(--spacing-md);
    border-radius: var(--card-border-radius);
    margin: var(--spacing-lg) 0;
}

.tag-list,
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.tag-item,
.category-item {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--accent-fill-rest);
    color: var(--neutral-foreground-on-accent-rest);
    border-radius: 20px;
    font-size: var(--type-ramp-minus-1-font-size);
    transition: var(--transition-smooth);
    text-decoration: none;
}

.tag-item:hover,
.category-item:hover {
    background: var(--accent-fill-hover);
    transform: scale(1.05);
    text-decoration: none;
}

/* ============================================
   Content Sections
   ============================================ */
.content-section {
    padding: var(--spacing-lg);
    line-height: 1.8;
}

.content-section h1,
.content-section h2,
.content-section h3,
.content-section h4 {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    color: var(--neutral-foreground-rest);
}

.content-section p {
    margin-bottom: var(--spacing-md);
}

.content-section a {
    color: var(--accent-foreground-rest);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.content-section a:hover {
    text-decoration: underline;
    color: var(--accent-foreground-hover);
}

/* ============================================
   Header Enhancements
   ============================================ */
.modern-header {
    background: linear-gradient(135deg, var(--accent-fill-rest) 0%, var(--accent-fill-hover) 100%);
    padding: var(--spacing-lg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-header h3 a {
    color: var(--neutral-foreground-on-accent-rest);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.modern-header h3 a:hover {
    opacity: 0.9;
    text-decoration: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* ============================================
   Blog Post Cards (Scroll View)
   ============================================ */
.blog-post-card {
    background: var(--neutral-layer-1);
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow);
    padding: var(--spacing-lg);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    border: none;
}

.blog-post-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-4px);
}

.blog-post-card-title {
    margin-bottom: var(--spacing-md);
    color: var(--neutral-foreground-rest);
}

.blog-post-card-meta {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-size: var(--type-ramp-minus-1-font-size);
    color: var(--neutral-foreground-hint);
}

.blog-post-card-description {
    flex: 1;
    color: var(--neutral-foreground-rest);
    margin-bottom: var(--spacing-md);
}

.blog-post-card-link {
    margin-top: auto;
    align-self: flex-start;
}

/* ============================================
   Footer Enhancements
   ============================================ */
.modern-footer {
    background: var(--neutral-layer-4);
    padding: var(--spacing-xl);
    margin-top: var(--spacing-xl);
    border-top: 1px solid var(--neutral-stroke-divider-rest);
}

.modern-footer-content {
    text-align: center;
    color: var(--neutral-foreground-hint);
    font-size: var(--type-ramp-minus-1-font-size);
}

.modern-footer a {
    color: var(--accent-foreground-rest);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.modern-footer a:hover {
    color: var(--accent-foreground-hover);
    text-decoration: underline;
}

/* ============================================
   Loading States
   ============================================ */
.modern-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-xl);
    min-height: 200px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .post-navigation {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .post-navigation-prev,
    .post-navigation-next {
        width: 100%;
        text-align: center;
    }

    .tag-list,
    .category-list {
        justify-content: center;
    }

    .content-section {
        padding: var(--spacing-md);
    }

    .modern-card,
    .modern-widget {
        padding: var(--spacing-md);
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--accent-foreground-rest) 0%, var(--accent-foreground-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Remove Old Border Styles
   ============================================ */
.no-border {
    border: none !important;
}

/* ============================================
   Spacing Utilities
   ============================================ */
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }

/* Ensure body-section and side-section maintain flex layout */
.content-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

.content-wrapper .body-section {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 0 !important;
    margin-left: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
}

.content-wrapper .side-section {
    flex: 0 0 22%;
    min-width: 200px;
    margin-left: 1rem;
    margin-right: 0;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Widget spacing in sidebar */
.side-section .modern-widget {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* ============================================
   Layout Modes
   ============================================ */

/* Landing Mode - Full-width, minimal chrome */
.layout-landing .content-wrapper {
    max-width: 100%;
    padding: 0 1.5rem;
    margin: 0;
    box-sizing: border-box;
}

.layout-landing .body-section {
    width: 100%;
    padding: 1rem;
}

.layout-landing .main {
    padding: 0;
    margin: 0;
}

/* Reading Mode - Narrow content, optimized for reading */
.layout-reading .content-wrapper {
    max-width: 90ch;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.layout-reading .body-section {
    font-size: 1.125rem;
    line-height: 1.75;
    max-width: 100%;
    color: #333;
}

.layout-reading .side-section {
    display: none !important; /* Hide sidebar widgets in reading mode */
}

.layout-reading .main {
    justify-content: center;
}

/* Standard Mode - Default layout (uses existing styles) */
.layout-standard .content-wrapper {
    padding: 0 1.5rem;
    box-sizing: border-box;
}

/* On small screens, stack sidebar below content */
@media (max-width: 900px) {
    .content-wrapper {
        flex-direction: column;
    }

    .content-wrapper .side-section {
        width: 100%;
        min-width: 0;
        margin-left: 0;
    }
}

/* ============================================
   Admin Settings - Bold Labels
   ============================================ */
/* Fluent UI web components expose label via ::part(label) */
.settings-form fluent-text-field::part(label),
.settings-form fluent-number-field::part(label),
.settings-form fluent-combobox::part(label),
.settings-form fluent-select::part(label),
.settings-form fluent-text-area::part(label),
.settings-form fluent-checkbox::part(label) {
    font-weight: 700;
}

/* Native labels used with textarea */
.settings-form label {
    font-weight: 700;
}

/* ============================================
   Settings Form Improvements
   ============================================ */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Make textarea fields wider */
.settings-form fluent-text-area {
    width: 100%;
    display: block;
}

/* Checkboxes should display inline with their labels */
.settings-form fluent-checkbox {
    display: inline-flex !important;
    align-items: center !important;
    width: auto !important;
    margin-right: 1.5rem !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

/* Ensure checkbox root part displays inline */
.settings-form fluent-checkbox::part(root) {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    width: auto !important;
    flex-wrap: nowrap !important;
}

/* Ensure checkbox label appears inline */
.settings-form fluent-checkbox::part(label) {
    display: inline !important;
    margin-left: 0.5rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.settings-form fluent-text-area::part(control) {
    width: 100% !important;
}

.settings-form fluent-text-area textarea {
    width: 100% !important;
}

.settings-card {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.settings-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.settings-section:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.settings-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.settings-section-header fluent-icon {
    color: #0ea5e9;
    flex-shrink: 0;
}

.settings-section-header fluent-label {
    color: #0c4a6e;
    font-weight: 600;
    margin: 0;
}

/* Colorful section headers for different settings pages */
.settings-card .settings-section:nth-child(1) .settings-section-header {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left-color: #2563eb;
}

.settings-card .settings-section:nth-child(1) .settings-section-header fluent-icon {
    color: #2563eb;
}

.settings-card .settings-section:nth-child(1) .settings-section-header fluent-label {
    color: #1e40af;
}

.settings-card .settings-section:nth-child(2) .settings-section-header {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-left-color: #dc2626;
}

.settings-card .settings-section:nth-child(2) .settings-section-header fluent-icon {
    color: #dc2626;
}

.settings-card .settings-section:nth-child(2) .settings-section-header fluent-label {
    color: #b91c1c;
}

.settings-card .settings-section:nth-child(3) .settings-section-header {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left-color: #16a34a;
}

.settings-card .settings-section:nth-child(3) .settings-section-header fluent-icon {
    color: #16a34a;
}

.settings-card .settings-section:nth-child(3) .settings-section-header fluent-label {
    color: #15803d;
}

.settings-card .settings-section:nth-child(4) .settings-section-header {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-left-color: #a855f7;
}

.settings-card .settings-section:nth-child(4) .settings-section-header fluent-icon {
    color: #a855f7;
}

.settings-card .settings-section:nth-child(4) .settings-section-header fluent-label {
    color: #9333ea;
}

.settings-card .settings-section:nth-child(5) .settings-section-header {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-left-color: #f97316;
}

.settings-card .settings-section:nth-child(5) .settings-section-header fluent-icon {
    color: #f97316;
}

.settings-card .settings-section:nth-child(5) .settings-section-header fluent-label {
    color: #ea580c;
}

.settings-subsection {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Color Picker Styling */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.color-picker-input {
    width: 60px;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.color-picker-text-field {
    flex: 1;
}

/* Route Override Cards */
.route-override-card {
    margin: 1rem 0;
    padding: 1rem;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.route-override-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.route-override-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Info Icon with Tooltip */
.settings-info-icon {
    cursor: help;
    color: #666;
    margin-left: 0.25rem;
}

.settings-info-icon:hover {
    color: #0078d4;
}

/* Responsive Design */
/* Note: Admin pages (settings and content management) have minimum width of 800px */
/* to prevent FluentMenuProvider errors during window resize */
@media (max-width: 1024px) {
    /* Only apply responsive styles if window is larger than minimum */
    .settings-card {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* For very small screens, maintain minimum width but adjust padding */
    .settings-card {
        padding: 1rem;
        min-width: 800px !important; /* Maintain minimum to prevent errors */
    }
    
    .settings-form {
        gap: 1rem;
    }
    
    .settings-form fluent-text-area {
        min-width: 100%;
        width: 100%;
    }
    
    .settings-form fluent-text-area::part(control) {
        min-width: 100% !important;
        width: 100% !important;
    }
    
    .settings-form fluent-text-area textarea {
        min-width: 100% !important;
        width: 100% !important;
    }
    
    .color-picker-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .color-picker-input {
        width: 100%;
        max-width: 200px;
    }
}

/* ============================================
   Hero Section
   ============================================ */
/* Hero block: no border, no background. Spacing via margin only so title/description stay typography-only. */
.hero-content-provided {
    width: 100%;
    padding: 0;
    margin-bottom: 2rem;
    text-align: center;
    border: none;
    background: none;
}

.hero-content-provided .hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #1a1a1a;
    line-height: 1.2;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0;
}

.hero-content-provided .hero-description {
    font-size: 1.25rem;
    color: #666;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 0 auto;
}

/* Responsive adjustments for hero */
@media (max-width: 768px) {
    .hero-content-provided {
        padding: 2rem 1rem;
    }
    
    .hero-content-provided .hero-title {
        font-size: 2rem;
    }
    
    .hero-content-provided .hero-description {
        font-size: 1.125rem;
    }
}

/* Landing mode hero adjustments */
.layout-landing .hero-content-provided {
    padding: 3rem 1rem;
    margin-bottom: 0;
}

/* Reading mode hero adjustments */
.layout-reading .hero-content-provided {
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
    padding: 3rem 1rem;
}

/* ============================================
   Modern Login & Reset Password Pages
   ============================================ */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* Break out of content-wrapper and body-section padding to center properly */
.body-section .login-container,
.content-wrapper .login-container {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    width: calc(100% + 3rem);
    max-width: none;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 auto;
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.login-header fluent-label[typo="Typography.H3"] {
    font-weight: 600;
    color: #1a1a1a;
}

.login-header fluent-label[typo="Typography.Body"] {
    font-size: 0.95rem;
}

.login-form {
    width: 100%;
}

.login-form fluent-text-field {
    width: 100%;
}

.login-form fluent-text-field::part(control) {
    width: 100%;
    min-width: 100%;
}

.login-form fluent-button {
    height: 44px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.login-form fluent-button:hover {
    transform: translateY(-1px);
}

.login-form fluent-button[appearance="Appearance.Accent"] {
    background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
    border: none;
}

.login-form fluent-button[appearance="Appearance.Accent"]:hover {
    background: linear-gradient(135deg, #106ebe 0%, #005a9e 100%);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.login-form fluent-button[appearance="Appearance.Stealth"] {
    color: #0078d4;
}

.login-form fluent-button[appearance="Appearance.Stealth"]:hover {
    background-color: #f3f3f3;
    color: #005a9e;
}

.login-form fluent-message-bar {
    border-radius: 6px;
}

/* Responsive Design for Login */
@media (max-width: 768px) {
    .login-container {
        min-height: calc(100vh - 100px);
        padding: 1rem;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }
    
    .login-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .login-header fluent-icon {
        width: 40px !important;
        height: 40px !important;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem 1rem;
    }
    
    .login-header fluent-label[typo="Typography.H3"] {
        font-size: 1.5rem;
    }
}

/* ============================================
   Modern Page Styling
   ============================================ */
/* Page Title: typography only. No border, background, box, card, or panel. */
.page-title {
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    line-height: 1.3;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0;
}

/* Page Description: optional content block. May use container, border, or background separately from title. */
.page-description-block {
    margin-top: 0;
    margin-bottom: 1rem;
}

.page-description {
    color: #666;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 0;
}

/* Legacy page-header: no border/background. Margin-only for grouping where still used. */
.page-header {
    margin-top: 0;
    margin-bottom: 1rem;
    padding: 0;
    border: none;
    background: none;
}

.page-content {
    max-width: 100%;
    line-height: 1.8;
    color: #333;
}

/* If a duplicate page title is the first child of CMS content, render as typography only */
.page-content > h1:first-child {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0;
}

/* If the first block in CMS content is a div containing only an h1 (title block), strip its box */
.page-content > div:first-child:has(> h1:only-child) {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.page-content > div:first-child:has(> h1:only-child) > h1 {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0;
}

/* Blog Posts Page */
.blog-posts-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.blog-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0;
    border: none;
    background: none;
    flex-wrap: wrap;
    gap: 1rem;
}

.blog-posts-title-section {
    flex: 1;
    min-width: 200px;
}

.display-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.horizontal-scroll-container {
    margin: 0;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    padding-right: 50px;
}

.post-card-scroll,
.post-card-classic {
    padding: 1rem 1.25rem;
    min-height: 0 !important;
    height: fit-content !important;
    max-height: none !important;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    align-items: stretch;
}

/* Override FluentCard default styles */
.post-card-scroll fluent-card,
.post-card-classic fluent-card {
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.post-card-scroll fluent-card::part(control),
.post-card-classic fluent-card::part(control) {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
}

.post-card-scroll {
    width: 330px;
    min-width: 330px;
}

/* Ensure FluentCard doesn't add extra height */
.post-card-scroll fluent-card,
.post-card-classic fluent-card {
    height: auto !important;
    min-height: 0 !important;
}

.post-card-scroll::part(control),
.post-card-classic::part(control) {
    height: auto !important;
    min-height: 0 !important;
}

.post-card-scroll:hover,
.post-card-classic:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0078d4;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: block;
    line-height: 1.4;
}

.post-card-title:hover {
    color: #106ebe;
    text-decoration: underline;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.post-card-meta fluent-icon {
    color: #666;
}

.post-card-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

.post-card-description {
    flex: 0 0 auto;
    color: #555;
    line-height: 1.6;
    overflow: visible;
    margin-bottom: 0;
}

.post-card-read-more {
    display: inline-block;
    margin-top: 0.5rem;
    color: #0078d4;
    font-weight: 500;
    text-decoration: none;
}

.post-card-read-more:hover {
    color: #106ebe;
    text-decoration: underline;
}

.blog-posts-classic {
    margin: 0.25rem 0 2rem 0;
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
    box-sizing: border-box;
}
    width: 100%;
}

.posts-grid {
    width: 100%;
}

.post-card-classic {
    max-width: 100%;
}

.pagination-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination-label {
    font-weight: 600;
    color: #333;
}

.pagination-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-button {
    min-width: 40px;
}

/* Contact Page */
.contact-page {
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    padding: 2rem;
    margin-top: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact-form {
    width: 100%;
}

.contact-form fluent-text-field,
.contact-form fluent-text-area {
    width: 100%;
}

.contact-form-actions {
    margin-top: 1rem;
}

.contact-message {
    margin-bottom: 1.5rem;
}

.captcha-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

/* Archive Page */
.archive-page {
    max-width: 1200px;
    margin: 0 auto;
}

.archive-content {
    margin-top: 2rem;
}

.archive-categories {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.category-link {
    padding: 0.5rem 1rem;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #0078d4 !important;
    transition: all 0.2s ease;
    display: inline-block;
    font-weight: 500;
    cursor: pointer;
}

.category-link:hover {
    background-color: #e8f4f8;
    color: #005a9e !important;
    border-color: #0078d4;
    text-decoration: none;
}

.category-link:active,
.category-link:focus {
    background-color: #cce8f5;
    color: #005a9e !important;
    border-color: #0078d4;
    outline: 2px solid #0078d4;
    outline-offset: 2px;
}

.archive-category-section {
    margin-bottom: 3rem;
}

.category-title {
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.post-count {
    color: #666;
    font-weight: 400;
    font-size: 0.9em;
}

.archive-grid-card {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.archive-grid {
    width: 100%;
}

.archive-post-link {
    color: #0078d4;
    text-decoration: none;
    font-weight: 500;
}

.archive-post-link:hover {
    color: #106ebe;
    text-decoration: underline;
}

.archive-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e0e0e0;
    text-align: center;
}

.total-count {
    color: #0078d4;
    font-weight: 600;
}

/* Post Page */
.post-header-section {
    margin-bottom: 0.5rem;
    margin-top: 0;
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.post-title {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    font-size: 1.75rem;
}

.post-description {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.post-metadata {
    margin-bottom: 0.5rem;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #666;
    font-size: 0.9rem;
}

.metadata-item fluent-icon {
    color: #666;
}

.metadata-separator {
    color: #ccc;
    font-size: 0.9rem;
    margin: 0 0.25rem;
    user-select: none;
}

.metadata-categories {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-badge-inline {
    padding: 0.25rem 0.5rem;
    background-color: #f0f0f0;
    border-radius: 4px;
    text-decoration: none;
    color: #0078d4;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    font-weight: 500;
}

.category-badge-inline:hover {
    background-color: #e8f4f8;
    color: #005a9e;
    border: 1px solid #0078d4;
    text-decoration: none;
}

.category-badge-inline fluent-icon {
    color: #0078d4;
    flex-shrink: 0;
}

.category-badge-inline:hover fluent-icon {
    color: #005a9e;
}

/* Keep old class for backward compatibility if used elsewhere */
.post-categories {
    margin-bottom: 0.5rem;
}

.category-badge {
    padding: 0.4rem 0.8rem;
    background-color: #f0f0f0;
    border-radius: 4px;
    text-decoration: none;
    color: #0078d4;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.category-badge:hover {
    background-color: #e8f4f8;
    color: #005a9e;
    border: 1px solid #0078d4;
}

/* Tags in header - modern inline style */
.post-tags-header {
    margin-bottom: 0.5rem;
    margin-top: 0.25rem;
}

.tag-badge-header {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.6rem;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    text-decoration: none;
    color: #666;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.tag-badge-header:hover {
    background-color: #f5f5f5;
    border-color: #0078d4;
    color: #0078d4;
    text-decoration: none;
    transform: translateY(-1px);
}

.tag-badge-header fluent-icon {
    color: #999;
    flex-shrink: 0;
}

.tag-badge-header:hover fluent-icon {
    color: #0078d4;
}

.post-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

.post-navigation {
    padding: 1rem 1.25rem;
    margin: 0.5rem auto;
    max-width: 1200px;
    width: 100%;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding-left: 2rem;
    padding-right: 2rem;
    box-sizing: border-box;
}

.post-nav-item {
    flex: 1;
    min-width: 0;
}

.post-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #0078d4;
    padding: 0.75rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    min-width: 0;
}

.post-nav-link:hover {
    background-color: #e8f4f8;
    color: #106ebe;
}

.post-nav-prev .post-nav-link {
    justify-content: flex-start;
}

.post-nav-next .post-nav-link {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.post-nav-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.post-nav-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-nav-title {
    font-weight: 600;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-content {
    line-height: 1.8;
    color: #333;
    margin: 0 0 1rem 0;
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

.post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem auto;
    max-width: 1200px;
    width: 100%;
    padding: 1rem 2rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-sizing: border-box;
}

/* Post Footer Section - Side by Side Layout */
.post-footer-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 2rem auto 1rem auto;
    padding: 0 2rem;
    box-sizing: border-box;
    align-items: start;
}

/* When only one column exists, make it span full width or use single column */
.post-footer-section:has(.post-footer-column:only-child) {
    grid-template-columns: 1fr;
}

.post-footer-column {
    min-width: 0; /* Prevents overflow */
    display: flex;
    flex-direction: column;
    width: 100%;
}

.post-footer-column > * {
    width: 100%;
}

/* Related Posts Card */
.related-posts-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-posts-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-bottom: 1px solid #e0e0e0;
}

.related-posts-header fluent-icon {
    color: #0078d4;
}

.related-posts-title {
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.related-posts-content {
    padding: 1rem 1.25rem;
    flex: 1;
    text-align: left !important;
}

.related-posts-card .related-posts-content {
    text-align: left !important;
}

.related-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left !important;
    width: 100%;
}

.related-posts-list li {
    margin-bottom: 0.75rem;
    padding-left: 0;
    text-align: left !important;
    width: 100%;
}

.related-posts-list li:last-child {
    margin-bottom: 0;
}

.related-post-link {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    color: #0078d4;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: all 0.2s ease;
    border-radius: 4px;
    justify-content: flex-start !important;
    text-align: left !important;
    width: 100%;
    margin: 0;
}

.related-post-link fluent-anchor,
.related-post-link fluent-anchor::part(control) {
    text-align: left !important;
    justify-content: flex-start !important;
    display: flex !important;
    width: 100% !important;
}

.related-posts-list li fluent-anchor {
    text-align: left !important;
    justify-content: flex-start !important;
    display: flex !important;
    width: 100% !important;
    margin: 0 !important;
}

.related-posts-card fluent-anchor {
    text-align: left !important;
    justify-content: flex-start !important;
}

.related-posts-card fluent-anchor::part(control) {
    text-align: left !important;
    justify-content: flex-start !important;
    display: flex !important;
    width: 100% !important;
}

.related-posts-list li fluent-anchor::part(control) {
    text-align: left !important;
    justify-content: flex-start !important;
    display: flex !important;
    width: 100% !important;
}

.related-post-link:hover {
    color: #106ebe;
    text-decoration: none;
    background-color: #f5f5f5;
    padding-left: 0.5rem;
}

.related-post-link fluent-icon {
    color: #0078d4;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.related-post-link:hover fluent-icon {
    transform: translateX(2px);
    color: #106ebe;
}

/* Post Comments Card */
.post-comments-card {
    height: 100%;
    display: flex !important;
    flex-direction: column;
    padding: 0;
    overflow: visible;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 200px;
}

.post-comments-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-bottom: 1px solid #e0e0e0;
}

.post-comments-header fluent-icon {
    color: #0078d4;
}

.post-comments-title {
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.post-comments-content {
    padding: 1rem 1.25rem;
    flex: 1;
    overflow-y: visible;
    min-height: 150px;
}

.post-comments-content p {
    margin: 0;
}

.post-comments-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* Backward compatibility - keep old classes */
.related-posts-container,
.post-comments-container {
    max-width: 1200px;
    width: 100%;
    margin: 1rem auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

.tag-badge {
    padding: 0.4rem 0.8rem;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #0078d4;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.tag-badge:hover {
    background-color: #0078d4;
    color: #ffffff;
    border-color: #0078d4;
}

/* Responsive Design for Pages */
@media (max-width: 1400px) {
    .blog-posts-container {
        max-width: 100%;
        padding: 0 1.5rem;
    }
    
    .post-header-section,
    .post-content,
    .post-navigation,
    .post-tags,
    .post-footer-section {
        max-width: 100%;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .blog-posts-classic {
        max-width: 100%;
        padding: 0 1.5rem;
    }
}

@media (max-width: 992px) {
    .post-footer-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .blog-posts-container {
        padding: 0 1rem;
    }
    
    .blog-posts-header {
        flex-direction: column;
    }
    
    .post-card-scroll {
        width: 280px;
        min-width: 280px;
    }
    
    .post-header-section,
    .post-content,
    .post-navigation,
    .post-tags,
    .post-footer-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .blog-posts-classic {
        padding: 0 1rem;
    }
    
    .post-navigation {
        padding: 1rem;
    }
    
    .post-footer-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .post-nav-link {
        flex-direction: column !important;
        text-align: center;
    }
    
    .post-nav-next .post-nav-link {
        flex-direction: column !important;
    }
    
    .post-nav-title {
        white-space: normal;
        text-align: center;
    }
    
    .archive-categories {
        padding: 1rem;
    }
    
    .contact-card {
        padding: 1.5rem;
    }
}

/* ============================================
   Dashboard Styling
   ============================================ */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.dashboard-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-stat-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e5e5;
    overflow: hidden;
}

.dashboard-stat-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: #d0d0d0;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    position: relative;
    min-height: auto;
}

.stat-header-content {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.stat-header-content fluent-label {
    font-size: 1.125rem;
    font-weight: 600;
}

.stat-header-total {
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 1;
}

/* Ensure icons in headers are clearly visible with white color */
.stat-header-posts fluent-icon,
.stat-header-pages fluent-icon,
.stat-header-comments fluent-icon {
    color: #ffffff !important;
    fill: #ffffff !important;
    opacity: 1 !important;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3)) !important;
}

.stat-header-posts fluent-icon svg,
.stat-header-pages fluent-icon svg,
.stat-header-comments fluent-icon svg {
    fill: #ffffff !important;
    color: #ffffff !important;
}

.stat-header-posts {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.stat-header-posts,
.stat-header-posts *,
.stat-header-posts .stat-header-content fluent-label,
.stat-header-posts .stat-header-total,
.stat-header-posts fluent-icon,
.stat-header-posts fluent-label {
    color: #ffffff !important;
}

.stat-header-posts fluent-icon {
    color: #ffffff !important;
    fill: #ffffff !important;
    stroke: #ffffff !important;
    opacity: 1 !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) !important;
    width: 24px !important;
    height: 24px !important;
    display: inline-block !important;
    --icon-fill: #ffffff !important;
    --icon-color: #ffffff !important;
}

.stat-header-posts fluent-icon::part(root) {
    color: #ffffff !important;
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

/* Aggressive targeting for Posts header icons - ensure all SVG elements are white */
.stat-header-posts fluent-icon svg,
.stat-header-posts fluent-icon svg path,
.stat-header-posts fluent-icon svg g,
.stat-header-posts fluent-icon svg g path,
.stat-header-posts fluent-icon svg g > path,
.stat-header-posts fluent-icon svg *,
.stat-header-posts fluent-icon svg circle,
.stat-header-posts fluent-icon svg rect,
.stat-header-posts fluent-icon svg polygon,
.stat-header-posts fluent-icon svg polyline {
    fill: #ffffff !important;
    stroke: #ffffff !important;
    stroke-width: 1.5 !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

.stat-header-posts fluent-icon::part(root) svg,
.stat-header-posts fluent-icon::part(root) svg path,
.stat-header-posts fluent-icon::part(root) svg * {
    fill: #ffffff !important;
    stroke: #ffffff !important;
    stroke-width: 1.5 !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

.stat-header-pages {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.stat-header-pages,
.stat-header-pages *,
.stat-header-pages .stat-header-content fluent-label,
.stat-header-pages .stat-header-total,
.stat-header-pages fluent-icon,
.stat-header-pages fluent-label {
    color: #ffffff !important;
}

.stat-header-pages fluent-icon {
    color: #ffffff !important;
    fill: #ffffff !important;
    stroke: #ffffff !important;
    opacity: 1 !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) !important;
    width: 24px !important;
    height: 24px !important;
    display: inline-block !important;
    --icon-fill: #ffffff !important;
    --icon-color: #ffffff !important;
}

.stat-header-pages fluent-icon::part(root) {
    color: #ffffff !important;
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

/* Aggressive targeting for Pages header icons - ensure all SVG elements are white */
.stat-header-pages fluent-icon svg,
.stat-header-pages fluent-icon svg path,
.stat-header-pages fluent-icon svg g,
.stat-header-pages fluent-icon svg g path,
.stat-header-pages fluent-icon svg g > path,
.stat-header-pages fluent-icon svg *,
.stat-header-pages fluent-icon svg circle,
.stat-header-pages fluent-icon svg rect,
.stat-header-pages fluent-icon svg polygon,
.stat-header-pages fluent-icon svg polyline {
    fill: #ffffff !important;
    stroke: #ffffff !important;
    stroke-width: 1.5 !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

.stat-header-pages fluent-icon::part(root) svg,
.stat-header-pages fluent-icon::part(root) svg path,
.stat-header-pages fluent-icon::part(root) svg * {
    fill: #ffffff !important;
    stroke: #ffffff !important;
    stroke-width: 1.5 !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

.stat-header-comments {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.stat-header-comments,
.stat-header-comments *,
.stat-header-comments .stat-header-content fluent-label,
.stat-header-comments .stat-header-total,
.stat-header-comments fluent-icon,
.stat-header-comments fluent-label {
    color: #ffffff !important;
}

.stat-header-comments fluent-icon {
    color: #ffffff !important;
    fill: #ffffff !important;
    stroke: #ffffff !important;
    opacity: 1 !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) !important;
    width: 24px !important;
    height: 24px !important;
    display: inline-block !important;
    --icon-fill: #ffffff !important;
    --icon-color: #ffffff !important;
}

.stat-header-comments fluent-icon::part(root) {
    color: #ffffff !important;
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

/* Aggressive targeting for Comments header icons - ensure all SVG elements are white */
.stat-header-comments fluent-icon svg,
.stat-header-comments fluent-icon svg path,
.stat-header-comments fluent-icon svg g,
.stat-header-comments fluent-icon svg g path,
.stat-header-comments fluent-icon svg g > path,
.stat-header-comments fluent-icon svg *,
.stat-header-comments fluent-icon svg circle,
.stat-header-comments fluent-icon svg rect,
.stat-header-comments fluent-icon svg polygon,
.stat-header-comments fluent-icon svg polyline {
    fill: #ffffff !important;
    stroke: #ffffff !important;
    stroke-width: 1.5 !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

.stat-header-comments fluent-icon::part(root) svg,
.stat-header-comments fluent-icon::part(root) svg path,
.stat-header-comments fluent-icon::part(root) svg * {
    fill: #ffffff !important;
    stroke: #ffffff !important;
    stroke-width: 1.5 !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

.stat-header-actions {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #1a1a1a;
}

.stat-header-actions .stat-header-content fluent-label,
.stat-header-actions .stat-header-total,
.stat-header-actions fluent-icon {
    color: #1a1a1a;
}

.stat-header-actions .stat-header-total {
    text-shadow: none;
}

.stat-header-actions fluent-icon {
    filter: none;
}

.stat-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background-color: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.stat-badge:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-badge-success {
    border-left: 4px solid #107c10;
}

.stat-badge-success:hover {
    background-color: #e8f5e9;
    border-color: #107c10;
}

.stat-badge-warning {
    border-left: 4px solid #ffaa44;
}

.stat-badge-warning:hover {
    background-color: #fff3e0;
    border-color: #ffaa44;
}

.stat-badge-info {
    border-left: 4px solid #0078d4;
}

.stat-badge-info:hover {
    background-color: #e3f2fd;
    border-color: #0078d4;
}

.stat-badge-danger {
    border-left: 4px solid #d13438;
}

.stat-badge-danger:hover {
    background-color: #ffebee;
    border-color: #d13438;
}

.stat-badge fluent-icon {
    flex-shrink: 0;
}

.stat-badge-label {
    flex: 1;
    font-weight: 500;
    color: #4a4a4a;
    font-size: 0.95rem;
}

.stat-badge-value {
    font-weight: 700;
    font-size: 1.25rem;
    color: #1a1a1a;
    min-width: 2.5rem;
    text-align: right;
}

.stat-badge-success .stat-badge-value {
    color: #107c10;
}

.stat-badge-warning .stat-badge-value {
    color: #ff8c00;
}

.stat-badge-info .stat-badge-value {
    color: #0078d4;
}

.stat-badge-danger .stat-badge-value {
    color: #d13438;
}

.quick-action-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    background: #f5f5f5;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    border: 2px solid #e0e0e0;
}

.quick-action-link:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
    border-color: #d0d0d0;
}

.quick-action-link:last-child {
    margin-bottom: 0;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
}

.quick-action-link:last-child:hover {
    background: #e8e8e8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

.quick-action-link fluent-icon {
    color: #1a1a1a;
}

.quick-action-link span {
    color: #1a1a1a;
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .dashboard-container {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }
    
    .dashboard-layout {
        gap: 1rem;
    }
    
    .stat-card-header {
        padding: 0.875rem 1rem;
    }
    
    .stat-header-content fluent-label {
        font-size: 1rem;
    }
    
    .stat-header-total {
        font-size: 1.25rem;
    }
    
    .stat-card-content {
        padding: 1.25rem;
    }
    
    .stat-badge {
        padding: 0.875rem 1rem;
    }
    
    .stat-badge-value {
        font-size: 1.1rem;
    }
}

/* ============================================
   Account Page Styling
   ============================================ */
.account-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e5e5;
}

.account-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.account-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e5e5;
}

.account-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    border-radius: 12px;
    color: #ffffff;
}

.account-header-icon fluent-icon {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.account-header-icon fluent-icon svg,
.account-header-icon fluent-icon svg path,
.account-header-icon fluent-icon svg * {
    fill: #ffffff !important;
    stroke: #ffffff !important;
    color: #ffffff !important;
}

.account-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.account-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0891b2;
    border-radius: 6px;
}

.account-section-header fluent-icon {
    color: #0891b2;
    flex-shrink: 0;
}

.account-section-header fluent-label {
    color: #0c4a6e;
    font-weight: 600;
}

.account-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
}

/* Responsive Account Page */
@media (max-width: 768px) {
    .account-card {
        padding: 1.5rem;
    }
    
    .account-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .account-header-icon {
        width: 40px;
        height: 40px;
    }
    
    .account-section-header {
        padding: 0.75rem 1rem;
    }
}

/* ============================================
   Content Management Styling
   ============================================ */
.content-management-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e5e5;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e5e5;
    flex-wrap: nowrap;
    gap: 1rem;
}

@media (max-width: 768px) {
    .content-header {
        flex-wrap: wrap;
    }
}

.content-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-button {
    min-width: 100px;
    transition: all 0.2s ease;
}

.filter-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-button-primary {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    transition: all 0.2s ease;
}

.action-button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

.content-data-grid {
    width: 100%;
    margin-top: 1rem;
}

.content-link {
    color: #0078d4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.content-link:hover {
    color: #106ebe;
    text-decoration: underline;
}

.comment-badge {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.comment-approved {
    color: #107c10;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background: #e8f5e9;
    border-radius: 4px;
}

.comment-pending {
    color: #d13438;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background: #ffebee;
    border-radius: 4px;
}

.status-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge-published {
    background: #e8f5e9;
    color: #107c10;
}

.status-badge-draft {
    background: #fff3e0;
    color: #ff8c00;
}

.status-badge-success {
    background: #e8f5e9;
    color: #107c10;
}

.status-badge-warning {
    background: #fff3e0;
    color: #ff8c00;
}

.status-badge-info {
    background: #e3f2fd;
    color: #0078d4;
}

.status-badge-danger {
    background: #ffebee;
    color: #d13438;
}

.status-badge-neutral {
    background: #f5f5f5;
    color: #666;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.action-buttons fluent-button {
    transition: all 0.2s ease;
}

.action-buttons fluent-button:hover {
    transform: translateY(-1px);
}

.content-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e5e5;
}

/* Responsive Content Management */
@media (max-width: 768px) {
    .content-management-card {
        padding: 1rem;
        min-width: 800px !important; /* Maintain minimum to prevent FluentMenuProvider errors */
    }
    
    .content-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .content-filters {
        width: 100%;
        justify-content: center;
    }
    
    .action-button-primary {
        width: 100%;
        justify-content: center;
    }
    
    .action-buttons {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
}