/* Page Template Styles */
:root {
    --primary: #1A1E2B;
    --secondary: #2D4059;
    --accent: #EA5455;
    --light: #FFFFFF;
    --dark: #F5F5F5;
    --text: #333333;
    --text-light: #666666;
    --border: #E0E0E0;
}

.article-page {
    font-family: 'Montserrat', sans-serif;
    color: var(--text);
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

.article-page .container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Article Header */
.article-header {
    padding: 2rem 0;
    text-align: center;
}

.article-title {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: var(--primary);
    text-align: center;
}

.article-excerpt {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
    font-weight: 400;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Article Content */
.article-content {
    padding: 2rem 0 5rem;
}

.article-body {
    max-width: 800px;
    margin: 0 auto;
}

.article-image {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

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

.article-content-wrapper {
    margin-top: 2rem;
}

/* Typography */
.article-body h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1.2rem;
    color: var(--primary);
    position: relative;
    padding-bottom: 0.5rem;
}

.article-body h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent);
}

.article-body h3 {
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    color: var(--primary);
}

.article-body p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.article-body ul, 
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.article-body blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-light);
    background-color: var(--dark);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

/* Steps */
.steps {
    margin: 2rem 0;
}

.step {
    display: flex;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--dark);
    border-radius: 10px;
    border-left: 4px solid var(--accent);
}

.step-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent);
    margin-right: 1.5rem;
    min-width: 40px;
}

.step-content h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
}

/* Tips */
.tip {
    background: #FFF9E6;
    border-left: 4px solid #FFD166;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.tip-title {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    color: #E6B325;
    font-weight: 600;
}

.tip-title i {
    margin-right: 0.5rem;
}

/* Warning */
.warning {
    background: #FFE6E6;
    border-left: 4px solid #FF6B6B;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.warning-title {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    color: #E64545;
    font-weight: 600;
}

.warning-title i {
    margin-right: 0.5rem;
}

/* Table */
.article-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.article-table th {
    background: var(--primary);
    color: white;
    padding: 1rem;
    text-align: left;
}

.article-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.article-table tr:nth-child(even) {
    background: var(--dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .article-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-excerpt {
        font-size: 1.1rem;
    }
    
    .article-body h2 {
        font-size: 1.5rem;
    }
    
    .article-body h3 {
        font-size: 1.2rem;
    }
    
    .step {
        flex-direction: column;
    }
    
    .step-number {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.6rem;
    }
    
    .article-excerpt {
        font-size: 1rem;
    }
    
    .article-page .container {
        width: 95%;
    }
    
    .article-header {
        padding: 1.5rem 0;
    }
}

/* Стили для ссылок */
.article-body a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    padding: 0 2px;
}

/* Подчеркивание при наведении */
.article-body a:hover {
    color: var(--secondary);
}

.article-body a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--secondary));
    transition: width 0.3s ease;
    border-radius: 1px;
}

/* Table Styles */
.wp-block-table,
.article-content-wrapper table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.wp-block-table table,
.article-content-wrapper table {
    width: 100%;
    border-collapse: collapse;
}

.wp-block-table th,
.wp-block-table td,
.article-content-wrapper th,
.article-content-wrapper td {
    padding: 1rem;
    border: 1px solid var(--border);
}

.wp-block-table th,
.article-content-wrapper th {
    background: var(--primary);
    color: white;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--secondary);
}

.wp-block-table tr:nth-child(even),
.article-content-wrapper tr:nth-child(even) {
    background: var(--dark);
}

.wp-block-table tr:hover,
.article-content-wrapper tr:hover {
    background: rgba(234, 84, 85, 0.05);
    transition: background-color 0.3s ease;
}

/* Стили для таблиц созданных через редактор */
table.wp-block-table {
    border-radius: 10px;
}

table.wp-block-table thead th {
    border-bottom: 2px solid var(--secondary);
}

/* Стили для выравнивания текста */
.wp-block-table[data-align="left"] {
    margin-right: auto;
}

.wp-block-table[data-align="center"] {
    margin-left: auto;
    margin-right: auto;
}

.wp-block-table[data-align="right"] {
    margin-left: auto;
}

/* Полосатик для таблиц */
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background-color: var(--dark);
}

.wp-block-table.is-style-stripes th,
.wp-block-table.is-style-stripes td {
    border-color: var(--border);
}

/* Адаптивность для таблиц */
@media (max-width: 768px) {
    .wp-block-table,
    .article-content-wrapper table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .wp-block-table th,
    .wp-block-table td,
    .article-content-wrapper th,
    .article-content-wrapper td {
        padding: 0.8rem 0.6rem;
        font-size: 0.9rem;
    }
}

/* Стили для подписей таблиц */
.wp-block-table figcaption,
.article-content-wrapper table + p[style*="text-align: center"],
.article-content-wrapper table + p[style*="text-align:center"] {
    text-align: center;
    font-style: italic;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-size: 0.9rem;
    padding: 0.5rem;
}

/* Специфические стили для таблиц в контенте */
.article-content-wrapper > table {
    margin: 2.5rem 0;
}

.article-content-wrapper > table:first-child {
    margin-top: 1rem;
}

/* Классы выравнивания таблиц */
table.alignleft {
    float: left;
    margin-right: 2rem;
    margin-bottom: 1rem;
}

table.alignright {
    float: right;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

table.aligncenter {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

/* Очистка после плавающих таблиц */
.article-content-wrapper:after {
    content: "";
    display: table;
    clear: both;
}

/* Стили для широких и полноразмерных таблиц */
table.alignwide {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

table.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Медиа-запрос для плавающих таблиц */
@media (max-width: 768px) {
    table.alignleft,
    table.alignright {
        float: none;
        margin-left: auto;
        margin-right: auto;
        display: table;
    }
}

.wp-block-image img{
   margin: 2rem 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.31);
}