/* ============================================
   POLSERVIS.COM - СТИЛИ СТРАНИЦЫ СТАТЬИ
   Версия: 1.0
============================================ */

/* ===== LAYOUT СТАТЬИ ===== */
.article-page {
    padding-top: 80px;
}

.article-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    padding: 40px 0 80px;
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.breadcrumbs {
    padding: 20px 0;
    font-size: 14px;
    color: var(--gray);
}

.breadcrumbs a {
    color: var(--primary);
}

.breadcrumbs a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.breadcrumbs__separator {
    margin: 0 8px;
    color: var(--gray-light);
}

/* ===== КОНТЕНТ СТАТЬИ ===== */
.article {
    background: var(--white);
    max-width: 100%;
}

/* Шапка статьи */
.article__header {
    margin-bottom: 40px;
}

.article__category {
    display: inline-block;
    background: rgba(26, 95, 122, 0.1);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
}

.article__title {
    font-size: 2.4rem;
    line-height: 1.3;
    color: var(--dark);
    margin-bottom: 20px;
}

.article__meta {
    display: flex;
    gap: 25px;
    font-size: 14px;
    color: var(--gray);
    flex-wrap: wrap;
}

.article__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Главная картинка статьи */
.article__hero-image {
    margin-bottom: 40px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article__hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Заглушка для картинки */
.article__hero-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
}

/* Вступление */
.article__intro {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: 40px;
    padding: 25px;
    background: var(--light);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.article__intro strong {
    color: var(--dark);
}

/* ===== СОДЕРЖАНИЕ (TOC) ===== */
.toc {
    background: var(--light);
    padding: 25px 30px;
    border-radius: var(--radius);
    margin-bottom: 40px;
}

.toc__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc__list {
    list-style: none;
    margin: 0;
    counter-reset: toc-counter;
}

.toc__list li {
    margin-bottom: 10px;
    counter-increment: toc-counter;
}

.toc__list a {
    color: var(--primary);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc__list a::before {
    content: counter(toc-counter) ".";
    color: var(--secondary);
    font-weight: 600;
    min-width: 20px;
}

.toc__list a:hover {
    color: var(--secondary);
}

/* ===== ТЕЛО СТАТЬИ ===== */
.article__body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article__body h2 {
    font-size: 1.8rem;
    color: var(--dark);
    margin: 50px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light);
}

.article__body h2:first-child {
    margin-top: 0;
}

.article__body h3 {
    font-size: 1.4rem;
    color: var(--dark);
    margin: 35px 0 15px;
}

.article__body h4 {
    font-size: 1.2rem;
    color: var(--dark);
    margin: 25px 0 10px;
}

.article__body p {
    margin-bottom: 20px;
}

.article__body ul,
.article__body ol {
    margin: 20px 0 25px 25px;
}

.article__body li {
    margin-bottom: 12px;
    line-height: 1.7;
}

.article__body strong {
    color: var(--dark);
}

.article__body a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(26, 95, 122, 0.3);
    text-underline-offset: 3px;
}

.article__body a:hover {
    color: var(--secondary);
    text-decoration-color: var(--secondary);
}

/* Картинки в статье */
.article__body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.article__body figure {
    margin: 30px 0;
}

.article__body figcaption {
    text-align: center;
    font-size: 14px;
    color: var(--gray);
    margin-top: 10px;
    font-style: italic;
}

/* ===== ИНФО-БЛОКИ ===== */
.info-box {
    padding: 25px;
    border-radius: var(--radius);
    margin: 30px 0;
}

.info-box p:last-child,
.info-box ul:last-child,
.info-box ol:last-child {
    margin-bottom: 0;
}

.info-box__title {
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
}

.info-box--tip {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.info-box--tip .info-box__title {
    color: #2e7d32;
}

.info-box--warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
}

.info-box--warning .info-box__title {
    color: #e65100;
}

.info-box--important {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.info-box--important .info-box__title {
    color: #1565c0;
}

.info-box--danger {
    background: #ffebee;
    border-left: 4px solid #f44336;
}

.info-box--danger .info-box__title {
    color: #c62828;
}

/* ===== ТАБЛИЦЫ ===== */
.article__table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 15px;
}

.article__table th,
.article__table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.article__table th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

.article__table th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
}

.article__table th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

.article__table tr:hover {
    background: var(--light);
}

.article__table td:first-child {
    font-weight: 600;
    color: var(--dark);
}

/* Адаптивная таблица */
.table-responsive {
    overflow-x: auto;
    margin: 30px 0;
}

.table-responsive .article__table {
    margin: 0;
    min-width: 600px;
}

/* ===== ПОШАГОВЫЙ СПИСОК ===== */
.steps-list {
    list-style: none;
    margin: 30px 0;
    counter-reset: step-counter;
}

.steps-list li {
    position: relative;
    padding-left: 70px;
    margin-bottom: 30px;
    counter-increment: step-counter;
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.steps-list__title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.steps-list__desc {
    color: var(--gray-700);
    margin: 0;
}

/* ===== CTA БЛОК В СТАТЬЕ ===== */
.article__cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 35px;
    border-radius: var(--radius);
    margin: 40px 0;
    text-align: center;
}

.article__cta h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--white);
}

.article__cta p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.article__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ===== FAQ СЕКЦИЯ ===== */
.faq {
    margin: 50px 0;
}

.faq__title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--dark);
}

.faq__item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    overflow: hidden;
}

