/* Страница статьи */

body {
    margin: 0;
    background: #F5F5F5;
    font-family: 'Roboto', Arial, sans-serif;
}

/* Основной контейнер */
.article-main {
    background: #F5F5F5;
}

.article-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* Хлебные крошки */
.article-breadcrumbs {
    display: inherit;
    align-items: center;
    flex-wrap: wrap;
    padding: 24px 0 30px;
    gap: 0;
    row-gap: 4px;
}

.article-breadcrumbs a {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    color: #767676;
    text-decoration: none;
    transition: color 0.2s;
}

.article-breadcrumbs a:hover {
    color: #48924E;
}

.article-breadcrumbs-sep {
    font-size: 16px;
    color: #767676;
    margin: 0 8px;
}

.article-breadcrumbs-current {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    color: #1C1C1C;
    /* убираем обрезку — пусть переносится */
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
}

/* Мета: дата и кнопка поделиться */
.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    position: relative;
}

.article-date {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    color: #909598;
}

/* Кнопка поделиться */
.article-share-wrapper {
    position: relative;
}

.article-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    color: #909598;
    padding: 0;
    transition: color 0.2s;
}

.article-share-btn:hover {
    color: #48924E;
}

.article-share-btn img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Попап поделиться */
.share-popup {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 190px;
    background: #FFFFFF;
    border-radius: 6px;
    box-shadow: 0px 4px 34px -10px rgba(0, 0, 0, 0.25);
    z-index: 500;
    padding: 8px 0;
}

.share-popup.active {
    display: block;
}

/* Треугольник-стрелка */
.share-popup-arrow {
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #FFFFFF;
    filter: drop-shadow(0px -2px 2px rgba(0, 0, 0, 0.06));
}

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

.share-popup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    color: #1C1C1C;
    text-decoration: none;
    text-align: left;
    transition: background 0.15s;
    box-sizing: border-box;
}

.share-popup-item:hover {
    background: #F5F5F5;
}

.share-popup-item img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Уведомление о копировании */
.share-copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #48924E;
    color: #fff;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 30px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
}

.share-copy-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Заголовок */
.article-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 46px;
    line-height: 100%;
    color: #1C1C1C;
    margin: 0 0 20px;
}

/* Подзаголовок */
.article-subtitle {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 24px;
    line-height: 120%;
    color: #1C1C1C;
    margin: 0 0 24px;
}

/* Главная картинка */
.article-hero-image {
    margin-bottom: 28px;
}

.article-hero-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 700 / 390;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

/* Основной текст */
.article-text {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 130%;
    color: #484848;
    margin: 0 0 16px;
}

/* Контент статьи из редактора (tiptap).
   Задаём только базовые стили для тегов — inline-стили (цвет, выравнивание, размер)
   из редактора должны иметь приоритет, поэтому !important не используется. */
.article-content {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 130%;
    color: #484848;
}

.article-content > *:first-child {
    margin-top: 0;
}

.article-content > *:last-child {
    margin-bottom: 0;
}

.article-content p {
    margin: 0 0 16px;
    line-height: 1.2;
}

.article-content h1 {
    font-weight: 700;
    font-size: 32px;
    line-height: 110%;
    color: #1C1C1C;
    margin: 32px 0 16px;
}

.article-content h2 {
    font-weight: 700;
    font-size: 26px;
    line-height: 120%;
    color: #1C1C1C;
    margin: 32px 0 14px;
}

.article-content h3 {
    font-weight: 700;
    font-size: 22px;
    line-height: 130%;
    color: #1C1C1C;
    margin: 28px 0 12px;
}

.article-content h4 {
    font-weight: 700;
    font-size: 18px;
    line-height: 130%;
    color: #1C1C1C;
    margin: 24px 0 10px;
}

.article-content h5 {
    font-weight: 700;
    font-size: 16px;
    line-height: 130%;
    color: #1C1C1C;
    margin: 20px 0 8px;
}

.article-content h6 {
    font-weight: 700;
    font-size: 14px;
    line-height: 130%;
    color: #1C1C1C;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 18px 0 8px;
}

.article-content ul,
.article-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.article-content ul li,
.article-content ol li {
    margin-bottom: 6px;
}

.article-content ul ul,
.article-content ol ol,
.article-content ul ol,
.article-content ol ul {
    margin: 6px 0;
}

.article-content a {
    color: #48924E;
    text-decoration: underline;
    transition: color 0.2s;
}

.article-content a:hover {
    color: #5aaa62;
}

