/*
Theme Name: dds_geekeados.com
Theme URI: https://geekeados.com
Author: Илья Воронцов
Author URI: https://geekeados.com
Description: Тема для Geekeados — русскоязычного медиа о цифровой культуре, медиа-индустрии, играх, сериалах и креативных инструментах.
Version: 1.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: dds_geekeados.com
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* =====================================================
   CSS VARIABLES
   ===================================================== */
:root {
    --bg-deep: #0D0F12;
    --bg-card: #1A1D22;
    --bg-card-hover: #1E2128;
    --border-subtle: #2A2F38;
    --border-hover: #3A3F48;
    --accent-orange: #FF6B45;
    --accent-pink: #FF2E6A;
    --accent-gradient: linear-gradient(135deg, #FF6B45, #FF2E6A);
    --accent-gradient-hover: linear-gradient(135deg, #FF2E6A, #FF6B45);
    --text-primary: #EAEAEF;
    --text-secondary: #9A9DA8;
    --text-bright: #FFFFFF;
    --cat-films: #1E3A8A;
    --cat-series: #6C2BD9;
    --cat-games: #10B981;
    --cat-streaming: #E11D48;
    --cat-tools: #F59E0B;
    --cat-creative: #14B8A6;
    --reading-bg: #0A1F1A;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 30px;
    --shadow-card: 0 2px 12px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 20px rgba(255,107,69,0.15);
    --font-heading: 'Unbounded', 'Segoe UI', sans-serif;
    --font-body: 'Onest', 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --content-max: 1280px;
    --transition-fast: 0.2s ease;
    --transition-med: 0.35s ease;
}

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

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

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

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

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

p {
    margin: 0 0 1em;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-bright);
    line-height: 1.3;
    margin: 0 0 0.6em;
    font-weight: 700;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

ul, ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

blockquote {
    background: var(--bg-card);
    border-left: 4px solid var(--accent-orange);
    padding: 1.2em 1.5em;
    margin: 1.5em 0;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-style: italic;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}
table th, table td {
    border: 1px solid var(--border-subtle);
    padding: 0.7em 1em;
    text-align: left;
}
table th {
    background: var(--bg-card);
    color: var(--text-bright);
    font-weight: 600;
}
table td {
    background: rgba(26,29,34,0.5);
}

pre, code {
    font-family: var(--font-mono);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
}
pre {
    padding: 1.2em;
    overflow-x: auto;
    margin: 1.5em 0;
    border: 1px solid var(--border-subtle);
    font-size: 0.9rem;
}
code {
    padding: 0.15em 0.4em;
    font-size: 0.9em;
}
pre code {
    padding: 0;
    background: none;
}

hr {
    border: none;
    height: 1px;
    background: var(--border-subtle);
    margin: 2em 0;
}

::selection {
    background: rgba(255,107,69,0.3);
    color: var(--text-bright);
}

/* =====================================================
   LAYOUT
   ===================================================== */
.site-container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 1.5em;
}

.content-area {
    display: flex;
    gap: 3em;
    padding: 2em 0;
}
.content-area .main-content {
    flex: 1;
    min-width: 0;
}
.content-area .sidebar-area {
    flex: 0 0 27%;
    min-width: 0;
}

.content-full {
    width: 85%;
    margin: 0 auto;
    padding: 2em 0;
}

/* =====================================================
   HEADER
   ===================================================== */
.site-header {
    background: rgba(13,15,18,0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0;
    position: relative;
    z-index: 100;
}

.header-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0.8em 1.5em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5em;
}

.brand-zone {
    display: flex;
    align-items: center;
    gap: 1em;
    flex-shrink: 0;
}
.brand-zone a {
    display: flex;
    align-items: center;
    gap: 0.8em;
    color: inherit;
}
.brand-zone a:hover {
    color: inherit;
}
.brand-logo {
    height: 44px;
    width: auto;
    display: block;
    border-radius: var(--radius-sm);
}
.brand-placeholder-svg {
    width: 44px;
    height: 44px;
    display: block;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.brand-name {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand-tagline {
    font-size: 0.65rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 340px;
}

/* Header nav */
.header-nav {
    display: flex;
    align-items: center;
    gap: 0;
}
.header-nav ul {
    display: flex;
    list-style: none;
    gap: 0;
    padding: 0;
    margin: 0;
}
.header-nav li {
    position: relative;
}
.header-nav li a {
    display: block;
    padding: 0.6em 1em;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
    white-space: nowrap;
}
.header-nav li a:hover,
.header-nav li.current-menu-item a,
.header-nav li.current_page_item a {
    color: var(--text-bright);
    background: rgba(255,107,69,0.08);
}

/* Subscribe button in header */
.header-subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.5em 1.3em;
    background: var(--accent-gradient);
    color: var(--text-bright);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    font-family: var(--font-body);
    clip-path: polygon(6% 0%, 100% 0%, 94% 100%, 0% 100%);
    padding: 0.5em 2em;
}
.header-subscribe-btn:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
    color: var(--text-bright);
}
.header-subscribe-btn svg {
    width: 16px;
    height: 16px;
}

/* Burger */
.burger-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5em;
    color: var(--text-primary);
}
.burger-toggle svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* Mobile nav overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13,15,18,0.97);
    z-index: 200;
    padding: 5em 2em 2em;
    overflow-y: auto;
}
.mobile-nav-overlay.is-open {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
}
.mobile-nav-overlay ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}
.mobile-nav-overlay li a {
    display: block;
    padding: 0.8em 1.5em;
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 500;
}
.mobile-nav-overlay li a:hover {
    color: var(--accent-orange);
}
.mobile-nav-close {
    position: absolute;
    top: 1em;
    right: 1.5em;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.5em;
}
.mobile-nav-close svg {
    width: 28px;
    height: 28px;
}

