@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@600;700;800&display=swap");

:root {
  --brand-red: #dc2626;
  --brand-red-light: #ef4444;
  --brand-red-dark: #b91c1c;
  --brand-red-soft: rgba(220, 38, 38, 0.08);
  --brand-dark: #0f172a;
  --brand-slate: #334155;
  --brand-muted: #64748b;
  --surface-bg: #f4f6fb;
  --card-bg: #ffffff;
  --card-border: rgba(226, 232, 240, 0.9);
  --shadow-soft:
    0 10px 30px -5px rgba(15, 23, 42, 0.06),
    0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-hover:
    0 20px 40px -10px rgba(15, 23, 42, 0.14),
    0 8px 20px -4px rgba(220, 38, 38, 0.08);
  --radius-lg: 20px;
  --radius-md: 14px;
}

/* Глобальные стили */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  background-color: var(--surface-bg);
  background-image:
    radial-gradient(at 0% 0%, rgba(220, 38, 38, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(37, 99, 235, 0.04) 0px, transparent 50%);
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  color: var(--brand-dark);
  line-height: 1.65;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", sans-serif;
  color: var(--brand-dark);
  letter-spacing: -0.02em;
}

/* ==========================================================================
   ПРЕМИАЛЬНАЯ ВЕРХНЯЯ ПАНЕЛЬ НАВИГАЦИИ С ПЛАВАЮЩЕЙ КРАСНОЙ ЛИНИЕЙ
   (ЕДИНЫЙ СТАТИЧНЫЙ РАЗМЕР НА ВСЕХ ВКЛАДКАХ САЙТА)
   ========================================================================== */
.navbar {
  position: relative;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  padding: 0.65rem 0;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.navbar > .container-fluid {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 28px;
}

.navbar-brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  margin-left: -10px;
  border-radius: 16px;
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Мягкий радиальный ореол в фирменных цветах газеты позади логотипа */
.navbar-brand::before {
  content: "";
  position: absolute;
  inset: -6px -14px;
  border-radius: 22px;
  background: radial-gradient(
    ellipse at 45% 50%,
    rgba(217, 4, 41, 0.26) 0%,
    rgba(255, 30, 66, 0.15) 45%,
    rgba(255, 122, 69, 0.06) 70%,
    transparent 85%
  );
  filter: blur(10px);
  opacity: 0;
  transform: scale(0.88);
  transition:
    opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
  pointer-events: none;
}

/* Акцентная газетная красная линия с неоновым свечением снизу логотипа */
.navbar-brand::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #d90429 18%,
    #ff1e42 50%,
    #d90429 82%,
    transparent 100%
  );
  box-shadow:
    0 0 12px rgba(217, 4, 41, 0.85),
    0 0 24px rgba(255, 30, 66, 0.55);
  opacity: 0;
  transform: scaleX(0.2);
  transition:
    opacity 0.35s ease,
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.navbar-brand img {
  max-height: 76px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.08));
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.navbar-brand:hover::before {
  opacity: 1;
  transform: scale(1.06);
  animation: logoAuraPulse 2.2s ease-in-out infinite alternate;
}

.navbar-brand:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.navbar-brand:hover img {
  transform: translateY(-2px) scale(1.045);
  filter:
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 10px rgba(217, 4, 41, 0.65))
    drop-shadow(0 0 22px rgba(255, 30, 66, 0.48))
    drop-shadow(0 6px 26px rgba(217, 4, 41, 0.35));
  animation: logoEditorialGlow 2.2s ease-in-out infinite alternate;
}

@keyframes logoEditorialGlow {
  0% {
    filter:
      drop-shadow(0 0 2px rgba(255, 255, 255, 0.95))
      drop-shadow(0 0 9px rgba(217, 4, 41, 0.6))
      drop-shadow(0 0 20px rgba(255, 30, 66, 0.42))
      drop-shadow(0 6px 24px rgba(217, 4, 41, 0.3));
  }
  100% {
    filter:
      drop-shadow(0 0 3px rgba(255, 255, 255, 1))
      drop-shadow(0 0 14px rgba(255, 30, 66, 0.82))
      drop-shadow(0 0 30px rgba(217, 4, 41, 0.65))
      drop-shadow(0 8px 34px rgba(255, 82, 82, 0.45));
  }
}

@keyframes logoAuraPulse {
  0% {
    opacity: 0.85;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1.12);
  }
}

.navbar-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.navbar-nav .nav-item {
  position: relative;
}

