/*
Theme Name: Feo
Author: Feodemon
Author URI: feodemon.ru
Description: тема для feodemon.ru
Version: 1.0
*/
.site-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-description {
    color: white;
    text-align: right;
    font-size: 16px;
    margin-top: 10px;
}

/* Для мобильных устройств — уменьшаем шрифт и выравниваем по центру */
@media (max-width: 768px) {
    .header-description {
        text-align: center;
        font-size: 14px;
        padding: 0 15px;
    }
}

/* Центрирование всех изображений в статьях */
.single .entry-content img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    height: auto;
}

/* Центрирование iframe (видео, карты и т. д.) */
.single .entry-content iframe {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

/* Центрирование таблиц */
.single .entry-content table {
    margin-left: auto;
    margin-right: auto;
}

/* Центрирование цитат */
.single .entry-content blockquote {
    margin-left: auto;
    margin-right: auto;
    max-width: 80%;
    text-align: center;
}

/* Адаптивность: на мобильных устройствах центрирование может быть менее строгим */
@media (max-width: 768px) {
    .single .entry-content img,
    .single .entry-content iframe,
    .single .entry-content table,
    .single .entry-content blockquote {
        margin-left: 15px;
        margin-right: 15px;
    }
}


/* Убираем отступ для админ‑бара */
.admin-bar {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Убираем отступы по умолчанию у body */
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	height: 100%;
    margin: 0;
    padding: 0;
}

/* Шапка сайта — уменьшенная высота и без отступов */
.site-header {
    background: linear-gradient(to right, #1e3c72, #2a5298);
    padding: 8px 0; /* Уменьшенная высота padding */
    margin: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Уменьшенные отступы слева и справа */
}

/* Логотип */
.logo img {
    transition: transform 0.3s ease;
}
.logo img:hover {
    transform: scale(1.05);
}

/* Название сайта */
.site-title h1 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}
.site-title a {
    color: white;
    text-decoration: none;
}

/* Правая часть — авторизация/профиль */
.user-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Кнопки входа/регистрации */
.auth-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}
.auth-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}
.login {
    background: rgba(255, 255, 255, 0.1);
}
.register {
    background: rgba(255, 255, 255, 0.2);
}

/* Профиль пользователя */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px; /* Отступ между аватаром, информацией и кнопкой */
}

/* Аватар */
.user-profile img {
    flex-shrink: 0; /* Фиксированный размер аватара */
}

/* Блок с информацией о пользователе */
.user-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

/* Имя пользователя (верхняя строка) */
.username {
    font-weight: 600;
    font-size: 14px;
    color: white;
    margin-bottom: 2px;
}
.post-count {
    font-size: 14px;
    opacity: 0.9;
	color: white;
    margin-bottom: 2px;
}
.logout-btn {
    padding: 6px 12px;
    background: #ff6b6b;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 14px;
}
.logout-btn:hover {
    background: #ff5252;
}

/* Главное меню */
.main-menu {
    background: rgba(30, 60, 114, 0.9);
    padding: 10px 0;
}

.menu-list {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.menu-list li {
    margin: 0 15px;
}

.menu-list a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background 0.3s;
}

.menu-list a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Сетка карточек */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Карточка статьи */
.article-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Ссылка внутри карточки */
.card-link {
    text-decoration: none;
    color: #333;
    display: block;
}

/* Изображение в карточке */
.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

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

/* Информация в карточке */
.card-info {
    padding: 15px;
}

/* Дата публикации */
.post-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

/* Рубрика */
.post-category {
    font-size: 14px;
    font-weight: 600;
    color: #2a5298;
    margin-bottom: 5px;
}

/* Автор */
.post-author {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

/* Заголовок статьи */
.post-title {
    font-size: 16px;
    margin: 0;
    line-height: 1.4;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
}

.pagination a:hover {
    background: #2a5298;
    color: white;
    border-color: #2a5298;
}

.pagination .current {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
    font-weight: bold;
}


/* Заголовки разделов — центрирование */
.category-header,
.archive-header {
    text-align: center;
    margin: 20px 0;
    padding: 0 20px;
}

.category-header h1,
.archive-header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
    text-align: center; /* Явное указание центрирования */
}

/* Описание рубрики */
.category-description {
    color: #666;
    font-style: italic;
    max-width: 800px;
    margin: 0 auto; /* Центрирование блока описания */
    text-align: center; /* Выравнивание текста по центру */
}

/* Подвал сайта */
.site-footer {
	flex-shrink: 0;
    background: #1e3c72;
    color: white;
    padding: 10px 0 20px;
    margin-top: 10px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 30px;
}

/* Левая часть подвала */
.footer-left {
    flex: 1;
    min-width: 250px;
}

.footer-left h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.footer-left p {
    margin-bottom: 15px;
    opacity: 0.9;
}

.copyright {
    font-size: 13px;
    opacity: 0.8;
}

/* Центральная часть подвала */
.footer-center {
    flex: 1;
    min-width: 200px;
}

.footer-center h4 {
    font-size: 16px;
    margin-bottom: 15px;
}

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

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

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* Правая часть подвала — ЯндексМетрика */
.footer-right {
    flex: 1;
    min-width: 200px;
    text-align: right;
}

.yandex-metrica {
    font-size: 12px;
    opacity: 0.7;
}

/* Адаптивность: для планшетов (768px и выше) */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-right {
        text-align: center;
    }
}

/* Адаптивность: для мобильных устройств (до 480px) */
@media (max-width: 480px) {
    .site-footer {
        padding: 30px 0 15px;
    }
    
    .footer-container {
        gap: 15px;
        padding: 0 15px;
    }
    
    .yandex-metrica {
        font-size: 11px;
    }
}

.post-excerpt {
    color: #666;
    line-height: 1.5;
    margin: 10px 0 15px;
    font-size: 14px;
}

.card-button-wrapper {
    text-align: center;
    width: 100%;
}

.card-button {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s ease;
    cursor: pointer;
}

.card-button:hover {
    background: #FF8C00;
}

@media (max-width: 768px) {
    .post-excerpt {
        font-size: 13px;
        margin: 8px 0 12px;
    }
    .card-button {
        padding: 8px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .post-excerpt {
        font-size: 12px;
    }
    .card-button {
        width: 100%;
        text-align: center;
    }
}

.top-button-container {
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
}

.top-button {
    display: block;
    width: 100%;
    max-width: 400px; /* Ограничение максимальной ширины */
    margin: 0 auto; /* Центрирование */
    background: #FF8C00; /* Оранжевый цвет */
    color: white;
    padding: 15px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(255, 140, 0, 0.2);
}

.top-button:hover {
    background: #FF7000; /* Более тёмный оранжевый при наведении */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 140, 0, 0.3);
}
