@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=PT+Serif:ital,wght@0,400;0,700;1,400&display=swap");

:root {
  --page-bg: #eef6fb;
  --surface: #ffffff;
  --surface-soft: #f6fbff;
  --line: #c7dbe8;
  --text: #14344a;
  --muted: #607789;
  --brand: #0b6fae;
  --brand-dark: #075383;
  --brand-soft: #dff0fb;
  --accent: #1b9aaa;
  --shadow: 0 18px 50px rgba(20, 52, 74, 0.14);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body#page,
body.yoopage {
  min-width: 0 !important;
  margin: 0 !important;
  color: var(--text) !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.65 !important;
  background:
    radial-gradient(circle at top left, rgba(27, 154, 170, 0.2), transparent 34rem),
    linear-gradient(180deg, #d9effb 0, var(--page-bg) 30rem, #f8fbfd 100%) !important;
}

body#page * {
  box-sizing: border-box;
}

#absolute > div[style*="135px"] {
  display: none !important;
}

#page-body,
#page-footer,
.page-body-2,
.page-footer-2 {
  min-width: 0 !important;
  background: transparent !important;
}

.wrapper,
#page-footer .wrapper {
  width: min(1160px, calc(100% - 32px)) !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

#header {
  min-height: 168px !important;
  margin-top: 18px !important;
  padding: 16px 20px 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  border-radius: 22px 22px 0 0 !important;
  background:
    linear-gradient(135deg, rgba(9, 94, 148, 0.88), rgba(39, 157, 190, 0.82)),
    url("/mirror/assets/templates/yoo_royalplaza/images/blue/page_bg.jpg") center top / cover no-repeat !important;
  box-shadow: var(--shadow) !important;
  overflow: visible !important;
}

#toolbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  min-height: 32px !important;
  color: rgba(255, 255, 255, 0.92) !important;
}

#toolbar .left,
#toolbar .right {
  float: none !important;
  width: auto !important;
}

#toolbar a,
#toolbar address,
#toolbar span,
#toolbar strong,
#toolbar em {
  color: rgba(255, 255, 255, 0.94) !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  text-shadow: none !important;
}

#toolbar ul.menu {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#toolbar ul.menu li {
  list-style: none !important;
}

#logo {
  position: relative !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: min(560px, 90%) !important;
  min-height: 74px !important;
  margin: 18px auto 12px !important;
  padding: 14px 26px !important;
  border: 1px solid rgba(255, 255, 255, 0.38) !important;
  border-radius: 14px !important;
  background: rgba(5, 66, 114, 0.58) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 26px rgba(3, 43, 75, 0.22) !important;
}

#logo::after {
  content: "ЦБС Верхнеуслонского муниципального района";
  color: #ffffff;
  font-family: "PT Serif", Georgia, serif;
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 700;
  line-height: 1.18;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
}

#logo .logo-icon {
  display: none !important;
}

#date {
  top: auto !important;
  left: 24px !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  color: var(--brand-dark) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  font-weight: 600 !important;
}

#search {
  top: auto !important;
  right: 22px !important;
}

#search .searchbox,
#search input.searchfield {
  border-radius: 999px !important;
}

#menubar,
#menubar * {
  background: transparent !important;
}

#menu {
  position: relative !important;
  height: auto !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 6px !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.18) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24) !important;
}

#menu .left,
#menu .right {
  float: none !important;
  display: inline !important;
  width: auto !important;
}

#menu ul.menu-dropdown {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#menu ul.menu-dropdown > li {
  float: none !important;
  height: auto !important;
  list-style: none !important;
}

#menu ul.menu-dropdown > li > a,
#menu ul.menu-dropdown > li > span.separator {
  display: flex !important;
  align-items: center !important;
  min-height: 40px !important;
  padding: 8px 16px !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  background: rgba(2, 71, 121, 0.36) !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  text-shadow: none !important;
}

#menu .title,
#menu .subtitle,
#menu .bg {
  color: inherit !important;
  font-family: inherit !important;
  line-height: 1.1 !important;
  text-shadow: none !important;
}

#menu .subtitle {
  opacity: 0.78;
  font-size: 11px !important;
  font-weight: 500 !important;
}

#menu ul.menu-dropdown > li:hover > a,
#menu ul.menu-dropdown > li:hover > span.separator,
#menu ul.menu-dropdown > li.active > a {
  background: rgba(255, 255, 255, 0.92) !important;
  color: var(--brand-dark) !important;
}