.navbar-nav .nav-link {
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #1e293b !important;
  padding: 12px 20px !important;
  border-radius: 12px;
  position: relative;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    transform 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #d90429 !important;
  background-color: rgba(217, 4, 41, 0.05);
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link.is-current-page {
  color: #d90429 !important;
}

/* Плавающая красная линия под текстом вкладок */
.nav-floating-line {
  position: absolute;
  bottom: 2px;
  left: 0;
  height: 3.5px;
  width: 0;
  background: linear-gradient(90deg, #ff1e42 0%, #d90429 50%, #9b001a 100%);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(217, 4, 41, 0.45);
  pointer-events: none;
  transition:
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease;
  opacity: 0;
  z-index: 5;
}

.navbar-toggler {
  border: 1.5px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  padding: 8px 12px;
  transition: all 0.2s ease;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.2);
}

/* Выпадающее меню «Выпуски» */
.navbar .dropdown-menu,
.dropdown-menu {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 10px;
  min-width: 170px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  margin-top: 4px !important;
}

.navbar .dropdown-menu::before,
.dropdown-menu::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
}

.navbar .dropdown-item,
.dropdown-item {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.96rem;
  color: #1e293b;
  padding: 9px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.navbar .dropdown-item::after,
.dropdown-item::after {
  content: "→";
  font-size: 0.85rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.2s ease;
  color: #d90429;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus,
.dropdown-item:hover,
.dropdown-item.active,
.dropdown-item:active {
  background: rgba(217, 4, 41, 0.09);
  color: #d90429 !important;
  padding-left: 20px;
}

.navbar .dropdown-item:hover::after,
.dropdown-item:hover::after,
.dropdown-item.active::after {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 991.98px) {
  .navbar {
    padding: 0.38rem 0;
  }
  .navbar > .container-fluid {
    padding: 0 14px;
  }
  .navbar-brand {
    max-width: calc(100% - 62px);
    padding: 2px 0;
  }
  .navbar-brand img {
    max-height: 44px;
    max-width: 195px;
    width: auto;
  }
  .navbar-toggler {
    padding: 6px 10px;
  }
  .nav-floating-line {
    display: none;
  }
  .navbar-collapse {
    background: #ffffff;
    border-radius: 16px;
    padding: 14px;
    margin-top: 12px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(15, 23, 42, 0.08);
  }
  .navbar .dropdown-menu::before,
  .dropdown-menu::before {
    display: none;
  }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
    border: 1px solid #f1f5f9;
    background: #f8fafc;
    margin-top: 6px !important;
  }
  .dropdown-menu.show {
    display: block;
  }
}

/* ==========================================================================
   HERO-БЛОК ШКОЛЫ И ПРИВЕТСТВИЕ НА ГЛАВНОЙ
   ========================================================================== */
.container {
  max-width: 1340px;
}

.img-container {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 18px;
  border-radius: 50%;
  display: inline-block;
  box-shadow:
    0 16px 36px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(220, 38, 38, 0.12);
  margin-bottom: 10px;
  position: relative;
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease;
}

.img-container:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 22px 45px rgba(220, 38, 38, 0.16),
    0 0 0 3px rgba(220, 38, 38, 0.22);
}

.rounded-img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.welcome-section {
  padding: 28px 32px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
}

.welcome-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #dc2626 0%, #3b82f6 50%, #dc2626 100%);
}

.welcome-section h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 10px;
}

.welcome-section p.lead {
  color: var(--brand-muted);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0;
}

/* Заголовки секций на главной */
h3.text-center {
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 800;
  color: var(--brand-dark);
  position: relative;
  display: table;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 14px;
  margin-bottom: 32px !important;
}

h3.text-center::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 4px;
  background: linear-gradient(90deg, #dc2626, #ff6b6b);
  border-radius: 999px;
}

/* ==========================================================================
   ГОРЯЧИЕ НОВОСТИ — СТРОГО 3 В РЯД НА ПК, КРАСИВЫЕ КАРТОЧКИ
   ========================================================================== */
.news-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

@media (max-width: 1080px) {
  .news-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}