.article-content strong,
.article-content b {
    font-weight: 700;
}

.article-content em,
.article-content i {
    font-style: italic;
}

.article-content u {
    text-decoration: underline;
}

.article-content s,
.article-content del {
    text-decoration: line-through;
}

.article-content blockquote {
    margin: 20px 0;
    padding: 12px 20px;
    border-left: 4px solid #48924E;
    background: #FAF5EF;
    border-radius: 0 8px 8px 0;
    color: #484848;
    font-style: italic;
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}

.article-content code {
    font-family: 'Courier New', monospace;
    background: #F0EFEA;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #1C1C1C;
}

.article-content pre {
    background: #1C1C1C;
    color: #F5F5F5;
    padding: 16px 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 14px;
}

.article-content hr {
    border: none;
    border-top: 1px solid #D8D8D8;
    margin: 28px 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 10px;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
}

.article-content table th,
.article-content table td {
    border: 1px solid #D8D8D8;
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
}

.article-content table th {
    background: #FAF5EF;
    font-weight: 700;
    color: #1C1C1C;
}

.article-content table tbody tr:nth-child(even) {
    background: #FAFAFA;
}

.article-content mark {
    background: #FFF3B8;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.article-content sub,
.article-content sup {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

.article-content sup {
    top: -0.5em;
}

.article-content sub {
    bottom: -0.25em;
}

@media (max-width: 768px) {
    .article-content {
        font-size: 15px;
    }

    .article-content h1 {
        font-size: 26px;
    }

    .article-content h2 {
        font-size: 22px;
    }

    .article-content h3 {
        font-size: 19px;
    }

    .article-content h4 {
        font-size: 17px;
    }

    .article-content table {
        font-size: 14px;
    }

    .article-content table th,
    .article-content table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .article-content {
        font-size: 14px;
    }

    .article-content h1 {
        font-size: 22px;
    }

    .article-content h2 {
        font-size: 20px;
    }

    .article-content h3 {
        font-size: 17px;
    }

    .article-content blockquote {
        padding: 10px 16px;
    }

    /* Горизонтальный скролл для таблиц на узких экранах */
    .article-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Бежевый блок */
.article-highlight-box {
    background: #FAF5EF;
    border-radius: 10px;
    padding: 24px 28px;
    margin: 24px 0 28px;
}

.article-highlight-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 130%;
    color: #292829;
    margin: 0 0 16px;
}

.article-highlight-list {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-highlight-list li {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 130%;
    color: #484848;
}

/* Заголовки разделов */
.article-section-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 130%;
    color: #1C1C1C;
    margin: 32px 0 14px;
}

.article-subsection-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 130%;
    color: #1C1C1C;
    margin: 24px 0 10px;
}

/* Одна картинка */
.article-image-single {
    margin: 24px 0;
}

.article-image-single img {
    width: 100%;
    height: auto;
    aspect-ratio: 700 / 390;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

/* Две картинки в ряд */
.article-image-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0;
}

.article-image-double-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

/* Секция «Читайте также» */
.article-also {
    background: #F5F5F5;
    padding: 48px 0 60px;
}

.article-also-inner {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 20px;
}

.article-also-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 30px;
    line-height: 38px;
    color: #1C1C1C;
    margin: 0 0 28px;
}

/* Слайдер «Читайте также» */
.article-also-slider-wrapper {
    position: relative;
}

.article-also-slider {
    overflow: hidden;
}

.article-also-track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
    will-change: transform;
}

/* Карточка «Читайте также» */
.also-card {
    flex: 0 0 calc((100% - 60px) / 4);
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    border: 1px solid #D8D8D8;
    background: #FFFFFF;
    overflow: hidden;
    transition: box-shadow 0.25s;
}

.also-card-image-wrap {
    position: relative;
    flex-shrink: 0;
}

.also-card-image {
    width: 100%;
    aspect-ratio: 283 / 175;
    object-fit: cover;
    display: block;
}

.also-card-date {
    position: absolute;
    bottom: -14px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 28px;
    color: #FFFFFF;
    white-space: nowrap;
    z-index: 2;
}

.also-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 16px 16px;
}

.also-card-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.35;
    color: #000000;
    margin: 0 0 10px;
}

.also-card-text {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.4;
    color: #000000;
    margin: 0 0 14px;
    flex: 1;
}

.also-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 38px;
    border-radius: 6px;
    background: #48924E;
    box-shadow: 0px 6px 8px 0px rgba(255, 255, 255, 0.35) inset,
    0px -4px 11px 0px rgba(0, 0, 0, 0.3) inset;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 20px;
    color: #FFFFFF;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.25s;
    margin-top: auto;
}

