html, body {
	font-family: 'Arial';
	margin: 0;
	padding: 0;
	height: 100%;
	width: 100%;
	color: #0175be;
}

a {
	color: #0059b2;
	text-decoration: none;
}

img {max-width: 600px; height: auto;}

img.img-article-left {
	max-width: 300px;
	height: auto;
	float: left;
	padding: 0 10px 10px 0;
}

img.img-article-left.thumb {
	max-width: 300px;
	height: auto;
}

p.link-read-post {
	text-align: right;
}
p.link-read-post a {
	padding: 10px;
	min-width: 100px;
	background: #0175be;
	color: #fff;
	text-decoration: none;
}

div.article-panel {
    background: #eee;
    padding: 5px 10px 5px 10px;
    box-sizing: border-box;
    overflow: hidden;
    color: #555;
}
div.article-panel p.first {
    margin: 0;
    float: left;
}
div.article-panel p.last {
    margin: 0;
    float: right;
}

ul.list-articles {
	list-style: none;
	margin: 0;
	padding: 0;
}
ul.list-articles li {
	border-bottom: 1px solid #ccc;
}

.table-page {
	width: 100%;
	height: 100%;
	vertical-align: top;
}
.table-page tr {height: 100%;}

.clear {clear: both;}

/* Header styles */
.header {
    background: #0175be;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    height: 100%;
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
}

.logo {
    background: url('../images/logo.png') no-repeat center;
    background-size: contain;
    width: 60px;
    height: 60px;
    margin-right: 10px;
}

.site-name {
    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Main menu styles */
ul.mainmenu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
}

ul.mainmenu li {
    display: flex;
    align-items: center;
    margin: 0 15px;
}

ul.mainmenu li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

ul.mainmenu li a:hover {
    color: #FDA83D;
}

/* Right section styles */
.header-right {
    display: flex;
    align-items: center;
    height: 100%;
}

.user-info {
    display: flex;
    align-items: center;
}

.username {
    color: #ffffff;
    margin-right: 10px;
    font-size: 16px;
}

.logout-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.logout-btn:hover {
    color: #FDA83D;
}

.auth-links {
    display: flex;
    align-items: center;
}

.auth-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #FDA83D;
}

.divider {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
}
.panelitems {
	text-align: center;
}

ul.langitem {
	list-style: none;
	display: inline-block;
	margin: 30px;
	padding: 0;
	max-width: 300px
}
ul.langitem li {
	margin: 10px 0 0 0;
	width: 100%;
}
ul.langitem li.image {
	margin: 0;
	text-align: center;
	width: 100%;
	height: 250px;
	overflow: hidden;
}
ul.langitem li.descr {
	color: #777;
	height: 170px;
	overflow: hidden;
}
ul.langitem li a {
	color: #fdc073;
	text-decoration: none;
	font-size: 20px;
}
ul.langitem li a:hover {
	color: #FDA83D;
}
div.button {
	background: #3F4137;
	max-width: 200px;
	margin: 0 auto;
	padding: 5px 20px 5px 20px;
	border-radius: 10px;
	font-size: 20px;
}

.table-content {
	width: 100%;
	min-height: 100%;
	height: 100%;
}

.left-chapters {
    margin: 0;
    background: #f5f5f5; /* Слегка осветленный фон */
    border-right: 1px solid #ddd; /* Более мягкая граница */
}

.left-chapters ul {
    width: 230px;
    margin: 0;
    padding: 15px 0; /* Измененные отступы */
    list-style: none;
    font-size: 18px; /* Чуть меньший размер шрифта */
}

