/* style_ar.css - стили для статей, дополняющие основные стили из style.css */

/* Отключение анимаций при загрузке страницы */
.article-content,
.article-header,
.article-title,
.article-meta,
.article-section,
.article-section h2,
.article-section h3,
.article-section h4,
.article-section p,
.article-section li,
.article-section ul,
.article-section ol {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Основные стили контента статьи */
.article-content {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 60px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 40px;
    margin-bottom: 60px;
    color: #1a202c;
}

.article-content p ol {
    color: #1a202c;
}

.article-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
}

.article-title {
    font-size: 2.3rem;
    color: #0a2540;
    margin-bottom: 20px;
    line-height: 1.2;
}

.article-meta {
    color: #718096;
    font-size: 0.95rem;
}

.article-section {
    margin-bottom: 40px;
}

.article-section h2 {
    color: #0a2540;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.8rem;
    font-weight: 600;
}

.article-section h3 {
    color: #1a202c;
    margin: 25px 0 15px 0;
    font-size: 1.4rem;
    font-weight: 600;
}

/* Стили для таблиц */
.table-container {
    overflow-x: auto;
    margin: 25px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.safety-table, .cable-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.safety-table th, .cable-table th {
    background: #0a2540;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.safety-table td, .cable-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
    color: #1a202c;
}

.safety-table tr:nth-child(even), .cable-table tr:nth-child(even) {
    background: #f8fafc;
}

/*.safety-table tr:hover, .cable-table tr:hover {
    background: #e3f2fd;
}*/

/* Информационные блоки */
.danger-box {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    color: #1a202c;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    color: #1a202c;
}

.safe-box {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    color: #1a202c;
}

.info-box, .note-box {
    background: #e3f2fd;
    border-left: 4px solid #0072ce;
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    color: #1a202c;
}

/* Навигация и ссылки */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 30px;
    transition: var(--transition);
    padding: 10px 16px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
}

.back-link:hover {
    color: #ff6b35;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.article-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0072ce;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 10px 16px;
    border-radius: 8px;
}

.nav-link:hover {
    color: #ff6b35;
    background: rgba(0, 114, 206, 0.05);
    transform: translateX(-5px);
}

.nav-link.next:hover {
    transform: translateX(5px);
}

/* Карточки защиты */
.protection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.protection-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: var(--transition);
    text-align: center;
}

.protection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.protection-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #0072ce, #ff6b35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 1.8rem;
}

.protection-card h4 {
    color: #0a2540;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.protection-card p {
    color: #4a5568;
    line-height: 1.5;
}

/* Сетка инструментов */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #0072ce;
}

.tool-icon {
    width: 40px;
    height: 40px;
    background: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0072ce;
    font-size: 1.2rem;
}

/* Специализированные сетки */
.specialist-grid, .causes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.specialist-card, .cause-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.specialist-card:hover, .cause-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.article-section h4{
    font-size: 1.2rem;
}

.specialist-card h4, .cause-card h4 {
    color: #0a2540;
    margin-bottom: 12px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.specialist-card h4 i {
    color: #0072ce;
}

.cause-card h4 i {
    color: #dc3545;
}

/* Шаги и списки */
.first-aid-steps, .solution-steps, .criteria-list {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid #dc3545;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.step:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.step-number {
    background: #0072ce;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    font-weight: 600;
}

.step-content h4 {
    color: #0a2540;
    margin-bottom: 8px;
}

.criteria-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.criteria-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.criteria-number {
    background: #28a745;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    font-weight: 600;
}

/* Формулы и расчеты */
.formula {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    text-align: center;
    border: 1px solid #e2e8f0;
    color: #1a202c;
    font-weight: 600;
}

.calculation-example {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid #ff6b35;
    color: #1a202c;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    border: 1px solid #e2e8f0;
}

.comparison-table th, .comparison-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    color: #1a202c;
}

.comparison-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #0a2540;
}

.calculation-example h4 {
    color: #0a2540;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.calculation-example h4 i {
    color: #0072ce;
}

/* Жирный текст в блоках */
.danger-box strong, .warning-box strong, .safe-box strong, .info-box strong, .note-box strong {
    color: #0a2540;
}

/* Основные стили текста - ТЕМНЫЙ ТЕКСТ */
.article-section p {
    text-align: left;
    text-indent: 1em;
    margin-bottom: 1.2em;
    line-height: 1.7;
    max-width: 100%;
    hyphens: auto;
    color: #2a3242;
    font-size: 1rem;
}

.article-section ul, 
.article-section ol {
    text-align: left;
    margin-left: 2em;
    margin-bottom: 1.2em;
}

.article-section li {
    text-align: left;
    margin-bottom: 0.5em;
    line-height: 1.6;
    color: #2a3242;
    font-size: 1.05rem;
}

/* Отступы после заголовков
.article-section h2 + p,
.article-section h3 + p,
.article-section h4 + p {
    text-indent: 1.5em;
}*/

/* Сброс отступов для специальных блоков */
.danger-box p,
.warning-box p,
.info-box p,
.note-box p,
.safe-box p,
.calculation-example p {
    text-indent: 0 !important;
    margin-bottom: 0.8em;
}

/* Выравнивание информационных блоков */
.danger-box,
.warning-box,
.info-box,
.note-box,
.safe-box,
.calculation-example {
    text-align: left;
}

/* Таблицы и формулы */
.table-container,
.formula {
    text-align: left;
}

.ar-grid {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.ar-card {
    width: 100%;
    max-width: 100%;
}

.ar-image {
    width: 100%;
    text-align: center;
}

.ar-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
}

/* Стили для содержания статьи */
.toc-container {
    background: #f8fafc;
    padding: 35px 30px;
    border-radius: 16px;
    margin: 35px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.toc-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0072ce, #ff6b35);
    border-radius: 16px 16px 0 0;
}

