/* ===================================================
   📱 ERFIX Article Style v2
=================================================== */

/* ==========================================
   Таблицы
========================================== */

.table-responsive-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(15,23,42,.04);
}

.prose table {
    width: 100%;
    min-width: 550px;
    border-collapse: collapse;
    margin: 0 !important;
    font-size: 15px;
}

.prose table th {
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 14px 16px;
    border: none;
}

.prose table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

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

.prose table tr:hover {
    background: #eff6ff;
    transition: .2s;
}

/* ==========================================
   Контент статьи
========================================== */

#dns-article-body {
    color: #334155;
    font-size: 18px;
    line-height: 1.8;
}

#dns-article-body p {
    margin-bottom: 1.25rem;
}

/* ==========================================
   Заголовки
========================================== */

#dns-article-body h2 {
    font-size: 2rem;
    font-weight: 900;
    color: #0f172a;
    margin-top: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

#dns-article-body h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 2.5rem;
    margin-bottom: .75rem;
    line-height: 1.3;
}

/* ==========================================
   Списки
========================================== */

#dns-article-body ul,
#dns-article-body ol {
    margin: 1rem 0;
    padding-left: 1.4rem;
}

#dns-article-body li {
    margin-bottom: .75rem;
}

/* ==========================================
   Жирный текст
========================================== */

#dns-article-body strong {
    color: #0f172a;
    font-weight: 700;
}

/* ==========================================
   Цитаты и важные блоки
========================================== */

#dns-article-body blockquote {
    margin: 2rem 0;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    border-radius: 0 14px 14px 0;
    color: #475569;
}

/* ==========================================
   Изображения
========================================== */

#dns-article-body img {
    width: 100%;
    height: auto;
    border-radius: 18px;
    margin: 2rem 0;
}

/* ==========================================
   Мобильная версия
========================================== */

@media (max-width: 768px) {

    #dns-article-body {
        font-size: 16px;
        line-height: 1.75;
    }

    #dns-article-body h2 {
        font-size: 1.55rem;
        margin-top: 2rem;
    }

    #dns-article-body h3 {
        font-size: 1.25rem;
        margin-top: 1.75rem;
    }

    #dns-article-body ul,
    #dns-article-body ol {
        padding-left: 1.2rem;
    }

    #dns-article-body li {
        margin-bottom: .6rem;
    }

    .prose table {
        min-width: 480px;
        font-size: 14px;
    }

    .prose table th,
    .prose table td {
        padding: 12px;
    }
}

/* Автоматически находим и стилизуем ВСЕ ссылки на базу знаний */
#dns-article-body a[href^="/legal/"] {
    color: #2563eb !important; /* Насыщенный синий цвет */
    font-weight: 800 !important; /* Делаем ссылку жирной и заметной */
    text-decoration: underline !important; /* Принудительное подчеркивание */
    text-underline-offset: 3px !important; /* Аккуратный отступ линии от букв */
    transition: color 0.15s ease-in-out !important;
}

/* Эффект при наведении на ссылку */
#dns-article-body a[href^="/legal/"]:hover {
    color: #1d4ed8 !important; /* Чуть темнее при наведении */
    text-decoration-thickness: 2px !important; /* Линия становится толще */
}


/* Настраиваем внешние ссылки внутри контента, чтобы они соответствовали стилю внутренних */
    #dns-article-body a[href^="http://"],
    #dns-article-body a[href^="https://"] {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        /* Наследуем твои стили из Tailwind */
        color: #2563eb; /* text-blue-600 */
        font-weight: 700; /* font-bold */
        text-decoration: none; /* no-underline */
        transition: all 0.2s ease-in-out;
    }

    #dns-article-body a[href^="http://"]:hover,
    #dns-article-body a[href^="https://"]:hover {
        color: #1d4ed8; /* text-blue-700 */
        text-decoration: underline; /* underline */
    }

    /* Добавляем маленькую иконку-стрелочку для внешних переходов */
    #dns-article-body a[href^="http://"]::after,
    #dns-article-body a[href^="https://"]::after {
        content: "⇗";
        font-size: 10px;
        margin-left: 2px;
        color: #94a3b8; /* slate-400 */
        font-weight: normal;
        transition: color 0.2s;
    }

    #dns-article-body a[href^="http://"]:hover::after,
    #dns-article-body a[href^="https://"]:hover::after {
        color: #1d4ed8;
    }


        /* Плавный перелив градиента текста */
        @keyframes gradient-shift {
            0% {
                background-position: 0% center;
            }
            50% {
                background-position: 100% center;
            }
            100% {
                background-position: 0% center;
            }
        }

        /* Деликатная микро-пульсация стрелочки вниз */
        @keyframes bounce-subtle {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(2px);
            }
        }

        /* 👇 Наше новое мягкое дыхание света вокруг капсулы */
        @keyframes pulse-glow {
            0%, 100% {
                box-shadow: 0 0 12px 0 rgba(37, 99, 235, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.8);
                border-color: rgba(219, 234, 254, 0.5); /* blue-100/50 */
            }
            50% {
                box-shadow: 0 0 20px 6px rgba(37, 99, 235, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.8);
                border-color: rgba(191, 219, 254, 0.8); /* blue-200/80 */
            }
        }

        .animate-gradient-shift {
            animation: gradient-shift 4s ease infinite;
        }

        .animate-bounce-subtle {
            animation: bounce-subtle 2s ease infinite;
        }

        /* Применяем анимацию свечения */
        .animate-pulse-glow {
            animation: pulse-glow 3s ease-in-out infinite;
        }


@keyframes scaleIn {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.animate-scale-in {
    animation: scaleIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fadeIn {
    animation: fadeIn 0.2s ease-out forwards;
}
/* Прячем стандартный маркер details в Safari/Chrome */
summary::-webkit-details-marker {
    display: none;
}
