/* ============================================================
   📰 news.css - ПОЛНЫЙ СТИЛЬ ДЛЯ СТРАНИЦЫ "НОВОСТИ"
   ============================================================ */

/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
  --accent-main: #d4a574;
  --accent-light: #e8c9a0;
  --accent-dark: #b8926a;
  --accent-rgb: 212, 165, 116;
  --accent-glass: rgba(212, 165, 116, 0.08);
  --accent-glass-hover: rgba(212, 165, 116, 0.20);
  --accent-border: rgba(212, 165, 116, 0.15);
  --accent-border-hover: rgba(212, 165, 116, 0.30);
  --accent-btn: linear-gradient(135deg, #d4a574, #b8926a);
  --accent-shadow: rgba(212, 165, 116, 0.25);
}

/* ===== ТЁМНАЯ ТЕМА ===== */
body.dark {
  --bg-body: #08080a;
  --bg-gradient: radial-gradient(ellipse at 50% 0%, #141418 0%, #08080a 70%);
  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.5);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(255, 255, 255, 0.03);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.8);
  --badge-bg: rgba(255, 255, 255, 0.06);
  --badge-border: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.06);
}

/* ===== СВЕТЛАЯ ТЕМА ===== */
body.light {
  --bg-body: #0a0a0a;
  --bg-gradient: radial-gradient(ellipse at 50% 0%, #1a0a0a 0%, #0a0a0a 70%);
  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.5);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(255, 255, 255, 0.03);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.6);
  --badge-bg: rgba(255, 255, 255, 0.06);
  --badge-border: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.06);
}

/* ===== АКЦЕНТНЫЕ ТЕМЫ ===== */
.theme-red {
  --accent-main: #ef4444;
  --accent-light: #f87171;
  --accent-dark: #dc2626;
  --accent-rgb: 239, 68, 68;
  --accent-glass: rgba(239, 68, 68, 0.08);
  --accent-glass-hover: rgba(239, 68, 68, 0.20);
  --accent-border: rgba(239, 68, 68, 0.15);
  --accent-border-hover: rgba(239, 68, 68, 0.30);
  --accent-btn: linear-gradient(135deg, #ef4444, #dc2626);
  --accent-shadow: rgba(239, 68, 68, 0.25);
}
.theme-orange {
  --accent-main: #f97316;
  --accent-light: #fb923c;
  --accent-dark: #ea580c;
  --accent-rgb: 249, 115, 22;
  --accent-glass: rgba(249, 115, 22, 0.08);
  --accent-glass-hover: rgba(249, 115, 22, 0.20);
  --accent-border: rgba(249, 115, 22, 0.15);
  --accent-border-hover: rgba(249, 115, 22, 0.30);
  --accent-btn: linear-gradient(135deg, #f97316, #ea580c);
  --accent-shadow: rgba(249, 115, 22, 0.25);
}
.theme-yellow {
  --accent-main: #eab308;
  --accent-light: #facc15;
  --accent-dark: #ca8a04;
  --accent-rgb: 234, 179, 8;
  --accent-glass: rgba(234, 179, 8, 0.08);
  --accent-glass-hover: rgba(234, 179, 8, 0.20);
  --accent-border: rgba(234, 179, 8, 0.15);
  --accent-border-hover: rgba(234, 179, 8, 0.30);
  --accent-btn: linear-gradient(135deg, #eab308, #ca8a04);
  --accent-shadow: rgba(234, 179, 8, 0.25);
}
.theme-green {
  --accent-main: #22c55e;
  --accent-light: #4ade80;
  --accent-dark: #16a34a;
  --accent-rgb: 34, 197, 94;
  --accent-glass: rgba(34, 197, 94, 0.08);
  --accent-glass-hover: rgba(34, 197, 94, 0.20);
  --accent-border: rgba(34, 197, 94, 0.15);
  --accent-border-hover: rgba(34, 197, 94, 0.30);
  --accent-btn: linear-gradient(135deg, #22c55e, #16a34a);
  --accent-shadow: rgba(34, 197, 94, 0.25);
}
.theme-blue {
  --accent-main: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #2563eb;
  --accent-rgb: 59, 130, 246;
  --accent-glass: rgba(59, 130, 246, 0.08);
  --accent-glass-hover: rgba(59, 130, 246, 0.20);
  --accent-border: rgba(59, 130, 246, 0.15);
  --accent-border-hover: rgba(59, 130, 246, 0.30);
  --accent-btn: linear-gradient(135deg, #3b82f6, #2563eb);
  --accent-shadow: rgba(59, 130, 246, 0.25);
}
.theme-purple {
  --accent-main: #8b5cf6;
  --accent-light: #a78bfa;
  --accent-dark: #7c3aed;
  --accent-rgb: 139, 92, 246;
  --accent-glass: rgba(139, 92, 246, 0.08);
  --accent-glass-hover: rgba(139, 92, 246, 0.20);
  --accent-border: rgba(139, 92, 246, 0.15);
  --accent-border-hover: rgba(139, 92, 246, 0.30);
  --accent-btn: linear-gradient(135deg, #8b5cf6, #7c3aed);
  --accent-shadow: rgba(139, 92, 246, 0.25);
}

/* ===== ГЛОБАЛЬНЫЕ СТИЛИ ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  background: var(--bg-body);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  margin: 0;
}

/* ===== ЗАГОЛОВОК СТРАНИЦЫ ===== */
.page-header {
  text-align: center;
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
  background: var(--card-bg);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--glass-border);
  border-radius: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-main), transparent);
  opacity: 0.5;
  z-index: 1;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-header:hover::before {
  opacity: 1;
}

.page-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  color: var(--accent-main);
  stroke: var(--accent-main);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-header-icon svg {
  width: 48px;
  height: 48px;
  stroke: var(--accent-main);
  filter: drop-shadow(0 0 20px rgba(var(--accent-rgb), 0.15));
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-header:hover .page-header-icon svg {
  transform: scale(1.08) rotate(-3deg);
  filter: drop-shadow(0 0 40px rgba(var(--accent-rgb), 0.35));
}

.page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-light), var(--accent-main));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  z-index: 1;
}

.page-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ===== СТЕКЛЯННЫЙ БЛОК (GLASS CARD) ===== */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--glass-border);
  border-radius: 1.75rem;
  padding: 1.75rem 1.5rem;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow);
  transform: translateZ(0);
  will-change: transform;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-main), transparent);
  opacity: 0.6;
  z-index: 1;
}

