/* style.css - Основные стили в стиле ВТТКР */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #fff;
    background: linear-gradient(135deg, #1a3a6c 0%, #2a5298 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Контейнер и анимации */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Топбар */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideIn 0.6s ease-out 0.2s both;
}

.topbar-left, .topbar-right {
    display: flex;
    gap: 20px;
    flex: 1;
}

.topbar-right {
    justify-content: flex-end;
}

.topbar-center {
    flex: 0 0 auto;
}

.logo {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-btn {
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Шапка */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideIn 0.6s ease-out 0.3s both;
}

/* Заголовки */
.main-title {
    text-align: center;
    padding: 40px 30px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeIn 0.8s ease-out 0.5s both;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    animation: textReveal 1s ease-out 0.7s forwards;
}

.section-subtitle {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 20px;
    opacity: 0;
    animation: textReveal 1s ease-out 0.9s forwards;
}

/* Карточки */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.article-card {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, background-color 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.article-card:hover {
    transform: translateY(-10px);
    background-color: rgba(255, 255, 255, 0.12);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 25px;
}

.article-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}

.article-excerpt {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 15px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-bottom: 20px;
}

.category-badge {
    background: rgba(52, 152, 219, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-bottom: 10px;
    display: inline-block;
}

.read-more {
    display: inline-block;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.read-more:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    text-decoration: none;
}

/* Футер */
.footer {
    text-align: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    opacity: 0;
    animation: fadeIn 0.8s ease-out 2.3s forwards;
}

/* Социальные сети - компактный размер */
.social-links {
    display: flex;
    justify-content: center;
    gap: 10px; /* уменьшили расстояние между иконками */
    margin-top: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px; /* компактный размер */
    height: 28px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.social-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px); /* уменьшили эффект при наведении */
}

.social-btn img {
    width: 14px; /* маленькие иконки */
    height: 14px;
    filter: brightness(0) invert(1);
}

/* Админ-панель */
.admin-login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.15);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: rgba(52, 152, 219, 0.8);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background-color: rgba(52, 152, 219, 1);
    transform: translateY(-2px);
}

.error-message {
    background-color: rgba(231, 76, 60, 0.2);
    color: #ff6b6b;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    background-color: rgba(46, 204, 113, 0.2);
    color: #6bff6b;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

/* Админ дашборд */
.admin-container {
    padding: 30px;
}

.admin-nav {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px 30px;
    margin-bottom: 30px;
}

.admin-nav a {
    color: #fff;
    text-decoration: none;
    margin-right: 20px;
    padding: 8px 16px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.admin-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.12);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.stat-label {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

/* Форма создания статьи */
.form-container {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px;
    margin: 30px auto;
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.btn-submit {
    background-color: rgba(46, 204, 113, 0.8);
    color: white;
    border: none;
    padding: 12px 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background-color: rgba(46, 204, 113, 1);
    transform: translateY(-2px);
}

.image-preview {
    max-width: 200px;
    margin-top: 10px;
}

.image-preview img {
    max-width: 100%;
    border-radius: 6px;
}

/* Страница статьи */
.article-container {
    padding: 40px 30px;
}

.article-header {
    margin-bottom: 30px;
}

.article-full-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}

.article-full-meta {
    display: flex;
    gap: 20px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-full-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin: 30px 0;
}

.article-full-content {
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.article-full-content p {
    margin-bottom: 20px;
}

.back-link {
    display: inline-block;
    margin-top: 40px;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .topbar-left, .topbar-right {
        justify-content: center;
    }
    
    .logo {
        height: 40px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .article-full-title {
        font-size: 28px;
    }
}