/* =====================================================
   BREADCRUMBS
   ===================================================== */
.breadcrumbs-bar {
    padding: 1em 0 0.5em;
}
.breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.breadcrumbs-list li::after {
    content: '→';
    margin-left: 0.4em;
    opacity: 0.5;
}
.breadcrumbs-list li:last-child::after {
    content: '';
}
.breadcrumbs-list a {
    color: var(--text-secondary);
}
.breadcrumbs-list a:hover {
    color: var(--accent-orange);
}

/* =====================================================
   CARDS
   ===================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.8em;
    margin: 2em 0;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card);
    transform: translateY(-3px);
}

.card-thumb-wrap {
    position: relative;
    overflow: hidden;
}
.card-thumb-wrap a {
    display: block;
}
.card-thumb-wrap img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-med);
}
.card:hover .card-thumb-wrap img {
    transform: scale(1.04);
}

.card-category-badge {
    position: absolute;
    top: 0.8em;
    left: 0.8em;
    padding: 0.25em 0.75em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-bright);
    border-radius: var(--radius-sm);
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.2em 1.3em 1.3em;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.8em;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.6em;
}
.card-meta-divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-secondary);
    opacity: 0.5;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.5em;
}
.card-title a {
    color: var(--text-bright);
    transition: color var(--transition-fast);
}
.card-title a:hover {
    color: var(--accent-orange);
}

.card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1em;
    flex: 1;
}
.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-orange);
    transition: gap var(--transition-fast), color var(--transition-fast);
    margin-top: auto;
}
.card-read-more:hover {
    gap: 0.7em;
    color: var(--accent-pink);
}
.card-read-more svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}
.card-read-more:hover svg {
    transform: translateX(2px);
}

/* Format badge on card */
.card-format-badge {
    display: inline-block;
    padding: 0.15em 0.6em;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Category separator icons */
.category-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8em 0;
    opacity: 0.3;
}
.category-separator svg {
    width: 20px;
    height: 20px;
}

/* =====================================================
   HERO SLIDER / MEDIA SHOWCASE
   ===================================================== */
.media-showcase {
    position: relative;
    margin: 2em 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.showcase-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.showcase-slide {
    flex: 0 0 100%;
    position: relative;
    aspect-ratio: 21 / 9;
    overflow: hidden;
}
.showcase-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.showcase-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5em 2em 1.8em;
    background: linear-gradient(transparent, rgba(13,15,18,0.92));
}
.showcase-overlay .showcase-cat {
    display: inline-block;
    padding: 0.2em 0.7em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    margin-bottom: 0.5em;
}
.showcase-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.3em;
    color: var(--text-bright);
}
.showcase-overlay p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 500px;
}

