/* 
 * Phuket Guide Blog - Main Styles
 * Based on HTML templates with WordPress integration
 */

:root {
    --primary: #11B9DE;
    --primary-hover: #0ea5c6;
    --primary-bg: #E7F8FC;
    --text-main: #111827;
    --text-sec: #6B7280;
    --bg-body: #F9FAFB;
    --bg-card: #FFFFFF;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --header-height: 70px;
    --bottom-nav-height: 70px;
    --radius: 16px;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    padding-top: var(--header-height);
    padding-bottom: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

@media (max-width: 992px) {
    body { 
        padding-bottom: var(--bottom-nav-height); 
    }
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: color 0.2s; 
}

ul, ol { 
    list-style: none; 
}

img { 
    display: block; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

button { 
    font-family: inherit; 
}

/* === HEADER === */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.header-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 1002;
}

.logo img {
    width: auto;
    height: 50px;
    object-fit: contain;
}

.logo span { 
    color: var(--primary); 
}

.header-nav {
    display: flex;
    flex-direction: row;
    gap: 45px;
}

.header-nav ul {
    display: flex;
    flex-direction: row;
    gap: 45px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-nav li {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.header-nav a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    display: inline-block;
}

.header-nav a:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-search {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
    transition: 0.2s;
}

.btn-search:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

/* Burger для мобильного */
.burger-trigger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    cursor: pointer;
    z-index: 1002;
}

.burger-line {
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: 0.3s;
}

/* === MOBILE MENU (Открывается справа) === */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.mobile-menu-sidebar {
    position: fixed;
    top: 0;
    right: 0; /* Меню справа */
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 1001;
    transform: translateX(100%); /* Скрыто справа */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 60px 0 0 0;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Кнопка закрытия мобильного меню */
.mobile-menu-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: var(--bg-body);
    color: var(--primary);
}

/* Навигация с прокруткой */
.mobile-menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

/* Футер меню */
.mobile-menu-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.mobile-menu-open .mobile-menu-overlay {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-open .mobile-menu-sidebar {
    transform: translateX(0);
}

/* Анимация бургера */
.mobile-menu-open .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-open .burger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-open .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mm-link {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.mm-sublink {
    display: block;
    padding: 8px 0 8px 15px;
    color: var(--text-sec);
    font-size: 0.95rem;
}

/* Сворачиваемые категории */
.mm-categories-toggle {
    border-bottom: 1px solid var(--border);
}

.mm-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--primary);
    user-select: none;
}

.mm-arrow {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.mm-toggle.active .mm-arrow {
    transform: rotate(180deg);
}

.mm-categories-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mm-categories-list.active {
    max-height: 1000px;
}

/* === LAYOUT GRID === */
.app-layout {
    max-width: 1280px;
    margin: 30px auto 60px;
    display: grid;
    grid-template-columns: 200px 1fr 300px;
    gap: 40px;
    padding: 0 20px;
}

/* === SIDEBAR LEFT === */
.sidebar-left {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.nav-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-vertical a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    border-radius: 12px;
    color: var(--text-sec);
    font-weight: 600;
    transition: 0.2s;
}

.nav-vertical a:hover,
.nav-vertical a.active {
    background-color: var(--primary-bg);
    color: var(--primary);
}

.nav-vertical i {
    width: 24px;
    text-align: center;
    font-size: 1.2rem;
}

/* === MAIN FEED === */
.main-feed {
    width: 100%;
    min-width: 0;
}

/* === CATEGORIES (STICKY) === */
.categories-wrapper {
    position: relative;
    z-index: 90;
    background: var(--bg-body);
    padding: 15px 0 20px;
    margin: 0 -20px;
    display: flex;
    align-items: center;
}

.categories-scroll-container {
    overflow-x: auto;
    scrollbar-width: none;
    display: flex;
    flex-grow: 1;
    scroll-behavior: smooth;
}

.categories-scroll-container::-webkit-scrollbar {
    display: none;
}

.categories-list {
    display: flex;
    gap: 10px;
    padding: 0 10px;
    margin: 0 auto;
}

.categories-scroll-container {
    justify-content: start;
}

.category-pill {
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-sec);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.category-pill.active {
    background: var(--text-main);
    color: white;
    border-color: var(--text-main);
}

.category-pill:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
}

.cat-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-sec);
    flex-shrink: 0;
    margin: 0 10px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.cat-arrow:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