.glass-card:hover {
  background: var(--glass-bg);
  border-color: var(--accent-border-hover);
  transform: translateY(-6px) translateZ(0);
  box-shadow: var(--shadow-hover);
}

/* ===== ЗАГОЛОВКИ РАЗДЕЛОВ ===== */
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-main), var(--accent-light));
  margin-top: 0.5rem;
  border-radius: 4px;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-title:hover::after {
  width: 80px;
  background: linear-gradient(90deg, var(--accent-light), var(--accent-main));
}

.section-title .section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-main);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-title .section-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--accent-main);
}

.news-section-title {
  font-size: 1.8rem;
  margin: 1.5rem 0 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.news-section-title i {
  color: var(--accent-main);
}

/* ===== КОНТЕЙНЕР СПИСКА НОВОСТЕЙ ===== */
.news-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.news-list-container .news-item {
  margin: 0;
}

/* ===== КАРТОЧКА НОВОСТИ ===== */
.news-item {
  background: var(--card-bg);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: 1.5rem;
  padding: 1.2rem 1.5rem;
  margin: 0.8rem 0;
  border: 1px solid var(--glass-border);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Задержки для новостей */
.news-item:nth-child(1) {
  animation-delay: 0.05s;
}
.news-item:nth-child(2) {
  animation-delay: 0.10s;
}
.news-item:nth-child(3) {
  animation-delay: 0.15s;
}
.news-item:nth-child(4) {
  animation-delay: 0.20s;
}
.news-item:nth-child(5) {
  animation-delay: 0.25s;
}

.news-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-main), transparent);
  opacity: 0.4;
  z-index: 1;
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-item:hover {
  background: var(--glass-bg);
  border-color: var(--accent-border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.news-item:hover::before {
  opacity: 0.9;
}

/* ===== ЗАГОЛОВОК НОВОСТИ ===== */
.news-item h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
  font-size: 1.15rem;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

/* ===== ИКОНКА НОВОСТИ ===== */
.news-item .news-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-main);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-item .news-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent-main);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-item:hover .news-icon svg {
  transform: scale(1.15) rotate(-3deg);
  filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.3));
}

/* ===== ТЕКСТ НОВОСТИ ===== */
.news-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  position: relative;
  z-index: 2;
  margin-bottom: 0.5rem;
}

.news-item small {
  color: var(--text-secondary);
  opacity: 0.6;
  font-size: 0.8rem;
  position: relative;
  z-index: 2;
}

/* ===== ССЫЛКА НА МЕДИА ===== */
.news-item .media-link {
  color: var(--accent-main);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
  z-index: 2;
}

.news-item .media-link:hover {
  color: var(--accent-light);
}

/* ===== МЕДИА ВНУТРИ НОВОСТЕЙ ===== */
.news-item video {
  width: 100%;
  border-radius: 0.8rem;
  margin-top: 0.5rem;
  max-height: 300px;
  object-fit: cover;
  position: relative;
  z-index: 2;
}

.news-item img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 0.8rem;
  margin-top: 0.5rem;
  position: relative;
  z-index: 2;
}

.news-item audio {
  width: 100%;
  margin-top: 0.5rem;
  position: relative;
  z-index: 2;
}

/* ===== АДМИН-ПАНЕЛЬ ===== */
.admin-item {
  background: var(--card-bg);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: 1.5rem;
  padding: 1.2rem 1.5rem;
  margin: 0.8rem 0;
  border: 1px solid var(--glass-border);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.admin-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-main), transparent);
  opacity: 0.4;
}

