:root {
  --bg: #ecf2f8;
  --ink: #182433;
  --muted: #5f6f82;
  --line: #d3deea;
  --card: #ffffff;
  --accent: #760802;
  --accent-2: #1a4f90;
  --hero-top: #0f1f33;
  --hero-bottom: #1a4f90;
  --layout-gutter: 1.25rem;
  --layout-gap: 1.25rem;
  --admin-control-size: 38px;
  --header-expanded-h: 156px;
  --header-compact-h: 72px;
  --header-current-h: 132px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 8% -12%, #f6fbff 0%, transparent 62%),
    radial-gradient(900px 340px at 100% 0%, #dde8f6 0%, transparent 62%),
    var(--bg);
  font-family: "Open Sans", sans-serif;
  font-weight: 400;
  overflow-x: clip;
}

input,
button,
textarea,
select {
  font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.site-wrap {
  width: min(1200px, calc(100% - (2 * var(--layout-gutter))));
  margin: 0 auto;
}

.news-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--header-current-h);
  z-index: 40;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  overflow: visible;
  transition: height 0.32s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, background 0.3s ease;
}

.news-top.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 24px rgba(20, 38, 63, 0.16);
}

.news-top-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1200px) minmax(0, 1fr);
  align-items: center;
  column-gap: var(--layout-gap);
  height: 100%;
  width: 100%;
  padding: 0.6rem var(--layout-gutter);
  transition: padding 0.32s cubic-bezier(0.4, 0, 0.2, 1), gap 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-top.scrolled .news-top-inner {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.news-top-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  justify-self: start;
  min-width: 0;
}

.brand-logo {
  max-height: 108px;
  width: auto;
  display: block;
  transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-top.scrolled .brand-logo {
  max-height: 44px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 1.08rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-copy small {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}

.top-tools {
  grid-column: 2;
  display: block;
  width: 100%;
  min-width: 0;
}

.news-top.scrolled .top-tools {
  width: 100%;
}

.top-tools input {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 0.56rem 0.95rem;
  min-width: 0;
  color: var(--ink);
  transition: padding 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-top.scrolled .top-tools input {
  padding-top: 0.44rem;
  padding-bottom: 0.44rem;
}

.top-tools input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(26, 79, 144, 0.14);
}

.news-marquee-wrap {
  padding: calc(var(--header-current-h) + 0.65rem) var(--layout-gutter) 0;
}

.news-marquee {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 22px rgba(20, 38, 63, 0.08);
}

.news-marquee-track {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: max-content;
  padding: 0.65rem 0.85rem;
}

.news-marquee[data-animate="true"] .news-marquee-track {
  animation: marquee-scroll 34s linear infinite;
}

.news-marquee:hover .news-marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  min-width: 0;
  width: min(300px, 72vw);
}

.marquee-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid rgba(211, 222, 234, 0.75);
  border-radius: 14px;
  padding: 0.42rem;
  background: #fff;
}

.marquee-link:hover {
  border-color: rgba(26, 79, 144, 0.32);
  box-shadow: 0 8px 18px rgba(20, 38, 63, 0.1);
}

.marquee-link img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #d8e3ef;
}

.marquee-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.86rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.hero {
  margin: 1rem 0 1.35rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(138deg, var(--hero-top), #1b3553 58%, var(--hero-bottom));
  color: #f8f7f3;
  box-shadow: 0 18px 42px rgba(20, 38, 63, 0.22);
}

.swiper {
  width: 100%;
  height: 100%;
}

.slide-card {
  padding: clamp(1.1rem, 3vw, 2.1rem);
  min-height: 320px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.25rem;
}

.slide-copy h2 {
  margin: 0 0 0.8rem;
  line-height: 1.14;
  font-size: clamp(1.4rem, 3.4vw, 2.2rem);
  overflow-wrap: anywhere;
}

.slide-copy p {
  margin: 0 0 1rem;
  color: #d9e3ee;
  overflow-wrap: anywhere;
}

.slide-copy a {
  display: inline-flex;
  color: #f4f8fd;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.48rem 0.88rem;
  border-radius: 999px;
}

.slide-media img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-thumbs-wrap {
  padding: 0 clamp(1.1rem, 3vw, 2.1rem) clamp(1rem, 3vw, 1.4rem);
}

.heroThumbs {
  overflow: visible;
}

.hero-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  opacity: 0.56;
  cursor: pointer;
  transform: translateY(0);
  transition: transform 0.22s ease, opacity 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.hero-thumb:hover {
  opacity: 0.84;
}

.hero-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.heroThumbs .swiper-slide-thumb-active .hero-thumb {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 24px rgba(7, 17, 30, 0.28);
  transform: translateY(-2px);
}

.news-stream {
  padding-bottom: 3rem;
}

.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.05rem;
}

