/*
Theme Name: ChinaBusinessInsider_925
Theme URI: https://tanyasubbotina.ru
Author: Aisha Gainullina
Description: Блог о бизнесе с Китаем: от поиска поставщиков и переговоров до импорта, логистики и рыночных трендов. Статьи, кейсы и аналитика для предпринимателей, развивающих торговлю с КНР.
Version: 1.1
Text Domain: chinabusinessinsider
*/

/* ========== CSS VARIABLES ========== */
:root {
    --color-primary: #0A1F44;
    --color-accent: #C44536;
    --color-accent-hover: #A33A2E;
    --color-white: #FFFFFF;
    --color-bg-light: #F8F9FA;
    --color-rice-paper: #E8E6E1;
    --color-text: #2D2D2D;
    --color-text-light: #6B7280;
    --color-border: #D1D5DB;
    --font-heading: 'Montserrat', 'Museo Sans Cyrl', sans-serif;
    --font-body: 'PT Serif', Georgia, serif;
    --font-ui: 'Montserrat', sans-serif;
    --radius: 4px;
    --shadow-sm: 0 1px 3px rgba(10, 31, 68, 0.08);
    --shadow-md: 0 4px 12px rgba(10, 31, 68, 0.1);
    --shadow-lg: 0 8px 30px rgba(10, 31, 68, 0.12);
    --shadow-hover: 0 6px 20px rgba(10, 31, 68, 0.15);
    --transition: 0.3s ease;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.75;
    overflow-x: hidden;
}

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

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

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

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.85rem; }
h3 { font-size: 1.375rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.125rem; margin-bottom: 0.5rem; }

p {
    margin-bottom: 1.25rem;
}

blockquote {
    background: var(--color-rice-paper);
    border-left: 4px solid var(--color-accent);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    position: relative;
}

blockquote::before {
    content: '\201C';
    font-size: 4rem;
    color: var(--color-accent);
    opacity: 0.3;
    position: absolute;
    top: -0.5rem;
    left: 0.5rem;
    font-family: var(--font-heading);
    line-height: 1;
}

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

.site-content {
    min-height: 60vh;
}

/* ========== HEADER ========== */
.site-header {
    background: var(--color-primary);
    position: relative;
    z-index: 100;
}

.header-top-bar {
    background: rgba(0, 0, 0, 0.15);
    padding: 0.4rem 0;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.header-top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top-bar a {
    color: rgba(255, 255, 255, 0.7);
}

.header-top-bar a:hover {
    color: var(--color-white);
}

.header-main {
    padding: 1.25rem 0;
}

.header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.site-logo img,
.site-logo svg {
    height: 50px;
    width: auto;
}

.site-title-group {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.2;
}

.site-title a {
    color: var(--color-white);
}

.site-title a:hover {
    color: var(--color-rice-paper);
}

.site-description {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.15rem;
    max-width: 280px;
    line-height: 1.4;
}

/* Stamp / Chop */
.chop-stamp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid var(--color-accent);
    border-radius: 4px;
    color: var(--color-accent);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    position: relative;
    transform: rotate(-3deg);
}

.chop-stamp::after {
    content: '';
    position: absolute;
    inset: 2px;
    border: 1px solid var(--color-accent);
    border-radius: 2px;
    opacity: 0.5;
}

/* ========== NAVIGATION ========== */
.main-navigation {
    font-family: var(--font-ui);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all var(--transition);
    white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
}

/* Submenu */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-white);
    min-width: 220px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    padding: 0.5rem 0;
    z-index: 200;
}

.main-navigation li:hover > ul {
    display: flex;
}

.main-navigation ul ul a {
    color: var(--color-text);
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    border-radius: 0;
}

.main-navigation ul ul a:hover {
    background: var(--color-bg-light);
    color: var(--color-accent);
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: all var(--transition);
}

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

/* Search toggle in header */
.header-search-toggle {
    background: none;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-ui);
}

.header-search-toggle:hover {
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
}

.header-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 31, 68, 0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.header-search-overlay.active {
    display: flex;
}

.header-search-overlay .search-form-inner {
    width: 90%;
    max-width: 600px;
}

.header-search-overlay input[type="search"] {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.25rem;
    font-family: var(--font-body);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    outline: none;
    transition: border-color var(--transition);
}

.header-search-overlay input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.header-search-overlay input[type="search"]:focus {
    border-color: var(--color-accent);
}

.search-overlay-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity var(--transition);
}

.search-overlay-close:hover {
    opacity: 1;
}

/* ========== HERO SECTION (Front Page) ========== */
.hero-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, #132B55 60%, #1A3668 100%);
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400" opacity="0.04"><text x="50%" y="50%" font-size="300" text-anchor="middle" dominant-baseline="middle" fill="white" font-family="serif">商</text></svg>') no-repeat center;
    background-size: contain;
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(transparent, rgba(10, 31, 68, 0.3));
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-label {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(196, 69, 54, 0.4);
    border-radius: var(--radius);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--color-white);
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.hero-title span {
    color: var(--color-accent);
}