.also-card-btn:hover {
    background: #5aaa62;
}

/* Стрелки слайдера */
.also-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FF9C00;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s, opacity 0.2s;
}

.also-arrow svg path {
    stroke: #FFFFFF;
}

.also-arrow:hover:not(:disabled) {
    background: #FFB033;
}

.also-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.also-arrow--left {
    left: -22px;
}

.also-arrow--right {
    right: -22px;
}

/* Точки навигации (мобилка) */
.also-dots {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.also-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C8C8C8;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.also-dot.active {
    background: #FF9C00;
}

/* АДАПТИВ */

/* --- 1200px и менее --- */
@media (max-width: 1200px) {
    .also-arrow--left {
        left: -10px;
    }

    .also-arrow--right {
        right: -10px;
    }

    .also-card {
        flex: 0 0 calc((100% - 40px) / 3);
    }
}

/* --- 1024px и менее --- */
@media (max-width: 1024px) {
    .article-title {
        font-size: 38px;
    }

    .article-subtitle {
        font-size: 20px;
    }

    .also-card {
        flex: 0 0 calc((100% - 40px) / 3);
    }
}

/* --- 768px и менее --- */
@media (max-width: 768px) {
    .article-container {
        padding: 0 16px 40px;
    }

    .article-breadcrumbs {
        padding: 16px 0 14px;
    }

    .article-breadcrumbs a,
    .article-breadcrumbs-sep {
        font-size: 13px;
    }

    .article-breadcrumbs-current {
        font-size: 13px;
        white-space: normal;
        max-width: none;
        overflow: visible;
    }

    /* На мобилке — поделиться справа */
    .article-meta {
        justify-content: space-between;
    }

    .article-title {
        font-size: 28px;
        line-height: 110%;
        margin-bottom: 16px;
    }

    .article-subtitle {
        font-size: 18px;
        margin-bottom: 18px;
    }

    .article-hero-image img {
        aspect-ratio: 4 / 3;
    }

    .article-text {
        font-size: 15px;
    }

    .article-highlight-box {
        padding: 20px;
    }

    .article-highlight-title {
        font-size: 16px;
    }

    .article-highlight-list li {
        font-size: 15px;
    }

    .article-section-title {
        font-size: 20px;
        margin: 28px 0 12px;
    }

    .article-subsection-title {
        font-size: 17px;
        margin: 20px 0 8px;
    }

    .article-image-single img {
        aspect-ratio: 4 / 3;
    }

    /* Две картинки → одна */
    .article-image-double {
        grid-template-columns: 1fr;
    }

    .article-image-double-item img {
        aspect-ratio: 4 / 3;
    }

    /* Читайте также */
    .article-also {
        padding: 36px 0 48px;
    }

    .article-also-inner {
        padding: 0 16px;
    }

    .article-also-title {
        font-size: 24px;
        line-height: 30px;
        margin-bottom: 20px;
    }

    .also-card {
        flex: 0 0 calc((100% - 16px) / 2);
    }

    .also-arrow {
        display: none;
    }

    .also-dots {
        display: flex;
    }

    .article-also-slider {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .article-also-slider::-webkit-scrollbar {
        display: none;
    }

    .article-also-track {
        transition: none;
        gap: 16px;
    }

    .also-card {
        scroll-snap-align: center;
    }

    /* Попап поделиться на мобилке — к правой стороне */
    .share-popup {
        left: auto;
        right: 0;
    }

    .share-popup-arrow {
        left: auto;
        right: 20px;
    }
}

/* --- 480px и менее --- */
@media (max-width: 480px) {
    .article-container {
        padding: 0 12px 32px;
    }

    .article-title {
        font-size: 24px;
        line-height: 110%;
    }

    .article-subtitle {
        font-size: 16px;
    }

    .article-text {
        font-size: 14px;
    }

    .article-highlight-box {
        padding: 16px;
    }

    .article-highlight-title {
        font-size: 15px;
    }

    .article-highlight-list li {
        font-size: 14px;
    }

    .article-section-title {
        font-size: 18px;
    }

    .article-subsection-title {
        font-size: 16px;
    }

    .article-image-double-item:last-child {
        display: none;
    }

    /* 1 карточка на мобилке */
    .also-card {
        flex: 0 0 100%;
    }

    .article-also-inner {
        padding: 0 12px;
    }

    .article-also-title {
        font-size: 22px;
    }
}