/* === FEATURED SLIDER === */
.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 10px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title a {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

.slider-wrapper {
    position: relative;
    margin: 0 -20px;
    padding: 0 20px;
}

.featured-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
    scrollbar-width: none;
    margin: 0;
    padding: 0 0 20px 0;
    scroll-behavior: smooth;
}

.featured-slider::-webkit-scrollbar {
    display: none;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: var(--text-main);
    transition: all 0.2s;
}

.slider-arrow:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.slider-arrow.prev {
    left: -15px;
}

.slider-arrow.next {
    right: -15px;
}

.featured-card {
    min-width: 280px;
    height: 320px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: var(--shadow-md);
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
}

.featured-tag {
    background: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: inline-block;
}

/* === BLOG POSTS === */
.post-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: 0.2s;
}

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

.post-img-wrap {
    height: 280px;
    position: relative;
}

.post-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-excerpt {
    font-size: 0.95rem;
    color: var(--text-sec);
    margin-bottom: 20px;
    line-height: 1.6;
}

.post-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-read {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-read:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* === SIDEBAR RIGHT === */
.sidebar-right {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.widget {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.widget h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.trend-row {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    align-items: center;
}

.trend-num {
    font-size: 1.2rem;
    font-weight: 800;
    color: #E5E7EB;
    width: 20px;
}

.trend-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
}

.trend-info span {
    font-size: 0.8rem;
    color: var(--text-sec);
}

/* === PAGINATION === */
.pagination {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    display: inline-block;
}

.page-btn,
.pagination a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.2s;
}

.page-btn:hover,
.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.page-btn.active,
.pagination .current,
.pagination .current span {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

.page-dots {
    color: var(--text-sec);
    font-weight: 600;
    padding: 0 5px;
}

/* === SINGLE POST STYLES === */
.article-layout {
    max-width: 1200px;
    margin: 40px auto 60px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 820px 320px;
    gap: 40px;
    justify-content: center;
}

.article-layout > main {
    width: 820px;
    max-width: 820px;
    overflow: hidden;
}

.article-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

.article-top-bar {
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: white;
    flex-wrap: wrap;
    gap: 15px;
}

.meta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-sec);
}

.meta-item i {
    color: var(--primary);
    font-size: 1rem;
}

.article-hero-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 450px;
    overflow: hidden;
}

.article-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-badge-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: white;
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-content {
    padding: 40px;
}

.breadcrumb-container {
    margin-bottom: 20px;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-sec);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

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

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: var(--border);
}

.article-header {
    margin-bottom: 30px;
}

.article-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-main);
    margin-top: 0;
}

.article-lead {
    font-size: 1.15rem;
    color: var(--text-sec);
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 500;
}

.btn-read-aloud {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    background: #F3F4F6;
    color: var(--text-main);
    border: none;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
	background:#379bca;
}

.btn-read-aloud:hover {
    background: #379bca;
    color: #fff;
}

.content-body {
    font-size: 1.05rem;
    color: #374151;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.content-body img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
}

.content-body p {
    margin-bottom: 24px;
}

.content-body h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 40px 0 20px;
    color: var(--text-main);
}

.content-body h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 30px 0 15px;
}

.content-body ul,
.content-body ol {
    margin-bottom: 24px;
    padding-left: 40px;
    color: #374151;
}

.content-body ul {
    list-style-type: disc;
}

.content-body ol {
    list-style-type: decimal;
}

.content-body li {
    margin-bottom: 10px;
    display: list-item;
}

.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: auto;
}

.content-body table thead {
    background: var(--primary-bg);
}

.content-body table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 2px solid var(--border);
}

.content-body table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    color: #374151;
}

.content-body table tbody tr:hover {
    background: var(--bg-body);
}

.content-body table tbody tr:last-child td {
    border-bottom: none;
}

.content-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    font-style: italic;
    color: var(--text-main);
    font-size: 1.1rem;
    background: var(--bg-body);
    padding: 20px;
    border-radius: 0 12px 12px 0;
    margin: 30px 0;
}

