/*
Theme Name: Feel On/Off Code
Theme URI: https://example.com/feel-on-off-code
Author: Alexander Filonov
Author URI: https://example.com
Description: Modern WordPress theme for neural network and marketing experts. Bright design with focus on content. Light and dark theme support.
Version: 1.2.7
Tested up to: 6.7
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: feel-on-off-code
Tags: blog, one-column, two-columns, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks, accessibility-ready

Feel On/Off Code WordPress Theme, (C) 2024
Feel On/Off Code is distributed under the terms of the GNU GPL.
*/

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

/* Light Theme (Default) */
:root,
[data-theme="light"] {
    /* Colors from design */
    --color-primary: #D2D21E;
    --color-primary-dark: #B8B81A;
    --color-primary-light: #DCDC3A;
    --color-accent: #C40E6C;
    --color-accent-light: #D81B60;
    --color-accent-dark: #800A47;
    --color-brown: #8D6E63;
    --color-brown-light: #A1887F;
    --color-brown-dark: #6D4C41;
    
    /* Neutrals */
    --color-white: #FFFFFF;
    --color-black: #1A1A1A;
    --color-gray-100: #F5F5F5;
    --color-gray-200: #EEEEEE;
    --color-gray-300: #E0E0E0;
    --color-gray-400: #BDBDBD;
    --color-gray-500: #9E9E9E;
    --color-gray-600: #757575;
    --color-gray-700: #616161;
    --color-gray-800: #424242;
    --color-gray-900: #212121;
    
    /* Theme-specific colors */
    --color-bg: var(--color-primary);
    --color-bg-alt: var(--color-primary-dark);
    --color-surface: var(--color-white);
    --color-surface-alt: var(--color-gray-100);
    --color-text: var(--color-gray-900);
    --color-text-muted: var(--color-gray-600);
    --color-text-heading: var(--color-accent-dark);
    --color-border: var(--color-gray-200);
    
    /* Typography */
    --font-primary: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Font sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Layout */
    --container-max: 1200px;
    --content-max: 800px;
    --sidebar-width: 300px;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-2xl: 30px;
    --radius-full: 9999px;
    
    /* 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;
    
    /* Color scheme */
    color-scheme: light;
}

/* Dark Theme */
[data-theme="dark"] {
    --color-bg: var(--color-accent-dark);
    --color-bg-alt: #5a0632;
    --color-surface: #4a0529;
    --color-surface-alt: #3a0420;
    --color-text: #F5F5F5;
    --color-text-muted: #BDBDBD;
    --color-text-heading: var(--color-primary);
    --color-border: rgba(255, 255, 255, 0.15);
    
    /* Adjusted colors for dark theme */
    --color-gray-100: #3a0420;
    --color-gray-200: rgba(255, 255, 255, 0.1);
    --color-gray-600: #BDBDBD;
    --color-gray-700: #E0E0E0;
    --color-gray-800: #F5F5F5;
    --color-gray-900: #FFFFFF;
    
    color-scheme: dark;
}

/* Auto dark mode based on system preference */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-bg: var(--color-accent-dark);
        --color-bg-alt: #5a0632;
        --color-surface: #4a0529;
        --color-surface-alt: #3a0420;
        --color-text: #F5F5F5;
        --color-text-muted: #BDBDBD;
        --color-text-heading: var(--color-primary);
        --color-border: rgba(255, 255, 255, 0.15);
        
        color-scheme: dark;
    }
}

/* ==========================================================================
   Base / Reset
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: var(--space-4);
    color: var(--color-text-heading);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    margin-top: 0;
    margin-bottom: var(--space-4);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover,
a:focus {
    color: var(--color-accent-dark);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--color-white);
    border-radius: var(--radius-sm);
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: var(--color-gray-900);
    display: block;
    font-size: var(--text-sm);
    font-weight: 700;
    height: auto;
    left: var(--space-2);
    line-height: normal;
    padding: var(--space-4);
    text-decoration: none;
    top: var(--space-2);
    width: auto;
    z-index: 100000;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: var(--space-4);
    background: var(--color-accent);
    color: var(--color-white);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    z-index: 100000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-2);
    outline: 2px solid var(--color-white);
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ==========================================================================
   Layout
   ========================================================================== */
#page {
    position: relative;
    width: 100%;
    overflow-x: hidden;
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
    position: relative;
    z-index: 1;
}