.showcase-controls {
    position: absolute;
    bottom: 1em;
    right: 1.5em;
    display: flex;
    gap: 0.5em;
    z-index: 5;
}
.showcase-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26,29,34,0.8);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-primary);
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.showcase-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}
.showcase-btn svg {
    width: 16px;
    height: 16px;
}

.showcase-dots {
    position: absolute;
    bottom: 1.2em;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4em;
    z-index: 5;
}
.showcase-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}
.showcase-dot.is-active {
    background: var(--accent-orange);
    transform: scale(1.3);
}

/* =====================================================
   FRONT PAGE SECTIONS
   ===================================================== */
.fp-section {
    padding: 3em 0;
    position: relative;
}
.fp-section + .fp-section {
    border-top: 1px solid var(--border-subtle);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5em;
    gap: 1em;
}
.section-header h2 {
    margin: 0;
    font-size: 1.5rem;
    position: relative;
}
.section-header h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1em;
    background: var(--accent-gradient);
    border-radius: 2px;
    margin-right: 0.6em;
    vertical-align: middle;
}
.section-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-orange);
    white-space: nowrap;
}
.section-link:hover {
    color: var(--accent-pink);
}

/* Thematic blocks */
.thematic-block {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5em;
    margin-bottom: 2em;
}

.thematic-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5em;
    margin-top: 1.5em;
}

.thematic-col-item {
    padding: 1.5em;
    background: rgba(13,15,18,0.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}
.thematic-col-item:hover {
    border-color: var(--border-hover);
}
.thematic-col-item h4 {
    margin-bottom: 0.5em;
    font-size: 1.05rem;
}
.thematic-col-item p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
}
.thematic-col-item .col-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1.3rem;
}

/* Steps row */
.steps-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2em;
    margin-top: 1.5em;
    counter-reset: step;
}
.step-item {
    counter-increment: step;
    padding: 1.5em;
    background: rgba(13,15,18,0.5);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    position: relative;
}
.step-item::before {
    content: counter(step, decimal-leading-zero);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 0.4em;
    line-height: 1;
}
.step-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3em;
}
.step-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Dynamic timestamp badges */
.timestamp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.15em 0.6em;
    font-size: 0.72rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.timestamp-badge.is-fresh {
    background: rgba(16,185,129,0.15);
    color: #10B981;
}
.timestamp-badge.is-stale {
    background: rgba(245,158,11,0.15);
    color: #F59E0B;
}
.timestamp-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.is-fresh .timestamp-badge-dot {
    background: #10B981;
    animation: pulseDot 2s infinite;
}
.is-stale .timestamp-badge-dot {
    background: #F59E0B;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.7em 1.8em;
    background: var(--accent-gradient);
    color: var(--text-bright);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
    text-decoration: none;
    background-size: 200% 200%;
    background-position: left center;
}
.btn-primary:hover {
    background-position: right center;
    box-shadow: 0 4px 20px rgba(255,107,69,0.3);
    transform: translateY(-1px);
    color: var(--text-bright);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.55em 1.4em;
    background: transparent;
    color: var(--accent-orange);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
    text-decoration: none;
}
.btn-outline:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 0 12px rgba(255,107,69,0.1);
    color: var(--accent-orange);
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    padding: 2.5em 0 1em;
}
.pagination-wrap a,
.pagination-wrap span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.6em;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    background: transparent;
    transition: all var(--transition-fast);
}
.pagination-wrap a:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    box-shadow: 0 0 10px rgba(255,107,69,0.1);
}
.pagination-wrap .current {
    background: var(--accent-gradient);
    color: var(--text-bright);
    border-color: transparent;
}
.pagination-wrap .dots {
    border: none;
    color: var(--text-secondary);
}

/* =====================================================
   SINGLE POST
   ===================================================== */
.single-header {
    padding: 2em 0 1em;
}
.single-header .post-categories {
    display: flex;
    gap: 0.5em;
    margin-bottom: 0.8em;
}
.single-header .cat-badge {
    display: inline-block;
    padding: 0.2em 0.65em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    color: var(--text-bright);
}
.single-header h1 {
    font-size: 2rem;
    line-height: 1.25;
    margin-bottom: 0.5em;
}
.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.single-featured-img {
    margin: 0 0 2em;
    border-radius: var(--radius-md);
    overflow: hidden;
}
.single-featured-img img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 100%;
}
.post-content img {
    border-radius: var(--radius-sm);
    margin: 1em 0;
}
.post-content a {
    color: var(--accent-orange);
    text-decoration: underline;
    text-decoration-color: rgba(255,107,69,0.3);
    text-underline-offset: 3px;
}
.post-content a:hover {
    text-decoration-color: var(--accent-orange);
}

