/* ===== RESET ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
img { display: block; width: 100%; object-fit: cover; }

/* ===== BASE ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: #f4f4f6;
  color: #111;
  font-size: 15px;
}

/* ===== TOP META ===== */
.top-meta {
  background: #111;
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  padding: 6px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.top-meta-right { display: flex; gap: 12px; }

.top-widgets {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.top-widget {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.78);
  padding: 3px 10px;
  white-space: nowrap;
}

.top-widget b {
  color: #fff;
  font-size: 11px;
}

/* ===== MASTHEAD LOGO ===== */
.masthead-logo {
  display: block;
  background: #fff;
  height: 278px;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-bottom: 1px solid #f0f0f0;
}

.masthead-logo img {
  width: min(1300px, 100%);
  height: 100%;
  margin: 0 auto;
  object-fit: cover;
  object-position: center 55%;
}

/* ===== NAVBAR ===== */
.navbar {
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 40px;
  border-bottom: 3px solid #cc0000;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  justify-content: center;
}

.brand {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1px;
  color: #111;
  white-space: nowrap;
  padding: 16px 0;
}

.brand span { color: #cc0000; }

.nav-links {
  display: flex;
  gap: 4px;
  flex: 0 1 auto;
  justify-content: center;
  margin: 0 auto;
}

.nav-links a {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  padding: 20px 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
  color: #cc0000;
  border-bottom-color: #cc0000;
}

.nav-links a[href="video.html"] {
  color: #cc0000;
}

.search-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background 0.2s;
  position: absolute;
  right: 40px;
}
.search-btn:hover { background: #f4f4f6; }

/* ===== BREAKING BAR ===== */
.breaking-bar {
  background: #cc0000;
  color: #fff;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 36px;
}

.breaking-label {
  background: #111;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.breaking-text {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
}

.breaking-text span {
  position: absolute;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  top: 0;
  left: 0;
  line-height: 36px;  /* совпадает с .breaking-bar height — выравнивание по центру */
  will-change: transform;
}

/* ===== HERO ===== */
.hero-news {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  padding: 24px 40px 4px;
  max-width: 1320px;
  margin: 0 auto;
}

.hero-left-ad {
  display: flex;
}

.hero-main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  width: 100%;
  cursor: pointer;
  background: #111;
}

.hero-main img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.hero-main:hover img { transform: scale(1.03); }

/* Полупрозрачный градиент-подложка под заголовком (для .card-body внутри hero-main) */
.hero-main .card-body,
.hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 32px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.7) 55%, rgba(0,0,0,0) 100%);
  color: #fff;
  z-index: 2;
}

.hero-main .card-body .tag,
.hero-overlay .tag {
  background: #c8102e;
  color: #fff;
}

.hero-main .card-body h1,
.hero-main .card-body h2,
.hero-overlay h1 {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  margin: 10px 0 10px;
  letter-spacing: -0.3px;
  color: #fff;
}

.hero-main .card-body p,
.hero-overlay p {
  font-size: 14px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 10px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-side-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  flex: 1;
}

.hero-side-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.hero-side-card img {
  width: 100px;
  height: 75px;
  border-radius: 8px;
  flex-shrink: 0;
}

.hero-side-card h3 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin: 6px 0 8px;
}

/* ===== TAGS ===== */
.tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #cc0000;
  background: rgba(204,0,0,0.08);
  padding: 3px 8px;
  border-radius: 4px;
}
.tag.small { font-size: 10px; }

.time {
  font-size: 12px;
  color: #999;
}

.news-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: #777;
}

.news-thumb {
  position: relative;
  overflow: hidden;
  background: #eee;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-main .news-thumb {
  position: absolute;
  inset: 0;
}

.hero-main .news-thumb img {
  position: absolute;
  inset: 0;
}

.hero-side-card .news-thumb {
  width: 100px;
  height: 75px;
  border-radius: 8px;
  flex-shrink: 0;
}

.most-read-thumb {
  width: 78px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 6px;
}

.news-card > .news-thumb {
  height: 180px;
}

.video-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(200, 16, 46, 0.94);
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(0,0,0,0.22);
}

.article-video-player {
  margin: 18px 0 24px;
  background: #0d0d10;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: 0 12px 36px rgba(20,24,35,0.12);
}

.article-video-player iframe,
.article-video-player video {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

/* ===== CONTENT WRAP ===== */
.content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  padding: 0 40px 40px;
  max-width: 1320px;
  margin: 0 auto;
}

.main-feed { display: flex; flex-direction: column; gap: 32px; }