.content-area {
    max-width: var(--content-max);
    margin-left: auto;
    margin-right: auto;
}

/* Grid layouts */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-6);
    padding: var(--space-8) 0;
}

@media (min-width: 640px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    background-color: var(--color-bg);
    padding: var(--space-4) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color var(--transition-base);
}

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

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

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 2px solid var(--color-text);
    border-radius: var(--radius-full);
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background-color: var(--color-text);
    color: var(--color-bg);
}

.theme-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Show/hide icons based on theme */
.theme-toggle-icon--dark {
    display: none;
}

[data-theme="dark"] .theme-toggle-icon--light {
    display: none;
}

[data-theme="dark"] .theme-toggle-icon--dark {
    display: flex;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle-icon--light {
        display: none;
    }
    
    :root:not([data-theme="light"]) .theme-toggle-icon--dark {
        display: flex;
    }
}

.site-branding {
    flex-shrink: 0;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo img,
.site-logo-image {
    height: 48px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.site-logo svg {
    height: 48px;
    width: auto;
}

.site-title {
    margin: 0;
    font-size: var(--text-xl);
    font-weight: 700;
}

.site-title a {
    color: var(--color-text-heading);
    text-decoration: none;
}

.site-title a:hover,
.site-title a:focus {
    color: var(--color-accent);
}

.site-description {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.main-navigation {
    display: none;
}

@media (min-width: 768px) {
    .main-navigation {
        display: block;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    padding: var(--space-2) var(--space-4);
    color: var(--color-text);
    font-weight: 500;
    font-size: var(--text-base);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: var(--color-accent);
    text-decoration: none;
}

.nav-menu .current-menu-item a,
.nav-menu .current_page_item a {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.nav-menu .current-menu-item a:hover,
.nav-menu .current_page_item a:hover {
    background-color: var(--color-accent-dark);
    color: var(--color-white);
}

/* Mobile menu toggle */
.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    position: relative;
    transition: background-color var(--transition-fast);
}

.menu-toggle span::before,
.menu-toggle span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--color-text);
    left: 0;
    transition: transform var(--transition-fast);
}

.menu-toggle span::before {
    top: -8px;
}

.menu-toggle span::after {
    top: 8px;
}

/* Mobile navigation */
.mobile-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-bg-alt);
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
}

.mobile-navigation.is-active {
    display: block;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-menu li {
    margin: 0;
}

.mobile-nav-menu a {
    display: block;
    padding: var(--space-3) var(--space-4);
    color: var(--color-text);
    font-weight: 500;
    border-radius: var(--radius-md);
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a:focus {
    background-color: var(--color-surface);
    color: var(--color-accent);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    width: 100vw !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: var(--space-12) 0;
    background-color: var(--color-bg);
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    transition: background-color var(--transition-base);
}

.hero-inner {
    /* Простой block layout без grid - на всю ширину */
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

@media (min-width: 768px) {
    .hero-inner {
        display: flex;
        gap: var(--space-8);
        align-items: center;
    }
}

.hero-widget {
    display: contents;
}

.hero-content {
    order: 2;
}

@media (min-width: 768px) {
    .hero-content {
        order: 1;
        flex: 1 1 50%;
        max-width: 600px;
    }
}

.hero-title {
    font-size: var(--text-4xl);
    font-weight: 900;
    color: var(--color-text-heading);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    line-height: 1.1;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: var(--text-5xl);
    }
}

.hero-subtitle {
    font-size: var(--text-xl);
    font-weight: 500;
    color: var(--color-accent);
    margin-bottom: var(--space-4);
}

.hero-description {
    font-size: var(--text-base);
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
}

.hero-image {
    order: 1;
}

@media (min-width: 768px) {
    .hero-image {
        order: 2;
        flex: 0 1 auto;
    }
}

.hero-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    margin-left: auto;
    display: block;
}

/* Decorative shapes */
.hero-shape {
    position: absolute;
    left: -30px;
    bottom: 20%;
    width: 80px;
    height: 150px;
    background-color: var(--color-brown);
    border-radius: var(--radius-2xl);
    opacity: 0.7;
    z-index: 0;
}

@media (min-width: 768px) {
    .hero-shape {
        width: 100px;
        height: 180px;
    }
}

/* Global decorative shapes system */
.decorative-shapes-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: -1;
}