/* Кастомные блоки цитат через шорткоды */
.custom-blockquote {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    margin: 30px 0;
}

.custom-blockquote.blockquote-quote {
    background: #F3F4F6;
    border-left: 4px solid var(--primary);
}

.custom-blockquote.blockquote-warning {
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
}

.custom-blockquote.blockquote-info {
    background: #EFF6FF;
    border-left: 4px solid #3B82F6;
}

.custom-blockquote.blockquote-danger {
    background: #FEE2E2;
    border-left: 4px solid #EF4444;
}

.custom-blockquote.blockquote-check {
    background: #D1FAE5;
    border-left: 4px solid #10B981;
}

.blockquote-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.blockquote-content {
    flex: 1;
}

/* Блокквоты с прямыми классами (не через шорткоды) */
.content-body blockquote.warning,
.content-body blockquote.info,
.content-body blockquote.danger,
.content-body blockquote.check,
.content-body blockquote.quote {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    margin: 30px 0;
    border-left: 4px solid;
    position: relative;
}

.content-body blockquote.warning::before,
.content-body blockquote.info::before,
.content-body blockquote.danger::before,
.content-body blockquote.check::before,
.content-body blockquote.quote::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.content-body blockquote.warning {
    background: #FEF3C7;
    border-left-color: #F59E0B;
    color: #92400E;
}

.content-body blockquote.warning::before {
    content: "\f071";
    color: #F59E0B;
}

.content-body blockquote.info {
    background: #EFF6FF;
    border-left-color: #3B82F6;
    color: #1E40AF;
}

.content-body blockquote.info::before {
    content: "\f05a";
    color: #3B82F6;
}

.content-body blockquote.danger {
    background: #FEE2E2;
    border-left-color: #EF4444;
    color: #991B1B;
}

.content-body blockquote.danger::before {
    content: "\f06a";
    color: #EF4444;
}

.content-body blockquote.check {
    background: #D1FAE5;
    border-left-color: #10B981;
    color: #065F46;
}

.content-body blockquote.check::before {
    content: "\f058";
    color: #10B981;
}

.content-body blockquote.quote {
    background: #F3F4F6;
    border-left-color: var(--primary);
    color: var(--text-main);
}

.content-body blockquote.quote::before {
    content: "\f10d";
    color: var(--primary);
}

/* Спойлер */
.spoiler-box {
    margin: 30px 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.spoiler-title {
    padding: 15px 20px;
    background: #F3F4F6;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spoiler-title:hover {
    background: #E5E7EB;
}

.spoiler-content {
    padding: 20px;
}

/* Мобильное оглавление */
.mobile-toc {
    display: none;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
}

.mobile-toc summary {
    padding: 15px 20px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #F3F4F6;
}

.mobile-toc summary::after {
    content: '\f078';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    transition: transform 0.2s;
}

.mobile-toc[open] summary::after {
    transform: rotate(180deg);
}

.mobile-toc-content {
    padding: 20px;
    background: white;
}

.mobile-toc-content ol {
    list-style: none;
}

.mobile-toc-content .toc-root {
    list-style: none;
}

/* Десктоп оглавление (сворачивается) */
.toc-widget .toc-content {
    max-height: 500px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

.toc-widget.collapsed .toc-content {
    max-height: 0;
    overflow: hidden;
}

.toc-widget.collapsed .toc-icon {
    transform: rotate(-90deg);
}

.toc-icon {
    transition: transform 0.3s ease;
}

.toc-root {
    padding-left: 0;
    counter-reset: section;
    list-style: none;
}

.toc-root ol {
    list-style: none;
}

.toc-root li {
    margin-bottom: 10px;
    position: relative;
}

.toc-root > li {
    counter-increment: section;
}

.toc-root > li > a {
    font-weight: 400;
    color: var(--text-main);
    display: block;
    line-height: 1.4;
}

.toc-root > li > a::before {
    content: counter(section) ". ";
    color: var(--primary);
    font-weight: 800;
    margin-right: 5px;
}

.toc-root ol {
    counter-reset: subsection;
    padding-left: 20px;
    margin-top: 8px;
}

.toc-root ol > li {
    counter-increment: subsection;
}

.toc-root ol > li > a {
    font-size: 0.95rem;
    color: var(--text-sec);
}

.toc-root ol > li > a::before {
    content: counter(section) "." counter(subsection) ". ";
    color: var(--primary);
    font-weight: 700;
    margin-right: 5px;
}

.toc-root a:hover {
    color: var(--primary);
}

/* Лайки/Дизлайки */
.reaction-share-container {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.reaction-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.reaction-btns {
    display: flex;
    gap: 15px;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-sec);
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.reaction-btn:hover {
    border-color: var(--text-main);
    color: var(--text-main);
    background: #F9FAFB;
}

.reaction-btn.active {
    background: #ECFDF5;
    border-color: #10B981;
    color: #10B981;
}

.reaction-btn.dislike:hover {
    border-color: #EF4444;
    color: #EF4444;
    background: #FEF2F2;
}

.share-block h4 {
    font-size: 0.95rem;
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--text-main);
}

.social-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    font-size: 1.1rem;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

/* Список источников */
.sources-block {
    margin-top: 40px;
    padding: 30px;
    background: #F9FAFB;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.sources-block h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.sources-block ol {
    padding-left: 20px;
    list-style: none;
}

.sources-block li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    line-height: 1.6;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: list-item;
}

.sources-block li:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Похожие записи */
.related-section {
    margin-top: 40px;
    position: relative;
}

.section-title-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.related-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.related-slider::-webkit-scrollbar {
    display: none;
}

.scroll-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(17, 185, 222, 0.4);
}

