/*
Theme Name: dds_jbbatteryfrance.com
Theme URI: https://jbbatteryfrance.com
Author: Алексей Мартынов
Description: Русскоязычное медиа об аккумуляторах, источниках питания и системах накопления энергии.
Version: 1.1
Text Domain: dds_jbbatteryfrance.com
Requires at least: 6.0
Requires PHP: 7.4
*/

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    --clr-bg: #F7F8FA;
    --clr-white: #FFFFFF;
    --clr-brand: #1A6F6B;
    --clr-brand-dark: #13504D;
    --clr-brand-light: rgba(26,111,107,0.05);
    --clr-accent: #E67E22;
    --clr-accent-dark: #C96A15;
    --clr-text: #1E2A32;
    --clr-text-muted: #5B6F7E;
    --clr-border: #DDE2E8;
    --clr-shadow: rgba(30,42,50,0.08);
    --clr-lithium: #2C9B8E;
    --clr-lead: #D97706;
    --clr-solid: #4B7B8C;
    --clr-storage: #2E5A4E;
    --clr-backup: #B85D19;
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Onest', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 20px;
    --shadow-card: 0 2px 12px var(--clr-shadow);
    --shadow-hover: 0 6px 24px rgba(30,42,50,0.13);
    --max-width: 1280px;
    --content-wide: 85%;
    --content-main: 67%;
    --sidebar-width: 27%;
    --transition: 0.25s ease;
}

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

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

body {
    font-family: var(--font-body);
    color: var(--clr-text);
    background: var(--clr-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--clr-brand);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--clr-brand-dark);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--clr-text);
    margin: 0 0 0.6em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }

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

blockquote {
    border-left: 4px solid var(--clr-brand);
    padding: 1em 1.5em;
    margin: 1.5em 0;
    background: var(--clr-white);
    font-style: italic;
    color: var(--clr-text-muted);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

table th, table td {
    border: 1px solid var(--clr-border);
    padding: 0.65em 1em;
    text-align: left;
}

table th {
    background: var(--clr-brand);
    color: var(--clr-white);
    font-family: var(--font-heading);
    font-weight: 600;
}

table tr:nth-child(even) {
    background: rgba(26,111,107,0.03);
}

pre, code {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

pre {
    background: #1E2A32;
    color: #E8ECF0;
    padding: 1.2em 1.5em;
    border-radius: var(--radius-md);
    overflow-x: auto;
    border-left: 3px solid var(--clr-accent);
    margin: 1.5em 0;
}

code {
    background: rgba(26,111,107,0.08);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}

pre code {
    background: none;
    padding: 0;
}

/* ============================================
   LAYOUT
   ============================================ */
.site-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main-wrap {
    flex: 1;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.content-area {
    padding: 2.5rem 0;
}

.layout-with-sidebar {
    display: flex;
    gap: 3%;
    align-items: flex-start;
}

.layout-with-sidebar .primary-content {
    width: var(--content-main);
    min-width: 0;
}

.layout-with-sidebar .sidebar-area {
    width: var(--sidebar-width);
    min-width: 0;
}

.layout-no-sidebar .primary-content {
    width: var(--content-wide);
    margin: 0 auto;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--clr-white);
    box-shadow: 0 1px 6px var(--clr-shadow);
    position: relative;
    z-index: 100;
}

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

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--clr-text);
    flex-shrink: 0;
}

.header-brand:hover {
    color: var(--clr-text);
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand-logo-svg {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    max-width: 320px;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.25;
    color: var(--clr-text);
}

.brand-desc {
    font-size: 0.72rem;
    color: var(--clr-text-muted);
    line-height: 1.35;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Scheme toggle */
.scheme-toggle-btn {
    background: none;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--radius-md);
    padding: 6px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    color: var(--clr-text-muted);
    margin-left: 0.5rem;
}

.scheme-toggle-btn:hover {
    border-color: var(--clr-brand);
    color: var(--clr-brand);
}

.scheme-toggle-btn svg {
    width: 20px;
    height: 20px;
}

/* Schematic mode */
body.schematic-mode {
    filter: grayscale(1) contrast(1.15);
}

body.schematic-mode .site-header,
body.schematic-mode .site-footer {
    filter: none;
}

body.schematic-mode img {
    filter: grayscale(0);
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    padding: 0;
    margin: 0;
}

.nav-menu li a {
    display: block;
    padding: 0.55em 1em;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--clr-text);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.nav-menu li a:hover,
.nav-menu li.current-menu-item a,
.nav-menu li.current_page_item a {
    background: var(--clr-brand-light);
    color: var(--clr-brand);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--clr-text);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    margin: 5px 0;
    transition: all var(--transition);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.82rem;
    color: var(--clr-text-muted);
}

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

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .bc-sep {
    margin: 0 0.4em;
    color: var(--clr-border);
}

