/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #111;
    color: #ccc;
    margin: 0;
    line-height: 1.6;
}

/* Header */
.blog-header {
    background-color: #1a1a1a;
    padding: 15px 30px;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Pushes logo and nav to opposite ends */
}

.blog-header nav a {
    color: #ccc;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.2s ease;
}

.blog-header nav a:hover {
    color: #fff;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    font-size: 1.2em;
    font-weight: bold;
}

.logo-link img {
    height: 40px;
    margin-right: 15px;
}

/* Main Content */
.blog-main {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

h1 {
    font-size: 2.5em;
    color: #fff;
    margin-bottom: 0.2em;
}

.subtitle {
    font-size: 1.2em;
    color: #888;
    margin-bottom: 40px;
}

/* Article List */
.article-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    transition: transform 0.2s ease-in-out;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: #555;
}

.article-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card-image {
    width: 100%;
    height: 200px; /* Limit image height */
    object-fit: contain; /* Scale image to fit proportionally within the container */
    display: block;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 1.5em;
    color: #fff;
    margin: 0 0 10px 0;
}

.card-excerpt {
    font-size: 1em;
    color: #ccc;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px; /* Добавляем отступы для размера */
    background-color: transparent; /* Прозрачный фон */
    color: #00008B; /* Темно-голубой текст */
    text-decoration: none;
    border: 1px solid transparent; /* Прозрачная рамка для сохранения места */
    border-radius: 5px; /* Скругленные углы */
    font-weight: bold;
    font-size: 1.1em; /* Увеличиваем размер шрифта */
    transition: all 0.3s ease; /* Плавный переход для всех свойств */
}

.read-more:hover {
    background-color: transparent; /* Фон остается прозрачным */
    color: #0000FF; /* Голубой текст при наведении */
    border: 1px solid #0000FF; /* Голубая рамка при наведении */
    display: block; /* Make it block on hover */
    width: 100%; /* Make it full width on hover */
    box-sizing: border-box; /* Include padding and border in the width */
    text-align: center; /* Center the text within the full-width block */
}

/* Single Article Page */
.article-page h1 {
    font-size: 2.2em;
}

.article-meta {
    color: #888;
    margin-bottom: 20px;
}

.article-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.article-page h2 {
    font-size: 1.8em;
    color: #fff;
    margin-top: 40px;
}

.article-page ul {
    padding-left: 20px;
}

/* Call to Action */
.call-to-action {
    background-color: #1a1a1a;
    border: 1px solid #00aaff;
    border-radius: 8px;
    padding: 30px;
    margin: 40px 0;
    /* text-align: center; */ /* Removed to left-align content */
}

.cta-button {
    display: inline-block;
    background-color: #00aaff;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: background-color 0.2s ease;
}

.cta-button:hover {
    background-color: #0088cc;
}

/* --- Общие стили для футера --- */
.site-footer {
    background-color: #1a1a1a;
    color: #888;
    padding: 20px 30px;
    border-top: 1px solid #333;
    display: flex;
    flex-wrap: wrap; /* Позволяет переносить элементы на новую строку */
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-top: 40px; /* Отступ сверху */
}

.site-footer .footer-main {
    display: flex;
    align-items: center;
    gap: 20px; /* Пространство между элементами */
}

.site-footer .footer-legal {
    display: flex;
    gap: 15px; /* Пространство между ссылками */
}

.site-footer a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #fff;
}

.site-footer .back-link {
    margin-right: auto; /* Отодвигает копирайт вправо */
}

/* Адаптивность для футера */
@media (max-width: 768px) {
    .site-footer {
        flex-direction: column; /* Ставим все в колонку */
        gap: 15px; /* Отступ между блоками */
        text-align: center;
    }

    .site-footer .footer-main {
        flex-direction: column;
        order: 2; /* Копирайт будет ниже */
    }

    .site-footer .back-link {
        margin-right: 0;
        order: 1; /* Ссылка назад будет первой */
    }

    .site-footer .footer-legal {
        order: 3; /* Ссылки на политику будут последними */
    }
}