/* Reading mode */
body.reading-mode-active .post-content {
    max-width: 720px;
    margin: 0 auto;
}
body.reading-mode-active .site-header,
body.reading-mode-active .sidebar-area,
body.reading-mode-active .site-footer {
    opacity: 0.3;
    transition: opacity 0.5s ease;
}
body.reading-mode-active .site-header:hover,
body.reading-mode-active .sidebar-area:hover,
body.reading-mode-active .site-footer:hover {
    opacity: 1;
}

body.night-reading-active {
    background-color: var(--reading-bg);
}
body.night-reading-active .post-content {
    color: #B8D4C8;
}

.reading-toggle-btn {
    position: fixed;
    bottom: 5em;
    right: 1.5em;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-secondary);
    z-index: 50;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}
.reading-toggle-btn:hover {
    color: var(--accent-orange);
    border-color: var(--accent-orange);
}
.reading-toggle-btn svg {
    width: 20px;
    height: 20px;
}

/* Post navigation */
.post-nav-links {
    display: flex;
    gap: 1.5em;
    padding: 2em 0;
    border-top: 1px solid var(--border-subtle);
    margin-top: 2em;
}
.post-nav-link {
    flex: 1;
    padding: 1em 1.2em;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}
.post-nav-link:hover {
    border-color: var(--border-hover);
}
.post-nav-link small {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.3em;
}
.post-nav-link span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.92rem;
}
.post-nav-link:hover span {
    color: var(--accent-orange);
}
.post-nav-next {
    text-align: right;
}

/* =====================================================
   COMMENTS
   ===================================================== */
.comments-section {
    margin-top: 3em;
    padding-top: 2em;
    border-top: 1px solid var(--border-subtle);
}
.comments-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5em;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.comment-list .comment {
    padding: 1.2em;
    margin-bottom: 1em;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}
.comment-list .children {
    list-style: none;
    padding-left: 1.5em;
    margin-top: 1em;
}
.comment-meta {
    display: flex;
    align-items: center;
    gap: 0.6em;
    margin-bottom: 0.6em;
}
.comment-meta img {
    border-radius: 50%;
    display: block;
}
.comment-author-name {
    font-weight: 700;
    color: var(--text-bright);
    font-size: 0.92rem;
}
.comment-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.comment-body p {
    font-size: 0.92rem;
    color: var(--text-primary);
}
.comment-reply-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-orange);
}

.comment-form-wrap {
    margin-top: 2em;
}
.comment-form-wrap h3 {
    font-size: 1.2rem;
    margin-bottom: 1em;
}
.comment-form label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.3em;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.7em 1em;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    margin-bottom: 1em;
    transition: border-color var(--transition-fast);
}
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-orange);
}
.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}
.comment-form .submit {
    display: inline-flex;
    align-items: center;
    padding: 0.7em 2em;
    background: var(--accent-gradient);
    color: var(--text-bright);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: box-shadow var(--transition-fast);
}
.comment-form .submit:hover {
    box-shadow: 0 4px 16px rgba(255,107,69,0.3);
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar-area .widget {
    margin-bottom: 1.8em;
    padding: 1.5em;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}
.sidebar-area .widget-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1em;
    padding-bottom: 0.6em;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}
.sidebar-area .widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 1px;
}
.sidebar-area .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-area .widget li {
    padding: 0.5em 0;
    border-bottom: 1px solid rgba(42,47,56,0.4);
}
.sidebar-area .widget li:last-child {
    border-bottom: none;
}
.sidebar-area .widget li a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}
.sidebar-area .widget li a:hover {
    color: var(--accent-orange);
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
    background: #0A0C0E;
    border-top: 1px solid var(--border-subtle);
    margin-top: 3em;
    position: relative;
    overflow: hidden;
}

/* Animated code lines decoration */
.footer-code-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.04;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.8;
    color: var(--accent-orange);
}
.footer-code-line {
    white-space: nowrap;
    animation: scrollCode 30s linear infinite;
}
.footer-code-line:nth-child(2) { animation-delay: -10s; }
.footer-code-line:nth-child(3) { animation-delay: -20s; }