.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 0.42rem 0.82rem;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.86rem;
  position: relative;
  max-width: 100%;
}

.cat-btn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.34rem;
  border-radius: 50%;
  background: #b42318;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.cat-btn.active {
  background: linear-gradient(135deg, var(--accent-2), #2663aa);
  color: #fff;
  border-color: var(--accent-2);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.news-card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 24px rgba(20, 38, 63, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 32px rgba(20, 38, 63, 0.15);
}

.news-card.reveal {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.news-card.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.news-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #d8e3ef;
}

.news-card-media {
  position: relative;
}

.news-card-media-link {
  display: block;
  line-height: 0;
}

.news-card .body {
  padding: 0.9rem;
  min-width: 0;
}

.news-card-admin {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.news-card-featured-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.38rem 0.62rem;
  border: 1px solid rgba(255, 234, 168, 0.5);
  border-radius: 999px;
  background: rgba(155, 103, 0, 0.82);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #fff7db;
  box-shadow: 0 10px 20px rgba(50, 34, 3, 0.24);
}

.news-card-featured-badge .feature-icon {
  width: 14px;
  height: 14px;
}

.news-card-featured-text {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.status-switch {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.34rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #17324e;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.status-switch:hover {
  transform: translateY(-1px);
}

.status-switch:disabled {
  opacity: 0.6;
  cursor: wait;
}

.status-switch.active {
  background: rgba(18, 125, 88, 0.1);
  border-color: rgba(18, 125, 88, 0.28);
}

.status-switch.inactive {
  background: rgba(137, 31, 43, 0.08);
  border-color: rgba(137, 31, 43, 0.2);
}

.switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  border-radius: 999px;
  background: rgba(23, 50, 78, 0.16);
  transition: background 0.2s ease;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(16, 31, 51, 0.18);
  transition: transform 0.2s ease;
}

.status-switch.active .switch-track {
  background: #127d58;
}

.status-switch.active .switch-thumb {
  transform: translateX(18px);
}

.feature-switch {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: #17324e;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.feature-switch:hover {
  transform: translateY(-1px);
}

.feature-switch:disabled,
.feature-switch.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.feature-switch.active {
  background: rgba(237, 180, 47, 0.2);
  border-color: rgba(237, 180, 47, 0.65);
  color: #f4b400;
}

.feature-switch.inactive {
  color: #6b7d92;
}

.feature-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.news-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  line-height: 1.33;
  overflow-wrap: anywhere;
}

.news-card a {
  color: var(--accent-2);
  text-decoration: none;
}

.meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.77rem;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.excerpt {
  margin: 0;
  color: #364556;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

#newsSentinel {
  height: 26px;
}