.decorative-shape {
    position: absolute;
    background-color: var(--color-brown);
    pointer-events: none;
    transition: opacity var(--transition-slow);
    z-index: -1;
}

[data-theme="dark"] .decorative-shape {
    opacity: 0.7;
}

/* Shape variants - matching SVG design from profile_color_bg.svg */
/* Right side grouped shapes - like in design image */

/* Large rounded rectangle - top right */
.decorative-shape--1 {
    width: 140px;
    height: 220px;
    right: -45px;
    border-radius: 70px 70px 70px 25px;
}

/* Medium rounded shape - middle right */
.decorative-shape--2 {
    width: 120px;
    height: 180px;
    right: -40px;
    border-radius: 25px 60px 60px 60px;
}

/* Wide rounded rectangle */
.decorative-shape--3 {
    width: 180px;
    height: 140px;
    right: -60px;
    border-radius: 70px;
}

/* Small rounded square - bottom right group */
.decorative-shape--4 {
    width: 100px;
    height: 120px;
    right: -30px;
    border-radius: 50px 50px 20px 50px;
}

/* Left side accent shape */
.decorative-shape--5 {
    width: 80px;
    height: 200px;
    left: -25px;
    border-radius: 40px 40px 40px 15px;
}

/* Another left side shape */
.decorative-shape--6 {
    width: 100px;
    height: 150px;
    left: -35px;
    border-radius: 50px;
}

/* Hide shapes on mobile for better performance */
@media (max-width: 767px) {
    .decorative-shapes-container {
        display: none;
    }
}

.hero-placeholder {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.hero-placeholder svg {
    width: 120px;
    height: 120px;
    opacity: 0.3;
}

/* Section title for front page */
.section-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-accent-dark);
    margin-bottom: var(--space-6);
    text-align: center;
}

/* ==========================================================================
   Post Cards
   ========================================================================== */
.post-card {
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base);
    position: relative;
    z-index: 1;
}

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

.post-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    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 .no-thumbnail {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card-image .no-thumbnail svg {
    width: 48px;
    height: 48px;
    color: var(--color-white);
    opacity: 0.5;
}

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

.post-card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-2);
    line-height: 1.3;
}

.post-card-title a {
    color: var(--color-text-heading);
    text-decoration: none;
}

.post-card-title a:hover,
.post-card-title a:focus {
    color: var(--color-accent);
}

.post-card-excerpt {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Full excerpts mode - no truncation, equal height cards */
.posts-grid--full-excerpts {
    align-items: stretch;
}

.posts-grid--full-excerpts .post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.posts-grid--full-excerpts .post-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.posts-grid--full-excerpts .post-card-excerpt {
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
    flex: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* ==========================================================================
   Single Post / Page
   ========================================================================== */
.single-post-header {
    padding: var(--space-8) 0;
    background-color: var(--color-bg);
}

/* Article card wrapper for single posts */
.single .container,
.page .container {
    position: relative;
}

.single article,
.page article {
    background-color: var(--color-surface);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    margin-bottom: var(--space-8);
    box-shadow: var(--shadow-md);
    transition: background-color var(--transition-base);
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .single article,
    .page article {
        padding: var(--space-8);
    }
}

/* Decorative stripe for dark theme */
[data-theme="dark"] .single .container::after {
    content: '';
    position: absolute;
    top: 100px;
    right: -20px;
    width: 20px;
    height: 200px;
    background-color: var(--color-primary);
    border-radius: var(--radius-lg);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.breadcrumbs a {
    color: var(--color-text);
}

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

.breadcrumbs .separator {
    color: var(--color-text-muted);
}

.post-date {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.single-featured-image {
    margin: var(--space-6) 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.single-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.entry-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-text-heading);
    margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
    .entry-title {
        font-size: var(--text-4xl);
    }
}

.entry-content {
    padding: var(--space-8) 0;
    color: var(--color-text);
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

/* Entry content typography */
.entry-content p {
    margin-bottom: var(--space-4);
}

.entry-content h2 {
    margin-top: var(--space-8);
    margin-bottom: var(--space-4);
}

.entry-content h3 {
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
}

.entry-content ul,
.entry-content ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
}

.entry-content li {
    margin-bottom: var(--space-2);
}

.entry-content blockquote {
    margin: var(--space-6) 0;
    padding: var(--space-4) var(--space-6);
    border-left: 4px solid var(--color-accent);
    background-color: var(--color-surface-alt);
    font-style: italic;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

/* Telegram button */
.telegram-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background-color: var(--color-accent);
    color: var(--color-white);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: background-color var(--transition-fast);
    margin: var(--space-6) 0;
}

.telegram-button:hover,
.telegram-button:focus {
    background-color: var(--color-accent-dark);
    color: var(--color-white);
    text-decoration: none;
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: var(--space-6) 0;
}

.post-tags a {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background-color: var(--color-surface-alt);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
}

.post-tags a:hover,
.post-tags a:focus {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-white);
    text-decoration: none;
}

/* Post navigation */
.post-navigation {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-8) 0;
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-8);
}

