/* ---------------------------------------------------------
   Базовые переменные
   --------------------------------------------------------- */
:root {
  --font-base: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Merriweather", Georgia, serif;

  --radius: 10px;
  --radius-sm: 6px;

  --container-width: 1200px;
}

.palette-gray-green {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --text: #1f2a26;
  --muted: #6f7f78;
  --accent: #5f8573;
  --accent-2: #4f7262;
  --accent-text: #ffffff;
  --link: #587f6d;
  --border: rgba(40, 60, 50, 0.08);
  --shadow-sm: 0 6px 18px rgba(20, 40, 30, 0.06);
  --shadow-md: 0 14px 36px rgba(20, 40, 30, 0.08);
  --gray-100: #f8f9f7;
  --gray-200: #eaecea;
  --gray-300: #d9ded9;
  --gray-400: #c7d1c9;
  --gray-500: #b0b8b0;
  --gray-600: #8f9a8f;
  --gray-700: #6f7f78;
  --gray-800: #4f6356;
  --gray-900: #2f3a2f;

  /* span dynamic */
  --span-color: #2f4f43; /* читаемый на светлом фоне */
  --span-bg-tag: #d9ede6;
}

/* =========================================================
   Общие стили сайта
   ========================================================= */
.news-site {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-base);
  line-height: 1.6;
}

.news-site a {
  color: var(--link);
  text-decoration: none;
  transition: color .15s ease, text-shadow .15s ease;
}

.news-site a:hover {
  color: var(--accent-2);
  text-shadow: 0 0 6px rgba(95, 133, 115, 0.28);
}

.news-site .container,
.news-site .container-fluid {
  max-width: var(--container-width);
}

.news-site h1,
.news-site h2,
.news-site h3,
.news-site h4,
.news-site h5 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.news-site p {
  margin-bottom: 1rem;
}

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

.news-site .navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.news-site .navbar-brand { color: var(--text); font-weight:800; }
.news-site .nav-link { color: var(--muted); font-weight:600; }
.news-site .nav-link.active, .news-site .nav-link:hover { color: var(--text); }

.news-site .btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: none;
  transition: background .15s ease, box-shadow .15s ease;
  box-shadow: none;
}

/* Залитые кнопки */
.news-site :is(.btn-primary, .btn-secondary, .btn-success, .btn-info, .btn-warning, .btn-danger, .btn-dark) {
  color: #fff;
  background-color: var(--btn-bg);
  background-image: linear-gradient(180deg, var(--btn-bg-top), var(--btn-bg));
  border-color: var(--btn-bg);
}

.news-site :is(.btn-primary, .btn-secondary, .btn-success, .btn-info, .btn-warning, .btn-danger, .btn-dark):hover,
.news-site :is(.btn-primary, .btn-secondary, .btn-success, .btn-info, .btn-warning, .btn-danger, .btn-dark):focus,
.news-site :is(.btn-primary, .btn-secondary, .btn-success, .btn-info, .btn-warning, .btn-danger, .btn-dark):active,
.news-site :is(.btn-primary, .btn-secondary, .btn-success, .btn-info, .btn-warning, .btn-danger, .btn-dark):focus-visible {
  background-image: none;
  background-color: var(--btn-bg-hover);
  box-shadow: var(--shadow-sm);
}

/* Outline-кнопки */
.news-site :is(.btn-outline-primary, .btn-outline-secondary, .btn-outline-success, .btn-outline-info, .btn-outline-warning, .btn-outline-danger, .btn-outline-dark) {
  background: transparent;
  box-shadow: none;

  color: rgb(var(--btn-focus-rgb));
  border: 1px solid currentColor;
}

.news-site :is(.btn-outline-primary, .btn-outline-secondary, .btn-outline-success, .btn-outline-info, .btn-outline-warning, .btn-outline-danger, .btn-outline-dark):hover {
  color: rgb(var(--btn-focus-rgb));
  background-color: rgba(var(--btn-focus-rgb), 0.08);
  border: 1px solid currentColor;
  box-shadow: var(--shadow-sm);
}

/* Цвета */
.news-site .btn-primary {
  --btn-bg: #5f8573;
  --btn-bg-hover: #4f7262;
  --btn-bg-top: #6b9481;
  --btn-outline: #5f8573;
  --btn-outline-hover: rgba(95, 133, 115, 0.08);
}

.news-site .btn-secondary {
  --btn-bg: #6c757d;
  --btn-bg-hover: #5c636a;
  --btn-bg-top: #7a838a;
  --btn-outline: #6c757d;
  --btn-outline-hover: rgba(108, 117, 125, 0.08);
}

.news-site .btn-success {
  --btn-bg: #4f8a5b;
  --btn-bg-hover: #41734a;
  --btn-bg-top: #5a9966;
  --btn-outline: #4f8a5b;
  --btn-outline-hover: rgba(79, 138, 91, 0.08);
}

.news-site .btn-info {
  --btn-bg: #2f7d8a;
  --btn-bg-hover: #25636d;
  --btn-bg-top: #3b8d9a;
  --btn-outline: #2f7d8a;
  --btn-outline-hover: rgba(47, 125, 138, 0.08);
}

.news-site .btn-warning {
  --btn-bg: #c58a2b;
  --btn-bg-hover: #a87221;
  --btn-bg-top: #d4993a;
  --btn-outline: #c58a2b;
  --btn-outline-hover: rgba(197, 138, 43, 0.08);
}

.news-site .btn-danger {
  --btn-bg: #b45353;
  --btn-bg-hover: #964343;
  --btn-bg-top: #c46363;
  --btn-outline: #b45353;
  --btn-outline-hover: rgba(180, 83, 83, 0.08);
}

.news-site .btn-dark {
  --btn-bg: #2f3437;
  --btn-bg-hover: #212529;
  --btn-bg-top: #3b4044;
  --btn-outline: #2f3437;
  --btn-outline-hover: rgba(47, 52, 55, 0.08);
}

.news-site .btn-outline-primary {
  --btn-focus-rgb: 95, 133, 115;
}

.news-site .btn-outline-secondary {
  --btn-focus-rgb: 108, 117, 125;
}

.news-site .btn-outline-success {
  --btn-focus-rgb: 79, 138, 91;
}

.news-site .btn-outline-info {
  --btn-focus-rgb: 47, 125, 138;
}

.news-site .btn-outline-warning {
  --btn-focus-rgb: 197, 138, 43;
}

.news-site .btn-outline-danger {
  --btn-focus-rgb: 180, 83, 83;
}

.news-site .btn-outline-dark {
  --btn-focus-rgb: 47, 52, 55;
}

.news-site .card, .news-site .article-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.news-site .card-title { color: var(--text); }
.news-site .excerpt, .news-site .card-text { color: var(--muted); }

.news-site .form-control {
  background: var(--gray-100);
  border: 1px solid var(--gray-400);
  border-radius: var(--radius-sm);
  color: var(--text);
}
.news-site .form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(95, 133, 115, 0.15); }

.news-site table { width: 100%; }
.news-site thead th { color: var(--muted); font-weight:700; border-bottom:2px solid var(--border); }
.news-site tbody td { border-bottom:1px solid rgba(0,0,0,0.04); }

/* ---------------------------------------------------------
   Span и метки (динамический цвет)
   --------------------------------------------------------- */
.news-site span {
  color: var(--span-color);
  font-weight: 600;
  line-height: 1.4;
}


.badge-light-gray {
    background-color: #e7efeb; /* светло-серо-зелёный */
    color: #39675b;           /* контрастный текст */
}

/* Анимация */
.alert {
  animation: fadeInDown 0.4s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}