:root {
  --primary: #4361ee;
  --secondary: #3f37c9;
  --accent: #4895ef;
  --dark: #121212;
  --darker: #0a0a0a;
  --light: #f8f9fa;
  --success: #4cc9f0;
  --warning: #f72585;
  --gray: #757575;
  --text: #DCDCDC;
  --text-secondary: #b0b0b0;
  --border: #333333;
}

* {
  box-sizing: border-box;
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--darker);
  color: var(--text);
}

.container {
  max-width: 800px;
  margin: 5px auto;
  background: var(--dark);
  padding: 2em;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 2rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}



/* Стили для ссылок */
a {
  color: #a0c4ff; /* Мягкий голубой */
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #7fb2ff; /* Чуть более насыщенный голубой при наведении */
  text-decoration: underline;
}

/* Особые стили для ссылок в навигации */
.nav-links a {
  color: white;
}

.nav-links a:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.2);
}

h2 { 
color: #FFF5EE;

}


/* Ссылки в постах */
.post-content a,
.post-excerpt a,
.post-meta a {
  color: #a0c4ff;
}

.post-content a:hover,
.post-excerpt a:hover,
.post-meta a:hover {
  color: #7fb2ff;
}

/* Ссылки в футере */
.footer-column a {
  color: #a0c4ff;
}

.footer-column a:hover {
  color: #7fb2ff;
}

/* Кнопки и специальные ссылки */
.btn,
.category-btn,
.read-more {
  color: white !important; /* Кнопки остаются с белым текстом */
}











.logo {
  font-size: 1.8rem;
  font-weight: 700;
  text-decoration: none;
  color: white;
}


.hero {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://source.unsplash.com/random/1600x900/?code,programming');
  background-size: cover;
  background-position: center;
  color: white;
  margin-bottom: 2rem;
}

.post-card {
  background-color: var(--gray);
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  position: relative;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
  border-color: #555;
}

.post-image {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.post-content {
  padding: 1.5rem;
}

.post-tag {
  display: inline-block;
  background-color: var(--accent);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 0.8rem;
}

.post-title {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: var(--text);
}

.post-excerpt {
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.post-page {
  background-color: var(--dark);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  margin: 2rem 0;
}

footer {
  background-color: var(--darker);
  color: white;
  padding: 3rem 0;
  margin-top: 3rem;
}

/* Стили для кодовых блоков */
pre {
  background-color: #1e1e1e;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--border);
margin-top:30px;
margin-bottom:30px;
}

code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.9rem;
  color: #d4d4d4;
}

/* Категории */
.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  list-style: none;
  padding: 0;
  margin: 0 0 1em 0;
}

.category-btn {
  display: inline-block;
  padding: 0.5em 1em;
  background: #333;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
}

.category-btn:hover {
  background: var(--accent);
  color: white;
}

.category-btn.active {
  background: var(--accent);
  color: white;
}