.left-chapters ul li {
    margin: 8px 0;
    padding: 10px 20px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.left-chapters ul li.selected {
    color: #0175be; /* Основной синий цвет */
    background-color: #e6f2ff; /* Светло-синий фон */
    border-left-color: #0175be;
    font-weight: bold;
}

.left-chapters ul li a {
    color: #555; /* Более темный серый */
    text-decoration: none;
    display: block;
}

.left-chapters ul li a:hover {
    color: #CC0000;
    text-decoration: none;
}

.left-chapters ul li:hover:not(.selected) {
    background-color: #f0f0f0;
    border-left-color: #aaa;
}

/* Стили для блока share  */
.left-chapters ul li.share {
    margin: 40px 0 0 0;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.left-chapters ul li.share p {
    margin: 20px 0;
    color: #777;
    font-size: 16px;
}

.left-chapters ul li.share a {
    display: inline-block;
    width: 36px;
    height: 36px;
    margin: 0 15px 0 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.left-chapters ul li.share a:hover {
    opacity: 1;
}

ul.tags-list {
    width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.tags-list li {
	margin: 0;
	padding: 0 0 10px;
    display: inline-block;
}

ul.tags-list li a {
	padding: 5px;
	font-size: 16px;
	border: 1px solid #aaa;
}

.content {
	padding: 40px 20px 20px 40px;
	width: 100%;
	box-sizing: border-box;
}

ul.breadcrumbs {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 20px;
	font-family: Sans-serif, Arial, Tahoma;
}
ul.breadcrumbs li {
	display: inline-block;
}
ul.breadcrumbs li a {
	color: #0059b2;
	text-decoration: none;
}
ul.breadcrumbs li a:hover { color: #CC0000; }
ul.breadcrumbs li:after{
	padding: 0 10px 0 10px;
	content: "\2192";
}
ul.breadcrumbs li.last:after {content: "";}

ul.control {
	margin: 0;
	padding: 60px 0 0 0;
	list-style: none;
	font-family: Sans-serif, Arial, Tahoma;
	font-size: 18px;
	width: 100%;
}
ul.control li {	float: left; padding: 0 0 0 10px;}
ul.control li.first:before {content: "\2190"; padding: 0 10px 0 0;}
ul.control li.last {float: right; padding: 0 40px 0 0;}
ul.control li.last:after {content: "\2192"; padding: 0 0 0 10px;}
ul.control li a { color: #0059b2; text-decoration: none; }
ul.control li a:hover { color: #CC0000; }

ul.content-table {
	margin: 0;
	padding: 60px 0 0 30px;
	list-style: none;
	font-family: Sans-serif, Arial, Tahoma;
	font-size: 28px;
}
ul.content-table li {
	margin: 0 0 40px 0;
}
ul.content-table li a {
	color: #BB5715;
	text-decoration: none;
}
ul.content-table li a:hover {color: #F0711C;}

.content-text {
	color: #000;
	font-size: 20px;
	font-family: Yandex Sans Display Light;
}
.content-text h1 {font-size: 32px;}

ul.lang-list {
	list-style: none;
	margin: 0;
	padding: 14px 0 0 0;
	background: #3F4137;
	width: 100%;
	height: 50px;
	border-top: 1px solid #959A82;
	box-sizing: border-box;
	font-size: 18px;
	font-family: Sans-serif, Arial, Tahoma;
}
ul.lang-list li {
	display: inline-block;
	margin-left: 40px;
}
ul.lang-list li.selected {color: #fdc073; border-bottom: 1px solid #fdc073;}
ul.lang-list li a {
	color: #eee;
	text-decoration: none;
}
ul.lang-list li a:hover {color: #fdc073;}

.topic-subject .topic-line {
	border-bottom: 1px solid #CC0000;
	margin-top: -16px;
}

.topic-subject .topic-text {
	display: inline-block;
	font-size: 28px;
	color: #777;
	padding: 0 10px 0 10px;
	margin-left: 30px;
	background: #fff;
	font-family: Sans-serif, Arial, Tahoma;
}

.list-topic {
	margin: 40px 0 60px 0;
	font-family: Sans-serif, Arial, Tahoma;
}
.list-topic p {
	margin: 0;
	font-size: 28px;
}
.list-topic ol {
	columns: 2;
	-webkit-columns: 2;
	column-gap: 40px;
}
.list-topic ol li {
	display: list-item;
	margin: 10px 10px 0 0px;
	padding: 0 0 0 10px;
}
.list-topic ol li a {
	color: #0059b2;
	text-decoration: none;
}
.list-topic ol li a:hover {color: #CC0000;}

.highlight {
	max-width: 350px;
	padding: 0 10px 0 10px;
	margin: 0;
	overflow: auto;
	overflow-y: hidden;
	background: #f0f0f0;
}
.highlight p { margin: 0; }
.highlight .block {
	width: 100%;
	margin: 0;
}
.highlight .block p { margin: 0; }

.quote {
	background: url('../images') no-repeat 0 10px;
	padding: 5px 5px 5px 70px;
	font-family: Sans-serif, Arial, Tahoma;
	font-style: italic;
}

#footer {
	box-sizing: border-box;

	background: #0175be;
	padding: 5px;
	color: #ffffff;
	font-size: 14px;
	font-family: Verdana, Geneva, Arial, Helvetica;
	text-align: left;
	overflow: hidden;
}
#footer a {
	text-decoration: underline;
	color: #aaa;
}

.form-input {
    width: 300px;
    font-size: 16px;
}

.form-label {
    display: inline-block;
    min-width: 150px;
    vertical-align: top;
}

.form-error ul {
    list-style: none;
    padding: 0;
    color: #CC0000;
}

.form-button {
    min-width: 200px;
    font-size: 16px;
}
.list-pages {
	text-align: center;
	margin: 0 0 20px 0;
}
.list-pages ul {
	margin: 20px 0 0 0;
	padding: 0;
	list-style: none;
}
.list-pages ul li {
	display: inline-block;
	margin: 0 20px 0 0;
}
.list-pages a {
	color: #000;
	font-size: 24px;
	text-decoration: none;
}
.list-pages .page-num, .page-num-selected {
	display: inline-block;
	width: 60px;
	height: 44px;
	padding: 16px 0 0 0;
	border: 1px solid #d0d0d0;
	border-radius: 30px;
}
.list-pages .page-num:hover {
	box-shadow: 3px 3px 1px #d0d0d0;
}
.list-pages .page-num-selected {
	border: none;
	color: #000;
	font-size: 20px;
}
.list-pages .page-num-selected:hover {
	box-shadow: none;
}


/* Стили для списка категорий */
ul.list-categories {
    list-style: none;
    margin: 0;
    padding: 20px 0;
    width: 100%;
}

ul.list-categories li {
    padding: 12px 20px;
    margin: 5px 0;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

ul.list-categories li a {
    color: #0059b2;
    text-decoration: none;
    display: block;
    font-size: 18px;
}

ul.list-categories li:hover {
    background-color: #f5f9ff;
    border-left-color: #0175be;
}

ul.list-categories li:hover a {
    color: #CC0000;
    text-decoration: none;
}

ul.list-categories li.selected {
    background-color: #e6f2ff;
    border-left-color: #0175be;
    font-weight: bold;
}

ul.list-categories li.selected a {
    color: #0175be;
}

 /* Дополнительные стили для пагинации */
.list-pages a:hover {
	background: #e0f0ff !important;
	transform: translateY(-2px);
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

    /* Эллипсы для пропущенных страниц */
.list-pages .ellipsis {
	display: inline-flex;
	align-items: flex-end;
	height: 40px;
	margin: 0 5px;
	color: #888;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .header {
        height: 60px;
        padding: 0 10px;
    }

    .header-container {
        padding: 0 10px;
    }

    .site-name {
        font-size: 18px;
        display: none; /* Можно скрыть на мобильных */
    }

    .mainmenu {
        gap: 5px;
    }

    .mainmenu > li > a {
        font-size: 14px;
        padding: 6px 8px;
    }

    .username, .login-link, .register-link {
        font-size: 14px;
    }

    .logo {
        width: 40px;
        height: 40px;
    }
}
/* Стили для элемента поиска в меню */
.search-menu-item {
    margin-left: 15px;
    display: flex;
    align-items: center;
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 5px 30px 5px 10px;
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 14px;
    height: 30px;
    width: 180px;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(61, 58, 58, 0.7);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
}

.search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

/* Сообщение */
.message-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #f0f0f0;
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    z-index: 1000;
}

.comment-item {
    position: relative;
    padding-right: 40px;
    margin-bottom: 20px;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 8px;
    background: #fafafa;
}

.delete-comment-form {
    position: absolute;
    top: 10px;
    right: 10px;
}

.delete-comment-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.delete-comment-btn:hover {
    color: #ff4444;
    background-color: #ffeeee;
    transform: scale(1.1);
}

/* Простая адаптивность */
@media (max-width: 768px) {
    /* Делаем таблицу блочной */
    .table-page, .table-content, .table-content tr {
        display: block;
        width: 100%;
    }
    
    .table-content td {
        display: block;
        width: 100% !important;
    }
    
    /* Сайдбар становится горизонтальным меню */
    .left-chapters {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .left-chapters ul {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
        justify-content: center;
    }
    
    .left-chapters ul li {
        margin: 5px;
        padding: 8px 12px;
        border-left: none !important;
        border-bottom: 2px solid transparent;
    }
    
    .left-chapters ul li.selected {
        border-bottom-color: #0175be;
        border-left: none !important;
    }
    
    /* Убираем абсолютное позиционирование у меню */
    ul.mainmenu {
        position: static;
        transform: none;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 0;
    }
    
    /* Прячем поиск в меню на мобильных */
    .search-menu-item {
        display: none;
    }
    
    /* Уменьшаем отступы контента */
    .content {
        padding: 20px 15px;
    }
    
    /* Делаем картинки адаптивными */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Упрощаем хедер */
    .header {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    .header-left, .header-right {
        margin: 5px 0;
    }
    
    .site-name {
        font-size: 18px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    /* Упрощаем меню еще больше */
    ul.mainmenu li {
        margin: 0 5px;
    }
    
    ul.mainmenu li a {
        font-size: 14px;
        padding: 3px 5px;
    }
    
    /* Уменьшаем текст */
    .content-text {
        font-size: 16px;
    }
    
    .username, .login-link, .register-link {
        font-size: 14px;
    }
}