.faq__question {
    background: var(--light);
    padding: 20px 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    font-size: 1rem;
    color: var(--dark);
}

.faq__question:hover {
    background: var(--gray-200);
}

.faq__question::after {
    content: '+';
    font-size: 24px;
    color: var(--secondary);
    font-weight: 400;
    transition: var(--transition);
}

.faq__item.active .faq__question::after {
    content: '−';
}

.faq__answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq__item.active .faq__answer {
    padding: 20px 25px;
    max-height: 500px;
}

.faq__answer p:last-child {
    margin-bottom: 0;
}

/* ===== ФУТЕР СТАТЬИ ===== */
.article__footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--gray-200);
}

/* Теги */
.article__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.article__tags-label {
    font-weight: 600;
    color: var(--dark);
}

.article__tag {
    background: var(--light);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    color: var(--dark);
    border: 1px solid var(--gray-200);
}

.article__tag:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Поделиться */
.article__share {
    display: flex;
    align-items: center;
    gap: 15px;
}

.article__share-label {
    font-weight: 600;
    color: var(--dark);
}

.article__share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--white);
    transition: var(--transition);
}

.article__share-btn:hover {
    transform: scale(1.1);
    color: var(--white);
}

.article__share-btn--vk {
    background: #4a76a8;
}

.article__share-btn--tg {
    background: #0088cc;
}

.article__share-btn--wa {
    background: #25d366;
}

/* ===== САЙДБАР ===== */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Виджеты сайдбара */
.sidebar__widget {
    background: var(--light);
    padding: 25px;
    border-radius: var(--radius);
}

.sidebar__widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary);
}

/* CTA виджет */
.sidebar__widget--cta {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: var(--white);
    text-align: center;
}

.sidebar__widget--cta h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--white);
}

.sidebar__widget--cta p {
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.sidebar__widget--cta .btn {
    display: block;
    margin-bottom: 10px;
}

.sidebar__widget--cta .btn:last-child {
    margin-bottom: 0;
}

/* Виджет цены */
.sidebar__widget--price {
    text-align: center;
}

.sidebar__price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.sidebar__price span {
    font-size: 1rem;
    color: var(--gray);
    font-weight: 400;
}

.sidebar__price-note {
    font-size: 13px;
    color: var(--gray);
    margin-top: 5px;
}

/* Похожие статьи */
.sidebar__related-article {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar__related-article:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.sidebar__related-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.sidebar__related-text h5 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
    font-weight: 600;
}

.sidebar__related-text h5 a {
    color: var(--dark);
}

.sidebar__related-text h5 a:hover {
    color: var(--primary);
}

.sidebar__related-text span {
    font-size: 12px;
    color: var(--gray);
}

/* Услуги в сайдбаре */
.sidebar__services {
    list-style: none;
    margin: 0;
}

.sidebar__services li {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
    margin: 0;
}

.sidebar__services li:last-child {
    border-bottom: none;
}

.sidebar__services a {
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.sidebar__services a:hover {
    color: var(--primary);
}

/* Контакты в сайдбаре */
.sidebar__widget--contacts {
    background: var(--dark);
    color: var(--white);
}

.sidebar__widget--contacts .sidebar__widget-title {
    color: var(--white);
}

.sidebar__widget--contacts p {
    margin-bottom: 15px;
    font-size: 14px;
}

.sidebar__widget--contacts strong {
    color: var(--gray-light);
    font-weight: 400;
    display: block;
    margin-bottom: 3px;
}

.sidebar__widget--contacts a {
    color: var(--secondary);
}

.sidebar__widget--contacts a:hover {
    color: var(--secondary-light);
}

/* ===== АДАПТИВНОСТЬ СТАТЬИ ===== */
@media (max-width: 1024px) {
    .article-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .sidebar__widget--cta {
        grid-column: 1 / -1;
    }
    
    .article__title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .article-wrapper {
        padding: 20px 0 60px;
    }
    
    .article__title {
        font-size: 1.7rem;
    }
    
    .article__body h2 {
        font-size: 1.5rem;
    }
    
    .article__body h3 {
        font-size: 1.25rem;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
    
    .article__table th,
    .article__table td {
        padding: 10px;
        font-size: 13px;
    }
    
    .steps-list li {
        padding-left: 55px;
    }
    
    .steps-list li::before {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .article__meta {
        gap: 15px;
    }
    
    .article__cta {
        padding: 25px;
    }
    
    .article__cta h3 {
        font-size: 1.3rem;
    }
    
    .toc {
        padding: 20px;
    }
    
    .info-box {
        padding: 20px;
    }
    
    .faq__question {
        padding: 15px 20px;
        font-size: 0.95rem;
    }
    
    .faq__item.active .faq__answer {
        padding: 15px 20px;
    }
    
    .article__hero-placeholder {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .article__title {
        font-size: 1.5rem;
    }
    
    .article__intro {
        padding: 20px;
        font-size: 1.05rem;
    }
    
    .article__body {
        font-size: 1rem;
    }
    
    .article__body h2 {
        font-size: 1.35rem;
        margin: 40px 0 15px;
    }
    
    .article__body h3 {
        font-size: 1.15rem;
    }
    
    .article__cta-buttons {
        flex-direction: column;
    }
    
    .article__tags {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article__share {
        flex-wrap: wrap;
    }
    
    .sidebar__widget {
        padding: 20px;
    }
    
    .sidebar__price {
        font-size: 2rem;
    }
}