/* Адаптивность */
@media (max-width: 768px) {
  .nav-links {
    margin-top: 1rem;
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
}


        .nav-links {
            display: flex;
            gap: 1.5rem;
            list-style: none;
        }

        .nav-links a {
            color: white;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
            padding: 0.5rem 1rem;
            border-radius: 4px;
        }

        .nav-links a:hover {
            background-color: rgba(255, 255, 255, 0.2);
        }


        .hero h1 {
            font-size: 3rem;
            margin-bottom: 1rem;
        }

        .hero p {
            font-size: 1.2rem;
            max-width: 700px;
            margin: 0 auto 2rem;
        }

        .btn {
            display: inline-block;
            background-color: var(--accent);
            color: white;
            padding: 0.8rem 1.5rem;
            border-radius: 4px;
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
        }

        .btn:hover {
            background-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        .posts-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 2rem;
            margin: 3rem 0;
        }




        .post-page h1 {
            font-size: 2.2rem;
            margin-bottom: 1rem;
        }

        .post-page .meta {
            display: flex;
            gap: 1rem;
            margin-bottom: 2rem;
            color: #888;
        }

        .post-page img {
            max-width: 100%;
            height: auto;
            border-radius: 8px;
            margin: 1.5rem 0;
        }


        footer {
            background-color: var(--dark);
            color: white;
            padding: 3rem 0;
            margin-top: 3rem;
        }

        .footer-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 2rem;
        }

        .footer-column h3 {
            margin-bottom: 1.2rem;
            font-size: 1.2rem;
        }

        .footer-column ul {
            list-style: none;
        }

        .footer-column ul li {
            margin-bottom: 0.6rem;
        }

        .footer-column a {
            color: #ddd;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .footer-column a:hover {
            color: var(--accent);
        }

        .copyright {
            text-align: center;
            margin-top: 2rem;
            padding-top: 2rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        @media (max-width: 768px) {
            .nav-links {
                margin-top: 1rem;
                width: 100%;
                flex-direction: column;
                gap: 0.5rem;
            }

            .hero h1 {
                font-size: 2.2rem;
            }

            .hero p {
                font-size: 1rem;
            }
        }





/* Убираем стандартные отступы списка */
ul.category-buttons {
    margin-block-start: 0.5em;
    margin-block-end: 0;
    padding-inline-start: 0;
}


/* Адаптивность */
@media (max-width: 600px) {
    .category-buttons {
        gap: 0.3em;
    }
    .category-btn {
        padding: 0.4em 0.8em;
        font-size: 0.85rem;
    }
}







.read-more {
  display: inline-block;
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.read-more:hover {
  color: #2980b9;
}


















blockquote {
    border-left: 4px solid #ccc;
    padding-left: 1em;
    color: #555;
    font-style: italic;
    margin: 1em 0;
}



.admin-menu {
    max-width: 300px;
    margin: 2em auto;
    padding: 1em;
    background: #f9f9f9;
    border-radius: 8px;
}

.admin-menu h3 {
    font-size: 1.1em;
    margin-top: 1em;
    color: #333;
}

.admin-menu ul {
    list-style: none;
    padding-left: 0;
}

.admin-menu li {
    margin-bottom: 6px;
}

.admin-menu a {
    text-decoration: none;
    color: #007BFF;
}

.admin-menu a:hover {
    text-decoration: underline;
}






.post-content-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
}

/* Чётные (image-left) - картинка слева */
.post-card:nth-child(even) .post-content-wrapper {
    flex-direction: row;
}

/* Нечётные (image-right) - картинка справа */
.post-card:nth-child(odd) .post-content-wrapper {
    flex-direction: row-reverse;
}

.post-image {
    flex: 0 0 200px;
}

.post-text {
    flex: 1;
    min-width: 0;
}

.post-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.read-more {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 8px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.read-more:hover {
    background: #45a049;
}

@media (max-width: 768px) {
    .post-content-wrapper {
        flex-direction: column !important;
        gap: 10px;
    }

    .post-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}



/*верстка статей*/


        .hardware-list {
            background-color: gray;
            border-radius: 8px;
            padding: 20px;
color:white;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .requirements {
            background-color: var(--gray);
            padding: 20px;
            border-radius: 8px;
            margin: 20px 0;
        }

        .solution {
            background-color: #696969;
            padding: 20px;
            border-radius: 8px;
margin-top:10px;
            border-left: 4px solid #2e7d32;
        }

        .alternative {
            background-color: #4169E1;
            padding: 15px;
            border-radius: 8px;
            border-left: 4px solid #fb8c00;
        }


        .problem {
            background-color: var(--gray);
            padding: 20px;
            border-radius: 8px;
            margin: 20px 0;
        }


        .solution-overview {
            background-color: var(--gray);
            padding: 20px;
            border-radius: 8px;
            margin: 20px 0;
        }





      ul {
            padding-left: 20px;
        }



        .price {
            font-weight: bold;
            color: #d32f2f;
        }

        .note {
            font-style: italic;
            color: #D3D3D3;
            font-size: 0.9em;
        }



.category-header {
    background: linear-gradient(135deg, #696969, #000000);
    padding: 2rem;
    border-radius: 8px;
 margin-top: 1rem;

    margin-bottom: 1rem;
    color: white;
    text-align: center; /* Центрируем текст */
}

.category-header h1 {
    margin: 0; /* Убираем отступы у h1 */
    padding: 0;
    font-size: 2.2rem;
}

.post-card {
    position: relative;
    height: 300px; /* Фиксированная высота */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

/* Картинка как фон */
.post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* Затемнение фона + текст */
.post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 20px;
    background: linear-gradient(to top, rgba(8, 32, 50, 0.7) 10%, transparent 100%);
    color: white;
}

.post-content h3 a {
    color: white;
    text-decoration: none;
    font-size: 1.3em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);

}

.post-date {
  display: block;
  color: white;
  font-size: 0.85rem;
  margin-bottom: 1em;
background: rgba(0, 0, 0, 0.3); /* Цвет фона */

}


.post-content p {
    margin: 10px 0 0;
    opacity: 0.9;
    font-size: 0.95em;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Ограничиваем текст 2 строками */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Широкие карточки (каждая 3-я) */
.post-card:nth-child(3n) {
    grid-column: span 2;
    height: 400px; /* Выше обычных */
}

/* Адаптив */
@media (max-width: 768px) {
    .post-card {
        height: 250px;
    }
    .post-card:nth-child(3n) {
        grid-column: span 1;
        height: 300px;
    }
}




/* Простой разделитель для подзаголовков */
.posts-section h2 {
display: inline-block;
    position: relative;
    padding-bottom: 0.5rem;
    font-size: 1.5rem;
    color: #87CEFA;
 padding-right: 40px;

}

.posts-section h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: #4299e1; /* Цвет линии */
    border-radius: 2px;
}










/* Переключатель с анимацией */
.category-filters {
    display: inline-flex;
    position: relative;
    background: #696969;
    border-radius: 50px;
    padding: 5px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.category-filters .filter-btn {
    padding: 10px 20px;
    border-radius: 50px;
    color: #ADD8E6;
    font-weight: 500;
    font-size: 0.95rem;
    text-align: center;
    z-index: 2;
    position: relative;
    transition: color 0.3s;
    flex: 1;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    -webkit-tap-highlight-color: transparent;
}

.category-filters .filter-btn.active {
    color: white;
}

.category-filters .slider {
    position: absolute;
    top: 5px;
    left: 5px;
    height: calc(100% - 10px);
    width: calc(36% - 10px);
    background: linear-gradient(135deg, #4a6fa5, #4299e1);
    border-radius: 50px;
transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
    will-change: transform;
}

/* Принудительно включаем анимацию */
.category-filters a.active ~ .slider,
.category-filters button.active ~ .slider {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) !important;
}


.category-tag {
    position: absolute;
    top: -10px;
    left: 15px;
    display: inline-block;
    padding: 3px 12px;
    background-color: #4299e1;
    border-radius: 16px;
    font-size: 0.75em;
    color: white;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
    z-index: 2;
    transition: all 0.2s ease;
}

.category-tag:hover {
    background-color: #3a56c0;
    transform: translateY(-1px);
}




