/* TSTU premium dark mode (for base style)
   Load after tstu_ru_premium_override.css */

@import url("./tstu_ru_premium_override.css");

:root {
  --tstu-blue: #6f8fe4;
  --tstu-orange: #ff8a57;
  --tstu-white: #eaf0ff;
  --tstu-light: #141a27;
  --tstu-text: #d9e2f2;

  --bg-0: #0b1220;
  --bg-1: #0f1728;
  --bg-2: #162238;
  --card: rgba(20, 31, 52, 0.88);
  --card-strong: rgba(18, 28, 46, 0.96);
  --line: rgba(130, 160, 230, 0.26);
  --text-main: #e3ebfb;
  --text-soft: #c2d0ea;
  --text-muted: #a8b9d8;
  --section-title: #c89a6b;
}

body {
  color: var(--tstu-text) !important;
  background:#1a1924 !important;
  position: relative;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.26;
  background:
    linear-gradient(90deg, rgba(110, 140, 220, .15) 1px, transparent 1px) 0 0 / 120px 120px,
    linear-gradient(0deg, rgba(110, 140, 220, .12) 1px, transparent 1px) 0 0 / 120px 120px;
}

body::before {
  background: linear-gradient(90deg, #85a1ea, #ff9a6e, #85a1ea);
  box-shadow: 0 0 16px rgba(111, 143, 228, 0.45);
}

a { color: #90adff; }
a:hover { color: #ffad85; }
h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6 { color: #b7c9ff; }
p, li, span, div, td, th, small {
  color: var(--text-main);
}

/* Legacy blocks often carry hardcoded dim gray text */
font, .small, .muted, [style*="color:#666"], [style*="color: #666"], [style*="color:#777"], [style*="color: #777"] {
  color: var(--text-soft) !important;
}

/* Keep top identity bars but deepen global chrome */
header, .header, .top-header, .navbar, .navbar-default, .navbar-inverse, .main-header {
  background: rgba(12, 20, 35, 0.82) !important;
  background-image: none !important;
  border-color: var(--line) !important;
  box-shadow: 0 8px 24px rgba(3, 8, 16, 0.55);
}

.navbar a, .menu a, nav a {
  color: #d8e3ff !important;
}

.navbar a:hover, .menu a:hover, nav a:hover {
  background: rgba(111,143,228,.16) !important;
}

.hero, .jumbotron, .main-slider, .carousel, .top-banner, .slider, [class*="hero"], [class*="banner"] {
  background:#1a1924 !important;
  border-color: rgba(131, 158, 220, 0.36);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.52);
}

.moduletable,
.module,
.module-inner,
.nspMain,
.k2ItemsBlock,
.well,
.custom,
.card,
.panel,
.news-item,
.announcement-item,
.post,
.article,
[class*="item"] {
  background: linear-gradient(180deg, rgba(23, 36, 58, .92), rgba(16, 28, 47, .92)) !important;
  border: 0 !important;
  box-shadow: 0 10px 24px rgba(2, 8, 18, 0.42);
  border-radius: 12px;
}

.latestnews li,
.newsflash li,
.category-module li,
.k2ItemsBlock ul li,
.nspArt,
.nspArts .nspArt {
  background: linear-gradient(180deg, rgba(25, 40, 65, .94), rgba(17, 30, 50, .95));
  border: 1px solid rgba(131, 160, 220, 0.34);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
  border-radius: 10px;
  padding: 0.5rem 0.55rem;
}

.latestnews li:hover,
.newsflash li:hover,
.category-module li:hover,
.k2ItemsBlock ul li:hover,
.nspArt:hover,
.card:hover,
.panel:hover,
.news-item:hover,
.announcement-item:hover {
  border-color: rgba(163, 192, 255, 0.62);
  box-shadow: 0 12px 28px rgba(4, 12, 26, 0.55);
}

.latestnews li a,
.newsflash li a,
.category-module li a,
.k2ItemsBlock ul li a,
.nspArt h4 a,
.nspArt h3 a,
.news-item a,
.announcement-item a {
  color: #dbe8ff !important;
}

.latestnews li a:hover,
.newsflash li a:hover,
.category-module li a:hover,
.k2ItemsBlock ul li a:hover,
.nspArt h4 a:hover,
.nspArt h3 a:hover,
.news-item a:hover,
.announcement-item a:hover {
  color: #ffb18d !important;
}

.moduletable > h3,
.module > h3,
.module-title,
.nspMain h3,
.k2ItemsBlock h3,
h2, h3 {
  color: var(--section-title) !important;
  border-bottom-color: rgba(200, 154, 107, 0.34);
  text-shadow: 0 1px 0 rgba(0,0,0,.28);
}

h2::after, h3::after, .section-title::after, .module-title::after, [class*="title"]::after {
  background: linear-gradient(90deg, rgba(200,154,107,.95), rgba(122,151,219,.95));
}

/* Make section strips clearer and evenly bordered */
#jm-top2,
#jm-top3,
#jm-maincontent,
#jm-bottom1,
#jm-bottom2,
#jm-bottom3,
.home-news,
.home-announce,
.home-important {
  background: linear-gradient(180deg, rgba(11, 21, 38, 0.76), rgba(9, 18, 33, 0.78)) !important;
  border: 1px solid rgba(132, 160, 218, 0.28) !important;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  padding: 0.45rem 0.55rem;
  margin-bottom: 0.85rem;
}

.btn, button, input[type="button"], input[type="submit"], .button, .readmore {
  color: #dce8ff !important;
  border-color: rgba(130, 160, 230, 0.4) !important;
  background: linear-gradient(180deg, #1a2944, #162238) !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.btn:hover, button:hover, input[type="button"]:hover, input[type="submit"]:hover, .button:hover, .readmore:hover {
  color: #fff !important;
  background: linear-gradient(120deg, #6f8fe4, #4d73d4, #ff8a57) !important;
}

/* Critical readability fixes for specific header/section links */
a.text-decoration-none,
a.text-decoration-none:visited,
a.text-decoration-none:hover {
  color: #e8f0ff !important;
  opacity: 1 !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.nav-link.dropdown-toggle.color-blue,
.nav-link.dropdown-toggle.color-blue:visited {
  color: #dfe9ff !important;
}

.nav-link.dropdown-toggle.color-blue:hover,
.nav-link.dropdown-toggle.color-blue:focus {
  color: #ffbb96 !important;
}

/* Main menu readability (all nav links) */
.nav-link.dropdown-toggle,
.nav-link.dropdown-toggle:visited,
.navbar .nav-link,
.navbar-nav .nav-link,
a.nav-link {
  color: #dfe9ff !important;
  opacity: 1 !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.nav-link.dropdown-toggle:hover,
.nav-link.dropdown-toggle:focus,
.navbar .nav-link:hover,
.navbar-nav .nav-link:hover,
a.nav-link:hover {
  color: #ffbe98 !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
}

/* Dropdown caret/icons in dark mode */
.nav-link.dropdown-toggle::after {
  border-top-color: #cfe0ff !important;
}

a.float-end.tstu-arhiv,
a.float-end.tstu-arhiv:visited {
  color: #ffbe98 !important;
  font-weight: 600;
}

a.float-end.tstu-arhiv:hover {
  color: #ffd1b5 !important;
  text-decoration: underline;
}

h2.name-block.color-blue,
h2.name-block.color-blue a {
  color: #cf9f72 !important;
  margin-top: 30px !important;
}

/* Carousel indicators: visible default style in dark theme */
button[data-bs-target="#carouselExampleIndicators"],
.carousel-indicators button,
[data-bs-target][data-bs-slide-to] {
  width: 12px !important;
  height: 12px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(180, 205, 255, 0.75) !important;
  background: rgba(205, 220, 255, 0.28) !important;
  opacity: 1 !important;
  box-shadow: 0 0 0 1px rgba(8, 17, 33, 0.65) inset;
}

button[data-bs-target="#carouselExampleIndicators"].active,
.carousel-indicators button.active,
[data-bs-target][data-bs-slide-to].active {
  background: linear-gradient(180deg, #ffb487, #ff9060) !important;
  border-color: rgba(255, 199, 166, 0.92) !important;
  box-shadow: 0 0 10px rgba(255, 152, 106, 0.45);
}

/* Carousel container spacing */
#carouselExampleControls,
div#carouselExampleControls.carousel.slide {
  padding: 30px 16px !important;
}

/* Remove hard borders wrapper */
.border-top.border-bottom {
  border-top: 0 !important;
  border-bottom: 0 !important;
}

nav.border-bottom.bg-blue {
  background: transparent !important;
  background-image: none !important;
}

li.nav-item.dropdown {
  border: 0 !important;
  box-shadow: none !important;
}

div.bg-white.pt-4 {
  background: transparent !important;
  background-image: none !important;
  color: #ffffff !important;
}

div.bg-white.pt-4,
div.bg-white.pt-4 * {
  color: #ffffff !important;
}

/* Header-important titles: no glow shadow */
h3.header-important.color-orange,
h3.header-important.color-orange * {
  text-shadow: none !important;
}

h3.header-important.color-orange {
  color: #cf9f72 !important;
}

/* Nested dropdown menus: simple blue background, white text, no rounded corners/borders */
.dropdown-menu,
.dropdown-menu.show,
ul.dropdown-menu,
.navbar .dropdown-menu,
.navbar-nav .dropdown-menu,
.dropdown-menu .dropdown-menu {
  background: #0f1728 !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.dropdown-menu li,
.dropdown-menu .dropdown-item {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.dropdown-menu a,
.dropdown-menu .dropdown-item,
.dropdown-menu .nav-link {
  color: #ffffff !important;
  background: transparent !important;
  text-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.dropdown-menu a:hover,
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .nav-link:hover,
.dropdown-menu a:focus,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu .nav-link:focus {
  color: #ffffff !important;
  background: #0f1728 !important;
  background-image: none !important;
}

table,
thead th {
  background: rgba(18, 28, 46, 0.92) !important;
  color: #dce7ff !important;
  border-color: rgba(130, 160, 230, 0.2) !important;
}

/* Prevent very dark image overlays from swallowing text */
[class*="overlay"],
.overlay,
.mask,
[class*="mask"] {
  background-color: rgba(10, 16, 28, 0.36) !important;
}

footer, .footer, .copyright, .bottom, .site-footer {
  background: linear-gradient(180deg, rgba(8, 15, 29, 0.97), rgba(10, 19, 35, 0.99)) !important;
  border-top: 1px solid rgba(119, 148, 206, 0.3);
}

.font-mainmenu .dropdown-menu {
text-indent: 10px;
}