.related-card {
    min-width: 300px;
    max-width: 300px;
    width: 300px;
    scroll-snap-align: start;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    flex: 0 0 auto;
    transition: 0.2s;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.related-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.related-body {
    padding: 15px;
}

.related-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    white-space: nowrap;
}

.related-meta {
    font-size: 0.8rem;
    color: var(--text-sec);
}

/* Category hero card */
.category-hero-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 35px;
    margin-bottom: 40px;
    display: flex;
    align-items: flex-start;
    gap: 30px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.category-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: linear-gradient(90deg, transparent, #F0FDFF);
    opacity: 0.6;
    pointer-events: none;
}

.cat-icon-box {
    width: 80px;
    height: 80px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(17, 185, 222, 0.15);
}

.cat-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.cat-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
    color: var(--text-main);
}

.cat-desc {
    font-size: 1.05rem;
    color: #4B5563;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 90%;
}

.cat-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    padding-top: 15px;
    border-top: 1px solid #F3F4F6;
}

.cat-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-stats i {
    color: var(--text-sec);
}

/* Search widget in sidebar */
.search-widget-group {
    margin-bottom: 12px;
    position: relative;
}

.search-widget-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1rem;
    z-index: 2;
    pointer-events: none;
}

.search-widget-input {
    width: 100%;
    padding: 14px;
    padding-left: 42px;
    border-radius: 12px;
    border: none;
    outline: none;
    background: white;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    cursor: default;
}

.search-widget-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: white;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-top: 5px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-widget-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.search-widget-footer {
    font-size: 0.85rem;
    text-align: center;
    margin-top: 15px;
    opacity: 0.85;
    line-height: 1.4;
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.search-modal.active {
    display: flex;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
}

.search-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1;
}

.search-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    border: none;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    z-index: 10;
    font-size: 1.2rem;
}

.search-modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

.search-modal-body {
    padding: 40px;
}

.search-form-modal {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 50px;
    border: 2px solid var(--border);
    outline: none;
    font-size: 1rem;
}

.search-input:focus {
    border-color: var(--primary);
}
.search-field{
	padding: 10px 5px;
    border-radius: 25px;
    border: 1px solid #E5E7EB;
}
.search-submit {
    border-radius: 25px;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    transition: 0.2s;
}

.search-submit:hover {
    background: var(--primary-hover);
}

/* === FOOTER === */
.site-footer {
    background: #1F2937;
    color: #E5E7EB;
    padding: 60px 0 20px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col p {
    font-size: 0.9rem;
    color: #9CA3AF;
    line-height: 1.6;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #9CA3AF;
    font-size: 0.95rem;
}

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

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    color: #6B7280;
    font-size: 0.85rem;
}