#menu .dropdown {
  width: 280px !important;
  min-width: 260px !important;
  padding-top: 8px !important;
}

#menu .dropdown-1,
#menu .dropdown-2,
#menu .dropdown-3,
#menu .group-box1,
#menu .group-box2,
#menu .group-box3,
#menu .group-box4,
#menu .group-box5,
#menu .hover-box1,
#menu .hover-box2,
#menu .hover-box3,
#menu .hover-box4 {
  border-radius: 12px !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

#menu .dropdown a {
  color: var(--text) !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

.wrapper-t1,
.wrapper-t2,
.wrapper-t3,
.wrapper-b1,
.wrapper-b2,
.wrapper-b3,
.wrapper-1,
.wrapper-2,
.wrapper-3,
.left-bg,
.right-bg,
.contentleft-bg,
.contentright-bg {
  background: transparent !important;
}

.wrapper-1 {
  padding: 18px !important;
  border: 1px solid var(--line) !important;
  border-top: 0 !important;
  border-radius: 0 0 22px 22px !important;
  background: rgba(255, 255, 255, 0.82) !important;
  box-shadow: var(--shadow) !important;
}

#top {
  margin-bottom: 22px !important;
}

#top img,
.slideshow img,
.yoo-carousel img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 12px !important;
  object-fit: cover;
}

.yoo-carousel,
.yoo-carousel .frame,
.yoo-carousel .panel,
.yoo-carousel .slide,
.yoo-carousel .panel-container {
  width: 100% !important;
  max-width: 100% !important;
}

#middle-expand {
  display: grid !important;
  grid-template-columns: 260px minmax(0, 1fr) !important;
  gap: 24px !important;
}

#main {
  grid-column: 2 !important;
  width: auto !important;
  min-width: 0 !important;
  float: none !important;
}

#main-shift {
  margin-left: 0 !important;
}

#left {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: auto !important;
  float: none !important;
}

#content,
#content-shift,
#component,
.joomla,
.blog,
.article {
  width: auto !important;
  min-width: 0 !important;
}

#content,
#component,
#maintop .module,
#contenttop .module,
#mainbottom .module {
  border-radius: 14px !important;
  background: var(--surface) !important;
}

#component {
  padding: 8px 4px !important;
}

.module,
.box-1,
.box-2,
.box-3,
.deepest {
  background: transparent !important;
}

#left .module {
  margin-bottom: 18px !important;
  padding: 16px !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: var(--surface-soft) !important;
}

#left h3,
.module h3,
.module .header,
.module .title {
  margin: 0 0 10px !important;
  color: var(--brand-dark) !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

#left ul,
#left ol {
  margin: 0 !important;
  padding-left: 18px !important;
}

#left li {
  margin: 5px 0 !important;
  color: var(--muted) !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
}

a,
.joomla a,
#left a {
  color: var(--brand) !important;
  text-decoration: none !important;
}

a:hover,
.joomla a:hover,
#left a:hover {
  color: var(--brand-dark) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.joomla h1,
.joomla h2,
.joomla h3,
.headline h1,
.headline h2,
.headline h3,
.article h1,
.article h2,
.article h3 {
  margin: 0 0 14px !important;
  color: var(--brand-dark) !important;
  font-family: "PT Serif", Georgia, serif !important;
  font-weight: 700 !important;
  line-height: 1.18 !important;
}

.joomla h1,
.headline h1 {
  font-size: clamp(30px, 4vw, 46px) !important;
}

.joomla h2,
.headline h2 {
  font-size: clamp(23px, 2.6vw, 32px) !important;
}

.joomla h3,
.headline h3 {
  font-size: clamp(20px, 2vw, 26px) !important;
}

.article,
.joomla,
.joomla p,
.joomla li,
.item,
.item p,
.content,
#component {
  color: var(--text) !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
  font-size: 16px !important;
  line-height: 1.72 !important;
}

.joomla p,
.article p,
.item p {
  max-width: 76ch;
  margin: 0 0 1rem !important;
}

.leadingarticles .item,
.teaserarticles .item,
.joomla .item {
  margin-bottom: 18px !important;
  padding: 18px !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: var(--surface) !important;
  box-shadow: 0 10px 24px rgba(20, 52, 74, 0.08) !important;
}

.item-bg {
  background: transparent !important;
}