@keyframes scrollCode {
    from { transform: translateX(100%); }
    to { transform: translateX(-200%); }
}

.footer-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 3em 1.5em 1.5em;
    position: relative;
    z-index: 1;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5em;
    margin-bottom: 2em;
}

.footer-widgets .widget {
    min-width: 0;
}
.footer-widgets .widget-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 1em;
    padding-bottom: 0.6em;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}
.footer-widgets .widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 1px;
}
.footer-widgets .widget p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.footer-widgets .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-widgets .widget li {
    padding: 0.35em 0;
}
.footer-widgets .widget li a {
    color: var(--text-secondary);
    font-size: 0.88rem;
    transition: color var(--transition-fast);
}
.footer-widgets .widget li a:hover {
    color: var(--accent-orange);
}

/* Tech decoration strip */
.footer-tech-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8em;
    padding: 1em 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1.5em;
}
.footer-tech-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.5;
    padding: 0.2em 0.5em;
    border: 1px solid rgba(42,47,56,0.3);
    border-radius: var(--radius-sm);
}

.footer-copyright {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 0.5em 0;
}

/* =====================================================
   SEARCH FORM
   ===================================================== */
.search-form-wrap {
    position: relative;
    max-width: 400px;
}
.search-form-wrap input[type="search"] {
    width: 100%;
    padding: 0.7em 3em 0.7em 1em;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    transition: border-color var(--transition-fast);
}
.search-form-wrap input[type="search"]:focus {
    outline: none;
    border-color: var(--accent-orange);
}
.search-form-wrap button {
    position: absolute;
    right: 0.5em;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.3em;
    transition: color var(--transition-fast);
}
.search-form-wrap button:hover {
    color: var(--accent-orange);
}
.search-form-wrap button svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* =====================================================
   404
   ===================================================== */
.error-page-content {
    text-align: center;
    padding: 4em 1em;
}
.error-page-content h1 {
    font-size: 5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2em;
}
.error-page-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5em;
}
.error-page-content .search-form-wrap {
    margin: 0 auto 2em;
}

/* =====================================================
   COOKIE BANNER
   ===================================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
    padding: 1em 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5em;
    z-index: 500;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
.cookie-banner p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
}
.cookie-banner .btn-primary {
    flex-shrink: 0;
    padding: 0.5em 1.5em;
    font-size: 0.85rem;
}
.cookie-banner.is-hidden {
    display: none;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 960px) {
    .header-nav {
        display: none;
    }
    .burger-toggle {
        display: block;
    }
    .header-subscribe-btn {
        display: none;
    }
    .content-area {
        flex-direction: column;
    }
    .content-area .sidebar-area {
        flex: none;
        width: 100%;
    }
    .content-full {
        width: 95%;
    }
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 2em;
    }
    .thematic-cols {
        grid-template-columns: 1fr 1fr;
    }
    .post-nav-links {
        flex-direction: column;
    }
    .brand-tagline {
        display: none;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 15px;
    }
    .site-container {
        padding: 0 1em;
    }
    .header-inner {
        padding: 0.6em 1em;
    }
    .content-full {
        width: 100%;
    }
    .cards-grid {
        grid-template-columns: 1fr;
    }
    .thematic-cols {
        grid-template-columns: 1fr;
    }
    .thematic-block {
        padding: 1.5em;
    }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
    .showcase-slide {
        aspect-ratio: 16 / 9;
    }
    .showcase-overlay h3 {
        font-size: 1.15rem;
    }
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 0.8em;
        padding: 1em;
    }
    .brand-name {
        font-size: 0.68rem;
    }
    .card-thumb-wrap {
        flex: none;
        width: 100%;
        position: static;
    }
    .card-thumb-wrap a {
        position: static;
    }
    .card-thumb-wrap img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .footer-inner {
        padding: 2em 1em 1em;
    }
    .single-header h1 {
        font-size: 1.5rem;
    }
    .steps-row {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   WORDPRESS ALIGNMENT CLASSES
   ===================================================== */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}
.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}
.aligncenter {
    display: block;
    margin: 1.5em auto;
}
.wp-caption {
    max-width: 100%;
}
.wp-caption-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 0.3em 0;
}