.breadcrumbs .bc-current {
    color: var(--clr-text-muted);
}

/* ============================================
   CARDS
   ============================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--clr-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    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 0.4s ease;
}

.card:hover .card-thumb-wrap img {
    transform: scale(1.04);
}

.card-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--clr-brand);
    color: var(--clr-white);
    font-size: 0.7rem;
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    z-index: 2;
}

.card-body {
    flex: 1;
    padding: 1.3rem 1.4rem;
    display: flex;
    flex-direction: column;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1em;
    font-size: 0.78rem;
    color: var(--clr-text-muted);
    margin-bottom: 0.6em;
}

.card-meta svg {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    margin-right: 3px;
    stroke: var(--clr-text-muted);
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.35;
    margin-bottom: 0.5em;
}

.card-title a {
    color: var(--clr-text);
}

.card-title a:hover {
    color: var(--clr-brand);
}

.card-excerpt {
    font-size: 0.9rem;
    color: var(--clr-text-muted);
    line-height: 1.65;
    flex: 1;
}

.card-excerpt p {
    margin: 0 0 0.5em;
    background: none;
}

.card-footer {
    margin-top: auto;
    padding-top: 0.8rem;
}

.card-readmore {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.84rem;
    color: var(--clr-brand);
    border: 1.5px solid var(--clr-brand);
    padding: 0.45em 1.1em;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    background: transparent;
}

.card-readmore:hover {
    background: var(--clr-brand-light);
    color: var(--clr-brand-dark);
}

.card-readmore svg {
    width: 14px;
    height: 14px;
    transition: transform var(--transition);
}

.card-readmore:hover svg {
    transform: translateX(3px);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    background: var(--clr-brand);
    color: var(--clr-white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.7em 1.6em;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary:hover {
    background: var(--clr-brand-dark);
    color: var(--clr-white);
    box-shadow: 0 4px 14px rgba(26,111,107,0.25);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    background: transparent;
    color: var(--clr-brand);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.7em 1.6em;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--clr-brand);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-outline:hover {
    background: var(--clr-brand-light);
    color: var(--clr-brand-dark);
}

.btn-accent {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    background: var(--clr-accent);
    color: var(--clr-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.75em 1.6em;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-accent:hover {
    background: var(--clr-accent-dark);
    color: var(--clr-white);
    box-shadow: 0 4px 14px rgba(230,126,34,0.3);
}

.btn-capsule {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    background: var(--clr-brand);
    color: var(--clr-white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.6em 1.5em;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-capsule:hover {
    background: var(--clr-brand-dark);
    color: var(--clr-white);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    padding: 2.5rem 0 1rem;
}

.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-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--clr-border);
    color: var(--clr-text);
    transition: all var(--transition);
}

.pagination-wrap a:hover {
    border-color: var(--clr-brand);
    color: var(--clr-brand);
    background: var(--clr-brand-light);
}

.pagination-wrap .current {
    background: var(--clr-brand);
    color: var(--clr-white);
    border-color: var(--clr-brand);
}

.pagination-wrap .dots {
    border: none;
    color: var(--clr-text-muted);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar-area .widget {
    background: var(--clr-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-area .widget-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1em;
    padding-bottom: 0.6em;
    border-bottom: 2px solid var(--clr-brand);
    color: var(--clr-text);
}

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

.sidebar-area .widget ul li {
    padding: 0.5em 0;
    border-bottom: 1px solid var(--clr-border);
}

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

.sidebar-area .widget ul li a {
    font-size: 0.9rem;
    color: var(--clr-text);
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.sidebar-area .widget ul li a:hover {
    color: var(--clr-brand);
}

.sidebar-area .widget ul li a::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--clr-brand);
    border-radius: 50%;
    flex-shrink: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--clr-text);
    color: rgba(255,255,255,0.75);
    margin-top: auto;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
}

.footer-widgets .widget {
    font-size: 0.88rem;
    line-height: 1.7;
}

.footer-widgets .widget-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--clr-white);
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid var(--clr-brand);
}

.footer-widgets .widget a {
    color: rgba(255,255,255,0.7);
    transition: color var(--transition);
}

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

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

.footer-widgets .widget ul li {
    padding: 0.35em 0;
}

.footer-widgets .widget ul li a::before {
    content: '→';
    margin-right: 0.5em;
    color: var(--clr-brand);
    font-size: 0.8em;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    padding: 1.2rem 1.5rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ============================================
   FRONT PAGE SECTIONS
   ============================================ */
