
:root {
    /* Цветовая палитра */
    --primary-color: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --accent-color: #10b981;
    --accent-dark: #059669;
    --text-main: #1f2937;
    --text-secondary: #4b5563;
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --bg-input: #f9fafb;
    --border-color: #e5e7eb;
    
    /* Отступы и размеры */
    --container-width: 1200px;
    --border-radius: 12px;
    --border-radius-sm: 6px;
    --border-radius-pill: 50px;
    
    /* Тени */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-focus: 0 0 0 3px rgba(59, 130, 246, 0.5);

    /* Анимации */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Сброс и базовые настройки */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Доступность и ссылки */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-base);
}

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

a.skip-link {
    position: absolute;
    top: -1000px;
    left: -1000px;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

a.skip-link:focus {
    position: static;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    background: var(--bg-card);
    padding: 1rem;
    z-index: 1000;
}

/* Лейаут и Контейнеры */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

#content {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Типографика */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1.entry-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-dark);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    margin-top: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin-top: 2rem;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Карточки контента */
.site-main article {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Кнопки */
.btn-box {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--border-radius-pill);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transform: translateY(0);
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
}

.btn:hover, .btn:focus {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

.btn:active {
    transform: translateY(-1px);
}

/* Изображения */
figure.wp-block-image {
    margin: 2rem 0;
    display: block;
    width: 100%;
}

figure.wp-block-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

figure.wp-block-image img:hover {
    transform: scale(1.01);
}

/* Цитаты */
blockquote {
    position: relative;
    padding: 2rem 2.5rem;
    margin: 2rem 0;
    background: #eff6ff;
    border-left: 5px solid var(--primary-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-style: italic;
    color: var(--text-main);
}

blockquote::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.2;
    line-height: 1;
}

blockquote p {
    margin-bottom: 0;
}

/* Списки */
ul.wp-block-list, ol.wp-block-list {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

ul.wp-block-list li, ol.wp-block-list li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

ul.wp-block-list li::marker {
    color: var(--primary-color);
}

/* Комментарии */
.comments-area {
    margin-top: 4rem;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.comments-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

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

.comment-list li.comment {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--bg-body);
    padding-bottom: 2rem;
}

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

.comment-box {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 1.5rem;
}

.comment-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
    border: 3px solid var(--bg-body);
}

.comment-meta {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    font-style: normal;
}

.comment-time {
    font-size: 0.875rem;
    color: #9ca3af;
}

.comment-text p {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    transition: color 0.2s;
}

.comment-reply-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Форма комментариев */
.comment-respond {
    margin-top: 3rem;
    background: var(--bg-body);
    padding: 2rem;
    border-radius: var(--border-radius);
}

.comment-reply-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.comment-form p {
    margin-bottom: 1.5rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-card);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition-base);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-focus);
}

.comment-form .submit {
    background: var(--accent-color);
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-base);
}

.comment-form .submit:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.comment-smiles img {
    margin-right: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

.comment-smiles img:hover {
    transform: scale(1.2);
}

/* Подвал (Footer) */
.site-footer {
    background-color: #111827;
    color: #d1d5db;
    padding: 3rem 0;
    margin-top: auto;
}

.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
}

.site-footer a {
    color: white;
    opacity: 0.8;
}

.site-footer a:hover {
    opacity: 1;
    color: var(--primary-light);
}

/* Кнопка "Наверх" */
.scrolltop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.8;
    transition: var(--transition-base);
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.scrolltop::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-top: 2px solid white;
    border-left: 2px solid white;
    transform: translate(-50%, -25%) rotate(45deg);
}

.scrolltop:hover {
    opacity: 1;
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .site-main article {
        padding: 1.5rem;
    }
    
    .comment-box {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .comment-avatar {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .comment-avatar img {
        width: 48px;
        height: 48px;
    }
    
    .comment-avatar::after {
        content: attr(data-author-name); /* Fallback logic needed in html usually, CSS purely styling */
        font-weight: bold;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    h1.entry-title {
        margin-top: 1rem;
    }
    
    .scrolltop {
        bottom: 1rem;
        right: 1rem;
    }
}
