/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
    background: #f8f9fa;
}

/* Стили для заголовков контента */
.rich-text h2,
h2.content-heading,
.content-heading-h2,
div.content-heading-h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.rich-text h3,
h3.content-heading,
.content-heading-h3,
div.content-heading-h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 1.5rem 0 0.75rem 0;
    line-height: 1.3;
    border-bottom: 1px solid #95a5a6;
    padding-bottom: 0.25rem;
}

.rich-text h4,
h4.content-heading,
.content-heading-h4,
div.content-heading-h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #34495e;
    margin: 1rem 0 0.5rem 0;
    line-height: 1.3;
}

.rich-text h2:first-child,
h2.content-heading:first-child,
.content-heading-h2:first-child,
div.content-heading-h2:first-child,
.rich-text h3:first-child,
h3.content-heading:first-child,
.content-heading-h3:first-child,
div.content-heading-h3:first-child,
.rich-text h4:first-child,
h4.content-heading:first-child,
.content-heading-h4:first-child,
div.content-heading-h4:first-child {
    margin-top: 0;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%; /* Добавляем для лучшей адаптивности */
    box-sizing: border-box; /* Включаем padding в ширину */
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem 0;
    font-weight: 600;
    line-height: 1.3;
    color: #2c3e50;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin: 0 0 1rem 0;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background: #ffffff;
    color: #333;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

/* В шапке: выравнивание элементов */
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* Mobile Navigation */
.mobile-navigation {
    display: none;
}

/* Mobile burger and overlay removed */

.site-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.site-title a {
    color: #1f2937;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-title a:hover {
    text-decoration: none;
    color: #3b82f6;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.main-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
}

.main-nav-list a {
    color: #4b5563;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main-nav-list a:hover {
    background-color: #f3f4f6;
    color: #3b82f6;
    text-decoration: none;
}

/* Mobile navigation code removed */

/* ==========================================================================
   Main Content
   ========================================================================== */

.main-content {
    background: rgba(255, 255, 255, 0.95);
    min-height: calc(100vh - 200px);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    position: relative;
    z-index: 1;
    margin: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.breadcrumbs {
    background: #ecf0f1;
    padding: 0.75rem 0;
    margin-bottom: 2rem;
    border-radius: 5px;
}

.breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}


.breadcrumbs a {
    color: #34495e;
}

/* ==========================================================================
   Blog Styles
   ========================================================================== */

/* Blog Index Page */
.template-blogindexpage .intro {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.blog-posts {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.blog-post-preview {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.blog-post-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(0,0,0,0.12);
}

.blog-post-preview h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.blog-post-preview h2 a {
    color: #2c3e50;
    text-decoration: none;
}

.blog-post-preview h2 a:hover {
    color: #3498db;
}

.blog-post-preview .meta {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.blog-post-preview .meta time {
    display: flex;
    align-items: center;
}

.blog-post-preview .meta time::before {
    content: "📅";
    margin-right: 0.5rem;
}

.blog-post-preview .intro {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.blog-post-preview .image {
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.blog-post-preview .image img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-post-preview p:last-child {
    margin: 0;
}

.blog-post-preview p:last-child a {
    display: inline-flex;
    align-items: center;
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.blog-post-preview p:last-child a:hover {
    background: #2980b9;
}

/* Blog Post Page */
.template-blogpage .post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.template-blogpage .post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.template-blogpage .post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    color: #7f8c8d;
    font-size: 0.95rem;
}

.template-blogpage .post-meta time {
    display: flex;
    align-items: center;
}

.template-blogpage .post-meta time::before {
    content: "📅";
}

.template-blogpage .tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.template-blogpage .tag {
    background: #ecf0f1;
    color: #34495e;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.template-blogpage .post-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.template-blogpage .post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.template-blogpage .post-intro {
    font-size: 1.2rem;
    color: #555;
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.template-blogpage .post-intro .intro {
    margin: 0;
    font-style: italic;
}

.template-blogpage .post-body {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 2rem 0;
}

.template-blogpage .post-body p {
    margin-bottom: 1.5rem;
}

.template-blogpage .post-body h2,
.template-blogpage .post-body h3,
.template-blogpage .post-body h4 {
    margin: 2rem 0 1rem 0;
    color: #2c3e50;
}

.template-blogpage .post-body ul,
.template-blogpage .post-body ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.template-blogpage .post-body li {
    margin-bottom: 0.5rem;
}

/* Gallery */
.post-gallery {
    margin: 3rem 0;
}

.post-gallery h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-item figcaption {
    padding: 1rem;
    background: white;
    color: #555;
    font-size: 0.9rem;
    text-align: center;
}

/* Post Tags */
.post-tags {
    margin: 3rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.post-tags h4 {
    margin: 0 0 1rem 0;
    color: #2c3e50;
}

.tag-link {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    margin: 0.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.tag-link:hover {
    background: #2980b9;
    text-decoration: none;
}

/* Post Navigation */
.post-navigation {
    margin: 3rem 0;
    text-align: center;
    padding: 2rem 0;
    border-top: 2px solid #ecf0f1;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    background: #95a5a6;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.back-to-blog:hover {
    background: #7f8c8d;
    text-decoration: none;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 2px solid #ecf0f1;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.pagination a:hover {
    background: #2980b9;
    text-decoration: none;
}

.pagination .current {
    color: #7f8c8d;
    font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: #34495e;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    position: relative;
    z-index: 2;
}

.site-footer p {
    margin: 0;
    opacity: 0.8;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .container {
    
    .header-content {
        margin: 0 1rem;
        gap: 1rem;
        text-align: center;
    }
    
    .main-nav-list {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .template-blogpage .post-header h1 {
        font-size: 2rem;
    }
    
    .template-blogpage .post-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .blog-post-preview {
        padding: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .blog-post-preview {
        padding: 1rem;
    }
    
    .template-blogpage .post-intro,
    .template-blogindexpage .intro {
        padding: 1rem;
    }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* ==========================================================================
   Content Blocks Styles
   ========================================================================== */


/* Alert Block */
.alert {
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 12px;
    border: 2px solid;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, currentColor, transparent);
}

.alert-info {
    background: rgba(227, 242, 253, 0.9);
    border-color: #2196f3;
    color: #0d47a1;
}

.alert-success {
    background: rgba(232, 245, 232, 0.9);
    border-color: #4caf50;
    color: #1b5e20;
}

.alert-warning {
    background: rgba(255, 243, 224, 0.9);
    border-color: #ff9800;
    color: #e65100;
}

.alert-danger {
    background: rgba(255, 235, 238, 0.9);
    border-color: #f44336;
    color: #b71c1c;
}

.alert-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-content {
    line-height: 1.6;
}

/* Pros and Cons Block */
.pros-cons-block {
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(76, 175, 80, 0.3);
    position: relative;
    overflow: hidden;
}

.pros-cons-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4caf50, #f44336);
}

.pros-cons-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.pros-cons-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.pros-section, .cons-section {
    background: rgba(248, 249, 250, 0.7);
    border-radius: 8px;
    padding: 1.5rem;
    border: none;
    box-shadow: none;
}

.pros-section {
    background: rgba(232, 245, 232, 0.7);
}

.cons-section {
    background: rgba(255, 235, 238, 0.7);
}

.pros-title, .cons-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.pros-list, .cons-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pros-item, .cons-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 1.5rem;
}

.pros-item:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
}

.cons-item:before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #f44336;
    font-weight: bold;
}

.pros-item:last-child, .cons-item:last-child {
    border-bottom: none;
}

/* Steps Block */
.steps-block {
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(103, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.steps-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.steps-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.steps-container {
    display: flex;
    flex-direction: column;

}

.step-item {
    display: flex;
    gap: 1.5rem;
    background: rgba(248, 249, 250, 0.7);
    border-radius: 8px;
    padding: 1.5rem;
    border: none;
    box-shadow: none;
    margin-bottom: 1rem;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.step-content {
    flex: 1;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.step-icon {
    font-size: 1.5rem;
}

.step-title {
    margin: 0;
    color: #2c3e50;
}

.step-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.step-image {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.step-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Cards Block */
.cards-block {
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
}

.cards-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #9b59b6);
}

.cards-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.cards-container {
    display: grid;
    gap: 1.5rem;
}

.cards-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.cards-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.cards-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.cards-masonry {
    columns: 3;
    column-gap: 1.5rem;
}

.cards-masonry .card-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

.card-item {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(0,0,0,0.12);
}

/* Цветовые классы карточек больше не используются */

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

.card-content {
    padding: 1.5rem;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.card-icon {
    font-size: 1.5rem;
}

.card-title {
    margin: 0;
    color: #2c3e50;
}

.card-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.card-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: #2980b9;
}

/* Accordion Block */
.accordion-block {
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(52, 66, 250, 0.3);
    position: relative;
    overflow: hidden;
}

.accordion-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3742fa, #5a67d8);
}

.accordion-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.accordion-container {
    background: rgba(248, 249, 250, 0.7);
    border-radius: 8px;
    overflow: hidden;
    border: none;
    box-shadow: none;
}

.accordion-item {
    border-bottom: 1px solid #f0f0f0;
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-question {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.accordion-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
    transition: transform 0.3s ease;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.active {
    max-height: 1000px;
}

.accordion-answer {
    padding: 1.5rem;
    color: #555;
    line-height: 1.6;
}

/* Quote Block */
.quote-block {
    margin: 2rem 0;
}

.quote-content {
    margin: 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
}

.quote-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.quote-default {
    border-color: #3498db;
}

.quote-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.quote-testimonial {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
}

.quote-text {
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.quote-footer {
    text-align: right;
    font-size: 0.9rem;
    opacity: 0.8;
}

.quote-author {
    font-weight: 600;
}

/* Stats Block */
.stats-block {
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
}

.stats-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #9b59b6);
}

.stats-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-item {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stat-description {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Code Block */
.code-block {
    margin: 2rem 0;
    background: rgba(45, 55, 72, 0.95);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00d4ff, #667eea);
}

.code-title {
    margin: 0 0 1rem 0;
    color: #ffffff;
    padding: 1rem 1rem 0 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.code-container {
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    border: none;
    box-shadow: none;
}

.code-header {
    background: #1a202c;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #4a5568;
}

.code-language {
    color: #a0aec0;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}

.code-content {
    margin: 0;
    padding: 1.5rem;
    background: #2d3748;
    color: #e2e8f0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
}

.code-content code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Responsive Design for Content Blocks */
@media (max-width: 768px) {
    .pros-cons-container {
        grid-template-columns: 1fr;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        align-self: center;
    }
    
    .cards-masonry {
        columns: 1;
    }
    
    .stats-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ==========================================================================
   АДАПТИВНАЯ ВЕРСТКА - ПРАВИЛЬНАЯ СТРУКТУРА
   ========================================================================== */

/* Базовые стили для всех размеров 769px+ */
@media (min-width: 769px) {
    .container {
        margin: 0 1rem;
        max-width: 100%; /* КЛЮЧЕВОЕ ИСПРАВЛЕНИЕ */
    }
    
    /* ИСПРАВЛЕНИЕ HEADER ДЛЯ ПЛАНШЕТОВ */
    .site-header {
        position: relative; /* Убираем sticky на планшетах */
        width: 100%;
        box-sizing: border-box;
    }
    
    .header-content {
        flex-direction: row;
        gap: 1rem; /* Уменьшаем gap */
        flex-wrap: wrap; /* Разрешаем перенос */
        width: 100%;
        box-sizing: border-box;
    }
    
    .site-title {
        flex-shrink: 0;
        max-width: 50%; /* Ограничиваем ширину заголовка */
    }
    
    .desktop-navigation {
        display: flex;
        flex: 1;
        justify-content: flex-end;
    }
    
    /* Mobile menu styles removed */
    
    .main-nav-list {
        flex-direction: row;
        gap: 0.75rem; /* Уменьшаем gap между пунктами меню */
        flex-wrap: wrap;
    }
    
    .template-blogpage .post-meta {
        flex-direction: row;
        gap: 1rem;
    }
}

/* Планшеты (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 100%;
    }

    /* Навигация остается десктопной */
    .desktop-navigation {
        display: flex !important;
    }

    .mobile-navigation {
        display: none !important;
    }

    /* Гарантированно показываем все элементы десктопной навигации */
    .desktop-navigation .main-navigation,
    .desktop-navigation .menu-list,
    .desktop-navigation .menu-item {
        display: flex !important;
    }
}
    
    /* Header адаптивный */
    .header-content {
        flex-direction: row;
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .main-nav-list {
        flex-direction: row;
        gap: 0.75rem;
    }
    
    /* Размеры шрифтов */
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    
    .template-blogpage .post-header h1 {
        font-size: 2rem;
    }
    
    /* Grid элементы */
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    
    .cards-grid-2 {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .cards-grid-3 {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    
    .pros-cons-container {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

/* Mobile menu styles removed */

/* Mobile Navigation */
.mobile-navigation {
    display: none;
}

.mobile-navigation .mobile-menu-wrapper {
        position: fixed;
        inset: 0;
        width: 100%;
        display: flex;
        justify-content: flex-end;
        pointer-events: none;
        z-index: 1400;
}

.mobile-navigation .mobile-menu-wrapper.active {
        pointer-events: auto;
}

.mobile-navigation .mobile-menu-toggle {
        pointer-events: auto;
        z-index: 1600;
}

.mobile-navigation .mobile-menu {
        position: relative;
        width: min(320px, 85vw);
        height: 100vh;
        background: #ffffff;
        box-shadow: -8px 0 24px rgba(15, 23, 42, 0.35);
        transform: translateX(110%);
        transition: transform 0.35s ease;
        pointer-events: auto;
        display: flex;
        flex-direction: column;
        padding: 1rem;
        z-index: 1500;
}

.mobile-navigation .mobile-menu-wrapper.active .mobile-menu {
        transform: translateX(0);
}

.mobile-navigation .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease;
        z-index: 1300;
}

.mobile-navigation .mobile-menu-wrapper.active .mobile-menu-overlay {
        opacity: 1;
        pointer-events: auto;
}

body.mobile-menu-open {
    overflow: hidden;
}

/* Временно убираем планшетный медиазапрос отсюда - переместим в конец */

@media (max-width: 768px) {
    .desktop-navigation,
    .desktop-navigation .main-navigation,
    .desktop-navigation .menu-list,
    .desktop-navigation .menu-item {
        display: none !important;
    }

    .header-content {
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
    }

    .site-title {
        flex: 1 1 auto;
    }

    .mobile-navigation {
        display: flex !important;
        align-items: center;
        margin-left: auto;
        order: 2;
        flex: 0 0 auto;
        justify-content: flex-end;
    }

    .mobile-navigation .mobile-menu {
        transform: translateX(calc(100% + 32px));
        width: min(320px, 85vw);
        max-width: 320px;
    }

    .mobile-navigation .mobile-menu-wrapper.active .mobile-menu {
        transform: translateX(0);
    }

    html,
    body {
        overflow-x: hidden;
    }
}

/* Большие экраны (1025px+) */
@media (min-width: 1025px) {
    .container {
        max-width: 1200px; /* Возвращаем ограничение для больших экранов */
    }

    /* Возвращаем sticky header на больших экранах */
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .header-content {
        flex-direction: row;
        gap: 2rem;
        flex-wrap: nowrap;
    }

    .site-title {
        max-width: none; /* Убираем ограничение ширины */
    }

    /* Навигация полная */
    .desktop-navigation {
        display: flex;
        flex: none;
        justify-content: flex-start;
    }

    .mobile-navigation {
        display: none;
    }

    .main-nav-list {
        flex-direction: row;
        gap: 1rem;
        flex-wrap: nowrap;
    }
}



/* Большие экраны (1025px+) */
@media (min-width: 1025px) {
    .container {
        max-width: 1200px;
    }
}