@media (min-width: 640px) {
    .post-navigation {
        flex-direction: row;
        justify-content: space-between;
    }
}

.post-navigation a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border: 2px solid var(--color-text);
    border-radius: var(--radius-full);
    color: var(--color-text);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.post-navigation a:hover,
.post-navigation a:focus {
    background-color: var(--color-text);
    color: var(--color-bg);
    text-decoration: none;
}

/* ==========================================================================
   Archive / Search
   ========================================================================== */
.archive-header,
.search-header {
    padding: var(--space-10) 0 var(--space-6);
    background-color: var(--color-bg);
}

.archive-title,
.search-title {
    font-size: var(--text-3xl);
    color: var(--color-text-heading);
    margin-bottom: var(--space-2);
}

.archive-description {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
    padding: var(--space-8) 0;
}

.pagination .nav-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 var(--space-3);
    background-color: var(--color-surface);
    color: var(--color-text);
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.pagination .page-numbers:hover,
.pagination .page-numbers:focus {
    background-color: var(--color-accent);
    color: var(--color-white);
    text-decoration: none;
}

.pagination .page-numbers.current {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.pagination .page-numbers.dots {
    background: transparent;
    min-width: auto;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.widget-area {
    padding: var(--space-6) 0;
    position: relative;
    z-index: 1;
}

.widget {
    background-color: var(--color-surface);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
    z-index: 1;
}

.widget-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-text-heading);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--color-primary);
}

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

.widget li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border);
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--color-text);
}

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

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area {
    padding: var(--space-8) 0;
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-8);
}

.comments-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-6);
}

.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment {
    padding: var(--space-5);
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.comment-author .avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
}

.comment-author .fn {
    font-weight: 600;
    color: var(--color-text);
}

.comment-metadata {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

.comment-content p {
    margin-bottom: var(--space-2);
}

.comment .children {
    list-style: none;
    margin: var(--space-4) 0 0 var(--space-6);
    padding: 0;
}

/* Comment form */
.comment-respond {
    background-color: var(--color-surface);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    margin-top: var(--space-6);
}

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

.comment-form label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--color-text);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: var(--text-base);
    background-color: var(--color-surface);
    color: var(--color-text);
    transition: border-color var(--transition-fast);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

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

.comment-form .form-submit {
    margin-top: var(--space-4);
}

.comment-form .submit {
    display: inline-block;
    padding: var(--space-3) var(--space-6);
    background-color: var(--color-accent);
    color: var(--color-white);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.comment-form .submit:hover,
.comment-form .submit:focus {
    background-color: var(--color-accent-dark);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--color-bg-alt);
    padding: var(--space-10) 0;
    margin-top: auto;
    transition: background-color var(--transition-base);
    position: relative;
    z-index: 1;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}

@media (min-width: 768px) {
    .footer-inner {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-widget-area {
    /* Footer widgets */
}

.site-info {
    text-align: center;
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-6);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.footer-navigation .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
}

/* ==========================================================================
   404 Page
   ========================================================================== */
.error-404 {
    text-align: center;
    padding: var(--space-16) 0;
}

.error-404 h1 {
    font-size: 8rem;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: var(--space-4);
}

.error-404 p {
    font-size: var(--text-xl);
    color: var(--color-gray-600);
    margin-bottom: var(--space-8);
}

.error-404 .search-form {
    max-width: 400px;
    margin: 0 auto var(--space-6);
}

/* ==========================================================================
   Search Form
   ========================================================================== */
.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.search-form .search-field {
    flex: 1 1 100%;
    min-width: 0;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--color-gray-200);
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: var(--text-base);
    background-color: var(--color-surface);
    color: var(--color-text);
}

