/* Глобальные стили */
:root {
    --primary: #0f172a;
    --secondary: #1e293b;
    --accent: #3b82f6;
    --neon: #06b6d4;
    --light: #f8fafc;
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --success: #10b981;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    --glass: rgba(15, 23, 42, 0.7);
    --radius: 16px;
    --radius-lg: 24px;
    --border: 1px solid rgba(148, 163, 184, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, #0c1220 100%);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    background-attachment: fixed;
}

h1, h2, h3, h4, h5 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: var(--light);
    line-height: 1.2;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, var(--accent) 0%, var(--neon) 100%);
    color: white;
    padding: 16px 36px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 18px;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--neon) 0%, var(--accent) 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.5);
}

.btn:hover:after {
    opacity: 1;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--text);
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
}

section {
    padding: 120px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 80px;
    font-size: 48px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title span {
    background: linear-gradient(90deg, var(--accent), var(--neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--neon));
    border-radius: 2px;
}

.text-center {
    text-align: center;
}

/* Header */
header {
    background: var(--glass);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: var(--border);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 32px;
    font-weight: 800;
    color: var(--light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    background: linear-gradient(90deg, var(--accent), var(--neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo i {
    color: var(--neon);
}

.logo-tagline {
    font-size: 14px;
    margin-left: 10px;
    color: var(--neon);
    font-weight: 500;
    letter-spacing: 0.5px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--neon));
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--neon);
}

nav ul li a:hover:after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--light);
    z-index: 1001;
}

.header-contacts {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-contacts a {
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.header-contacts a:hover {
    color: var(--neon);
}

.header-contacts a i {
    color: var(--accent);
}

/* Hero Blog */
.blog-hero {
    padding: 200px 0 100px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.95));
    text-align: center;
}

.blog-hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
            radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 60%),
            radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.1) 0%, transparent 60%);
    z-index: -1;
}

.blog-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.blog-hero h1 {
    font-size: 64px;
    margin-bottom: 30px;
    line-height: 1.1;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.blog-hero p {
    font-size: 24px;
    margin-bottom: 50px;
    color: var(--text-secondary);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.blog-search {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.blog-search input {
    width: 100%;
    padding: 18px 25px;
    background: rgba(30, 41, 59, 0.5);
    border: var(--border);
    border-radius: 50px;
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    transition: var(--transition);
    color: var(--text);
    padding-right: 70px;
}

.blog-search input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.blog-search button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(90deg, var(--accent), var(--neon));
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 20px;
    transition: var(--transition);
}

.blog-search button:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Blog Content */
.blog-content {
    position: relative;
    padding: 80px 0;
}

.blog-container {
    display: flex;
    gap: 40px;
}

/* Main Content */
.blog-posts {
    flex: 3;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.blog-card {
    background: rgba(30, 41, 59, 0.8);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: var(--border);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease-out;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.blog-image {
    height: 250px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: all 0.2s ease-out;
}

.blog-image:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8));
    transition: all 0.2s ease-out;
}

.blog-card:hover .blog-image:before {
    opacity: 0.7;
}

.blog-category {
    position: absolute;
    top: 25px;
    left: 25px;
    background: linear-gradient(90deg, var(--accent), var(--neon));
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    z-index: 2;
    transition: all 0.2s ease-out;
}

.blog-card:hover .blog-category {
    transform: translateY(-5px);
}

.blog-content-inner {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-meta {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.blog-meta i {
    margin-right: 8px;
    color: var(--neon);
}

.blog-card h3 {
    margin-bottom: 15px;
    font-size: 22px;
    line-height: 1.3;
}

.blog-excerpt {
    margin-bottom: 20px;
    color: var(--text-secondary);
    flex: 1;
    font-size: 16px;
    line-height: 1.6;
}

.blog-footer {
    padding: 0 30px 30px;
}

/* Sidebar */
.blog-sidebar {
    flex: 1;
}

.sidebar-widget {
    background: rgba(30, 41, 59, 0.5);
    border-radius: var(--radius-lg);
    border: var(--border);
    backdrop-filter: blur(10px);
    padding: 30px;
    margin-bottom: 40px;
}

.sidebar-widget h3 {
    font-size: 24px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.sidebar-widget h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--neon));
    border-radius: 2px;
}

.categories-list {
    list-style: none;
}

.categories-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.categories-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.categories-list a {
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.categories-list a:hover {
    color: var(--neon);
}

.categories-list span {
    background: rgba(59, 130, 246, 0.1);
    color: var(--neon);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
}

.popular-posts {
    list-style: none;
}

.popular-post {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.popular-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-post-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.popular-post-image:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
}

.popular-post-content {
    flex: 1;
}

.popular-post-content h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.popular-post-content .post-date {
    font-size: 14px;
    color: var(--text-secondary);
}

.tags-widget {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--neon);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    transition: var(--transition);
    border: 1px solid rgba(59, 130, 246, 0.3);
    text-decoration: none;
}

.tag:hover {
    background: linear-gradient(90deg, var(--accent), var(--neon));
    color: var(--primary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.5);
    border: var(--border);
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

.page-item:hover, .page-item.active {
    background: linear-gradient(90deg, var(--accent), var(--neon));
    color: var(--primary);
}

/* Footer */
footer {
    background: var(--secondary);
    padding: 100px 0 50px;
    position: relative;
    overflow: hidden;
}

footer:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
            radial-gradient(circle at top right, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
            radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.footer-col h4 {
    color: var(--light);
    margin-bottom: 25px;
    font-size: 22px;
    position: relative;
    padding-bottom: 15px;
}

.footer-col h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--neon));
    border-radius: 2px;
}

