/* Основные стили */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Шапка */
header {
    background-color: #1E90FF;
    color: #fff;
    padding: 15px 0;
    position: relative;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

header .logo {
    font-size: 24px;
    font-weight: bold;
    z-index: 2;
    white-space: nowrap;
}

/* Навигация для десктопа */
nav {
    display: flex;
    align-items: center;
    margin-left: 30px;
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: flex;
    align-items: center;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1;
    white-space: nowrap;
    transition: color 0.3s, background-color 0.3s;
}

nav ul li a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Поиск и авторизация — прижаты к правому краю */
header .search-and-auth {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    z-index: 2;
}

header .search {
    display: flex;
    align-items: center;
}

header .search input {
    padding: 8px 12px;
    border: none;
    border-radius: 3px;
    width: 200px;
}

header .search button {
    padding: 8px 15px;
    background-color: #FF8C00;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 3px;
    margin-left: 5px;
    transition: background-color 0.3s;
}

header .search button:hover {
    background-color: #e67e00;
}

header .auth .btn-auth {
    background-color: #FF8C00;
    color: #fff;
    padding: 8px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

header .auth .btn-auth:hover {
    background-color: #e67e00;
}

/* Кнопка выхода в шапке (десктоп) */
.nav-logout {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 15px;
    line-height: 1;
    white-space: nowrap;
    transition: background-color 0.3s, border-color 0.3s;
}

.nav-logout:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}

/* Кнопка "Войти" для мобильных устройств */
.auth-mobile {
    display: none;
}

/* Мобильное меню кнопка */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 100;
    padding: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* Стили для форм */
.form-group {
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #1E90FF;
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.2);
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background-color: #1E90FF;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #187bcd;
}

