/* blog.css - Стили для страниц блога */
.blog-post-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
    line-height: 1.6;
}

.post-header {
    margin-bottom: 30px;
    text-align: center;
}

.post-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #2c3e50;
    line-height: 1.3;
}

.post-meta {
    color: #7f8c8d;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.reading-time::before {
    content: "⏱️";
    margin-right: 5px;
}

.post-image-full {
    margin: 25px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.post-image-full img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.post-image-full:hover img {
    transform: scale(1.02);
}

.post-content-full {
    font-size: 1.1rem;
}

.post-content-full h2 {
    font-size: 1.6rem;
    margin: 35px 0 15px;
    color: #2980b9;
    padding-bottom: 8px;
    border-bottom: 1px solid #ecf0f1;
}

.post-content-full h3 {
    font-size: 1.3rem;
    margin: 25px 0 10px;
    color: #3498db;
}

.post-content-full p {
    margin-bottom: 20px;
}

.post-content-full ul,
.post-content-full ol {
    margin-bottom: 25px;
    padding-left: 25px;
}

.post-content-full li {
    margin-bottom: 8px;
}

.brands-table, .comparison-table {
    width: 100%;
    margin: 25px 0;
    border-collapse: collapse;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.brands-table th, 
.comparison-table th {
    background-color: #2980b9;
    color: white;
    padding: 12px;
    text-align: left;
}

.brands-table td, 
.comparison-table td {
    padding: 10px 12px;
    border: 1px solid #ecf0f1;
}

.brands-table tr:nth-child(even),
.comparison-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.info-box {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 20px;
    margin: 30px 0;
    border-radius: 0 8px 8px 0;
}

.info-box h3 {
    color: #2e7d32;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box .btn {
    margin-top: 15px;
    background-color: #4caf50;
}

.info-box .btn:hover {
    background-color: #45a049;
}

.warning-box {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    margin: 25px 0;
    border-radius: 0 4px 4px 0;
}

.warning-box h3 {
    color: #ff9800;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.call-to-action {
    background-color: #e3f2fd;
    padding: 25px;
    border-radius: 8px;
    margin: 40px 0;
    text-align: center;
}

.call-to-action p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.mobile-buttons-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    min-width: 160px;
    max-width: 100%;
    box-sizing: border-box;
}

.call-to-action .btn {
    background-color: #2980b9;
    color: white;
}

.call-to-action .btn:hover {
    background-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
}

.post-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

.post-tags {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tags span {
    background-color: #f1f1f1;
    color: #7f8c8d;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.post-share span {
    font-weight: bold;
    color: #7f8c8d;
}

.social-share {
    color: #2980b9;
    font-size: 1.3rem;
    transition: color 0.3s;
    margin: 0 5px;
}

.social-share:hover {
    color: #3498db;
}

.related-posts {
    margin-top: 60px;
}

.related-posts h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

.related-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.related-post {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.related-post:hover {
    transform: translateY(-5px);
}

.related-post img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.related-post h3 {
    padding: 15px;
    margin: 0;
    font-size: 1.1rem;
    color: #2980b9;
}

.comments-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #ecf0f1;
}

.comments-container {
    margin-bottom: 40px;
}

.comment {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.comment-author i {
    font-size: 1.5rem;
    color: #3498db;
}

.comment-date {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.comment-text {
    line-height: 1.6;
    margin-bottom: 15px;
}

.comment-rating {
    color: #f1c40f;
}

.add-comment {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.add-comment h3 {
    margin-top: 0;
    color: #2c3e50;
    margin-bottom: 20px;
}

.comment-form .form-group {
    margin-bottom: 20px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.2);
}

.rating-input {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stars-input {
    display: flex;
    gap: 5px;
    cursor: pointer;
}

.stars-input i {
    font-size: 1.5rem;
    color: #ddd;
    transition: color 0.3s;
}

.stars-input i:hover,
.stars-input i.active {
    color: #f1c40f;
}

@media (max-width: 768px) {
    .blog-post-container {
        padding: 15px;
    }
    
    .post-header h1 {
        font-size: 1.8rem;
    }
    
    .post-content-full {
        font-size: 1rem;
    }
    
    .post-content-full h2 {
        font-size: 1.4rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 5px;
        align-items: center;
    }
    
    .brands-table, 
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .brands-table th, 
    .brands-table td,
    .comparison-table th, 
    .comparison-table td {
        padding: 8px 10px;
    }
    
    .mobile-buttons-container {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        min-width: auto;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .call-to-action .btn {
        margin: 3px 0;
    }
    
    .info-box, 
    .warning-box, 
    .call-to-action {
        padding: 15px;
        margin: 20px 0;
    }
    
    .post-tags {
        justify-content: center;
    }
    
    .post-share {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .social-share {
        margin: 5px;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .add-comment {
        padding: 20px;
    }
    
    .rating-input {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .post-header h1 {
        font-size: 1.6rem;
    }
    
    .post-content-full h2 {
        font-size: 1.3rem;
    }
    
    .post-content-full h3 {
        font-size: 1.1rem;
    }
    
    .related-container {
        grid-template-columns: 1fr;
    }
    
    .post-tags span {
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .mobile-buttons-container {
        gap: 8px;
    }
}

/* Стили для внешних источников */
.external-source {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.external-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.external-link {
    color: white;
    text-decoration: none;
    display: block;
    transition: transform 0.3s ease;
}

.external-link:hover {
    transform: translateX(5px);
}

.external-link strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.external-link span {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Стили для блока Drive2 */
.drive2-reference {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #2c5aa0;
    border-radius: 16px;
    padding: 25px;
    margin: 40px 0;
    gap: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.1);
    box-sizing: border-box;
}

.drive2-reference:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(44, 90, 160, 0.2);
}

.drive2-icon {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3d6f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 4px 10px rgba(44, 90, 160, 0.3);
}

.drive2-content {
    flex: 1;
    min-width: 0; /* Важно для предотвращения переполнения */
}

.drive2-content h3 {
    color: #2c5aa0;
    margin: 0 0 12px 0;
    font-size: 1.4em;
    font-weight: 700;
    word-wrap: break-word;
}

.drive2-content p {
    color: #495057;
    margin: 0 0 20px 0;
    line-height: 1.6;
    font-size: 1.05em;
    word-wrap: break-word;
}

.drive2-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3d6f 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
    border: none;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drive2-link:hover {
    background: linear-gradient(135deg, #1e3d6f 0%, #152a4d 100%);
    transform: translateX(8px);
    box-shadow: 0 6px 18px rgba(44, 90, 160, 0.4);
    color: white;
}

/* Улучшенная адаптивность для мобильных */
@media (max-width: 768px) {
    .drive2-reference {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
        margin: 30px 0;
        border-radius: 12px;
        border-width: 1px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .drive2-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
        margin-bottom: 5px;
    }
    
    .drive2-content {
        width: 100%;
    }
    
    .drive2-content h3 {
        font-size: 1.3em;
        margin-bottom: 10px;
        padding: 0 5px;
    }
    
    .drive2-content p {
        font-size: 1em;
        margin-bottom: 18px;
        padding: 0 5px;
    }
    
    .drive2-link {
        padding: 14px 20px;
        font-size: 1.05em;
        width: 100%;
        max-width: 280px;
        justify-content: center;
        margin: 0 auto;
        display: flex;
    }
    
    .drive2-link:hover {
        transform: translateY(-2px);
    }
}

@media (max-width: 480px) {
    .drive2-reference {
        padding: 18px 12px;
        margin: 25px 0;
        width: calc(100% - 10px);
        margin-left: 5px;
        margin-right: 5px;
    }
    
    .drive2-icon {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    .drive2-content h3 {
        font-size: 1.2em;
        padding: 0;
    }
    
    .drive2-content p {
        font-size: 0.95em;
        padding: 0;
    }
    
    .drive2-link {
        padding: 12px 16px;
        font-size: 1em;
        max-width: 250px;
        min-width: auto;
    }
    
    /* Для очень маленьких экранов */
    @media (max-width: 360px) {
        .drive2-reference {
            padding: 15px 10px;
            margin: 20px 0;
        }
        
        .drive2-link {
            font-size: 0.95em;
            padding: 10px 14px;
            max-width: 220px;
        }
        
        .drive2-link span {
            white-space: normal;
            line-height: 1.3;
        }
    }
}

/* Дополнительные исправления для контейнера */
.blog-post-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
    line-height: 1.6;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden; /* Предотвращает горизонтальный скролл */
}

/* Гарантируем, что контент не выходит за границы */
.post-content-full {
    font-size: 1.1rem;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Блок "Читайте также" */
.related-articles {
    margin: 3rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.related-articles h3 {
    margin-top: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.related-article {
    background: white;
    padding: 1.25rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-article:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.related-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-link h4 {
    margin: 0 0 0.5rem 0;
    color: #2980b9;
    font-size: 1.1rem;
}

.related-link p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Стили для блока принятия решения (decision-box) из статьи про радиатор */
.decision-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.decision-option {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-top: 4px solid #3498db;
}

.decision-option:nth-child(2) {
    border-top-color: #e74c3c;
}

.decision-option h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2c3e50;
}

.decision-option ul {
    margin: 1rem 0 0 0;
    padding-left: 1.2rem;
}

.decision-option li {
    margin-bottom: 0.5rem;
}

.small-text {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .related-articles-grid {
        grid-template-columns: 1fr;
    }
    
    .decision-box {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .related-article,
    .decision-option {
        padding: 1rem;
    }
}