@media (max-width: 1659px) {
  :root {
    --header-expanded-h: 108px;
    --header-compact-h: 72px;
    --header-current-h: 108px;
  }

  .news-top-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-logo {
    max-height: 74px;
  }

  .news-top.scrolled .brand-logo {
    max-height: 42px;
  }

  .news-page-outer {
    display: block;
    padding: 1rem 14px 0;
  }

  .news-ad-col,
  .news-ad-col.public-hidden {
    display: none !important;
  }

  .admin-news-add-btn {
    padding: 0.46rem 0.72rem;
    font-size: 0.72rem;
  }

  .admin-news-avatar {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 980px) {
  :root {
    --header-expanded-h: 96px;
    --header-compact-h: 68px;
    --header-current-h: 96px;
  }

  .news-top-inner {
    padding-left: 12px;
    padding-right: 12px;
    column-gap: 0.6rem;
  }

  .brand-logo {
    max-height: 62px;
  }

  .news-top.scrolled .brand-logo {
    max-height: 38px;
  }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide-card { grid-template-columns: 1fr; }
  .hero-thumbs-wrap { padding-top: 0.35rem; }
}

@media (max-width: 720px) {
  :root {
    --header-expanded-h: 152px;
    --header-compact-h: 112px;
    --header-current-h: 152px;
  }

  .news-top-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand chip"
      "search search";
    row-gap: 0.55rem;
    padding-left: 10px;
    padding-right: 10px;
  }

  .brand {
    grid-area: brand;
  }

  .top-tools {
    grid-area: search;
    grid-column: auto;
    width: 100%;
  }

  .top-tools input {
    width: 100%;
    min-width: 0;
  }

  #adminHeaderChip {
    grid-area: chip;
    grid-column: auto;
    justify-self: end;
    gap: 0.5rem;
    max-width: 100%;
  }

  .brand-logo {
    max-height: 56px;
  }

  .news-top.scrolled .brand-logo {
    max-height: 34px;
  }

  .admin-news-avatar {
    width: 44px;
    height: 44px;
  }

  .news-page-outer {
    padding-top: 0.9rem;
  }

  .slide-card {
    min-height: 0;
    padding: 1rem;
    gap: 1rem;
  }

  .slide-media img {
    min-height: 200px;
  }
}

@media (max-width: 600px) {
  :root {
    --layout-gutter: 0.75rem;
    --layout-gap: 0.75rem;
    --header-expanded-h: 188px;
    --header-compact-h: 124px;
    --header-current-h: 188px;
  }

  .news-top-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "chip"
      "search";
    justify-items: stretch;
    row-gap: 0.45rem;
  }

  .brand {
    justify-self: center;
  }

  #adminHeaderChip {
    justify-self: stretch;
    justify-content: center;
    gap: 0.42rem;
  }

  .admin-news-add-btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .news-marquee-wrap {
    padding: calc(var(--header-current-h) + 0.5rem) var(--layout-gutter) 0;
  }

  .news-marquee-track {
    padding: 0.55rem 0.65rem;
  }

  .marquee-item {
    width: min(250px, 86vw);
  }

  .news-card-admin {
    top: 0.5rem;
    right: 0.5rem;
  }

  .news-card-featured-badge {
    top: 0.5rem;
    left: 0.5rem;
  }

  .grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .brand-logo {
    max-height: 48px;
  }

  .news-top.scrolled .brand-logo {
    max-height: 30px;
  }

  .admin-news-avatar {
    width: 40px;
    height: 40px;
  }
}

/* ── Three-column page layout with ad sidebars ─────────── */
.news-page-outer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1200px) minmax(0, 1fr);
  column-gap: var(--layout-gap);
  padding: var(--layout-gap) var(--layout-gutter) 0;
}

.news-page-outer > .site-wrap {
  width: 100%;
  margin: 0;
}

/* Ad column – hidden until enough viewport width */
.news-ad-col {
  display: none;
  padding: 0;
}

.news-ad-col.public-hidden {
  display: none;
}

/* Sticky container that tracks viewport scroll */
.news-ad-sticky {
  position: sticky;
  top: calc(var(--header-current-h) + var(--layout-gap));
  height: calc(100vh - var(--header-current-h) - (2 * var(--layout-gap)));
  max-height: 860px;
  min-height: 320px;
}

