﻿/* ===== НОВОСТИ - ОПТИМИЗИРОВАННЫЕ СТИЛИ (БЕЗ !important) ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
    --bg-page: #f0f2f5;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: #dbeafe;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --border: #e2e8f0;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 30px -10px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --radius-sm: 12px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Open Sans', sans-serif;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    --line-height-base: 1.6;
    --line-height-comfortable: 1.7;
    --paragraph-spacing: 1.2em;
    --text-indent-size: 1.5em;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: var(--line-height-base);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== КНОПКИ ===== */
.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #e2e8f0;
    color: #475569;
    border: none;
    padding: 12px 30px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* ===== СТИЛИ ДЛЯ ТЕКСТА НОВОСТИ ===== */
.event-detail-text,
.event-detail-text * {
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: var(--line-height-comfortable);
    color: var(--text-primary);
    background-color: transparent;
}

.event-detail-text {
    max-width: 800px;
    margin: 0 auto;
}

.event-detail-text p {
    margin-bottom: var(--paragraph-spacing);
    text-indent: var(--text-indent-size);
    text-align: left;
    line-height: var(--line-height-comfortable);
}

.event-detail-text h2 + p,
.event-detail-text h3 + p,
.event-detail-text h4 + p {
    text-indent: 0;
}

.event-detail-text h1 {
    font-size: 2.2em;
    font-weight: 700;
    margin: 1.2em 0 0.6em;
    text-indent: 0;
    line-height: 1.3;
    font-family: var(--font-serif);
    letter-spacing: -0.02em;
}

.event-detail-text h2 {
    font-size: 1.8em;
    font-weight: 600;
    margin: 1.5em 0 0.8em;
    text-indent: 0;
    letter-spacing: -0.01em;
    border-left: 4px solid var(--accent);
    padding-left: 20px;
    font-family: var(--font-serif);
    line-height: 1.3;
}

.event-detail-text h3 {
    font-size: 1.4em;
    font-weight: 600;
    margin: 1.2em 0 0.6em;
    text-indent: 0;
    font-family: var(--font-serif);
    color: var(--accent);
    line-height: 1.3;
}

.event-detail-text h4 {
    font-size: 1.2em;
    font-weight: 600;
    margin: 1em 0 0.5em;
    text-indent: 0;
    font-family: var(--font-sans);
    letter-spacing: -0.01em;
}

.event-detail-text h5 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0.8em 0 0.4em;
    text-indent: 0;
    font-family: var(--font-sans);
    color: var(--text-secondary);
}

.event-detail-text h6 {
    font-size: 1em;
    font-weight: 600;
    margin: 0.6em 0 0.3em;
    text-indent: 0;
    font-family: var(--font-sans);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-detail-text ul,
.event-detail-text ol {
    margin: 1.2em 0;
    padding-left: 2em;
}

.event-detail-text li {
    margin-bottom: 0.4em;
    line-height: var(--line-height-comfortable);
}

.event-detail-text ul li {
    list-style-type: disc;
}

.event-detail-text ol li {
    list-style-type: decimal;
}

.event-detail-text blockquote {
    background: var(--accent-light);
    border-radius: 16px;
    padding: 1.2em 2em;
    margin: 1.8em 0;
    font-style: italic;
    font-weight: 450;
    border-left: 4px solid var(--accent);
    text-indent: 0;
    font-family: var(--font-serif);
    font-size: 1.05em;
    line-height: 1.65;
}

.event-detail-text blockquote p {
    margin-bottom: 0;
    text-indent: 0;
}

.event-detail-text blockquote:before {
    content: '"';
    font-size: 2.5em;
    color: var(--accent);
    opacity: 0.5;
    position: relative;
    top: 10px;
    left: -10px;
}

.event-detail-text pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.2em;
    border-radius: 12px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.5;
    margin: 1.5em 0;
    text-indent: 0;
}

.event-detail-text code {
    background: #f1f5f9;
    color: #e11d48;
    padding: 0.2em 0.4em;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.event-detail-text a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    font-weight: 500;
    transition: all 0.2s;
}

.event-detail-text a:hover {
    border-bottom-color: var(--accent);
    color: var(--accent-hover);
}

.event-detail-text img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 2em auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    text-indent: 0;
}

.event-detail-text img:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.event-detail-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    text-indent: 0;
    overflow-x: auto;
    display: block;
    border-radius: 12px;
}

.event-detail-text th,
.event-detail-text td {
    border: 1px solid var(--border);
    padding: 12px 16px;
    text-align: left;
    font-size: 16px;
}

.event-detail-text th {
    background: #f8fafc;
    font-weight: 600;
}

.event-detail-text tr:nth-child(even) {
    background: #f8fafc;
}

.event-detail-text hr {
    margin: 2.5em 0;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    text-indent: 0;
}

.event-detail-text strong,
.event-detail-text b {
    color: var(--accent);
    font-weight: 700;
}

.event-detail-text em,
.event-detail-text i {
    font-style: italic;
    color: var(--text-secondary);
}

/* Динамические хэштеги */
.dynamic-hashtag {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    padding: 2px 8px;
    background: var(--accent-light);
    border-radius: 20px;
    transition: all 0.2s;
    display: inline-block;
    margin: 0 2px;
    font-size: 0.9em;
    cursor: pointer;
    border-bottom: none;
}

.dynamic-hashtag:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-1px);
    border-bottom: none;
}

/* ===== КОНТЕЙНЕР НОВОСТЕЙ ===== */
.news-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.news-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
}

.news-header h2:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.back-link:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateX(-5px);
}