.admin-item:hover {
  background: var(--glass-bg);
  border-color: var(--accent-border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.admin-news-list .admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-news-list .admin-item .news-type-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 40px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  color: var(--text-secondary);
}

.admin-news-list .admin-item .news-type-badge.important {
  color: var(--accent-main);
  border-color: var(--accent-main);
}

/* ===== ПОЛЯ ВВОДА И КНОПКИ ===== */
.admin-panel input,
.admin-panel textarea,
.admin-panel select {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  padding: 0.6rem 1rem;
  border-radius: 2rem;
  color: var(--text-primary);
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  margin: 0.3rem 0;
  transition: border 0.2s;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}

.admin-panel input:focus,
.admin-panel textarea:focus,
.admin-panel select:focus {
  outline: none;
  border-color: var(--accent-main);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.15);
}

.btn {
  background: var(--accent-btn);
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: 40px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  font-size: 0.9rem;
  box-shadow: 0 4px 20px var(--accent-shadow);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.btn:hover {
  background: var(--accent-btn-hover, linear-gradient(135deg, #e8c9a0, #c9a87c));
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 35px rgba(var(--accent-rgb), 0.4);
}

.btn:active {
  transform: scale(0.96);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #f87171, #ef4444);
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4);
}

/* ===== ИНДИКАТОР ЗАГРУЗКИ ===== */
.news-loading {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-secondary);
}

.news-loading i {
  color: var(--accent-main);
  margin-right: 0.5rem;
}

.news-loading .fa-spinner {
  font-size: 2rem;
  display: block;
  margin: 0 auto 0.5rem;
}

/* ============================================================
   🎬 АНИМАЦИИ
   ============================================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   📱 АДАПТИВ
   ============================================================ */

/* Планшеты */
@media (max-width: 1024px) {
  .glass-card {
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 768px) {
  .page-header {
    padding: 1.5rem 1rem;
    border-radius: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .page-header-icon svg {
    width: 40px;
    height: 40px;
  }

  .page-title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
  }

  .page-description {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.6rem;
    gap: 0.6rem;
  }

  .section-title .section-icon svg {
    width: 28px;
    height: 28px;
  }

  .section-title::after {
    width: 45px;
  }

  .news-section-title {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    gap: 0.5rem;
  }

  .news-item {
    padding: 1.2rem;
    border-radius: 1.25rem;
  }

  .news-item h3 {
    font-size: 1.05rem;
    gap: 0.5rem;
  }

  .news-item .news-icon svg {
    width: 20px;
    height: 20px;
  }

  .news-item p {
    font-size: 0.9rem;
  }

  .admin-news-list .admin-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-news-list .admin-item .btn {
    align-self: flex-end;
  }
}

/* Мобильные устройства */
@media (max-width: 640px) {
  .page-header {
    padding: 1rem 0.8rem;
    border-radius: 1.5rem;
    margin-bottom: 1rem;
  }

  .page-header-icon svg {
    width: 36px;
    height: 36px;
  }

  .page-title {
    font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  }

  .page-description {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.4rem;
    gap: 0.5rem;
  }

  .section-title .section-icon svg {
    width: 24px;
    height: 24px;
  }

  .section-title::after {
    width: 35px;
    height: 2px;
  }

  .news-section-title {
    font-size: 1.4rem;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
  }

  .news-item {
    padding: 1rem;
    border-radius: 1rem;
  }

  .news-item h3 {
    font-size: 0.95rem;
    gap: 0.4rem;
    flex-wrap: wrap;
  }

  .news-item .news-icon svg {
    width: 18px;
    height: 18px;
  }

  .news-item p {
    font-size: 0.85rem;
  }

  .news-item small {
    font-size: 0.7rem;
  }

  .news-item video,
  .news-item img {
    max-height: 200px;
  }

  .admin-item {
    padding: 0.8rem;
    border-radius: 1rem;
  }

  .admin-news-list .admin-item {
    padding: 0.8rem;
  }
}

/* Маленькие смартфоны */
@media (max-width: 480px) {
  .glass-card {
    padding: 1rem 0.8rem;
    border-radius: 1.25rem;
  }

  .page-header-icon svg {
    width: 30px;
    height: 30px;
  }

  .page-title {
    font-size: 1.4rem;
  }

  .page-description {
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.3rem;
    gap: 0.5rem;
  }

  .section-title .section-icon svg {
    width: 24px;
    height: 24px;
  }

  .section-title::after {
    width: 35px;
    height: 2px;
  }

  .news-section-title {
    font-size: 1.2rem;
  }

  .news-item {
    padding: 0.8rem;
  }

  .news-item h3 {
    font-size: 0.9rem;
    gap: 0.3rem;
  }

  .news-item .news-icon svg {
    width: 16px;
    height: 16px;
  }

  .news-item p {
    font-size: 0.8rem;
  }

  .news-item video,
  .news-item img {
    max-height: 160px;
  }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
  .glass-card {
    padding: 0.8rem 0.6rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .section-title .section-icon svg {
    width: 20px;
    height: 20px;
  }

  .news-item {
    padding: 0.6rem;
  }

  .news-item h3 {
    font-size: 0.85rem;
  }

  .news-item p {
    font-size: 0.8rem;
  }
}