/* ============================================================
   DESIGN_GUIDE.md — «Право в движении»
   Современный, креативный, смелый и молодёжный дизайн
   ============================================================ */

/* ============================================================
   1. CSS-переменные и базовые стили
   ============================================================ */

:root {
    /* Цветовая палитра */
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --dark: #0F172A;
    --dark-2: #1E293B;
    --dark-3: #334155;
    --light: #F8FAFC;
    --light-2: #F1F5F9;
    --accent: #22D3EE;
    --accent-light: #67E8F9;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --text: #1E293B;
    --text-muted: #64748B;
    --white: #FFFFFF;

    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #4F46E5 0%, #22D3EE 100%);
    --gradient-dark: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    --gradient-text: linear-gradient(135deg, #4F46E5 0%, #22D3EE 100%);

    /* Типографика */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;

    /* Размеры */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    /* Тени */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 16px 48px rgba(15, 23, 42, 0.16);
    --shadow-primary: 0 4px 16px rgba(79, 70, 229, 0.3);

    /* Переходы */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   2. Шапка (Header)
   ============================================================ */

.site-header {
    background: var(--gradient-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(15, 23, 42, 0.92);
}

.site-header .navbar {
    padding: 0.75rem 0;
}

.site-header .navbar-brand {
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0;
    margin-right: 2rem;
}

.site-header .navbar-brand:hover {
    opacity: 0.9;
}

.site-header .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
}

.site-header .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.3);
}

.site-header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.site-header .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color var(--transition-fast);
}

.site-header .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: var(--radius-pill);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.site-header .nav-link:hover {
    color: var(--white);
}

.site-header .nav-link:hover::after {
    transform: scaleX(1);
}

.site-header .nav-link.active {
    color: var(--white);
    font-weight: 600;
}

.site-header .nav-link.active::after {
    transform: scaleX(1);
}

/* ============================================================
   3. Hero-секция
   ============================================================ */

.hero-section {
    position: relative;
    background: var(--gradient-dark);
    padding: 5rem 0 6rem;
    overflow: hidden;
    color: var(--white);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 6s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite reverse;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.hero-title .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   4. Кнопки
   ============================================================ */

.btn {
    font-family: var(--font-main);
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.625rem 1.5rem;
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background: var(--gradient-primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-primary);
}

.btn-outline-light {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.0625rem;
    border-radius: var(--radius-lg);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}

/* ============================================================
   5. Карточки
   ============================================================ */

.card {
    border: none;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    opacity: 1;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.card-title a {
    color: var(--dark);
    transition: color var(--transition-fast);
}

.card-title a:hover {
    color: var(--primary);
}

.card-text {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.card-meta {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* ============================================================
   6. Секции
   ============================================================ */

.section {
    padding: 4rem 0;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-pill);
}

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-title a {
    color: var(--dark);
    transition: color var(--transition-fast);
}

.section-title a:hover {
    color: var(--primary);
}

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

.table {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--white);
    margin-bottom: 2rem;
}

.table thead th {
    background: var(--gradient-dark);
    color: var(--white);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    border: none;
}

.table tbody td {
    padding: 0.875rem 1.25rem;
    border-color: var(--light-2);
    font-size: 0.9375rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
    background-color: var(--light-2);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(248, 250, 252, 0.6);
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: var(--light-2);
}

.table-responsive {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* ============================================================
   8. Бейджи и статусы
   ============================================================ */

.badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-pill);
    letter-spacing: 0.02em;
}

.badge-primary {
    background: var(--gradient-primary);
    color: var(--white);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-info {
    background: rgba(34, 211, 238, 0.15);
    color: #0891B2;
}

/* ============================================================
   9. Хлебные крошки
   ============================================================ */

.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.breadcrumb-item {
    font-size: 0.875rem;
    max-width: 100%;
    min-width: 0;
    flex-shrink: 1;
    flex-basis: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.5;
}

.breadcrumb-item a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--primary);
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
    content: '›';
}

/* ============================================================
   10. Alert-сообщения
   ============================================================ */

.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065F46;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991B1B;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400E;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: rgba(34, 211, 238, 0.1);
    color: #155E75;
    border-left: 4px solid var(--accent);
}