.fp-section {
    padding: 3.5rem 0;
}

.fp-section:nth-child(even) {
    background: var(--clr-white);
}

.fp-section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.fp-section-header h2 {
    font-size: 1.85rem;
    position: relative;
    display: inline-block;
}

.fp-section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--clr-accent);
    margin: 0.5em auto 0;
    border-radius: 2px;
}

.fp-section-header p {
    color: var(--clr-text-muted);
    max-width: 640px;
    margin: 0.8em auto 0;
    font-size: 1rem;
}

/* Technology grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.tech-card {
    background: var(--clr-white);
    border-radius: var(--radius-md);
    padding: 1.8rem 1.5rem;
    box-shadow: var(--shadow-card);
    border-top: 3px solid var(--clr-brand);
    transition: all var(--transition);
    text-align: center;
}

.tech-card:nth-child(2) { border-top-color: var(--clr-lithium); }
.tech-card:nth-child(3) { border-top-color: var(--clr-lead); }
.tech-card:nth-child(4) { border-top-color: var(--clr-solid); }
.tech-card:nth-child(5) { border-top-color: var(--clr-backup); }

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

.tech-card-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    stroke: var(--clr-brand);
    fill: none;
    stroke-width: 1.5;
}

.tech-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5em;
}

.tech-card p {
    font-size: 0.88rem;
    color: var(--clr-text-muted);
    margin: 0;
}

/* Spec plate */
.spec-plate {
    background: #1E2A32;
    color: #E8ECF0;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--clr-accent);
    padding: 1.5rem 1.8rem;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.8;
    margin: 1.5rem 0;
}

.spec-plate .spec-label {
    color: var(--clr-accent);
    font-weight: 700;
}

/* Steps */
.steps-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    counter-reset: step;
}

.step-item {
    background: var(--clr-white);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem 1.5rem;
    box-shadow: var(--shadow-card);
    position: relative;
    counter-increment: step;
}

.step-item::before {
    content: counter(step);
    position: absolute;
    top: -14px;
    left: 20px;
    background: var(--clr-brand);
    color: var(--clr-white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.85rem;
}

.step-item h4 {
    margin-bottom: 0.4em;
}

.step-item p {
    font-size: 0.88rem;
    color: var(--clr-text-muted);
    margin: 0;
}

/* Safety block */
.safety-block {
    background: var(--clr-white);
    border: 2px solid var(--clr-accent);
    border-radius: var(--radius-md);
    padding: 2rem 2rem 1.5rem;
    position: relative;
}

.safety-block::before {
    content: '⚠';
    position: absolute;
    top: -16px;
    left: 20px;
    background: var(--clr-accent);
    color: var(--clr-white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.safety-block h3 {
    color: var(--clr-accent);
}

/* Timeline */
.timeline-horizontal {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding: 1.5rem 0 2rem;
    -webkit-overflow-scrolling: touch;
}

.timeline-phase {
    flex: 0 0 180px;
    text-align: center;
    position: relative;
    padding: 0 1rem;
}

.timeline-phase::after {
    content: '';
    position: absolute;
    top: 22px;
    right: 0;
    width: 100%;
    height: 2px;
    background: var(--clr-border);
    z-index: 0;
}

.timeline-phase:last-child::after {
    display: none;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    background: var(--clr-brand);
    border: 3px solid var(--clr-white);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--clr-brand);
    margin: 16px auto 1rem;
    position: relative;
    z-index: 1;
}

.timeline-phase h4 {
    font-size: 0.85rem;
    margin-bottom: 0.3em;
}

.timeline-phase p {
    font-size: 0.78rem;
    color: var(--clr-text-muted);
    margin: 0;
}

/* ============================================
   SINGLE POST / PAGE
   ============================================ */
.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    font-size: 2rem;
    margin-bottom: 0.4em;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2em;
    font-size: 0.85rem;
    color: var(--clr-text-muted);
}

.entry-meta svg {
    width: 15px;
    height: 15px;
    vertical-align: -2px;
    margin-right: 3px;
    stroke: var(--clr-text-muted);
}

.entry-content {
    font-size: 1rem;
    line-height: 1.8;
}

.entry-content h2 {
    margin-top: 2em;
}

.entry-content h3 {
    margin-top: 1.5em;
}

.entry-content img {
    border-radius: var(--radius-md);
    margin: 1.5em 0;
}

.entry-tags {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--clr-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}

.entry-tags a {
    display: inline-block;
    background: var(--clr-brand-light);
    color: var(--clr-brand);
    padding: 0.3em 0.8em;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
}

.entry-tags a:hover {
    background: var(--clr-brand);
    color: var(--clr-white);
}

/* ============================================
   COMMENTS
   ============================================ */
.comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--clr-border);
}

