:root {
    --primary-color: #a855f7;
    --secondary-color: #c084fc;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --heading-color: #6b21a8;
    --link-color: #a855f7;
    --body-bg: #ffffff;
    --content-bg: #faf5ff;
    --card-bg: #ffffff;
    --border-color: #f3e8ff;
    --footer-bg: #6b21a8;
    --footer-color: #e9d5ff;
    --font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;

    /* Hover effects - automatically darken */
    --hover-darken: brightness(0.85);
}


/**
 * Базовые стили - автоматически добавляются ко всем сайтам
 * Используют CSS переменные из color_schemes
 */

/* Общие стили body */
body {
    background: var(--body-bg, #ffffff);
    color: var(--text-primary, #1f2937);
    font-family: var(--font-family, Arial, sans-serif);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color, #111827);
    font-weight: 700;
    line-height: 1.3;
}

/* Ссылки с автоматическим затемнением при hover */
a {
    color: var(--link-color, #2563eb);
    text-decoration: none;
    transition: filter 0.3s ease;
}

a:hover {
    filter: brightness(0.85);
}

/* Параграфы */
p {
    color: var(--text-primary, #1f2937);
    line-height: 1.7;
}

/* Вторичный текст (small, meta, dates) */
small, .text-secondary {
    color: var(--text-secondary, #6b7280);
}

/* Границы */
hr {
    border: none;
    border-top: 1px solid var(--border-color, #e5e7eb);
    margin: 2rem 0;
}

/* Карточки */
.card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    padding: 1.5rem;
}

/* Универсальный hover для интерактивных элементов */
button, .btn, .nav-link, .listing-item, .widget-link {
    transition: filter 0.3s ease, transform 0.3s ease;
}

button:hover, .btn:hover {
    filter: brightness(0.9);
}

/* Отключаем синий outline, добавляем свой */
*:focus {
    outline: 2px solid var(--primary-color, #2563eb);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

/* Selection */
::selection {
    background: var(--primary-color, #2563eb);
    color: white;
}



/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Переменные генерируются автоматически в builder.php */

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary, #333);
    background: var(--body-bg, #fff);
}

.main-content {
    min-height: 60vh;
    padding: 2rem 0;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-container h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.content-container h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--heading-color, #444);
    font-weight: 600;
}

.content-container p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-primary, #555);
}

.content-container ul {
    margin: 1rem 0 1.5rem 2rem;
    line-height: 1.8;
}

.content-container li {
    margin-bottom: 0.5rem;
    color: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .content-container h1 {
        font-size: 2rem;
    }
    
    .content-container p {
        font-size: 1rem;
    }
}

/* Blog Homepage Styles */
.blog-welcome {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 1rem;
}

.blog-welcome h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color, #2563eb);
}

.blog-welcome p {
    font-size: 1.2rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

/* Blog Article Styles */
.blog-article {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #111;
}

.article-meta {
    font-size: 0.9rem;
    color: #999;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-content h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #222;
}

.article-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .blog-welcome h1 {
        font-size: 2rem;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
}

/* About Page Styles */
.about-intro {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: #555;
}

/* Contact Page Styles */
.contact-intro {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: #555;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.contact-item {
    padding: 1.5rem;
    background: var(--content-bg, #f9fafb);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #222;
}

.contact-item p {
    margin: 0;
    color: #666;
}

.contact-item a {
    color: var(--primary-color, #2563eb);
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}



.site-header {
    background: var(--primary-color, #333);
    color: white;
    padding: 0.87rem 0;
    box-shadow: 0 2.82px 6.6px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px, 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-family, Arial, sans-serif);
    font-size: 1.77rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.logo a:hover {
    opacity: 0.8;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}



.navigation {
    padding: 0.46rem 0;
}

.nav-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Скрываем чекбокс */
.nav-toggle {
    display: none;
}

/* Бургер кнопка (скрыта на десктопе) */
.nav-toggle-label {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

.nav-toggle-label span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Анимация бургера при открытии */
.nav-toggle:checked + .nav-toggle-label span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.nav-toggle:checked + .nav-toggle-label span:nth-child(2) {
    opacity: 0;
}

.nav-toggle:checked + .nav-toggle-label span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 2.41rem;
}

.nav-item {
    display: inline-block;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary, #333);
    font-weight: 578.43;
    padding: 0.59rem 1.27rem;
    display: block;
    font-size: 0.92rem;
}

/* Hover обрабатывается базовыми стилями (filter: brightness(0.85)) */

/* АДАПТИВ ДЛЯ МОБИЛЬНЫХ */
@media (max-width: 768px) {
    .navigation {
        padding: 0.75rem 0;
    }
    
    /* Показываем бургер */
    .nav-toggle-label {
        display: flex;
    }
    
    /* Прячем меню по умолчанию */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 999;
    }
    
    /* Показываем меню при активном чекбоксе */
    .nav-toggle:checked ~ .nav-menu {
        max-height: 500px;
    }
    
    .nav-item {
        display: block;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
    }
    
    .nav-link:hover {
        background: var(--content-bg, #f9fafb);
    }
}

/* Планшеты */
@media (max-width: 992px) and (min-width: 769px) {
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.95rem;
    }
}


.listing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.listing-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color, #333);
    font-weight: 700;
}

.listing-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.listing-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.listing-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.listing-item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.listing-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-item-content {
    padding: 1.5rem;
}

.listing-item-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.listing-item-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.listing-item-title a:hover {
    color: var(--primary-color, #2563eb);
}

.listing-item-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.listing-item-date {
    font-size: 0.85rem;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .listing-grid {
        grid-template-columns: 1fr;
    }
    
    .listing-title {
        font-size: 2rem;
    }
}



.site-footer {
    background: var(--footer-bg, #222);
    color: var(--footer-color, #ccc);
    padding: 1.92rem 0;
    margin-top: 3.71rem;
    border-top: 2.53px solid var(--primary-color, #333);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 26.53px;
}

.footer-content {
    text-align: center;
    font-family: var(--font-family, Arial, sans-serif);
}

.footer-content p {
    margin: 0.59rem 0;
    font-size: 0.93rem;
}

.footer-text {
    opacity: 0.83;
}