@media (max-width: 720px) {
  .news-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.news-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.news-card .card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.news-card:hover .card {
  transform: translateY(-7px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(220, 38, 38, 0.28);
}

.news-card .carousel {
  width: 100%;
  height: 290px;
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.news-card .carousel-inner {
  width: 100%;
  height: 100%;
}

.news-card .carousel-item {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.news-card .carousel-item::before {
  content: "";
  position: absolute;
  inset: -18px;
  background-image: var(--slide-bg);
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(0.62) saturate(1.25);
  transform: scale(1.14);
  z-index: 1;
  pointer-events: none;
}

.news-card .carousel-item img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  cursor: zoom-in;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.45));
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-card:hover .carousel-item.active img {
  transform: scale(1.03);
}

/* Подсказка увеличения фото на карточке */
.news-card .carousel::after {
  content: "🔍 Нажмите на фото для увеличения";
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.25s ease;
  z-index: 3;
}

.news-card .carousel:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.news-card .carousel-control-prev,
.news-card .carousel-control-next {
  width: 42px;
  height: 42px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  opacity: 0.85;
  transition: all 0.22s ease;
  z-index: 4;
}

.news-card .carousel-control-prev {
  left: 12px;
}

.news-card .carousel-control-next {
  right: 12px;
}

.news-card .carousel-control-prev:hover,
.news-card .carousel-control-next:hover {
  opacity: 1;
  background: var(--brand-red);
  transform: translateY(-50%) scale(1.08);
}

.news-card .carousel-control-prev-icon,
.news-card .carousel-control-next-icon {
  background-color: transparent;
  width: 18px;
  height: 18px;
  padding: 0;
}

.news-card .card-body {
  padding: 24px 26px 26px 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card .card-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--brand-dark);
  line-height: 1.4;
  margin-bottom: 14px;
}

.news-card .card-text {
  color: var(--brand-slate);
  font-size: 0.97rem;
  line-height: 1.68;
  margin-bottom: 12px;
}

.news-card .card-text:last-child {
  margin-bottom: 0;
}

/* Кнопка-ссылка в стиле вкладки «Новости» (Полная статья ↗ / Источник ↗) */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  margin-left: 6px;
  padding: 6px 15px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--brand-red, #dc2626) !important;
  background: var(--brand-red-soft, rgba(220, 38, 38, 0.08));
  border-radius: 999px;
  text-decoration: none !important;
  transition: all 0.25s ease;
}

.text-link::after {
  content: "↗";
  font-size: 0.94rem;
  transition: transform 0.22s ease;
}

.text-link:hover {
  background: var(--brand-red, #dc2626);
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.28);
  transform: translateY(-1px);
}

.text-link:hover::after {
  transform: translate(2px, -2px);
}

/* ==========================================================================
   БЛОК «СВЕЖИЙ ВЫПУСК» — ФЛАГМАНСКАЯ КАРТОЧКА НА ГЛАВНОЙ
   ========================================================================== */
.last-issue-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 24px;
  box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.09);
  overflow: hidden;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.last-issue-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -12px rgba(15, 23, 42, 0.15);
}

.last-issue-card > .row {
  align-items: stretch;
}

.last-issue-card .col-md-4 {
  position: relative;
  overflow: hidden;
  background: #0f172a;
  min-height: 430px;
}

.last-issue-card .carousel {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden;
  background: #0f172a;
}

.last-issue-card .carousel::after {
  content: "🔍 Нажмите на фото для увеличения";
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.25s ease;
  z-index: 3;
}

.last-issue-card .carousel:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.last-issue-card .carousel-inner {
  width: 100% !important;
  height: 100% !important;
}

.last-issue-card .carousel-item {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.last-issue-card .carousel-item::before {
  content: "";
  position: absolute;
  inset: -18px;
  background-image: var(--slide-bg);
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(0.62) saturate(1.25);
  transform: scale(1.14);
  z-index: 1;
  pointer-events: none;
}

.last-issue-card .carousel-item img {
  position: relative;
  z-index: 2;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center;
  cursor: zoom-in;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.45));
  transition: transform 0.55s ease;
}

.last-issue-card:hover .carousel-item.active img {
  transform: scale(1.03);
}

.last-issue-card .carousel-control-prev,
.last-issue-card .carousel-control-next {
  width: 44px;
  height: 44px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  opacity: 0.85;
  transition: all 0.22s ease;
  z-index: 4;
}

.last-issue-card .carousel-control-prev {
  left: 14px;
}

.last-issue-card .carousel-control-next {
  right: 14px;
}

.last-issue-card .carousel-control-prev:hover,
.last-issue-card .carousel-control-next:hover {
  opacity: 1;
  background: var(--brand-red);
  transform: translateY(-50%) scale(1.08);
}

.last-issue-card .carousel-control-prev-icon,
.last-issue-card .carousel-control-next-icon {
  background-color: transparent;
  width: 18px;
  height: 18px;
  padding: 0;
}

.last-issue-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: 38px 44px;
  height: 100%;
}