/* ===== ПАНЕЛЬ ФИЛЬТРОВ ===== */
.filter-panel {
    background: white;
    border-radius: var(--radius);
    padding: 20px 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 140px;
}

.filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-family: var(--font-sans);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:hover {
    border-color: var(--accent);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
    opacity: 0.7;
}

.filter-actions {
    display: flex;
    gap: 10px;
    min-width: 180px;
}

.btn-filter-apply,
.btn-filter-reset {
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-filter-apply {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    flex: 2;
}

.btn-filter-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-filter-reset {
    background: #f1f5f9;
    color: var(--text-secondary);
    flex: 1;
}

.btn-filter-reset:hover {
    background: var(--danger);
    color: white;
}

.filter-badge {
    background: var(--accent-light);
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    margin-left: 12px;
    display: inline-block;
}

/* ===== СЕТКА НОВОСТЕЙ ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.news-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.news-image {
    height: 160px;
    overflow: hidden;
    background: #f8fafc;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    font-size: 48px;
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-theme {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-type {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: #eef2ff;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
    align-self: flex-start;
}

.news-date {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-date i {
    margin-right: 4px;
    color: var(--accent);
}

.video-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 2;
    border: 2px solid white;
}

/* ===== АДМИН-КНОПКИ ===== */
.admin-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.admin-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f8fafc;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #64748b;
    font-size: 16px;
}

.admin-btn:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
}

.admin-btn.delete:hover {
    background: var(--danger);
}

.admin-btn:active {
    transform: translateY(0);
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0 20px;
}

.page-link {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
}

.page-link:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.page-current {
    padding: 8px 16px;
    color: var(--text-secondary);
}

/* ===== ДЕТАЛЬНАЯ СТРАНИЦА НОВОСТИ ===== */
.event-detail-page {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.event-detail-header {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.event-detail-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.event-detail-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    flex: 1;
    padding-right: 20px;
}

.dynamic-back-btn {
    background: var(--accent-light);
    border: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    white-space: nowrap;
}

.dynamic-back-btn:hover {
    background: var(--accent);
    color: white;
    transform: translateX(-5px);
}

.event-detail-date {
    font-size: 16px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.event-detail-date i {
    color: var(--accent);
}

.event-detail-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    margin-top: 20px;
}

.event-detail-content {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}

/* ===== ГАЛЕРЕЯ ===== */
.gallery-section {
    margin-bottom: 30px;
}

.carousel-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #f8fafc;
    width: 100%;
}

.carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}

.carousel-item img {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.carousel-item.video-item {
    background: #0f172a;
    padding: 20px;
}

.carousel-item video {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    border-radius: 8px;
}

.rutube-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
}

.rutube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    z-index: 10;
}

.carousel-nav:hover {
    background: var(--accent);
    color: white;
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    margin-top: 20px;
}

.thumbnail {
    width: 100px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    border: 2px solid transparent;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail.video-thumb {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    font-size: 24px;
}

/* ===== РЕДАКТОР НОВОСТЕЙ ===== */
.modal-large {
    max-width: 900px;
    width: 90%;
}

.news-editor {
    max-width: 1200px;
    margin: 30px auto;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.editor-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px 30px;
    color: white;
}

.editor-header h2 {
    margin: 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.editor-header p {
    margin: 8px 0 0;
    opacity: 0.9;
    font-size: 14px;
}

.editor-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 30px;
    gap: 8px;
}

.editor-tab {
    padding: 14px 24px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.editor-tab:hover {
    color: #667eea;
}

.editor-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.editor-content {
    padding: 30px;
}

.editor-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.editor-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
}

.form-control,
.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #667eea;
}

.form-text {
    display: block;
    margin-top: 8px;
    font-size: 12px;
}

.text-muted {
    color: var(--text-secondary);
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.media-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}

.media-section h3 {
    font-size: 18px;
    margin: 0 0 20px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.media-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.media-preview {
    height: 150px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.media-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.media-info {
    padding: 10px;
}

.media-name {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
    word-break: break-all;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.media-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.upload-area:hover {
    border-color: #667eea;
}

.rutube-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* ===== УВЕДОМЛЕНИЯ ===== */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

/* ===== NO RESULTS ===== */
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius);
    margin: 20px 0;
}

.no-results-message h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.no-results-message p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.error-placeholder {
    padding: 40px;
    text-align: center;
    color: #ef4444;
}

.error-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

/* ===== АНИМАЦИИ ===== */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.4); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
    .news-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px) {
    .news-grid { grid-template-columns: repeat(3, 1fr); }
    .event-detail-header-top { flex-direction: column; gap: 15px; }
    .dynamic-back-btn { align-self: flex-start; }
    .carousel-item { min-height: 400px; }
    .event-detail-content { padding: 30px; }
}

@media (max-width: 768px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .news-header { flex-direction: column; gap: 15px; align-items: flex-start; }
    .filter-row { flex-direction: column; gap: 12px; }
    .filter-group { width: 100%; }
    .filter-actions { width: 100%; }
    .event-detail-title { font-size: 24px; }
    .carousel-nav { width: 36px; height: 36px; font-size: 16px; }
    .carousel-prev { left: 10px; }
    .carousel-next { right: 10px; }
    .modal-large { width: 95%; }
}

@media (max-width: 576px) {
    .news-grid { grid-template-columns: 1fr; }
    .event-detail-content { padding: 20px; }
    .thumbnail { width: 70px; height: 50px; }
    .editor-tabs { padding: 0 15px; }
    .editor-tab { padding: 10px 16px; font-size: 13px; }
    .editor-content { padding: 20px; }
}