@media (min-width: 400px) {
    .search-form .search-field {
        flex: 1 1 auto;
    }
}

.search-form .search-field:focus {
    outline: none;
    border-color: var(--color-accent);
}

.search-form .search-submit {
    flex: 0 0 auto;
    width: 100%;
    padding: var(--space-3) var(--space-5);
    background-color: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

@media (min-width: 400px) {
    .search-form .search-submit {
        width: auto;
    }
}

.search-form .search-submit:hover,
.search-form .search-submit:focus {
    background-color: var(--color-accent-dark);
}

/* Sidebar search form - always stacked */
.widget-area .search-form .search-field,
.content-sidebar .search-form .search-field {
    flex: 1 1 100%;
}

.widget-area .search-form .search-submit,
.content-sidebar .search-form .search-submit {
    width: 100%;
}

/* ==========================================================================
   Block Editor Styles
   ========================================================================== */
/* Wide and full width alignments */
.alignwide {
    max-width: calc(var(--container-max) - var(--space-8));
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    max-width: none;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin-right: var(--space-4);
    margin-bottom: var(--space-4);
}

.alignright {
    float: right;
    margin-left: var(--space-4);
    margin-bottom: var(--space-4);
}

/* Block styles */
.wp-block-image {
    margin-bottom: var(--space-4);
}

.wp-block-image img {
    border-radius: var(--radius-md);
}

.wp-block-quote {
    border-left: 4px solid var(--color-accent);
    padding-left: var(--space-4);
    font-style: italic;
}

.wp-block-table {
    margin-bottom: var(--space-4);
}

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

.wp-block-table th,
.wp-block-table td {
    padding: var(--space-3);
    border: 1px solid var(--color-gray-200);
}

.wp-block-table th {
    background-color: var(--color-gray-100);
    font-weight: 600;
}

.wp-block-button .wp-block-button__link {
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: background-color var(--transition-fast);
}

.wp-block-button .wp-block-button__link:hover {
    background-color: var(--color-accent-dark);
    text-decoration: none;
}

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

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

@media (max-width: 767px) {
    .hide-mobile { display: none; }
}

@media (min-width: 768px) {
    .hide-desktop { display: none; }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .comments-area,
    .post-navigation {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* ==========================================================================
   Content Layout with Sidebar
   ========================================================================== */
.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.content-wrapper.has-sidebar {
    flex-direction: column;
}

@media (min-width: 1024px) {
    .content-wrapper.has-sidebar {
        flex-direction: row;
    }
    
    .content-wrapper.has-sidebar .content-main {
        flex: 1;
        min-width: 0;
    }
    
    .content-wrapper.has-sidebar .content-sidebar {
        width: var(--sidebar-width);
        flex-shrink: 0;
    }
}

.content-main {
    width: 100%;
}

.content-sidebar {
    padding: var(--space-4) 0;
}

/* ==========================================================================
   After Menu Widget Area
   ========================================================================== */
.after-menu-area {
    background-color: var(--color-bg-alt);
    padding: var(--space-4) 0;
    border-top: 1px solid var(--color-border);
}

.after-menu-widget {
    margin-bottom: var(--space-4);
}

.after-menu-widget:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   After Content Widget Area
   ========================================================================== */
.after-content-area {
    margin-top: var(--space-8);
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border);
}

.after-content-widget {
    margin-bottom: var(--space-6);
}

.after-content-widget:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Theme-Specific Logos
   ========================================================================== */
/* Default: show light logo, hide dark logo */
.site-logo-dark {
    display: none;
}

.site-logo-light {
    display: block;
}

/* Dark theme: show dark logo, hide light logo */
[data-theme="dark"] .site-logo-dark {
    display: block;
}

[data-theme="dark"] .site-logo-light {
    display: none;
}

/* System preference dark mode */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .site-logo-dark {
        display: block;
    }
    
    :root:not([data-theme="light"]) .site-logo-light {
        display: none;
    }
}

/* ==========================================================================
   Latest Posts Section
   ========================================================================== */
.latest-posts-section {
    padding: var(--space-8) 0;
}

.latest-posts-section .section-title {
    margin-bottom: var(--space-6);
}