.footer-col p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col ul li a:hover {
    color: var(--neon);
}

.footer-col ul li a i {
    width: 24px;
    color: var(--neon);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 50%;
    color: var(--text);
    font-size: 20px;
    transition: var(--transition);
    border: var(--border);
}

.social-links a:hover {
    background: linear-gradient(90deg, var(--accent), var(--neon));
    color: var(--primary);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 50px;
    border-top: var(--border);
    font-size: 16px;
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
}

/* Стили для изображений в карточках */
.blog-image {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease-out; /* Изменено с 0.5s на 0.2s */
}

.blog-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-category {
    position: absolute;
    top: 25px;
    left: 25px;
    background: linear-gradient(90deg, var(--accent), var(--neon));
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    z-index: 2;
}

/* Грид для карточек */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

/* Адаптивность для карточек */
@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-image {
        height: 200px;
    }
}

.blog-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .blog-hero h1 {
        font-size: 56px;
    }

    .section-title {
        font-size: 42px;
    }
}

@media (max-width: 992px) {
    .blog-hero {
        padding: 180px 0 80px;
    }

    .blog-hero h1 {
        font-size: 48px;
    }

    .blog-hero p {
        font-size: 20px;
    }

    .section-title {
        font-size: 36px;
    }

    .blog-container {
        flex-direction: column;
    }

    .mobile-menu-btn {
        display: block;
    }

    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--secondary);
        flex-direction: column;
        padding: 100px 40px 40px;
        transition: var(--transition);
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    }

    nav ul.active {
        right: 0;
    }

    .header-container {
        padding: 15px 0;
    }

    .header-contacts {
        display: none;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }

    .blog-hero {
        padding: 150px 0 60px;
    }

    .blog-hero h1 {
        font-size: 40px;
    }

    .blog-hero p {
        font-size: 18px;
    }

    .section-title {
        font-size: 32px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 20px;
    }

    .blog-hero h1 {
        font-size: 36px;
    }

    .section-title {
        font-size: 28px;
    }

    .blog-content-inner,
    .blog-footer,
    .sidebar-widget {
        padding: 25px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}