/* Sidebar info card */
.news-ad-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  border: 1px solid #dbe3ee;
  background: linear-gradient(176deg, #ffffff 0%, #f8fafc 38%, #eef3f8 100%);
  box-shadow: 0 10px 24px rgba(20, 38, 63, 0.08);
  overflow: auto;
  padding: 1.05rem 0.95rem 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.news-ad-admin-controls {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.news-ad-admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 170px;
  border-radius: 999px;
  padding: 0.28rem 0.56rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  justify-content: flex-start;
  transform: none;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}

.news-ad-admin-toggle:hover,
.news-ad-admin-toggle:active,
.news-ad-admin-toggle:focus-visible {
  transform: none;
}

.news-ad-admin-toggle .switch-text {
  line-height: 1;
}

.news-ad-admin-toggle:disabled {
  opacity: 0.55;
  cursor: wait;
}

.news-ad-col.ad-is-off .news-ad-placeholder {
  border-style: dashed;
  opacity: 0.76;
}

.news-ad-logo {
  width: 100%;
  max-width: 180px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.news-ad-copy {
  color: #2f4052;
  font-size: 0.9rem;
  line-height: 1.56;
  text-align: center;
  width: 100%;
  max-width: 360px;
}

.news-ad-heading {
  margin: 0 0 0.35rem;
  color: #1c3550;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.news-ad-copy p {
  margin: 0 0 0.7rem;
}

.news-ad-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.news-ad-list li {
  overflow-wrap: anywhere;
}

.news-ad-reklama-slot {
  width: 100%;
}

.news-ad-reklama-card {
  width: 100%;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.55rem;
  box-shadow: 0 8px 18px rgba(20, 38, 63, 0.08);
}

.news-ad-reklama-image {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  background: #f5f8fc;
}

.news-ad-reklama-title {
  margin: 0.55rem 0 0.1rem;
  text-align: center;
  color: #1f3247;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.news-ad-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.5rem;
}

.news-ad-social-link {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(4, 55, 118, 0.25);
  background: #f8fbff;
  color: #043776;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.news-ad-social-link:hover {
  transform: translateY(-1px);
  border-color: rgba(4, 55, 118, 0.5);
  box-shadow: 0 6px 14px rgba(4, 55, 118, 0.2);
}

.news-ad-social-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(4, 55, 118, 0.24);
}

.news-ad-social-link svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.news-ad-social-link[aria-label="Facebook"] svg,
.news-ad-social-link[aria-label="YouTube"] svg {
  fill: currentColor;
  stroke: none;
}

.news-ad-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 220px);
  min-height: 44px;
  border-radius: 14px;
  position: relative;
  border: 1px solid rgba(4, 55, 118, 0.82);
  background: #043776;
  color: #ffffff;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 9px 18px rgba(4, 55, 118, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  overflow: hidden;
}

.news-ad-cta::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  padding: 1px;
  background: conic-gradient(
    from 140deg,
    rgba(4, 55, 118, 0.35),
    rgba(74, 154, 242, 0.55),
    rgba(255, 255, 255, 0.75),
    rgba(74, 154, 242, 0.55),
    rgba(4, 55, 118, 0.35)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.news-ad-cta::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 20px;
  box-shadow: 0 0 16px rgba(4, 55, 118, 0.26);
  pointer-events: none;
}

.news-ad-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(4, 55, 118, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.24) inset;
  filter: brightness(1.03);
}

.news-ad-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 131, 209, 0.34), 0 10px 18px rgba(4, 55, 118, 0.3);
}

.news-ad-col--left .news-ad-placeholder,
.news-ad-col--right .news-ad-placeholder {
  background: linear-gradient(176deg, #ffffff 0%, #f8fafc 38%, #eef3f8 100%);
}

@media (max-width: 1660px) {

  html body .news-page-outer {
    display: block;
  }

}

@media (min-width: 1660px) {
  .news-top-inner {
    grid-template-columns: minmax(230px, 1fr) minmax(0, 1200px) minmax(230px, 1fr);
  }

  .news-page-outer {
    grid-template-columns: minmax(230px, 1fr) minmax(0, 1200px) minmax(230px, 1fr);
  }

  .news-ad-col {
    display: block;
  }

  /* Keep column footprint for public users, hide content only when sidebar is deactivated. */
  .news-ad-col.public-hidden {
    display: block;
  }

  .news-ad-col.public-hidden .news-ad-sticky {
    visibility: hidden;
    pointer-events: none;
  }
}



/* ── Admin header chip ──────────────────────────────────── */
#adminHeaderChip {
  grid-column: 3;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0;
  justify-self: end;
}