/* === BOTTOM NAV (MOBILE) === */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.bn-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
}

.bn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-sec);
    font-size: 0.7rem;
    width: 60px;
    cursor: pointer;
}

.bn-item i {
    font-size: 1.4rem;
}

.bn-item.active {
    color: var(--primary);
}

/* === RESPONSIVE === */

/* Tablet - адаптивная ширина для .article-layout */
@media (max-width: 1240px) {
    .article-layout {
        grid-template-columns: 1fr 320px;
    }
    
    .article-layout > main {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .app-layout {
        grid-template-columns: 1fr;
        margin-top: 10px;
    }
    
    .sidebar-left,
    .sidebar-right,
    .header-nav {
        display: none;
    }
    
    .burger-trigger {
        display: flex;
    }
    
    .bottom-nav {
        display: block;
    }
    
    .cat-arrow {
        display: none;
    }
    
    .slider-arrow {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .slider-arrow.prev {
        left: 5px;
    }
    
    .slider-arrow.next {
        right: 5px;
    }
    
    .slider-wrapper {
        margin: 0 -20px;
        padding: 0 20px;
    }
    
    .featured-slider {
        padding-right: 20px;
    }
    
    .categories-list {
        padding: 0 20px;
    }
    
    .categories-scroll-container {
        padding: 0;
    }
    
    .site-header {
        padding: 0 15px;
    }
    
    .header-inner {
        position: relative;
    }
    
    /* Бургер справа */
    .burger-trigger {
        order: 3;
        position: absolute;
        right: 0;
    }
    
    .logo {
        order: 2;
        margin: 0 auto;
    }
    
    .header-actions {
        order: 1;
        gap: 10px;
    }
    
    .btn-primary {
        display: none;
    }
    
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .post-card {
        margin: 0 0 25px 0;
    }
    
    .post-img-wrap {
        height: 220px;
    }
    
    /* Single post mobile */
    .article-layout {
        display: flex;
        flex-direction: column;
        gap: 25px;
        margin-top: 10px;
        padding: 0 15px;
    }
    
    .sidebar-wrapper {
        display: none;
    }
    
    .categories-wrapper {
        padding: 5px 0 10px;
        margin: 0 -15px;
    }
    
    .categories-wrapper .cat-arrow {
        display: none;
    }
    
    .article-hero-wrap {
        height: 250px;
    }
    
    .article-top-bar {
        padding: 12px 15px;
        justify-content: space-between;
    }
    
    .meta-group {
        gap: 12px;
    }
    
    .meta-item {
        font-size: 0.8rem;
    }
    
    .btn-read-aloud {
        padding: 4px 10px;
        font-size: 0.75rem;
        margin-left: 0;
    }
    
    .article-content {
        padding: 25px 15px;
    }
    
    .article-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
        line-height: 1.3;
    }
    
    .article-lead {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .content-body {
        font-size: 1rem;
    }
    
    .content-body h2 {
        font-size: 1.4rem;
        margin: 30px 0 15px;
    }
    
    .content-body h3 {
        font-size: 1.2rem;
        margin: 25px 0 10px;
    }
    
    .mobile-toc {
        display: block;
    }
    
    .site-footer {
        padding-bottom: 90px;
    }
    
    .related-card {
        min-width: 85vw;
    }
    
    .scroll-btn {
        width: 35px;
        height: 35px;
        font-size: 0.85rem;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
    }
    
    .scroll-btn:first-of-type {
        left: 5px;
    }
    
    .scroll-btn:last-of-type {
        right: 5px;
    }
    
    /* Category hero mobile */
    .category-hero-card {
        flex-direction: column;
        gap: 20px;
        padding: 25px;
    }
    
    .cat-icon-box {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .cat-title {
        font-size: 1.6rem;
    }
    
    .cat-desc {
        font-size: 0.95rem;
        max-width: 100%;
        margin-bottom: 15px;
    }
}

/* WordPress defaults */
.alignleft {
    float: left;
    margin-right: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
}

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

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-sec);
    margin-top: 10px;
}