.toc-container h3 {
    color: #0a2540;
    margin-bottom: 28px;
    text-align: center;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
}

.toc-container h3 i {
    color: #0072ce;
    font-size: 1.3rem;
}

.toc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-item {
    margin-bottom: 8px;
    position: relative;
}

.toc-link {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: #ffffff;
    border-radius: 10px;
    text-decoration: none;
    color: #334155;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.toc-link:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: #0072ce;
}

.toc-link:hover .toc-number {
    background: #0072ce;
    color: white;
}

.toc-link:hover .toc-text {
    color: #0072ce;
}

.toc-link:hover .toc-arrow {
    color: #0072ce;
    transform: translateX(4px);
}

.toc-number {
    background: #f1f5f9;
    color: #475569;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 15px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.toc-text {
    flex: 1;
    font-weight: 500;
    line-height: 1.5;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    color: #334155;
}

.toc-arrow {
    color: #94a3b8;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    margin-left: 10px;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .toc-container {
        padding: 25px 20px;
        margin: 25px 0;
        border-radius: 12px;
    }
    
    .toc-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .toc-container h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .toc-link {
        padding: 12px 15px;
    }
    
    .toc-number {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
        margin-right: 12px;
    }
    
    .toc-text {
        font-size: 0.9rem;
    }
    
    /* Исправления для адаптивности изображений */
    .ar-image img {
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }
    
    .ar-grid {
        margin: 20px 0;
    }
}

@media (max-width: 480px) {
    .toc-container {
        padding: 20px 15px 20px 0;
        margin: 20px 0;
    }
    
    .toc-link {
        padding: 10px 12px;
    }
    
    .toc-number {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
        margin-right: 10px;
    }
    
    .toc-text {
        font-size: 0.85rem;
    }
    
    .toc-container h3 {
        font-size: 1.2rem;
        flex-direction: row;
        gap: 10px;
    }
    
    .toc-container::before {
        height: 2px;
    }
    
    /* Исправления для адаптивности изображений на очень маленьких экранах */
    .ar-image img {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        max-width: 100%;
    }
}

/* Дополнительные улучшения для читабельности */
.toc-link:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

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

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .article-content {
        padding: 20px 10px;
        margin: 15px 5px;
        width: calc(100% - 10px);
        max-width: none;
        box-sizing: border-box;
    }
    
    .article-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .article-section h2 {
        font-size: 1.5rem;
    }
    
    .article-section h3 {
        font-size: 1.2rem;
    }
    
    .article-section li {
        font-size: 1rem;
        line-height: 1.6;
        text-align: left;
        color: #2a3242;
    }
    
    .article-section ul,
    .article-section ol {
        margin-left: 1.5em;
        text-align: left;
    }
    
    .table-container {
        /*margin: 15px -10px;*/
		margin: 15px -5px;
        border-radius: 0;
       /* width: calc(100% + 20px);*/
	   width: calc(100% + 10px);
    }
    
    .safety-table th, .safety-table td,
    .cable-table th, .cable-table td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
    
    .danger-box, .warning-box, .safe-box, .info-box, .note-box,
    .first-aid-steps, .solution-steps, .criteria-list,
    .calculation-example {
        margin: 20px -10px;
        padding: 15px;
        width: calc(100% + 20px);
        box-sizing: border-box;
    }
    
    .protection-grid, .causes-grid, .specialist-grid, .tools-grid {
        gap: 15px;
        margin: 20px -5px;
    }
    
    .protection-card, .cause-card, .specialist-card {
        padding: 20px 15px;
    }
    
    .tool-item {
        padding: 15px 12px;
        gap: 12px;
    }
    
    .tool-icon {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    .article-navigation {
        margin: 30px 0;
        padding: 15px 0;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .hero {
        padding: 120px 0 60px !important;
    }
    
    .hero .container {
        /*padding-left: 10px;*/
        /*padding-right: 10px;*/
        padding-left: 5px;
        padding-right: 5px;		
    }
    
    .container {
        padding-left: 10px;
        padding-right: 17px;
    }
    
    .protection-grid, .tools-grid, .specialist-grid, .causes-grid {
        grid-template-columns: 1fr;
    }
}

/* Адаптация для очень маленьких экранов */
@media (max-width: 480px) {
    .article-content {
        padding: 15px 8px;
        margin: 10px 2px;
        width: calc(100% - 4px);
    }
    
    .article-title {
        font-size: 1.6rem;
    }
    
    .article-section h2 {
        font-size: 1.3rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 8px;
        font-size: 0.8rem;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /*margin: 15px -8px;*/
        /*width: calc(100% + 16px);*/
		margin: 15px -4px;
		width: calc(100% + 8px);
    }
    
    .safety-table, .cable-table {
        /*min-width: 500px;*/
		min-width: 370px;
    }
    
    .danger-box, .warning-box, .safe-box, .info-box, .note-box,
    .first-aid-steps, .solution-steps, .criteria-list,
    .calculation-example {
        margin: 15px -8px;
        padding: 12px;
        width: calc(100% + 16px);
    }
    
    .protection-grid, .causes-grid, .specialist-grid, .tools-grid {
        gap: 12px;
        margin: 15px -5px;
    }
    
    .tool-item {
        padding: 12px 10px;
        gap: 10px;
    }
    
    .tool-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .step, .criteria-item {
        margin-bottom: 15px;
        padding-bottom: 15px;
    }
    
    .step-number, .criteria-number {
        width: 25px;
        height: 25px;
        font-size: 0.9rem;
        margin-right: 12px;
    }
}

/* Дополнительные стили */
/*.article-section p {
    max-width: none;
}*/

/* Предотвращение горизонтального скролла */
body {
    overflow-x: hidden;
}