#adminHeaderChip > .admin-news-identity,
#adminHeaderChip > .admin-news-lang-switcher,
#adminHeaderChip > .admin-news-logout-btn {
  align-self: center;
  flex: 0 0 auto;
}

.admin-news-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  background: linear-gradient(135deg, var(--accent-2), #2663aa);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.admin-news-add-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.admin-news-add-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  flex-shrink: 0;
}

.admin-news-identity {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
}

.admin-news-identity a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.admin-news-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 2px;
  border: 1.5px solid rgba(26, 79, 144, 0.4);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--card);
}

.admin-news-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--admin-control-size);
  min-width: var(--admin-control-size);
  max-width: var(--admin-control-size);
  height: var(--admin-control-size);
  min-height: var(--admin-control-size);
  max-height: var(--admin-control-size);
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 50%;
  flex: 0 0 auto;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.admin-news-lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.admin-news-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--admin-control-size);
  min-width: var(--admin-control-size);
  max-width: var(--admin-control-size);
  height: var(--admin-control-size);
  min-height: var(--admin-control-size);
  max-height: var(--admin-control-size);
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 50%;
  line-height: 1;
  flex: 0 0 auto;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.admin-news-lang-btn:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.admin-news-lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 55;
  min-width: 72px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 38, 63, 0.14);
  display: grid;
  gap: 6px;
}

.admin-news-lang-dropdown.hidden {
  display: none;
}

.admin-news-lang-option {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 0.4rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.admin-news-lang-option.active,
.admin-news-lang-option:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.admin-news-logout-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-news-logout-btn:hover {
  border-color: #b42318;
  color: #b42318;
}

.admin-news-logout-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Header responsive overrides must stay at file end to win cascade. */
@media (max-width: 1659px) {
  :root {
    --admin-control-size: 38px;
    --header-expanded-h: 108px;
    --header-compact-h: 72px;
    --header-current-h: 108px;
  }

  .news-top-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand-logo {
    max-height: 74px;
  }

  .news-top.scrolled .brand-logo {
    max-height: 42px;
  }

  .admin-news-add-btn {
    padding: 0.46rem 0.72rem;
    font-size: 0.72rem;
  }

  .admin-news-avatar {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 980px) {
  :root {
    --admin-control-size: 36px;
    --header-expanded-h: 96px;
    --header-compact-h: 68px;
    --header-current-h: 96px;
  }

  .news-top-inner {
    padding-left: 12px;
    padding-right: 12px;
    column-gap: 0.6rem;
  }

  .brand-logo {
    max-height: 62px;
  }

  .news-top.scrolled .brand-logo {
    max-height: 38px;
  }
}

@media (max-width: 720px) {
  :root {
    --admin-control-size: 34px;
    --header-expanded-h: 152px;
    --header-compact-h: 112px;
    --header-current-h: 152px;
  }

  .news-top-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand chip"
      "search search";
    row-gap: 0.55rem;
    padding-left: 10px;
    padding-right: 10px;
  }

  .brand {
    grid-area: brand;
  }

  .top-tools {
    grid-area: search;
    grid-column: auto;
    width: 100%;
  }

  #adminHeaderChip {
    grid-area: chip;
    grid-column: auto;
    justify-self: end;
    gap: 0.5rem;
    max-width: 100%;
  }

  .brand-logo {
    max-height: 56px;
  }

  .news-top.scrolled .brand-logo {
    max-height: 34px;
  }

  .admin-news-avatar {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 600px) {
  :root {
    --admin-control-size: 34px;
    --header-expanded-h: 188px;
    --header-compact-h: 124px;
    --header-current-h: 188px;
  }

  .news-top-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "chip"
      "search";
    justify-items: stretch;
    row-gap: 0.45rem;
  }

  .brand {
    justify-self: center;
  }

  #adminHeaderChip {
    justify-self: stretch;
    justify-content: center;
    gap: 0.42rem;
  }

  .admin-news-add-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  :root {
    --admin-control-size: 32px;
  }

  .brand-logo {
    max-height: 48px;
  }

  .news-top.scrolled .brand-logo {
    max-height: 30px;
  }

  .admin-news-avatar {
    width: 40px;
    height: 40px;
  }
}