.hero-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-white);
    line-height: 1;
}

.hero-stat-label {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: var(--color-white);
    box-shadow: var(--shadow-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    border-color: var(--color-white);
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.08);
}

.btn-outline-dark {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline-dark:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.825rem;
}

/* ========== SECTIONS ========== */
.section {
    padding: 4rem 0;
}

.section-rice {
    background: var(--color-rice-paper);
}

.section-light {
    background: var(--color-bg-light);
}

.section-dark {
    background: var(--color-primary);
}

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

.section-header h2 {
    font-size: 2rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 2px;
}

.section-header p {
    color: var(--color-text-light);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 1rem auto 0;
}

/* ========== POST CARDS ========== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

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

.post-card-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.post-card-featured .post-card-image {
    height: 100%;
    min-height: 320px;
}

.post-card-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: var(--color-rice-paper);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.post-card-image .post-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--color-accent);
    color: var(--color-white);
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    z-index: 2;
}

.post-card-no-image {
    height: 220px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #1A3668 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.post-card-no-image::after {
    content: '商';
    font-size: 6rem;
    color: rgba(255, 255, 255, 0.06);
    font-family: serif;
    position: absolute;
}

.post-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.post-card-meta-divider {
    width: 3px;
    height: 3px;
    background: var(--color-text-light);
    border-radius: 50%;
    opacity: 0.5;
}

.post-card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.post-card-title a {
    color: var(--color-primary);
}

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

.post-card-excerpt {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1rem;
}

.post-card-excerpt a {
    color: var(--color-accent);
    text-decoration: underline;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.read-more-link {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all var(--transition);
}

.read-more-link:hover {
    gap: 0.7rem;
    color: var(--color-accent-hover);
}

.read-more-link::after {
    content: '\2192';
    transition: transform var(--transition);
}

.read-more-link:hover::after {
    transform: translateX(3px);
}

.post-card-reading-time {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: var(--color-text-light);
}

/* ========== FEATURED SLIDER ========== */
.featured-slider-section {
    background: var(--color-primary);
    padding: 0;
    position: relative;
}

.featured-slider {
    position: relative;
    overflow: hidden;
}

.featured-slide {
    display: none;
    position: relative;
    min-height: 450px;
}

.featured-slide.active {
    display: flex;
    align-items: center;
}

.featured-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.featured-slide-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10,31,68,0.92) 0%, rgba(10,31,68,0.7) 50%, rgba(10,31,68,0.4) 100%);
}

.featured-slide-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 4rem 0;
}

.featured-slide-content .post-category-badge {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-white);
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.featured-slide-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-white);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.featured-slide-title a {
    color: var(--color-white);
}

.featured-slide-title a:hover {
    color: var(--color-rice-paper);
}

.featured-slide-excerpt {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.slider-controls {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 0.5rem;
    z-index: 5;
}

.slider-btn {
    width: 42px;
    height: 42px;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.2);
    color: var(--color-white);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition);
}

.slider-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 5;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.slider-dot.active {
    background: var(--color-accent);
    width: 24px;
    border-radius: 4px;
}

/* ========== SINGLE POST ========== */
.single-post-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, #132B55 100%);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.single-post-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(196, 69, 54, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.single-post-meta-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.single-post-header h1 {
    color: var(--color-white);
    font-size: 2.5rem;
    line-height: 1.2;
    max-width: 800px;
}

.single-post-meta-bottom {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    flex-wrap: wrap;
}

.single-post-meta-bottom a {
    color: rgba(255, 255, 255, 0.8);
}

.single-post-content {
    padding: 3rem 0;
}

.single-post-content .container {
    max-width: 800px;
}

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