/* ============================================================
   11. Списки публикаций
   ============================================================ */

.post-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-item {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.post-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.post-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--primary);
}

.post-item:hover::before {
    opacity: 1;
}

.post-item h3 {
    margin-bottom: 0.5rem;
}

.post-item h3 a {
    color: var(--dark);
    transition: color var(--transition-fast);
}

.post-item h3 a:hover {
    color: var(--primary);
}

.post-item .post-meta {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.post-item .post-excerpt {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ============================================================
   12. Страница публикации
   ============================================================ */

.article-page {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
}

.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-meta {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-thumbnail-area {
    margin-bottom: 2rem;
}

.post-thumb {
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.post-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.post-details {
    max-width: 800px;
    margin: 0 auto;
}

.article-page h1 {
    margin-bottom: 1rem;
}

.article-page .article-meta {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-page .article-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text);
}

.article-page .article-content p {
    margin-bottom: 1.5rem;
}

.article-page .article-content h2,
.article-page .article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-page .article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-page .article-content a:hover {
    color: var(--primary-dark);
}

.article-page .article-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--light-2);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
}

.article-page .article-content img {
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

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

.article-page .article-content li {
    margin-bottom: 0.5rem;
}

/* ============================================================
   13. Страница ошибки
   ============================================================ */

.error-page {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 0;
}

.error-code {
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 900;
    line-height: 1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
}

.error-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.error-description {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   14. Футер
   ============================================================ */

.site-footer {
    background: var(--gradient-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.site-footer h5 {
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer ul li {
    margin-bottom: 0.625rem;
}

.site-footer ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.site-footer ul li a:hover {
    color: var(--accent);
}

.site-footer .footer-brand {
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: inline-block;
}

.site-footer .footer-description {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.site-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 3rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.site-footer .footer-bottom .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* ============================================================
   15. Список публикаций (страница)
   ============================================================ */

.page-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--light-2);
}

.page-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1.0625rem;
    margin-bottom: 0;
}

.publication-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.publication-card:hover .card-img-top {
    transform: scale(1.03);
}

.publication-card .card-body {
    padding: 1.5rem;
}

.publication-card .card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.publication-card .card-title a {
    color: var(--dark);
    transition: color var(--transition-fast);
}

.publication-card .card-title a:hover {
    color: var(--primary);
}

.publication-card .card-text {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-footer-actions {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--light-2);
}

.read-more {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--primary);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.read-more:hover {
    color: var(--primary-dark);
    gap: 0.625rem;
}

.empty-state {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    color: var(--text-muted);
}

/* ============================================================
   16. Разделы (карточки-ссылки)
   ============================================================ */

.section-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    display: block;
    height: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--light-2);
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.section-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.section-card:hover::before {
    opacity: 1;
}

.section-card .section-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.section-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.section-card p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin-bottom: 0;
}

/* ============================================================
   17. Jumbotron (замена стандартного)
   ============================================================ */

.jumbotron {
    background: transparent;
    padding: 2rem 0;
}

.jumbotron.display-4 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--dark);
}

.jumbotron .lead {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/* ============================================================
   18. Навигация по предыдущей/следующей
   ============================================================ */

.prev-next-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-2);
}

.prev-next-nav a {
    background: var(--white);
    border: 1px solid var(--light-2);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text);
    transition: all var(--transition-base);
    max-width: 45%;
}

.prev-next-nav a:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

/* ============================================================
   19. Анимации и микро-взаимодействия
   ============================================================ */

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

/* Задержки для каскадных анимаций */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Микро-взаимодействия */

/* Плавное появление карточек при наведении */
.card,
.section-card,
.post-item {
    will-change: transform;
}

/* Эффект «нажатия» для кнопок */
.btn:active {
    transform: scale(0.97);
}

/* Пульсация для primary-кнопок */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-primary:hover::after {
    width: 300px;
    height: 300px;
}