.comments-section h2 {
    margin-bottom: 1.5em;
}

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

.comment-list .comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--clr-border);
}

.comment-list .comment:last-child {
    border-bottom: none;
}

.comment-author-info {
    display: flex;
    align-items: center;
    gap: 0.8em;
    margin-bottom: 0.7em;
}

.comment-author-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.comment-author-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
}

.comment-date {
    font-size: 0.78rem;
    color: var(--clr-text-muted);
    margin-left: auto;
}

.comment-body p {
    font-size: 0.92rem;
    line-height: 1.7;
}

.comment-reply-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--clr-brand);
}

/* Comment form */
.comment-form-wrap {
    margin-top: 2.5rem;
}

.comment-safety-notice {
    background: rgba(230,126,34,0.06);
    border: 2px solid var(--clr-accent);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
    color: var(--clr-text);
}

.comment-safety-notice strong {
    color: var(--clr-accent);
}

.comment-form label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 0.4em;
    color: var(--clr-text);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.85em 1em;
    border: 1.5px solid var(--clr-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--clr-white);
    color: var(--clr-text);
    transition: border-color var(--transition);
    margin-bottom: 1.2em;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--clr-brand);
    box-shadow: 0 0 0 3px rgba(26,111,107,0.1);
}

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

.comment-form .form-submit input {
    background: var(--clr-brand);
    color: var(--clr-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75em 2em;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

.comment-form .form-submit input:hover {
    background: var(--clr-brand-dark);
    box-shadow: 0 4px 14px rgba(26,111,107,0.25);
}

/* ============================================
   SEARCH FORM
   ============================================ */
.search-form {
    display: flex;
    gap: 0;
}

.search-form .search-field {
    flex: 1;
    padding: 0.75em 1em;
    border: 1.5px solid var(--clr-border);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--clr-white);
    color: var(--clr-text);
}

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

.search-form .search-submit {
    background: var(--clr-brand);
    color: var(--clr-white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75em 1.3em;
    border: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
    transition: background var(--transition);
}

.search-form .search-submit:hover {
    background: var(--clr-brand-dark);
}

/* ============================================
   404 PAGE
   ============================================ */
.page-404 {
    text-align: center;
    padding: 4rem 0;
}

.page-404 h1 {
    font-size: 5rem;
    color: var(--clr-brand);
    margin-bottom: 0.2em;
    line-height: 1;
}

.page-404 p {
    font-size: 1.1rem;
    color: var(--clr-text-muted);
    margin-bottom: 2em;
}

.page-404 .search-form {
    max-width: 480px;
    margin: 0 auto 2em;
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--clr-text);
    color: rgba(255,255,255,0.85);
    padding: 1.2rem 1.5rem;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    display: none;
}

.cookie-banner.visible {
    display: block;
}

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

.cookie-inner p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
}

.cookie-accept-btn {
    flex-shrink: 0;
    background: var(--clr-accent);
    color: var(--clr-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.6em 1.5em;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition);
}

.cookie-accept-btn:hover {
    background: var(--clr-accent-dark);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 960px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .header-nav {
        order: 3;
        width: 100%;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 0.5rem 0;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu li a {
        padding: 0.75em 0.5em;
    }

    .menu-toggle {
        display: block;
    }

    .brand-desc {
        display: none;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .layout-with-sidebar {
        flex-direction: column;
    }

    .layout-with-sidebar .primary-content,
    .layout-with-sidebar .sidebar-area {
        width: 100%;
    }

    .layout-no-sidebar .primary-content {
        width: 100%;
    }

    .timeline-horizontal {
        padding-bottom: 1rem;
    }
}

@media (max-width: 600px) {
    html { font-size: 15px; }

    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.4rem; }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .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;
    }

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

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

    .cookie-inner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .entry-title {
        font-size: 1.5rem;
    }

    .fp-section {
        padding: 2.5rem 0;
    }

    .spec-plate {
        font-size: 0.8rem;
        padding: 1rem 1.2rem;
    }
}