.entry-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.entry-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.entry-content ul, .entry-content ol {
    margin: 1.25rem 0;
    padding-left: 1.75rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content pre {
    background: var(--color-primary);
    color: #E0E0E0;
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.entry-content code {
    background: var(--color-rice-paper);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    color: var(--color-accent);
}

.entry-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.entry-content th,
.entry-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.entry-content th {
    background: var(--color-bg-light);
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.9rem;
}

/* Post tags at bottom */
.post-tags {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-tags-label {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
}

.post-tag {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    background: var(--color-bg-light);
    color: var(--color-text-light);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.post-tag:hover {
    background: var(--color-accent);
    color: var(--color-white);
}

/* Post navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.post-nav-item {
    padding: 1.25rem;
    background: var(--color-bg-light);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.post-nav-item:hover {
    background: var(--color-rice-paper);
}

.post-nav-item.next {
    text-align: right;
}

.post-nav-label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
    margin-bottom: 0.4rem;
}

.post-nav-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.4;
}

.post-nav-item a:hover .post-nav-title {
    color: var(--color-accent);
}

/* Author box */
.author-box {
    display: flex;
    gap: 1.5rem;
    background: var(--color-bg-light);
    padding: 2rem;
    border-radius: var(--radius);
    margin-top: 3rem;
    border-left: 4px solid var(--color-accent);
}

.author-box-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-box-name {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.author-box-bio {
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* ========== COMMENTS ========== */
.comments-section {
    padding: 3rem 0;
    background: var(--color-bg-light);
}

.comments-section .container {
    max-width: 800px;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

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

.comment {
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.comment .children {
    list-style: none;
    padding-left: 2rem;
    margin-top: 1.25rem;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.comment-header img {
    border-radius: 50%;
}

.comment-author-name {
    font-family: var(--font-ui);
    font-weight: 600;
    color: var(--color-primary);
}

.comment-date {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.comment-content p {
    font-size: 0.95rem;
    line-height: 1.7;
}

.comment-reply-link {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent);
}

/* Comment form */
.comment-respond {
    margin-top: 2.5rem;
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.comment-respond h3 {
    margin-bottom: 1.5rem;
}

.comment-form-field {
    margin-bottom: 1.25rem;
}

.comment-form-field label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.4rem;
}

.comment-form-field input,
.comment-form-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg-light);
    color: var(--color-text);
    transition: border-color var(--transition);
    outline: none;
}

.comment-form-field input:focus,
.comment-form-field textarea:focus {
    border-color: var(--color-accent);
    background: var(--color-white);
}

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

/* ========== PAGINATION ========== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    font-family: var(--font-ui);
}

.pagination-wrapper .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.5rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    transition: all var(--transition);
}

.pagination-wrapper .page-numbers:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

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

.pagination-wrapper .page-numbers.dots {
    border: none;
    cursor: default;
}

/* ========== SIDEBAR ========== */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 3rem;
    align-items: start;
}

.sidebar .widget {
    background: var(--color-white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.sidebar .widget-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-accent);
}

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

.sidebar .widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-bg-light);
}

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

.sidebar .widget a {
    font-family: var(--font-ui);
    font-size: 0.88rem;
    color: var(--color-text);
}

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

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

.search-form .search-field {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 1.5px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-text);
    outline: none;
    background: var(--color-bg-light);
    transition: border-color var(--transition);
}

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

.search-form .search-submit {
    padding: 0.65rem 1.25rem;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background var(--transition);
}

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

/* ========== FOOTER ========== */
.site-footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
}

.footer-widgets {
    padding: 3.5rem 0 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.footer-widget-area .widget-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-accent);
}

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

.footer-widget-area li {
    margin-bottom: 0.5rem;
}

.footer-widget-area a {
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-ui);
    font-size: 0.88rem;
    transition: color var(--transition);
}

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

.footer-widget-area p {
    font-size: 0.92rem;
    line-height: 1.6;
}

.footer-bottom {
    padding: 1.5rem 0;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
}

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

/* ========== PAGE TEMPLATE ========== */
.page-header-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, #132B55 100%);
    padding: 3.5rem 0 2.5rem;
    position: relative;
}

.page-header-section h1 {
    color: var(--color-white);
    font-size: 2.25rem;
}

.page-header-breadcrumbs {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.75rem;
}

.page-header-breadcrumbs a {
    color: rgba(255, 255, 255, 0.7);
}

.page-header-breadcrumbs a:hover {
    color: var(--color-white);
}

.page-content-section {
    padding: 3rem 0;
}

.page-content-section .container {
    max-width: 800px;
}

/* ========== SCROLL TO TOP ========== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 50;
}

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

.scroll-to-top:hover {
    background: var(--color-accent-hover);
    transform: translateY(-3px);
}

/* ========== 404 ========== */
.error-404-section {
    padding: 6rem 0;
    text-align: center;
}

.error-404-code {
    font-family: var(--font-heading);
    font-size: 8rem;
    font-weight: 800;
    color: var(--color-rice-paper);
    line-height: 1;
}

.error-404-section h1 {
    font-size: 2rem;
    margin-top: 1rem;
}

.error-404-section p {
    color: var(--color-text-light);
    max-width: 500px;
    margin: 1rem auto 2rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .post-card-featured {
        grid-template-columns: 1fr;
    }

    .post-card-featured .post-card-image {
        min-height: 250px;
    }

    .hero-stats {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --max-width: 100%;
    }

    .header-top-bar {
        display: none;
    }

    .header-main .container {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: flex;
    }

    .main-navigation {
        display: none;
        width: 100%;
        order: 10;
    }

    .main-navigation.active {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation a {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 0;
        padding: 0;
    }

    .main-navigation ul ul a {
        color: rgba(255, 255, 255, 0.7);
        padding-left: 1.5rem;
    }

    .hero-section {
        padding: 3rem 0 2.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .hero-stat {
        flex: 1;
        min-width: 80px;
    }

    .single-post-header h1 {
        font-size: 1.75rem;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    .section {
        padding: 3rem 0;
    }

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

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

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .featured-slide-title {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
    }

    .post-card-body {
        padding: 1.25rem;
    }
}

/* ========== ACCESSIBILITY ========== */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    clip: auto !important;
    color: var(--color-primary);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