/* Анимация появления hero-элементов */
.hero-title,
.hero-subtitle,
.hero-actions {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-subtitle {
    animation-delay: 0.15s;
}

.hero-actions {
    animation-delay: 0.3s;
}

/* Анимация появления карточек публикаций */
.publication-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.publication-card:nth-child(2) { animation-delay: 0.1s; }
.publication-card:nth-child(3) { animation-delay: 0.2s; }
.publication-card:nth-child(4) { animation-delay: 0.3s; }
.publication-card:nth-child(5) { animation-delay: 0.4s; }
.publication-card:nth-child(6) { animation-delay: 0.5s; }

/* Анимация появления section-card */
.section-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.section-card:nth-child(2) { animation-delay: 0.15s; }
.section-card:nth-child(3) { animation-delay: 0.3s; }

/* Анимация появления страницы ошибки */
.error-code {
    animation: fadeInUp 0.6s ease forwards;
}

.error-title {
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.15s forwards;
}

.error-message {
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

.error-description {
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.45s forwards;
}

.error-actions {
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.6s forwards;
}

/* Анимация появления страницы публикации */
.entry-header {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.post-thumbnail-area {
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.15s forwards;
}

.post-details {
    opacity: 0;
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

/* Анимация появления страницы списка публикаций */
.page-header {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* Уважение к prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================
   20. Адаптивность
   ============================================================ */

@media (max-width: 991.98px) {
    .hero-section {
        padding: 3.5rem 0 4.5rem;
    }

    .article-page {
        padding: 2rem;
    }

    .site-header .navbar-collapse {
        background: var(--dark-2);
        border-radius: var(--radius-md);
        padding: 1rem;
        margin-top: 0.5rem;
    }

    .site-header .nav-link {
        padding: 0.75rem 1rem;
    }

    .site-header .nav-link::after {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 2.5rem 0 3.5rem;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .article-page {
        padding: 1.5rem;
    }

    .section {
        padding: 3rem 0;
    }

    .prev-next-nav {
        flex-direction: column;
    }

    .prev-next-nav a {
        max-width: 100%;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    .page-header {
        margin-bottom: 2rem;
        padding-bottom: 1rem;
    }

    .publication-card .card-img-top {
        height: 180px;
    }

    .error-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .error-actions .btn {
        width: 100%;
    }

    .entry-header {
        margin-bottom: 1.5rem;
    }

    .post-details {
        max-width: 100%;
    }
}

@media (max-width: 575.98px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .post-item {
        padding: 1.25rem;
    }

    .site-footer {
        padding: 3rem 0 1.5rem;
    }

    .article-page {
        padding: 1.25rem;
        border-radius: var(--radius-lg);
    }

    .publication-card .card-img-top {
        height: 160px;
    }

    .section-card {
        padding: 1.5rem;
    }

    .empty-state {
        padding: 2rem 1.5rem;
    }
}

/* ============================================================
   21. Утилиты
   ============================================================ */

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mono-text {
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-light {
    background-color: var(--light) !important;
}

.bg-white {
    background-color: var(--white) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* ============================================================
   22. Прочие стили
   ============================================================ */

/* Стили для страницы «О нас» и «Контакты» */
.site-about,
.site-contact {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
}

/* Стили для форм */
.form-control {
    border: 1px solid var(--light-2);
    border-radius: var(--radius-md);
    padding: 0.625rem 1rem;
    font-family: var(--font-main);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--dark);
    margin-bottom: 0.375rem;
}

/* Стили для ссылок в списках */
.post-img {
    color: var(--dark);
    transition: color var(--transition-fast);
}

.post-img:hover {
    color: var(--primary);
}

/* Стили для разделителей */
hr {
    border-color: var(--light-2);
    opacity: 1;
}

/* Стили для контейнера */
.container {
    max-width: 1200px;
}

/* Стили для страницы входа (не изменяем содержимое, только стили) */
.site-login {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    max-width: 480px;
    margin: 3rem auto;
}

/* ============================================================
   23. Блок «Поделиться» и внешние ссылки
   ============================================================ */

.share-block {
    background: var(--light-2);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--light-2);
}

.share-title {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.external-link {
    padding-top: 1.5rem;
    border-top: 1px solid var(--light-2);
}

.external-link a {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--primary);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.external-link a:hover {
    color: var(--primary-dark);
    gap: 0.625rem;
}
