/* ==========================================
   СТИЛИ ДЛЯ СТАТИЧЕСКИХ СТРАНИЦ
   Используют ту же структуру что и посты
   ========================================== */

/* Основной контейнер страницы - убираем все отступы */
.page-content {
    padding: 0 !important;
}

/* Убираем отступы у основного элемента страницы */
.single-post-main {
    padding: 1rem 0 !important;
    margin: 0 !important;
}

/* Убираем отступы у контейнера */
.single-post-main .container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Используем те же стили что у постов для единообразия */
.single-content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    margin: 1rem 0;
}

/* Основной контент страницы использует стили article-main */
.article-main {
    background: #ffffff;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

/* Заголовок страницы - используем стили от article-header */
.article-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-100);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

/* Миниатюра страницы - используем стили от article-featured-image */
.article-featured-image {
    margin-bottom: 2rem;
    text-align: center;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.article-featured-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Контент страницы - используем стили от article-content */
.article-content {
    font-size: var(--font-size-lg);
    line-height: 1.7;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.article-content h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.article-content h4 {
    font-size: 1.25rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

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

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--gray-50);
    font-style: italic;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* Сайдбар страницы */
.page-sidebar {
    background: var(--gray-50);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.page-sidebar .widget {
    margin-bottom: 2rem;
}

.page-sidebar .widget:last-child {
    margin-bottom: 0;
}

.page-sidebar .widget-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Метаинформация страницы */
.page-meta {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.edit-page-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.edit-page-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Навигация по страницам */
.page-links {
    text-align: center;
    margin: 2rem 0;
    font-weight: 600;
}

.page-links a {
    display: inline-block;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.page-links a:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .page-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .page-main-content {
        padding: 1.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-sidebar {
        order: -1; /* Сайдбар вверху на мобильных */
        position: static;
    }
    
    .page-content {
        font-size: var(--font-size-base);
    }
    
    .page-content h2 {
        font-size: 1.5rem;
    }
    
    .page-content h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .page-content {
        padding: 1rem 0;
    }
    
    .page-main-content {
        padding: 1rem;
    }
    
    .page-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
}