.form-note {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

.form-note a {
    color: #1E90FF;
    text-decoration: none;
}

.form-note a:hover {
    text-decoration: underline;
}

/* Стили для переключения между вкладками */
.switch-tab {
    cursor: pointer;
}

/* Загрузка */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Валидация */
input:invalid {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

/* Мобильное меню */
@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
    }
    
    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background-color: #1E90FF;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 80px;
        transition: right 0.3s ease;
        z-index: 99;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    }
    
    nav ul.active {
        right: 0;
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    nav ul li a {
        display: block;
        padding: 15px 30px;
        font-size: 18px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    header .search {
        display: none;
    }
    
    .auth-mobile {
        display: block;
        padding: 20px 30px;
        margin-top: 20px;
    }
    
    .auth-mobile .btn-auth {
        background-color: #FF8C00;
        color: #fff;
        padding: 12px 30px;
        text-decoration: none;
        border-radius: 5px;
        display: block;
        text-align: center;
        font-size: 16px;
    }
    
    header .auth {
        display: none;
    }

    /* На мобильном выход — через профиль, кнопку в шапке прячем */
    .nav-logout {
        display: none;
    }
}

@media (max-width: 768px) {
    header .container {
        padding: 0 10px;
    }
    
    nav ul {
        width: 100%;
        max-width: none;
    }
}

/* Герой-секция */
.hero {
    background: linear-gradient(135deg, #1E90FF 0%, #4169E1 100%);
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero .buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .buttons .btn {
    background-color: #FF8C00;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.hero .buttons .btn:hover {
    background-color: #e67e00;
}

.hero .buttons .btn-outline {
    background-color: transparent;
    border: 2px solid #FF8C00;
    color: #FF8C00;
}

.hero .buttons .btn-outline:hover {
    background-color: #FF8C00;
    color: #fff;
}

@media (max-width: 1024px) {
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 15px;
        padding: 0 15px;
    }
    
    .hero .buttons {
        flex-direction: column;
        align-items: center;
        padding: 0 20px;
    }
    
    .hero .buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Популярные разделы */
.featured {
    display: flex;
    justify-content: space-between;
    padding: 60px 0;
    gap: 30px;
}

.featured-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    flex: 1;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.featured-item:hover {
    transform: translateY(-5px);
}

.featured-item h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #1E90FF;
}

.featured-item p {
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.6;
    color: #666;
}

.featured-item .btn {
    background-color: #1E90FF;
    color: #fff;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.3s;
}

.featured-item .btn:hover {
    background-color: #187bcd;
}

@media (max-width: 1024px) {
    .featured {
        gap: 20px;
    }
    
    .featured-item {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .featured {
        flex-direction: column;
        padding: 40px 0;
    }
    
    .featured-item {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* Рекомендуемые статьи */
.articles {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.articles h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #333;
}

.article-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.article-card {
    background-color: #fff;
    padding: 0;
    border-radius: 10px;
    flex: 1;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 0;
}

.article-card-content {
    padding: 25px;
}

.article-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.article-card p {
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.6;
    color: #666;
}

.article-card .btn {
    background-color: #1E90FF;
    color: #fff;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.3s;
}

.article-card .btn:hover {
    background-color: #187bcd;
}

@media (max-width: 1024px) {
    .article-grid {
        gap: 20px;
    }
    
    .article-card-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .articles {
        padding: 40px 0;
    }
    
    .articles h2 {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .article-grid {
        flex-direction: column;
    }
    
    .article-card {
        margin-bottom: 30px;
    }
}

/* Подписка на новости */
.newsletter {
    background: linear-gradient(135deg, #1E90FF 0%, #4169E1 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.newsletter h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.newsletter p {
    font-size: 18px;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.newsletter form {
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter input {
    padding: 12px 20px;
    border: none;
    border-radius: 5px 0 0 5px;
    flex: 1;
    font-size: 16px;
    width: 100%;
}

.newsletter button {
    padding: 12px 30px;
    background-color: #FF8C00;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
    font-size: 16px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.newsletter button:hover {
    background-color: #e67e00;
}

@media (max-width: 768px) {
    .newsletter {
        padding: 40px 0;
    }
    
    .newsletter h2 {
        font-size: 28px;
    }
    
    .newsletter p {
        font-size: 16px;
        padding: 0 15px;
    }
    
    .newsletter form {
        flex-direction: column;
        padding: 0 15px;
    }
    
    .newsletter input {
        border-radius: 5px;
        margin-bottom: 10px;
    }
    
    .newsletter button {
        border-radius: 5px;
        width: 100%;
    }
}

/* Футер */
footer {
    background-color: #333;
    color: #fff;
    padding: 60px 0 20px;
}

footer .container {
    display: flex;
    flex-direction: column;
}

footer .footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

footer .footer-logo {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #fff;
}

footer .footer-links {
    flex: 1;
    max-width: 800px;
}

footer .footer-links ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0;
    padding: 0;
}

footer .footer-links ul li a {
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    transition: color 0.3s;
}

footer .footer-links ul li a:hover {
    color: #FF8C00;
}

footer .social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

footer .social a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

footer .social a:hover {
    transform: translateY(-3px);
}

footer .social img {
    width: 20px;
    height: 20px;
}

footer .copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    color: #aaa;
}

@media (max-width: 1024px) {
    footer .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    footer .footer-links {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 40px 0 20px;
    }
    
    footer .footer-links ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

/* Конструктор форматирования (WYSIWYG-редактор) */
.editor-wrapper {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background-color: #fff;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    background-color: #f5f7fa;
    border-bottom: 1px solid #ddd;
}

.editor-btn {
    min-width: 34px;
    height: 32px;
    padding: 0 8px;
    background-color: #fff;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s;
}

.editor-btn:hover {
    background-color: #1E90FF;
    border-color: #1E90FF;
    color: #fff;
}

.editor-btn.active {
    background-color: #1E90FF;
    border-color: #1E90FF;
    color: #fff;
}

.editor-sep {
    width: 1px;
    height: 22px;
    background-color: #d5d5d5;
    margin: 0 4px;
}

.editor-area {
    min-height: 180px;
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    font-size: 16px;
    line-height: 1.6;
    outline: none;
}

.editor-area:empty::before {
    content: attr(data-placeholder);
    color: #aaa;
}

.editor-area:focus {
    box-shadow: inset 0 0 0 2px rgba(30, 144, 255, 0.15);
}

.editor-area h2 { font-size: 24px; margin: 12px 0; }
.editor-area h3 { font-size: 20px; margin: 10px 0; }
.editor-area p  { margin: 8px 0; }
.editor-area ul, .editor-area ol { padding-left: 28px; margin: 8px 0; }
.editor-area a  { color: #1E90FF; }

.editor-html {
    width: 100%;
    min-height: 180px;
    padding: 15px;
    border: none;
    border-top: 1px solid #ddd;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    resize: vertical;
    outline: none;
}

.section-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.section-form-actions .btn-submit {
    flex: 1;
}

.btn-cancel-edit {
    padding: 12px 20px;
    background-color: #95a5a6;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.btn-cancel-edit:hover {
    background-color: #7f8c8d;
}

/* ===== Контент страницы раздела (section.html) ===== */
.section-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    font-size: 17px;
    line-height: 1.7;
    color: #333;
}

.section-content h2 {
    font-size: 28px;
    color: #1E90FF;
    margin: 28px 0 16px;
    text-align: left;
}

.section-content h3 {
    font-size: 22px;
    color: #222;
    margin: 24px 0 12px;
}

.section-content p {
    margin: 14px 0;
}

.section-content ul,
.section-content ol {
    padding-left: 26px;
    margin: 14px 0;
}

.section-content li {
    margin: 8px 0;
}

.section-content a {
    color: #1E90FF;
    text-decoration: none;
    border-bottom: 1px solid rgba(30, 144, 255, 0.3);
    transition: border-color 0.2s;
}

.section-content a:hover {
    border-bottom-color: #1E90FF;
}

.section-content code {
    background-color: #eef3fb;
    color: #d6336c;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 15px;
}

@media (max-width: 768px) {
    .section-content {
        padding: 24px 20px;
        font-size: 16px;
    }
    .section-content h2 {
        font-size: 24px;
    }
    .section-content h3 {
        font-size: 19px;
    }
}

/* ===== Панель администратора ===== */
.admin-panel {
    background: linear-gradient(180deg, #eef3fb 0%, #f9f9f9 100%);
    padding: 60px 0;
}

.admin-header {
    text-align: center;
    margin-bottom: 40px;
}

.admin-badge {
    display: inline-block;
    background-color: #1E90FF;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.admin-title {
    font-size: 32px;
    margin: 0 0 10px;
    color: #222;
}

.admin-subtitle {
    color: #666;
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* Карточка (форма и список) */
.admin-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(30, 144, 255, 0.08);
    border: 1px solid #eaeef4;
    max-width: 760px;
    margin: 0 auto 30px;
    overflow: hidden;
}

.admin-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 28px;
    background: linear-gradient(135deg, #1E90FF 0%, #4169E1 100%);
    color: #fff;
    font-size: 20px;
    font-weight: bold;
}

.admin-card-header.editing {
    background: linear-gradient(135deg, #FF8C00 0%, #e67e00 100%);
}

.admin-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 20px;
    flex-shrink: 0;
}

.admin-form {
    padding: 28px;
}

/* Подписи полей */
.field-label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #444;
    margin-bottom: 8px;
}

/* Список существующих разделов */
#admin-sections-list {
    padding: 20px 28px 28px;
}

.admin-empty {
    text-align: center;
    color: #888;
    padding: 20px 0;
}

.admin-section-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid #eaeef4;
    border-radius: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    transition: box-shadow 0.2s, transform 0.2s;
}

.admin-section-row:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.admin-section-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-section-name {
    font-weight: bold;
    font-size: 16px;
    color: #222;
}

.admin-section-slug {
    font-size: 13px;
    color: #999;
    font-family: 'Courier New', monospace;
}

.admin-section-actions {
    display: flex;
    gap: 8px;
}

.btn-edit,
.btn-delete {
    padding: 8px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-edit {
    background-color: #1E90FF;
    color: #fff;
}

.btn-edit:hover {
    background-color: #187bcd;
}

.btn-delete {
    background-color: #fdecea;
    color: #e74c3c;
}

.btn-delete:hover {
    background-color: #e74c3c;
    color: #fff;
}

@media (max-width: 768px) {
    .section-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-cancel-edit {
        width: 100%;
    }
    .admin-title {
        font-size: 26px;
    }
    .admin-card-header {
        padding: 16px 20px;
        font-size: 18px;
    }
    .admin-form,
    #admin-sections-list {
        padding: 20px;
    }
    .admin-section-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .admin-section-actions {
        width: 100%;
    }
    .btn-edit,
    .btn-delete {
        flex: 1;
    }
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    width: 100%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-modal:hover {
    color: #FF8C00;
}

/* Вкладки */
.tabs {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.tab-link {
    background: none;
    border: none;
    padding: 15px 0;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    position: relative;
    flex: 1;
    text-align: center;
}

.tab-link.active {
    color: #1E90FF;
    font-weight: bold;
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #1E90FF;
}

/* Содержимое вкладок */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
}

/* Формы */
form input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

form input:focus {
    outline: none;
    border-color: #1E90FF;
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.1);
}

form button {
    width: 100%;
    padding: 12px;
    background-color: #1E90FF;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-top: 10px;
}

form button:hover {
    background-color: #187bcd;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        max-width: 95%;
    }
    
    .tab-link {
        font-size: 16px;
        padding: 12px 0;
    }
    
    .tab-content h3 {
        font-size: 20px;
    }
    
    form input {
        padding: 10px 12px;
    }
    
    form button {
        padding: 10px;
    }
}

/* =========================================================
   ВЁРСТКА ЛЕНТЫ НОВОСТЕЙ В СТИЛЕ DROIDER.RU
   ========================================================= */

/* Плашка микроновостей (молнии) */
.micronews-bar {
    background-color: #19385E;
    color: #fff;
    padding: 10px 0;
    border-bottom: 2px solid #E02642;
    font-size: 14px;
}

.micronews-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: hidden;
}

.micronews-badge {
    background-color: #E02642;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.micronews-ticker {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.micronews-ticker::-webkit-scrollbar {
    display: none;
}

.micronews-link {
    color: #e0e8f5;
    text-decoration: none;
    transition: color 0.2s;
}

.micronews-link:hover {
    color: #FF8C00;
}

/* Макет ленты Droider (Двухколоночная сетка) */
.droider-feed-section {
    padding: 50px 0;
    background-color: #f4f6f9;
}

.droider-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 35px;
}

.feed-header {
    margin-bottom: 25px;
    border-bottom: 2px solid #1E90FF;
    padding-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.feed-header h2 {
    font-size: 28px;
    margin: 0;
    color: #19385E;
    font-weight: bold;
}

.feed-subtitle {
    color: #777;
    font-size: 14px;
}

/* Список карточек постов */
.droider-posts-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Карточка новости/публикации в стиле Droider */
.droider-post-card {
    display: flex;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8ecef;
    transition: transform 0.2s, box-shadow 0.2s;
}

.droider-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.droider-post-cover {
    width: 240px;
    min-width: 240px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    overflow: hidden;
}

.droider-cover-icon {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.3);
    transition: transform 0.3s;
}

.droider-post-card:hover .droider-cover-icon {
    transform: scale(1.15) rotate(5deg);
}

.droider-post-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.droider-post-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.droider-post-cat {
    font-size: 12px;
    color: #1E90FF;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.droider-post-title {
    font-size: 20px;
    margin: 0 0 10px;
    line-height: 1.35;
    font-weight: 700;
}

.droider-post-title a {
    color: #19385E;
    text-decoration: none;
    transition: color 0.2s;
}

.droider-post-title a:hover {
    color: #1E90FF;
}

.droider-post-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.droider-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #8898a6;
    border-top: 1px solid #f0f3f6;
    padding-top: 12px;
}

.droider-post-stats {
    display: flex;
    gap: 15px;
}

.droider-empty {
    text-align: center;
    color: #888;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
}

/* Сайдбар */
.droider-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-block {
    background-color: #fff;
    padding: 22px;
    border-radius: 10px;
    border: 1px solid #e8ecef;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.sidebar-title {
    font-size: 18px;
    margin: 0 0 18px;
    color: #19385E;
    border-bottom: 2px solid #f0f3f6;
    padding-bottom: 10px;
}

.sidebar-popular-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-post {
    display: flex;
    gap: 14px;
    text-decoration: none;
    align-items: flex-start;
}

.sidebar-post-num {
    font-size: 22px;
    font-weight: 800;
    color: #1E90FF;
    line-height: 1;
    font-family: monospace;
}

.sidebar-post-info {
    display: flex;
    flex-direction: column;
}

.sidebar-post-cat {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    font-weight: bold;
}

.sidebar-post h4 {
    margin: 4px 0 0;
    font-size: 14px;
    color: #333;
    line-height: 1.35;
    transition: color 0.2s;
}

.sidebar-post:hover h4 {
    color: #1E90FF;
}

.newsletter-widget {
    background: linear-gradient(135deg, #19385E 0%, #2a5298 100%);
    color: #fff;
}

.newsletter-widget h3 {
    margin: 0 0 10px;
    color: #fff;
}

.newsletter-widget p {
    font-size: 13px;
    color: #d0dbe8;
    margin-bottom: 15px;
}

.sidebar-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-newsletter-form input {
    padding: 10px 12px;
    border-radius: 5px;
    border: none;
    font-size: 14px;
}

.sidebar-newsletter-form .btn {
    background-color: #FF8C00;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.sidebar-newsletter-form .btn:hover {
    background-color: #e67e00;
}

/* Мобильная адаптивность */
@media (max-width: 992px) {
    .droider-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .droider-post-card {
        flex-direction: column;
    }
    .droider-post-cover {
        width: 100%;
        min-width: 100%;
        height: 160px;
    }
    .droider-post-body {
        padding: 16px;
    }
    .droider-post-title {
        font-size: 18px;
    }
}

/* Стили страницы статьи (article.html) */
.article-single-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 35px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8ecef;
}

.article-badge {
    display: inline-block;
    background-color: #1E90FF;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.article-single-title {
    font-size: 32px;
    line-height: 1.3;
    color: #19385E;
    margin: 0 0 15px;
    font-weight: bold;
}

.article-single-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #8898a6;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f3f6;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.article-single-excerpt {
    font-size: 18px;
    line-height: 1.6;
    color: #445566;
    font-weight: bold;
    background-color: #eef4fc;
    padding: 18px 24px;
    border-left: 4px solid #1E90FF;
    border-radius: 4px;
    margin-bottom: 30px;
}

.article-body-styled {
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.article-share-box {
    margin-top: 40px;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px dashed #cbd5e1;
}

.btn-share {
    background-color: #1E90FF;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-share:hover {
    background-color: #187bcd;
}

.comments-section {
    margin-top: 40px;
    border-top: 2px solid #f0f3f6;
    padding-top: 30px;
}

.comments-section h3 {
    font-size: 22px;
    color: #19385E;
    margin-bottom: 20px;
}

.comment-item {
    background-color: #f8fafc;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.comment-header {
    font-size: 14px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    color: #19385E;
}

.comment-header small {
    color: #94a3b8;
}

.comment-item p {
    margin: 0;
    font-size: 15px;
    color: #334155;
}