.left-ads {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.left-ad-box {
  min-height: 280px;
  position: sticky;
  top: 92px;
}

.left-ad-box.compact {
  min-height: 180px;
  position: static;
}

/* ===== SECTION BLOCK ===== */
.section-block {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-header a {
  font-size: 13px;
  color: #cc0000;
  font-weight: 600;
}

/* ===== NEWS GRIDS ===== */
.news-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.news-grid-3 .news-card.big {
  grid-column: span 1;
}

.news-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

/* ===== NEWS CARD ===== */
.news-card {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #f0f0f0;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.news-card img {
  height: 180px;
  transition: transform 0.3s;
}

.news-card:hover img { transform: scale(1.05); }

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-body h3 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: #111;
}

.card-body h3:hover { color: #cc0000; }

.card-body p {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

/* ===== VIDEO GRID ===== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.video-card { border-radius: 12px; overflow: hidden; cursor: pointer; border: 1px solid #f0f0f0; transition: transform 0.2s, box-shadow 0.2s; }
.video-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }

.video-thumb {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.video-thumb img { height: 100%; transition: transform 0.3s; }
.video-card:hover .video-thumb img { transform: scale(1.05); }

.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(204,0,0,0.9);
  color: #fff;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform 0.2s, background 0.2s;
}

.video-card:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  background: #cc0000;
}

.duration {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ===== TWO SECTIONS ===== */
.two-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ===== LIST NEWS ===== */
.list-news { display: flex; flex-direction: column; gap: 12px; }

.list-card {
  display: flex;
  gap: 12px;
  cursor: pointer;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: opacity 0.2s;
}

.list-card:last-child { border-bottom: none; padding-bottom: 0; }
.list-card:hover { opacity: 0.75; }

.list-card img {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  flex-shrink: 0;
}

.list-card h4 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
}

/* ===== SPORT CARD ===== */
.sport-card.big-sport {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  cursor: pointer;
  border: 1px solid #f0f0f0;
  transition: transform 0.2s;
}

.sport-card.big-sport:hover { transform: translateY(-2px); }

.sport-card.big-sport img { height: 180px; }

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-block {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
}

.sidebar-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

/* TOP LIST */
.top-list {
  list-style: none;
  counter-reset: top-counter;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-list li {
  counter-increment: top-counter;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f4f4f6;
  position: relative;
  padding-left: 28px;
}

.top-list li:last-child { border-bottom: none; padding-bottom: 0; }

.top-list li::before {
  content: counter(top-counter);
  position: absolute;
  left: 0;
  font-size: 20px;
  font-weight: 900;
  color: #cc0000;
  opacity: 0.3;
  line-height: 1;
}

.top-list a {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #111;
  transition: color 0.2s;
}

.top-list a:hover { color: #cc0000; }

.top-list span {
  font-size: 11px;
  color: #aaa;
}

/* LIVE BLOCK */
.live-block { display: flex; flex-direction: column; gap: 10px; }

.live-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 140px;
}

.live-thumb img { height: 100%; }

.live-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: #cc0000;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.live-block p { font-size: 13px; font-weight: 600; line-height: 1.4; }

.watch-btn {
  display: inline-block;
  background: #cc0000;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  text-align: center;
  transition: background 0.2s;
}

.watch-btn:hover { background: #aa0000; }

/* MEDIA WIDGETS */
.radio-widget,
.tv-widget {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-screen {
  min-height: 96px;
  border-radius: 12px;
  padding: 16px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(204,0,0,0.96), rgba(17,17,17,0.96)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.2) 0 2px, transparent 2px 8px);
  display: grid;
  align-content: center;
  gap: 4px;
}

.radio-screen span {
  width: max-content;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.radio-screen strong {
  font-size: 18px;
  line-height: 1.15;
}

.radio-screen small {
  color: rgba(255,255,255,0.7);
}

.radio-widget audio {
  width: 100%;
  height: 38px;
}

.tv-frame {
  overflow: hidden;
  border-radius: 12px;
  background: #111;
  aspect-ratio: 16 / 9;
}

.tv-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.media-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.media-links a {
  flex: 1;
  min-width: max-content;
  border-radius: 8px;
  background: #f4f4f6;
  color: #111;
  padding: 9px 10px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.media-links a:hover {
  background: #cc0000;
  color: #fff;
}

/* WEATHER */
.weather-widget { display: flex; flex-direction: column; gap: 12px; }

.weather-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.weather-main span { font-size: 40px; }

.w-temp { font-size: 28px; font-weight: 800; }
.w-desc { font-size: 13px; color: #666; }

.weather-details {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #888;
  background: #f4f4f6;
  padding: 8px 12px;
  border-radius: 8px;
}

/* ADS */
.ad-banner,
.ad-box {
  border: 1px dashed rgba(204,0,0,0.35);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,245,245,0.96)),
    repeating-linear-gradient(-45deg, rgba(204,0,0,0.08) 0 1px, transparent 1px 10px);
  color: #111;
}

.ad-banner {
  max-width: 1200px;
  margin: 24px auto 0;
  min-height: 86px;
  border-radius: 16px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ad-banner-top { margin-top: 24px; }

.ad-banner span,
.ad-box span {
  color: #cc0000;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-banner strong {
  flex: 1;
  font-size: 22px;
  line-height: 1.2;
}

.ad-banner a,
.ad-box a {
  border-radius: 8px;
  background: #111;
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
}

.ad-box {
  border-radius: 16px;
  min-height: 220px;
  padding: 22px;
  display: grid;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.ad-box strong {
  font-size: 22px;
  line-height: 1.15;
}

.ad-box p {
  color: #666;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .hero-news,
  .content-wrap {
    grid-template-columns: 1fr;
  }

  .left-ads {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .left-ad-box {
    position: static;
    min-height: 170px;
  }

  .hero-side {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-side-card {
    min-height: 132px;
  }
}

@media (max-width: 720px) {
  .top-meta {
    padding: 8px 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-widgets {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .top-meta-right {
    display: none;
  }

  .masthead-logo {
    height: 170px;
    margin: 0;
  }

  .navbar {
    padding: 0 16px;
  }

  .nav-links {
    overflow-x: auto;
  }

  .hero-news,
  .content-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-main {
    height: 420px;
    min-height: 420px;
    max-height: 420px;
  }

  .hero-side {
    grid-template-columns: 1fr;
  }

  .left-ads {
    grid-template-columns: 1fr;
  }

  .ad-banner {
    margin-left: 16px;
    margin-right: 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .ad-banner strong {
    font-size: 19px;
  }
}

/* ===== FOOTER ===== */
.site-footer { background: #111; color: #fff; margin-top: 40px; }

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 48px 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .brand { font-size: 28px; font-weight: 900; letter-spacing: -1px; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.7; max-width: 320px; }

.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-links h4 { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.4); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px; }
.footer-links a { display: block; font-size: 14px; color: rgba(255,255,255,0.7); margin-bottom: 8px; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

.social-links { display: flex; gap: 12px; }
.social-links a {
  background: rgba(255,255,255,0.1);
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s;
}
.social-links a:hover { background: #cc0000; }

/* ===== ADMIN NEWS LAYER ===== */
.admin-added-section .section-header a {
  color: #cc0000;
  font-size: 13px;
  font-weight: 700;
}
.admin-news-card { cursor: pointer; }
.admin-news-card:hover {
  box-shadow: 0 10px 26px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}
.admin-news-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,0.72);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.admin-news-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.admin-news-modal-card {
  width: min(860px, 96vw);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  position: relative;
  box-shadow: 0 28px 80px rgba(0,0,0,0.35);
}
.admin-news-modal-card > img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  background: #fff;
}
.admin-news-modal-gallery {
  background: #f5f5f7;
  border-bottom: 1px solid #eee;
}
.admin-news-modal-main-image {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  background: #f5f5f7;
}
.admin-news-modal-thumbs {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  background: #fff;
}
.admin-news-modal-thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 68px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.64;
  transition: opacity 0.15s, border-color 0.15s, transform 0.15s;
}
.admin-news-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-news-modal-thumb:hover,
.admin-news-modal-thumb.active {
  opacity: 1;
  border-color: #c8102e;
}
.admin-news-modal-thumb:hover {
  transform: translateY(-1px);
}
.admin-news-modal-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 10;
}
.admin-news-modal-share,
.admin-news-modal-close {
  background: rgba(255,255,255,0.94);
  color: #1a1a1a;
  border: 1px solid #ddd;
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 7px 14px;
  transition: all 0.15s;
  font-family: inherit;
}
.admin-news-modal-share:hover { background: #c8102e; color: #fff; border-color: #c8102e; }
.admin-news-modal-close {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
}
.admin-news-modal-close:hover { background: #c8102e; color: #fff; border-color: #c8102e; }

.admin-news-modal-meta {
  color: #888;
  font-size: 13px;
  margin: 8px 0 18px;
  border-bottom: 1px solid #eee;
  padding-bottom: 14px;
}

.admin-news-modal-share-block {
  margin-top: 24px;
  padding: 18px 20px;
  background: #f9f9f9;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
}
.admin-news-modal-share-block strong {
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
  color: #1a1a1a;
}
.share-link-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.share-link-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: #555;
  min-width: 0;
}
.share-copy-btn {
  background: #c8102e;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.share-copy-btn:hover { background: #a00d24; }
.share-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.share-btn {
  flex: 1;
  text-align: center;
  text-decoration: none;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  min-width: 90px;
  transition: all 0.15s;
}
.share-tg:hover { background: #0088cc; color: #fff; border-color: #0088cc; }
.share-vk:hover { background: #0077FF; color: #fff; border-color: #0077FF; }
.share-wa:hover { background: #25D366; color: #fff; border-color: #25D366; }
.admin-news-modal-body { padding: 28px; }
.admin-news-modal-body h2 {
  font-size: 32px;
  line-height: 1.15;
  margin: 12px 0 18px;
}
.admin-news-modal-text {
  display: grid;
  gap: 14px;
  color: #444;
  font-size: 16px;
  line-height: 1.7;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.admin-news-modal-text p {
  margin: 0;
}
.admin-news-modal-text p:first-child {
  font-size: 1.06em;
  color: #25252c;
}
.article-keyword {
  background: transparent;
  color: #15151a;
  font-weight: 800;
  padding: 0;
}
/* Старый стиль кнопки закрытия — заменён на новый выше */

/* ===== ADMIN PAGE ===== */
.admin-page {
  background: #f4f4f6;
}
.admin-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 40px 60px;
}
.admin-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}
.admin-top .brand {
  background: #fff;
  padding: 14px 18px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.admin-top h1 {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 6px;
}
.admin-top p {
  color: #666;
  line-height: 1.6;
}
.admin-top code {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 2px 6px;
}
.admin-login,
.admin-editor,
.admin-list-panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}
.admin-login {
  max-width: 460px;
  margin: 32px auto 0;
  padding: 28px;
  display: grid;
  gap: 12px;
}
.admin-login h2,
.admin-editor h2,
.admin-list-panel h2 {
  font-size: 26px;
  font-weight: 900;
}
.admin-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
  gap: 22px;
  align-items: start;
}
.admin-editor,
.admin-list-panel {
  padding: 24px;
}
.admin-editor {
  display: grid;
  gap: 12px;
}
.admin-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 4px;
}
.admin-editor-head p,
.admin-list-panel p {
  color: #666;
  font-size: 14px;
  margin-top: 4px;
}
.admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr 160px;
  gap: 12px;
}
.admin-row.two {
  grid-template-columns: 1fr 1fr;
}
.admin-editor label,
.admin-login label {
  font-size: 13px;
  font-weight: 800;
}
.admin-editor input,
.admin-editor textarea,
.admin-editor select,
.admin-login input {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  font: inherit;
  outline: none;
}
.admin-editor textarea {
  min-height: 110px;
  resize: vertical;
}
.admin-editor #newsBody {
  min-height: 230px;
}
.admin-editor input:focus,
.admin-editor textarea:focus,
.admin-editor select:focus,
.admin-login input:focus {
  border-color: #cc0000;
  box-shadow: 0 0 0 3px rgba(204,0,0,0.09);
}
.admin-primary,
.admin-secondary,
.admin-ghost,
.admin-list-actions button {
  border: none;
  border-radius: 10px;
  padding: 11px 15px;
  font-weight: 800;
  cursor: pointer;
}
.admin-primary {
  background: #cc0000;
  color: #fff;
}
.admin-secondary {
  background: #111;
  color: #fff;
}
.admin-ghost,
.admin-list-actions button {
  background: #f4f4f6;
  color: #111;
}
.admin-list-actions button.danger {
  background: #fff0f0;
  color: #cc0000;
}
.admin-actions,
.admin-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-message,
.admin-empty {
  min-height: 20px;
  color: #666;
  font-size: 14px;
}
.admin-message.error {
  color: #cc0000;
}
.admin-image-preview img {
  max-height: 260px;
  border-radius: 12px;
  border: 1px solid #ddd;
}
.admin-news-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
}
.admin-news-list article {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 12px;
}
.admin-news-list.static-list article {
  grid-template-columns: 1fr;
}
.admin-news-list article.is-hidden-static {
  opacity: 0.58;
  background: #f7f7f8;
}
.admin-news-list img {
  width: 86px;
  height: 68px;
  border-radius: 8px;
}
.admin-news-list small {
  display: block;
  color: #cc0000;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}
.admin-news-list strong {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}
.admin-news-list span {
  display: block;
  color: #777;
  font-size: 12px;
  margin-top: 5px;
}
.admin-news-list .admin-list-actions {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .admin-shell { padding: 24px 18px 44px; }
  .admin-top,
  .admin-workspace,
  .admin-row,
  .admin-row.two {
    grid-template-columns: 1fr;
  }
  .admin-editor-head {
    display: grid;
  }
}

/* ===== PRAYER TIMES WIDGET ===== */
.prayer-widget { font-size: 0.88rem; }
.prayer-loading, .prayer-error { color: #888; padding: 8px 0; font-size: 0.85rem; }
.prayer-city { font-weight: 700; color: #c8102e; margin-bottom: 10px; font-size: 0.9rem; }
.prayer-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid #f0f0f0; }
.prayer-row:last-child { border-bottom: none; }
.prayer-row.passed { opacity: 0.45; }
.prayer-name { color: #333; }
.prayer-time { font-weight: 700; color: #1a1a1a; font-variant-numeric: tabular-nums; }
.prayer-next { margin-top: 10px; padding: 8px 10px; background: #fff8e1; border-radius: 6px; font-size: 0.83rem; color: #555; line-height: 1.5; }
.prayer-next b { color: #c8102e; }

/* ===== AD BANNER CLICKABLE ===== */
a.ad-banner, a.ad-box { display: block; }
a.ad-banner:hover, a.ad-box:hover { background: #f9eaed; border-color: #c8102e; }
.ad-cta-btn { display: inline-block; margin-top: 6px; background: #c8102e; color: #fff !important; padding: 5px 14px; border-radius: 5px; font-size: 0.82rem; font-weight: 700; }
a.ad-banner .ad-cta-btn, a.ad-box .ad-cta-btn { text-decoration: none; }

/* ===== TV CHANNEL SWITCHER ===== */
.tv-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.tv-channel-btn {
  background: #f0f0f0;
  border: 1.5px solid transparent;
  border-radius: 16px;
  padding: 5px 11px;
  font-size: 0.78rem;
  cursor: pointer;
  color: #444;
  font-weight: 600;
  transition: all 0.15s;
  font-family: inherit;
}
.tv-channel-btn:hover {
  background: #e5e5e5;
}
.tv-channel-btn.active {
  background: #c8102e;
  color: #fff;
  border-color: #c8102e;
}
.tv-frame {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}
.tv-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.tv-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}
.tv-note {
  font-size: 0.72rem;
  color: #888;
  margin: 6px 0 4px;
  line-height: 1.3;
}

/* ===== TV CHANNEL CARDS (new) ===== */
.tv-channels-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tv-channel-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}
.tv-channel-card:hover {
  border-color: #c8102e;
  background: #fff8f9;
  transform: translateX(2px);
}
.tv-channel-logo {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.72rem;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.tv-channel-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.tv-channel-info strong {
  font-size: 0.86rem;
  color: #1a1a1a;
  font-weight: 700;
  line-height: 1.2;
}
.tv-channel-info span {
  font-size: 0.72rem;
  color: #888;
  margin-top: 2px;
}
.tv-channel-live {
  font-size: 0.65rem;
  font-weight: 800;
  color: #c8102e;
  background: #fff;
  border: 1px solid #c8102e;
  border-radius: 10px;
  padding: 2px 7px;
  flex-shrink: 0;
}

/* ===== NEWS PHOTO GALLERY / CAROUSEL ===== */
.news-gallery {
  position: relative;
  width: 100%;
  height: 460px;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid #eee;
  user-select: none;
}
.news-gallery-track {
  display: flex;
  transition: transform 0.32s cubic-bezier(.4,.0,.2,1);
  width: 100%;
  height: 100%;
}
.news-gallery-slide {
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-gallery-slide img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.news-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, opacity 0.15s;
  padding-bottom: 4px;
  z-index: 2;
  font-family: serif;
}
.news-gallery.has-multiple .news-gallery-arrow {
  display: flex;
}
.news-gallery-arrow:hover {
  background: rgba(200,16,46,0.9);
}
.news-gallery-prev { left: 14px; }
.news-gallery-next { right: 14px; }

.news-gallery-counter {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  display: none;
  z-index: 2;
}
.news-gallery-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.news-gallery-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.news-gallery-dot:hover {
  background: rgba(255,255,255,0.85);
}
.news-gallery-dot.active {
  background: #fff;
  transform: scale(1.3);
}

@media (max-width: 600px) {
  .news-gallery-arrow {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }
  .news-gallery-prev { left: 8px; }
  .news-gallery-next { right: 8px; }
}

/* ===== ADMIN MULTI-IMAGE GALLERY EDITOR ===== */
.admin-images-section {
  margin: 14px 0 18px;
}
.admin-images-section > label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: .92rem;
  color: #333;
}
.admin-image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  min-height: 60px;
  padding: 8px;
  background: #fafafa;
  border: 1.5px dashed #ddd;
  border-radius: 8px;
}
.admin-image-list:empty::before {
  content: "Фотографии пока не добавлены. Используйте поля ниже.";
  color: #aaa;
  font-size: .82rem;
  width: 100%;
  text-align: center;
  align-self: center;
  padding: 14px 0;
}
.admin-image-item {
  position: relative;
  width: 120px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  background: #f0f0f0;
  border: 2px solid transparent;
  cursor: grab;
  flex-shrink: 0;
}
.admin-image-item.is-cover {
  border-color: #c8102e;
}
.admin-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-image-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.55) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 6px;
  opacity: 0;
  transition: opacity 0.15s;
}
.admin-image-item:hover .admin-image-item-overlay {
  opacity: 1;
}
.admin-image-item-top, .admin-image-item-bottom {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
.admin-image-item-cover-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #c8102e;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  z-index: 1;
  pointer-events: none;
}
.admin-image-item-btn {
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: .7rem;
  cursor: pointer;
  color: #333;
  font-weight: 600;
}
.admin-image-item-btn.danger { background: rgba(244,67,54,0.95); color: #fff; }
.admin-image-item-btn:hover { background: #fff; }
.admin-image-item-btn.danger:hover { background: #d32f2f; color: #fff; }

.admin-image-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.admin-image-add-row input[type="url"] {
  flex: 1;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: .92rem;
  font-family: inherit;
  margin-bottom: 0;
}
.admin-image-add-row input[type="file"] {
  flex: 1;
}
.admin-image-add-btn {
  padding: 8px 16px;
  font-size: .88rem;
  background: #f0f0f0;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
}
.admin-image-add-btn:hover {
  background: #e5e5e5;
}

/* ====================================================== */
/* ========== МОБИЛЬНАЯ АДАПТАЦИЯ (≤768px) =============== */
/* ====================================================== */

/* Базовые правила для всех мобильных */
@media (max-width: 768px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }

  /* ===== Верхняя мета-полоска ===== */
  .top-meta {
    padding: 6px 12px !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 6px;
  }
  #date-line {
    font-size: 11px;
    text-align: center;
  }
  .top-widgets {
    gap: 5px !important;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 4px;
    justify-content: flex-start !important;
  }
  .top-widgets::-webkit-scrollbar { display: none; }
  .top-widget {
    font-size: 10.5px;
    padding: 3px 8px;
    flex-shrink: 0;
  }
  .top-widget b { font-size: 10.5px; }
  .top-meta-right { display: none !important; }

  /* ===== Логотип ===== */
  .masthead-logo {
    height: 240px !important;
    padding: 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .masthead-logo img {
    height: 100%;
    width: auto;
    max-width: 95%;
    object-fit: contain;
  }

  /* ===== Навигация: горизонтальный скролл вместо переноса ===== */
  .navbar {
    padding: 0 !important;
    position: relative;
  }
  .nav-links {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 12px;
    gap: 0;
    width: 100%;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a {
    flex-shrink: 0;
    padding: 12px 14px !important;
    font-size: 13px;
    white-space: nowrap;
  }
  .search-btn {
    flex-shrink: 0;
    padding: 10px 14px;
  }

  /* ===== Бегущая строка ===== */
  .breaking-bar {
    padding: 0 !important;
    font-size: 12px;
    height: 36px !important;
  }
  .breaking-label {
    font-size: 10px;
    padding: 0 10px !important;
    margin-right: 0 !important;
    height: 100% !important;
  }
  .breaking-text {
    height: 100% !important;
  }
  .breaking-text span {
    line-height: 36px !important;
    font-size: 12px !important;
  }

  /* ===== Главный контент ===== */
  main { padding: 0; }
  .hero-news,
  .content-wrap {
    padding: 12px !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Главная большая новость */
  .hero-main {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    aspect-ratio: 16/10;
  }
  .hero-main h1,
  .hero-main h2 {
    font-size: 20px !important;
    line-height: 1.25 !important;
  }
  .hero-main p {
    font-size: 13px !important;
    -webkit-line-clamp: 2;
  }
  .hero-main .card-body {
    padding: 14px !important;
  }

  /* Сайдные карточки */
  .hero-side {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }
  .hero-side-card {
    min-height: 0 !important;
    height: auto;
    aspect-ratio: 16/9;
  }
  .hero-side-card h3 {
    font-size: 15px !important;
    line-height: 1.3 !important;
  }
  .hero-side-card .card-body {
    padding: 10px 12px !important;
  }

  /* Левые рекламные блоки — теперь под контентом */
  .left-ads {
    grid-template-columns: 1fr !important;
    margin-bottom: 8px;
  }
  .left-ad-box {
    position: static !important;
    min-height: 100px !important;
    padding: 16px !important;
  }
  .left-ad-box strong { font-size: 16px !important; }

  /* Рекламные баннеры */
  .ad-banner,
  a.ad-banner {
    margin: 12px !important;
    padding: 14px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px;
  }
  .ad-banner strong { font-size: 16px !important; }
  .ad-cta-btn {
    margin-top: 4px;
    font-size: 12px !important;
    padding: 6px 12px !important;
  }

  /* Сетка новостей */
  .news-grid,
  .news-grid-page,
  .video-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .news-card,
  .video-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 0;
  }
  .news-card img,
  .video-card img {
    width: 120px !important;
    height: 100% !important;
    min-height: 100px !important;
    max-height: 130px !important;
    flex-shrink: 0 !important;
    object-fit: cover !important;
    align-self: stretch !important;
  }
  .news-card .card-body,
  .video-card .card-body {
    padding: 10px 12px !important;
    flex: 1;
    min-width: 0;
  }
  .news-card h3,
  .video-card h3 {
    font-size: 14px !important;
    line-height: 1.3 !important;
    margin-bottom: 4px !important;
    /* Обрезка длинных заголовков */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .news-card p,
  .video-card p {
    display: none; /* Скрываем описания на маленьких карточках */
  }
  .news-card .tag,
  .video-card .tag {
    font-size: 9.5px !important;
    padding: 2px 7px !important;
  }
  .news-card .time,
  .video-card .time {
    font-size: 10.5px !important;
  }

  /* Заголовки секций */
  .section-header h2 {
    font-size: 18px !important;
  }
  .section-header {
    padding: 0 4px !important;
    margin-bottom: 10px !important;
  }

  /* ===== Сайдбар ===== */
  .sidebar {
    margin-top: 8px;
  }
  .sidebar-block {
    padding: 14px !important;
    margin-bottom: 14px !important;
  }
  .sidebar-title {
    font-size: 14px !important;
    margin-bottom: 10px !important;
  }
  .top-list li {
    font-size: 13px !important;
    padding: 8px 0 !important;
  }
  .top-list li span {
    font-size: 11px !important;
  }

  /* ТВ-каналы — компактнее */
  .tv-channel-card { padding: 7px 9px !important; }
  .tv-channel-logo { width: 34px !important; height: 34px !important; font-size: 0.68rem !important; }
  .tv-channel-info strong { font-size: 0.82rem !important; }
  .tv-channel-info span { font-size: 0.68rem !important; }
  .tv-channel-live { font-size: 0.6rem !important; padding: 2px 6px !important; }

  /* Намаз */
  .prayer-row { font-size: 12.5px; padding: 4px 0 !important; }
  .prayer-next { font-size: 11.5px; padding: 7px 9px !important; }
  .prayer-city { font-size: 12.5px !important; }

  /* ===== Списочные карточки ===== */
  .list-card {
    flex-direction: row !important;
    align-items: stretch;
    gap: 0 !important;
    padding: 0 !important;
  }
  .list-card img {
    width: 100px !important;
    height: 80px !important;
    flex-shrink: 0;
  }
  .list-card .card-body,
  .list-card > div {
    padding: 8px 12px !important;
    flex: 1;
    min-width: 0;
  }
  .list-card h4 {
    font-size: 13.5px !important;
    line-height: 1.3 !important;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .list-card p { display: none; }

  /* Спорт карточки */
  .sport-card {
    flex-direction: row !important;
  }
  .sport-card img {
    width: 110px !important;
    height: 80px !important;
  }

  /* ===== Футер ===== */
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding: 28px 18px !important;
  }
  .footer-links {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 18px !important;
  }
  .footer-bottom {
    flex-direction: column !important;
    gap: 12px;
    padding: 16px 18px !important;
    text-align: center;
    font-size: 12px !important;
  }
  .footer-brand .brand { font-size: 22px !important; }

  /* ===== Модальное окно новости с галереей ===== */
  .admin-news-modal {
    padding: 0 !important;
  }
  .admin-news-modal-card {
    width: 100% !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    height: 100vh;
  }
  .admin-news-modal-card > img,
  .news-gallery {
    max-height: 280px !important;
  }
  .news-gallery-slide img {
    max-height: 280px !important;
  }
  .admin-news-modal-body {
    padding: 20px !important;
  }
  .admin-news-modal-body h2 {
    font-size: 22px !important;
    line-height: 1.25 !important;
    margin: 10px 0 14px !important;
  }
  .admin-news-modal-text {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }
  .admin-news-modal-close {
    top: 10px !important;
    right: 10px !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 22px !important;
    background: rgba(0,0,0,0.6) !important;
    color: #fff !important;
    z-index: 10;
  }

  /* ===== Страница рекламы ===== */
  .contact-page {
    margin: 16px auto !important;
    padding: 0 12px 32px !important;
  }
  .contact-page h1 { font-size: 22px !important; }
  .contact-page .subtitle { font-size: 14px !important; margin-bottom: 20px !important; }
  .contact-card {
    padding: 18px !important;
    margin-bottom: 14px !important;
  }
  .ad-types {
    grid-template-columns: 1fr !important;
  }

  /* ===== Админка ===== */
  .admin-shell {
    padding: 12px !important;
  }
  .admin-top h1 {
    font-size: 22px !important;
  }
  .admin-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab-btn {
    flex-shrink: 0;
    padding: 9px 14px !important;
    font-size: 13.5px !important;
    white-space: nowrap;
  }
  .admin-editor,
  .admin-list-panel {
    padding: 16px !important;
  }
  .admin-editor input,
  .admin-editor select,
  .admin-editor textarea {
    font-size: 16px !important;  /* iOS не зумит при 16+ */
  }
  .admin-row,
  .admin-row.two {
    grid-template-columns: 1fr !important;
  }
  .admin-actions {
    flex-direction: column;
  }
  .admin-actions button {
    width: 100%;
  }
  .admin-image-item {
    width: 100px !important;
    height: 76px !important;
  }
  .admin-image-add-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  /* Список новостей в админке */
  .admin-news-list article {
    grid-template-columns: 70px 1fr !important;
    padding: 10px !important;
  }
  .admin-news-list img {
    width: 70px !important;
    height: 56px !important;
  }
  .admin-list-actions {
    flex-wrap: wrap;
    gap: 6px;
  }
  .admin-list-actions button {
    font-size: 11.5px !important;
    padding: 6px 10px !important;
  }

  /* ===== Прочее ===== */
  .ad-box,
  a.ad-box { padding: 14px !important; }
  .ad-box strong { font-size: 15px !important; }
  .ad-box p { font-size: 12.5px !important; }

  /* Тапы должны быть минимум 44×44 (Apple HIG) */
  button, a.button, .watch-btn { min-height: 38px; }
}

/* ====================================================== */
/* ========== ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (≤380px) =========== */
/* ====================================================== */
@media (max-width: 380px) {
  .masthead-logo {
    height: 200px !important;
    padding: 16px 16px;
  }
  .nav-links a {
    padding: 11px 12px !important;
    font-size: 12.5px;
  }
  .hero-main h1,
  .hero-main h2 {
    font-size: 17px !important;
  }
  .news-card img,
  .video-card img,
  .list-card img {
    width: 95px !important;
    height: 78px !important;
  }
  .news-card h3,
  .video-card h3,
  .list-card h4 {
    font-size: 13px !important;
  }
  .top-widget { font-size: 10px; padding: 2.5px 7px; }
}

/* ===== БЛОК «САМОЕ ЧИТАЕМОЕ» РЯДОМ С ГЛАВНОЙ НОВОСТЬЮ ===== */
.most-read-aside {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  padding: 18px 18px 12px;
  border: 1px solid #ececec;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.most-read-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 14px;
  color: #1a1a1a;
  padding-bottom: 10px;
  border-bottom: 2px solid #c8102e;
}
.most-read-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow: hidden;
}
.most-read-item {
  display: flex;
  gap: 10px;
  cursor: pointer;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.most-read-item:last-child { border-bottom: none; padding-bottom: 0; }
.most-read-item img {
  width: 78px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: cover;
}
.most-read-item-info {
  flex: 1;
  min-width: 0;
}
.most-read-item-tag {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #c8102e;
  display: block;
  margin-bottom: 3px;
}
.most-read-item h4 {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: #1a1a1a;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.most-read-item:hover h4 { color: #c8102e; }
.most-read-item-views {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
  display: block;
}
.most-read-rank {
  position: absolute;
  top: -2px;
  left: -8px;
  width: 22px;
  height: 22px;
  background: #c8102e;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.loading-stub {
  color: #aaa;
  font-size: 13px;
  text-align: center;
  padding: 30px 0;
}

/* ===== ПОЛУПРОЗРАЧНЫЙ БАННЕР МЕЖДУ HERO И ЛЕНТОЙ ===== */
/* (больше не используется — баннер теперь внутри main-feed) */

/* ===================== СТИЛИ КНОПКИ "ВСЕ НОВОСТИ" ===================== */
.see-all-news-row {
  text-align: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}
.see-all-btn {
  display: inline-block;
  background: #c8102e;
  color: #fff;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s, transform 0.1s;
}
.see-all-btn:hover { background: #a00d24; transform: translateY(-1px); }
.see-all-btn:active { transform: translateY(0); }

/* ===================== МОБИЛЬНЫЙ БУРГЕР-МЕНЮ ===================== */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  z-index: 100;
}

/* ============================================================ */
/* ===== ФИНАЛЬНАЯ МОБИЛЬНАЯ АДАПТАЦИЯ (для всех браузеров) ==== */
/* ============================================================ */

@media (max-width: 900px) {
  /* Универсальные правки для всех экранов до 900px */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  body {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
  }

  /* Сайдбар уходит под основной контент */
  .content-wrap {
    display: block !important;
    padding: 0 16px 24px !important;
    max-width: 100% !important;
  }
  .main-feed {
    width: 100% !important;
  }
  .sidebar {
    margin-top: 24px !important;
    width: 100% !important;
  }
}

@media (max-width: 720px) {

  /* === ШАПКА: верхняя плашка с виджетами === */
  .topbar { width: 100%; }
  .top-meta {
    flex-wrap: wrap !important;
    padding: 6px 10px !important;
    gap: 6px 8px !important;
    font-size: 11px !important;
  }
  .top-meta > #date-line {
    width: 100%;
    text-align: center;
    margin-bottom: 2px;
  }
  .top-widgets {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start !important;
    gap: 6px !important;
    padding: 2px 0;
    flex-wrap: nowrap !important;
  }
  .top-widgets::-webkit-scrollbar { display: none; }
  .top-widget {
    flex-shrink: 0;
    font-size: 11px !important;
    padding: 3px 9px !important;
    white-space: nowrap;
  }
  .top-widget b { font-size: 10.5px !important; }
  .top-meta-right { display: none !important; }

  /* === ЛОГОТИП — крупный и читаемый === */
  .masthead-logo {
    height: 240px !important;
    padding: 20px 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .masthead-logo img {
    height: 100% !important;
    width: auto !important;
    max-width: 95% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }

  /* === НАВИГАЦИЯ: горизонтальный скролл === */
  .navbar {
    padding: 0 !important;
    position: relative;
    width: 100%;
  }
  .nav-links {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a {
    flex-shrink: 0 !important;
    padding: 12px 14px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }
  .search-btn {
    flex-shrink: 0;
    padding: 10px 16px;
  }

  /* === БЕГУЩАЯ СТРОКА === */
  .breaking-bar {
    padding: 0 !important;
    font-size: 12px !important;
    height: 36px !important;
  }
  .breaking-label {
    font-size: 10px !important;
    padding: 0 10px !important;
    margin-right: 0 !important;
    height: 100% !important;
  }
  .breaking-text {
    height: 100% !important;
  }
  .breaking-text span {
    line-height: 36px !important;
    font-size: 12px !important;
  }

  /* === ОСНОВНОЙ КОНТЕНТ === */
  main { padding: 0 !important; }

  /* === HERO: главная новость + блок «Самое читаемое» === */
  .hero-news {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 12px !important;
    max-width: 100% !important;
  }
  .hero-main {
    aspect-ratio: 4/3 !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
  }
  .hero-main img { object-fit: cover !important; }
  .hero-main .card-body {
    padding: 18px 16px 14px !important;
  }
  .hero-main .card-body h1 {
    font-size: 18px !important;
    line-height: 1.25 !important;
    margin: 6px 0 6px !important;
  }
  .hero-main .card-body p {
    font-size: 13px !important;
    -webkit-line-clamp: 2;
  }

  /* === БЛОК «САМОЕ ЧИТАЕМОЕ» === */
  .most-read-aside {
    padding: 14px !important;
  }
  .most-read-title {
    font-size: 13px !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
  }
  .most-read-item img {
    width: 70px !important;
    height: 52px !important;
  }
  .most-read-item h4 {
    font-size: 12.5px !important;
  }

  /* === РЕКЛАМНЫЙ БАННЕР === */
  a.ad-banner,
  .ad-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    margin: 12px 16px !important;
    padding: 14px 16px !important;
    width: auto !important;
  }
  .ad-banner strong {
    font-size: 15px !important;
  }
  .ad-cta-btn {
    font-size: 12px !important;
    padding: 6px 12px !important;
  }

  /* === НОВЫЕ ПУБЛИКАЦИИ — сетка в 1 колонку с горизонтальными карточками === */
  .news-grid-3,
  .news-grid-page,
  .news-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .news-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
  }
  .news-card img {
    width: 120px !important;
    height: 100% !important;
    min-height: 100px !important;
    max-height: 130px !important;
    flex-shrink: 0 !important;
    object-fit: cover !important;
    align-self: stretch !important;
  }
  .news-card .card-body {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 12px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 6px !important;
  }
  .news-card h3 {
    font-size: 14.5px !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    font-weight: 700 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .news-card p { display: none !important; }
  .news-card .tag {
    font-size: 10px !important;
    padding: 2px 7px !important;
    align-self: flex-start !important;
  }
  .news-card .time {
    font-size: 11px !important;
    color: #888 !important;
  }

  /* === ЗАГОЛОВОК СЕКЦИИ === */
  .section-header h2 {
    font-size: 19px !important;
  }
  .section-header {
    padding: 0 4px !important;
    margin-bottom: 12px !important;
  }
  .section-block {
    padding: 16px 4px !important;
  }

  /* === КНОПКА "ПОСМОТРЕТЬ ВСЕ НОВОСТИ" === */
  .see-all-btn {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 20px;
    font-size: 14px;
  }

  /* === СТРАНИЦА РАЗДЕЛА / ВСЕ НОВОСТИ === */
  .section-page {
    padding: 16px 12px !important;
  }
  .page-title {
    font-size: 24px !important;
  }
  .page-desc {
    font-size: 14px !important;
    margin-bottom: 16px !important;
  }

  /* === САЙДБАР: блоки внутри === */
  .sidebar-block {
    padding: 14px !important;
    margin-bottom: 14px !important;
    border-radius: 12px !important;
  }
  .sidebar-title {
    font-size: 14px !important;
    margin-bottom: 10px !important;
  }

  /* === РАДИО === */
  .radio-widget audio {
    width: 100%;
  }

  /* === ТВ-КАНАЛЫ === */
  .tv-channel-card {
    padding: 8px 10px !important;
  }
  .tv-channel-logo {
    width: 36px !important;
    height: 36px !important;
    font-size: 11px !important;
  }
  .tv-channel-info strong {
    font-size: 13px !important;
  }
  .tv-channel-info span {
    font-size: 11px !important;
  }
  .tv-channel-live {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }

  /* === ПОГОДА / НАМАЗ в боковой панели === */
  .prayer-row {
    padding: 5px 0 !important;
    font-size: 13px !important;
  }
  .prayer-time {
    font-size: 13px !important;
  }

  /* === МОДАЛЬНОЕ ОКНО (открытая новость) === */
  .admin-news-modal {
    padding: 0 !important;
    align-items: flex-start !important;
  }
  .admin-news-modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100vh !important;
    min-height: 100vh;
    border-radius: 0 !important;
    overflow-y: auto !important;
  }
  .news-gallery {
    height: 280px !important;
  }
  .admin-news-modal-card > img {
    max-height: 280px !important;
  }
  .admin-news-modal-actions {
    top: 10px !important;
    right: 10px !important;
    gap: 6px !important;
  }
  .admin-news-modal-share,
  .admin-news-modal-close {
    font-size: 13px !important;
    padding: 6px 12px !important;
  }
  .admin-news-modal-close {
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    font-size: 20px !important;
  }
  .admin-news-modal-body {
    padding: 18px 16px !important;
  }
  .admin-news-modal-body h2 {
    font-size: 22px !important;
    line-height: 1.25 !important;
    margin: 8px 0 10px !important;
  }
  .admin-news-modal-text {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }
  .admin-news-modal-text p {
    margin: 0 0 14px !important;
  }
  .admin-news-modal-share-block {
    padding: 14px !important;
    margin-top: 18px !important;
  }
  .share-link-row {
    flex-direction: column;
    gap: 8px;
  }
  .share-buttons {
    flex-wrap: wrap;
  }
  .share-btn {
    flex: 1 1 auto;
    min-width: 30%;
  }

  /* === КАРУСЕЛЬ ФОТО === */
  .news-gallery-arrow {
    width: 36px !important;
    height: 36px !important;
    font-size: 22px !important;
  }
  .news-gallery-prev { left: 8px !important; }
  .news-gallery-next { right: 8px !important; }

  /* === ФУТЕР === */
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
    padding: 26px 18px !important;
  }
  .footer-links {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
  .footer-bottom {
    flex-direction: column !important;
    text-align: center !important;
    padding: 16px 18px !important;
    font-size: 12px !important;
    gap: 10px !important;
  }
  .footer-brand .brand {
    font-size: 22px !important;
  }

  /* === СТРАНИЦА РЕКЛАМЫ === */
  .contact-page {
    margin: 16px auto !important;
    padding: 0 12px 32px !important;
  }
  .contact-page h1 { font-size: 22px !important; }
  .contact-card { padding: 18px !important; }
  .ad-types { grid-template-columns: 1fr !important; }

  /* === АДМИНКА === */
  .cms-shell {
    padding: 12px !important;
  }
  .editor-layout {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .editor-aside {
    order: 2;
  }
  .tab-btn {
    flex-shrink: 0;
    padding: 10px 16px !important;
    font-size: 13px !important;
  }
  input, select, textarea {
    font-size: 16px !important; /* iOS не зумит при 16+ */
  }

  /* Универсальное: не показывать горизонтальный скролл */
  * {
    max-width: 100vw;
  }
}

/* === ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (iPhone SE и т.п.) === */
@media (max-width: 380px) {
  .masthead-logo { height: 200px !important; padding: 16px 16px !important; }
  .nav-links a { padding: 10px 12px !important; font-size: 12.5px !important; }
  .top-widget { font-size: 10.5px !important; padding: 2.5px 7px !important; }
  .top-widget b { font-size: 10px !important; }
  .hero-main .card-body h1 { font-size: 16px !important; }
  .news-card img { width: 100px !important; height: 80px !important; }
  .news-card h3 { font-size: 13px !important; }
  .section-header h2 { font-size: 17px !important; }
}

/* === iPhone notch / Safari env() поддержка === */
@supports (padding: env(safe-area-inset-top)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* ===== ОБНОВЛЁННЫЙ ПОДВАЛ ===== */
.footer-description {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,255,255,0.78);
  margin: 12px 0 0;
  max-width: 540px;
}
.footer-description strong {
  color: #fff;
  font-weight: 700;
}
.footer-links a {
  display: block;
  padding: 4px 0;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13.5px;
  transition: color 0.15s;
}
.footer-links a:hover { color: #fff; }
.footer-links h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 40px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-bottom-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-bottom-left p {
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.footer-bottom-right small {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  max-width: 460px;
  display: block;
  text-align: right;
}
.age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid #fff;
  border-radius: 6px;
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
}

@media (max-width: 720px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 16px 18px;
  }
  .footer-bottom-left {
    flex-direction: column;
    gap: 10px;
  }
  .footer-bottom-right small {
    text-align: center;
    max-width: 100%;
  }
}

/* ===== СКЕЛЕТОН-ЗАГЛУШКИ (пока новости подгружаются) ===== */
@keyframes skeleton-pulse {
  0%   { background-color: #ececec; }
  50%  { background-color: #f5f5f5; }
  100% { background-color: #ececec; }
}

/* Карточка новости — скелетон */
.news-card-skeleton {
  background: #ececec;
  border-radius: 12px;
  height: 280px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}
.news-card-skeleton::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 70px;
  background: linear-gradient(to top, rgba(255,255,255,0.45), transparent);
}

/* Главная новость — скелетон */
.hero-main-skeleton {
  background: #ececec !important;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.hero-main-skeleton img { display: none; }
.hero-skeleton-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 28px 32px 24px;
  background: linear-gradient(to top, rgba(255,255,255,0.6), transparent);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-skeleton-tag {
  display: inline-block;
  width: 90px;
  height: 22px;
  background: rgba(255,255,255,0.5);
  border-radius: 4px;
}
.hero-skeleton-title {
  display: inline-block;
  width: 95%;
  height: 26px;
  background: rgba(255,255,255,0.55);
  border-radius: 4px;
}
.hero-skeleton-title.short {
  width: 60%;
}

/* «Самое читаемое» — скелетон */
.most-read-item-skeleton {
  display: flex;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
  align-items: flex-start;
}
.most-read-item-skeleton::before {
  content: "";
  width: 78px;
  height: 60px;
  background: #ececec;
  border-radius: 6px;
  flex-shrink: 0;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.most-read-item-skeleton::after {
  content: "";
  flex: 1;
  height: 50px;
  background: linear-gradient(180deg, #ececec 30%, transparent 30%, transparent 40%, #ececec 40%, #ececec 70%, transparent 70%);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.most-read-item-skeleton:last-child {
  border-bottom: none;
}

/* На мобильных карточка-скелетон — горизонтальная */
@media (max-width: 720px) {
  .news-card-skeleton {
    height: 95px;
    border-radius: 8px;
  }
  .hero-skeleton-title { height: 18px; }
}

/* ===== ПУСТЫЕ СОСТОЯНИЯ (когда нет публикаций) ===== */
.empty-news-stub {
  text-align: center;
  padding: 50px 30px;
  color: #999;
  font-size: 15px;
  background: #fafafa;
  border-radius: 10px;
  border: 1px dashed #ddd;
  grid-column: 1 / -1;
}
.empty-hero {
  background: #f5f5f5 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4/3;
}
.empty-hero .hero-overlay {
  position: static;
  background: transparent !important;
  color: #999;
  text-align: center;
  padding: 30px;
}
.empty-hero h1 {
  color: #888 !important;
  font-size: 22px !important;
  font-weight: 700 !important;
}
.empty-hero p {
  color: #aaa !important;
}

/* ===================== ВИДЖЕТ ОПРОСА ===================== */
.poll-widget {
  border: 2px solid #c8102e;
  background: linear-gradient(to bottom, #fff 0%, #fff8f8 100%);
}
.poll-widget .sidebar-title {
  color: #c8102e;
  font-weight: 800;
}
.poll-question {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.35;
  margin-bottom: 8px;
}
.poll-description {
  font-size: 12.5px;
  color: #777;
  line-height: 1.45;
  margin-bottom: 14px;
  font-style: italic;
}
.poll-loading {
  color: #999;
  font-size: 13px;
  text-align: center;
  padding: 16px 0;
}
.poll-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.poll-option-btn {
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  font-family: inherit;
  width: 100%;
}
.poll-option-btn:hover:not(:disabled) {
  border-color: #c8102e;
  background: #fff;
  transform: translateX(3px);
}
.poll-option-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.poll-results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}
.poll-result-row {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 8px;
  padding: 9px 11px;
  position: relative;
}
.poll-result-row.is-user-choice {
  border-color: #c8102e;
  background: #fffafa;
}
.poll-result-row.is-leader .poll-result-fill {
  background: linear-gradient(to right, #c8102e, #ff3344);
}
.poll-result-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
  gap: 8px;
}
.poll-result-text {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  flex: 1;
  min-width: 0;
}
.poll-your-vote {
  color: #c8102e;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 4px;
}
.poll-result-pct {
  font-size: 14px;
  font-weight: 800;
  color: #c8102e;
  flex-shrink: 0;
}
.poll-result-bar {
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
}
.poll-result-fill {
  height: 100%;
  background: linear-gradient(to right, #999, #aaa);
  transition: width 0.5s ease;
}
.poll-result-votes {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}
.poll-already-voted {
  text-align: center;
  color: #1a7f37;
  font-weight: 700;
  font-size: 13px;
  margin: 12px 0 6px;
  padding: 6px;
  background: #e8f5e8;
  border-radius: 6px;
}
.poll-total {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #ececec;
}

/* ===== МОДАЛЬНОЕ ОКНО ОПРОСА (полноэкранное) ===== */
.poll-fullscreen-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.poll-fullscreen-modal.open {
  display: flex;
}
.poll-fullscreen-card {
  background: #fff;
  border-radius: 20px;
  max-width: 540px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
  animation: pollModalIn 0.25s ease;
}
@keyframes pollModalIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.poll-fullscreen-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #eee;
  background: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: all 0.15s;
  z-index: 2;
}
.poll-fullscreen-close:hover { background: #c8102e; color: #fff; border-color: #c8102e; }
.poll-fullscreen-header {
  padding: 22px 28px 0;
  font-size: 14px;
  font-weight: 800;
  color: #c8102e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.poll-fullscreen-body {
  padding: 18px 28px 28px;
}
.poll-fullscreen-body .poll-question {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
}
.poll-fullscreen-body .poll-option-btn {
  padding: 14px 18px;
  font-size: 15px;
  border-radius: 10px;
}
.poll-fullscreen-body .poll-result-text { font-size: 14px; }
.poll-fullscreen-body .poll-result-pct  { font-size: 16px; }
.poll-fullscreen-body .poll-total { font-size: 13px; margin-top: 16px; }

.poll-share-full {
  margin-top: 20px;
  padding: 18px 20px;
  background: #f9f9f9;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
}
.poll-share-full strong {
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
}

/* Кнопка «Поделиться» в сайдбаре */
.poll-share-row {
  text-align: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #ececec;
}
.poll-share-btn {
  background: none;
  border: 1px solid #c8102e;
  color: #c8102e;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.poll-share-btn:hover { background: #c8102e; color: #fff; }

/* Мобильная адаптация модалки */
@media (max-width: 720px) {
  .poll-fullscreen-modal { padding: 0; align-items: flex-start; }
  .poll-fullscreen-card {
    max-width: 100%;
    border-radius: 0;
    min-height: 100vh;
  }
  .poll-fullscreen-body { padding: 16px 18px 24px; }
  .poll-fullscreen-body .poll-question { font-size: 18px; }
  .poll-share-full .share-link-row { flex-direction: column; }
}

/* ===== WIDE DESKTOP HOME LAYOUT ===== */
@media (min-width: 1280px) {
  body {
    background: #f4f4f6;
  }

  .ad-banner-top,
  .hero-news,
  .content-wrap {
    max-width: min(94vw, 1640px) !important;
  }

  .ad-banner-top {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .hero-news {
    grid-template-columns: minmax(0, 1fr) clamp(340px, 23vw, 430px) !important;
    gap: 32px !important;
    padding: 32px clamp(28px, 4vw, 56px) 8px !important;
    align-items: stretch;
  }

  .hero-main {
    aspect-ratio: 16 / 9 !important;
    min-height: 520px;
    border-radius: 18px;
    box-shadow: 0 18px 54px rgba(20, 24, 35, 0.16);
  }

  .hero-main .card-body,
  .hero-overlay {
    padding: 36px 42px 34px !important;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.72) 52%, rgba(0,0,0,0) 100%) !important;
  }

  .hero-main .card-body h1,
  .hero-main .card-body h2,
  .hero-overlay h1 {
    max-width: 920px;
    font-size: clamp(28px, 2.1vw, 42px) !important;
    line-height: 1.14 !important;
    letter-spacing: 0 !important;
  }

  .hero-main .card-body p,
  .hero-overlay p {
    max-width: 820px;
    font-size: 16px !important;
    line-height: 1.6 !important;
    -webkit-line-clamp: 3;
  }

  .most-read-aside {
    border-radius: 18px;
    padding: 22px 22px 16px !important;
    box-shadow: 0 14px 42px rgba(20, 24, 35, 0.08);
  }

  .most-read-title {
    font-size: 17px !important;
    margin-bottom: 16px !important;
  }

  .most-read-list {
    gap: 14px !important;
  }

  .most-read-item {
    gap: 13px !important;
    padding-bottom: 14px !important;
  }

  .most-read-item img {
    width: 96px !important;
    height: 72px !important;
    border-radius: 8px !important;
  }

  .most-read-thumb {
    width: 96px !important;
    height: 72px !important;
    border-radius: 8px !important;
  }

  .most-read-item h4 {
    font-size: 14.5px !important;
    line-height: 1.32 !important;
  }

  .content-wrap {
    grid-template-columns: minmax(0, 1fr) clamp(340px, 23vw, 430px) !important;
    gap: 32px !important;
    padding: 16px clamp(28px, 4vw, 56px) 56px !important;
  }

  .section-block,
  .sidebar-block {
    border: 1px solid #ececf0;
    border-radius: 18px;
    box-shadow: 0 10px 34px rgba(20, 24, 35, 0.06);
  }

  .section-block {
    padding: 28px !important;
  }

  .section-header h2 {
    font-size: 24px !important;
  }

  .news-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 22px !important;
  }

  .news-card {
    border-radius: 14px;
    background: #fff;
  }

  .news-card img {
    height: 230px !important;
  }

  .news-card > .news-thumb {
    height: 230px !important;
  }

  .card-body {
    padding: 18px !important;
    gap: 10px !important;
  }

  .card-body h3 {
    font-size: 16px !important;
    line-height: 1.38 !important;
  }

  .card-body p {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  .sidebar {
    gap: 22px !important;
  }
}

@media (min-width: 1680px) {
  .hero-news {
    grid-template-columns: minmax(0, 1fr) 440px !important;
  }

  .content-wrap {
    grid-template-columns: minmax(0, 1fr) 440px !important;
  }

  .hero-main {
    min-height: 560px;
  }

  .news-card img {
    height: 250px !important;
  }

  .news-card > .news-thumb {
    height: 250px !important;
  }
}

/* ===== WIDE DESKTOP SECTION PAGES ===== */
@media (min-width: 1280px) {
  .section-page {
    max-width: min(94vw, 1640px) !important;
    padding: 40px clamp(28px, 4vw, 56px) 64px !important;
  }

  .section-page .page-title {
    font-size: clamp(42px, 3vw, 56px) !important;
    line-height: 1.05 !important;
    margin-bottom: 12px !important;
    letter-spacing: 0 !important;
  }

  .section-page .page-desc {
    font-size: 18px !important;
    margin-bottom: 36px !important;
  }

  .section-page .news-grid-page {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }

  .section-page .news-card {
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 34px rgba(20, 24, 35, 0.06);
  }

  .section-page .news-card img {
    height: 250px !important;
  }

  .section-page .news-card > .news-thumb {
    height: 250px !important;
  }

  .section-page .card-body {
    padding: 18px !important;
    gap: 10px !important;
  }

  .section-page .card-body h3 {
    font-size: 16px !important;
    line-height: 1.38 !important;
  }

  .section-page .card-body p {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }
}

@media (min-width: 1280px) and (max-width: 1439px) {
  .section-page .news-grid-page {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* ===== DESKTOP NAVIGATION POLISH ===== */
@media (min-width: 1024px) {
  .navbar {
    min-height: 64px !important;
    padding: 0 clamp(32px, 4vw, 72px) !important;
    background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%) !important;
    border-top: 1px solid #ececec;
    border-bottom: 4px solid #c8102e !important;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08) !important;
  }

  .nav-links {
    gap: 6px !important;
    padding: 7px !important;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  }

  .nav-links a {
    min-width: 104px;
    padding: 13px 18px !important;
    margin-bottom: 0 !important;
    border-bottom: 0 !important;
    border-radius: 8px;
    color: #262626 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1;
    text-align: center;
    letter-spacing: 0.03em !important;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.18s !important;
  }

  .nav-links a:hover {
    background: #f5f5f5;
    color: #c8102e !important;
    transform: translateY(-1px);
  }

  .nav-links a.active {
    background: #c8102e;
    color: #fff !important;
    box-shadow: 0 7px 18px rgba(200, 16, 46, 0.28);
  }

  .search-btn {
    width: 44px;
    height: 44px;
    right: clamp(32px, 4vw, 72px) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 50% !important;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
  }

  .search-btn:hover {
    background: #c8102e !important;
    color: #fff;
    border-color: #c8102e !important;
  }
}

/* ===== DESKTOP ARTICLE AND MODAL SCALE ===== */
@media (min-width: 1280px) {
  .admin-news-modal {
    padding: 34px !important;
  }

  .admin-news-modal-card {
    width: min(1120px, 92vw) !important;
    max-height: 92vh !important;
    border-radius: 20px !important;
  }

  .admin-news-modal-main-image {
    max-height: 680px !important;
  }

  .admin-news-modal-body {
    padding: 34px 42px 40px !important;
  }

  .admin-news-modal-body h2 {
    max-width: 980px;
    font-size: 38px !important;
    line-height: 1.16 !important;
    letter-spacing: 0 !important;
  }

  .admin-news-modal-text {
    max-width: 860px;
    font-size: 18px !important;
    line-height: 1.78 !important;
  }
}

@media (max-width: 720px) {
  .admin-news-modal-main-image {
    max-height: 340px;
  }

  .admin-news-modal-text {
    text-align: left;
  }

  .admin-news-modal-thumbs {
    padding: 10px;
  }

  .admin-news-modal-thumb {
    width: 74px;
    height: 54px;
  }
}