.teaserarticles.multicolumns {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

.teaserarticles .float-left,
.width50,
.width100 {
  float: none !important;
  width: auto !important;
}

.joomla img,
.article img,
.item img,
#component img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 10px !important;
}

.joomla img[align="left"],
.article img[align="left"] {
  margin: 4px 18px 12px 0 !important;
}

.joomla img[align="right"],
.article img[align="right"] {
  margin: 4px 0 12px 18px !important;
}

table {
  max-width: 100% !important;
  border-collapse: collapse !important;
}

td,
th {
  padding: 8px !important;
  vertical-align: top !important;
}

input,
textarea,
select,
button {
  max-width: 100% !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
}

#page-footer {
  padding: 28px 0 36px !important;
}

#footer {
  padding: 18px !important;
  border-radius: 16px !important;
  color: var(--muted) !important;
  background: rgba(255, 255, 255, 0.7) !important;
}

#topcontrol {
  right: 22px !important;
  bottom: 22px !important;
}

#cookie-notice {
  font-family: Inter, "Segoe UI", Arial, sans-serif !important;
}

@media (max-width: 900px) {
  .wrapper,
  #page-footer .wrapper {
    width: min(100% - 20px, 720px) !important;
  }

  #header {
    min-height: 0 !important;
    padding: 14px !important;
  }

  #toolbar {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  #logo {
    width: 100% !important;
    margin: 14px 0 12px !important;
    padding: 14px !important;
  }

  #date,
  #search {
    position: static !important;
    display: inline-block !important;
    margin: 8px 0 !important;
  }

  #menu ul.menu-dropdown {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  #menu ul.menu-dropdown > li > a,
  #menu ul.menu-dropdown > li > span.separator {
    justify-content: center !important;
    padding: 10px 8px !important;
    text-align: center !important;
  }

  #menu .dropdown {
    display: none !important;
  }

  .wrapper-1 {
    padding: 12px !important;
  }

  #middle-expand {
    display: block !important;
  }

  #main,
  #left {
    width: 100% !important;
  }

  #left {
    margin-top: 20px !important;
  }

  .teaserarticles.multicolumns {
    grid-template-columns: 1fr !important;
  }

  .joomla img[align],
  .article img[align] {
    float: none !important;
    display: block !important;
    margin: 12px auto !important;
  }
}

@media (max-width: 560px) {
  body#page,
  body.yoopage {
    font-size: 15px !important;
  }

  #logo::after {
    font-size: 20px;
  }

  #menu ul.menu-dropdown {
    grid-template-columns: 1fr !important;
  }

  .joomla h1,
  .headline h1 {
    font-size: 28px !important;
  }

  .leadingarticles .item,
  .teaserarticles .item,
  .joomla .item,
  #left .module {
    padding: 14px !important;
  }
}

@media (min-width: 901px) {
  body#page,
  body.yoopage {
    min-width: 980px !important;
  }

  .wrapper,
  #page-footer .wrapper {
    width: 980px !important;
    max-width: 980px !important;
  }

  #header {
    margin-right: 15px !important;
    margin-left: 15px !important;
  }

  #menu .left {
    float: left !important;
    display: block !important;
  }

  #menu .right {
    float: right !important;
    display: block !important;
  }

  #middle-expand {
    display: block !important;
    width: 200% !important;
  }

  #main {
    position: relative !important;
    left: 50% !important;
    width: 50% !important;
    min-width: 0 !important;
    float: left !important;
  }

  #main-shift {
    position: relative !important;
    left: -100% !important;
    margin-left: 225px !important;
    overflow: hidden !important;
  }

  #left {
    position: relative !important;
    left: -50% !important;
    width: 210px !important;
    float: left !important;
    overflow: hidden !important;
  }

  #content {
    position: relative !important;
    left: 50% !important;
    width: 50% !important;
    min-width: 0 !important;
    float: left !important;
  }

  #content-shift {
    position: relative !important;
    left: -100% !important;
    width: auto !important;
    overflow: hidden !important;
  }

  #component,
  .joomla,
  .blog,
  .article {
    width: auto !important;
    min-width: 0 !important;
  }

  .teaserarticles.multicolumns {
    display: block !important;
  }

  .teaserarticles .float-left,
  .width50 {
    float: left !important;
    width: 50% !important;
  }

  .width100 {
    float: left !important;
    width: 100% !important;
  }
}