.last-issue-card .card-body::before {
  content: "📰 СВЕЖИЙ НОМЕР ГАЗЕТЫ";
  display: inline-block;
  background: var(--brand-red-soft);
  color: var(--brand-red);
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.last-issue-card .card-title {
  font-family: "Montserrat", sans-serif;
  color: var(--brand-dark);
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.last-issue-card .card-text {
  color: var(--brand-slate);
  font-size: 1.05rem;
  line-height: 1.72;
  margin-bottom: 16px;
}

.last-issue-card .btn-primary {
  margin-top: 8px;
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  border: none;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 28px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.28);
  transition: all 0.25s ease;
}

.last-issue-card .btn-primary:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.38);
}

@media (max-width: 767.98px) {
  .last-issue-card .col-md-4 {
    height: 310px !important;
    min-height: 310px !important;
    max-height: 310px !important;
  }
  .last-issue-card .card-body {
    padding: 24px 20px;
    align-items: center;
    text-align: center;
  }
}

/* Кнопка «Узнать больше» в блоке Редакция */
.btn-outline-secondary {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 12px;
  border: 2px solid var(--brand-slate);
  color: var(--brand-dark);
  transition: all 0.25s ease;
}

.btn-outline-secondary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #ffffff;
  transform: translateY(-2px);
}

/* ==========================================================================
   ПОЛНОЭКРАННОЕ МОДАЛЬНОЕ ОКНО ПРОСМОТРА ФОТОГРАФИЙ (ЛАЙТБОКС С КАРУСЕЛЬЮ)
   ========================================================================== */
.photo-modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 24, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.photo-modal.show,
.photo-modal.active {
  display: flex;
  opacity: 1;
}

.photo-modal .carousel {
  width: 100%;
  max-width: 1120px;
  max-height: 88vh;
  position: relative;
}

.photo-modal .carousel-inner {
  border-radius: 16px;
  overflow: hidden;
}

.photo-modal .carousel-item {
  height: 82vh;
  background: transparent;
}

.photo-modal .carousel-item img {
  width: 100%;
  height: 100%;
  max-height: 82vh;
  object-fit: contain !important;
  margin: 0 auto;
  border-radius: 12px;
  user-select: none;
  filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.65));
}

.photo-modal .carousel-control-prev,
.photo-modal .carousel-control-next {
  width: 54px;
  height: 54px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  opacity: 0.92;
  z-index: 10010;
  transition: all 0.2s ease;
}

.photo-modal .carousel-control-prev {
  left: 8px;
}

.photo-modal .carousel-control-next {
  right: 8px;
}

.photo-modal .carousel-control-prev:hover,
.photo-modal .carousel-control-next:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  transform: translateY(-50%) scale(1.08);
  opacity: 1;
}

.photo-modal-close {
  position: fixed;
  top: 22px;
  right: 26px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10020;
  transition: all 0.2s ease;
}

.photo-modal-close:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  transform: rotate(90deg);
}

.photo-modal-counter {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 999px;
  z-index: 10020;
  pointer-events: none;
}

@media (max-width: 767.98px) {
  .photo-modal {
    padding: 12px;
  }
  .photo-modal .carousel-control-prev,
  .photo-modal .carousel-control-next {
    width: 42px;
    height: 42px;
  }
  .photo-modal-close {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
  }
}

/* ==========================================================================
   ФУТЕР И КНОПКА «НАВЕРХ»
   ========================================================================== */
.info-section {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  padding: 3.2rem 0 2.6rem;
  color: #f8fafc;
  position: relative;
  border-top: 4px solid var(--brand-red);
  margin-top: auto;
}

.info-title {
  font-family: "Montserrat", sans-serif;
  color: #ffffff;
  font-weight: 800;
  margin-bottom: 1.5rem;
  font-size: 1.45rem;
}

.info-content {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-item {
  color: #cbd5e1;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
}

.info-item strong {
  color: #ffffff;
  font-weight: 600;
}

.info-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 5px 15px;
  margin-left: 8px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.22s ease;
}

.info-btn:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #ffffff !important;
  transform: translateY(-2px);
}

.scroll-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #d90429 0%, #9b001a 100%);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 10px 24px rgba(217, 4, 41, 0.35);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1000;
}

.scroll-to-top.show,
.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 26px rgba(217, 4, 41, 0.5);
}

.scroll-to-top svg {
  color: #ffffff;
}

/* Скрываем пустой блок карусели в карточке новости, если к ней не прикреплены фотографии */
.news-card .carousel:not(:has(.carousel-item)) {
  display: none !important;
}

