html {
  scroll-behavior: smooth;
}

html,
body {
  /*Box model stuff*/
  height: 100%;
  margin: 0;
  padding: 0;
}

/* Fixed only on the home page; its height is reserved by indexrules.js. */
body {
  padding-top: var(--home-header-height, 0px);
}

#header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
}

.development-stripe {
  position: relative;
  z-index: 90;
  width: 100%;
  height: 36px;
  overflow: hidden;
  background: linear-gradient(90deg, #d96b00 0%, #ff9a1f 52%, #ffd24a 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.development-marquee {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
}

.development-marquee-track {
  display: flex;
  width: max-content;
  height: 100%;
  align-items: center;
  will-change: transform;
  animation: development-marquee-right 25s linear infinite;
}

.development-marquee-track span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0;
  color: #ffffff;
  font-family: "CreativeBlock", sans-serif;
  font-size: clamp(12px, 1.2vw, 18px);
  letter-spacing: 0.08em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

@keyframes development-marquee-right {
  0% {
    transform: translate3d(-50%, 0, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* #region ВЕРХНІ КАРТИНКИ */


.background-wrapper {
  /*Positioning stuff*/
  position: relative;
  /*Box model stuff*/
  width: 100%;
  height: clamp(180px, 40vw, 740px);
  min-height: 52vh;
  margin-top: 0;
  /*background:
    linear-gradient(to bottom, rgba(161, 111, 3, 0.486), transparent),
    linear-gradient(to top, rgba(255, 255, 255, 0.342), transparent);
  /*Miscellaneous*/
  overflow: hidden;
  z-index: 1;
}

.background-wrapper::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 30%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
}

/*.background-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(161, 111, 3, 0.486), transparent),
    linear-gradient(to top, rgba(255, 255, 255, 0.342), transparent);
}*/

.hero-slide {
  position: absolute;
  inset: 0;
  display: block !important;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1),
              transform 1.4s cubic-bezier(0.25, 1, 0.5, 1),
              visibility 0.9s ease;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  will-change: opacity, transform;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.home-hero-title {
  position: absolute;
  top: 12%;
  right: 0;
  left: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  z-index: 4;
  color: #ffffff;
  font-family: "Appleberry", sans-serif;
  font-size: clamp(34px, 5.2vw, 50px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  pointer-events: none;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
  text-shadow:
    0 2px 5px rgba(0, 0, 0, 0.65),
    0 4px 22px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(25, 95, 48, 0.5);
  transition: opacity 0.35s ease;
}

.home-hero-title .hero-title-sub {
  display: block;
  font-size: 0.6em;
  color: #ffe96d;
  font-family: "Aventis_deco", "HeroldCTT_Bold", sans-serif;
  letter-spacing: 0.03em;
  margin-top: 6px;
  text-shadow:
    0 2px 5px rgba(0, 0, 0, 0.75),
    0 0 28px rgba(255, 233, 109, 0.5);
}

/* Floating Down-Arrow Hero Indicator */
.hero-scroll-arrow {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 85px;
  height: 60px;
  color: #ffffff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s ease, color 0.25s ease;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5));
}

.hero-scroll-arrow svg,
.hero-scroll-arrow svg path {
  width: 85px;
  height: 60px;
  pointer-events: none;
}

.hero-scroll-arrow.is-visible {
  opacity: 0.3;
  visibility: visible;
  pointer-events: auto;
  animation: hero-arrow-float 2.4s ease-in-out infinite;
}

.hero-scroll-arrow:hover,
.hero-scroll-arrow:focus-visible {
  opacity: 0.85 !important;
  color: #ffe96d;
}

@keyframes hero-arrow-float {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(12px);
  }
}

.background-wrapper.hero-out-of-view .hero-scroll-arrow {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#header .shev-name {
  transition: color 0.3s ease, font-size 0.35s ease;
}

/* When the header text appears near the icon (when scrolling past hero), shrink header height smoothly */
#header:not(.home-hero-active) .header-upper {
  padding: 4px 25px;
}

#header:not(.home-hero-active) .header-logo {
  width: clamp(32px, 6.5vw, 44px);
}

#header:not(.home-hero-active) .shev-name {
  font-size: clamp(11px, 1.4vw + 2px, 20px);
}

#header:not(.home-hero-active) .nav-menu > li > a,
#header:not(.home-hero-active) .nav-menu > li > span {
  padding: 10px 14px;
}

#header:not(.home-hero-active) .onl-prod img {
  width: clamp(24px, 6vw, 36px);
}

.background-wrapper.hero-out-of-view .home-hero-title {
  opacity: 0;
}


.hero-control,
.hero-dots {
  position: absolute;
  z-index: 5;
}

.hero-control {
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease,
              transform 0.25s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.hero-control:hover {
  background: rgba(46, 151, 64, 0.85);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 0 20px rgba(46, 151, 64, 0.5);
}

.hero-control:active {
  transform: translateY(-50%) scale(0.95);
}

.hero-prev { left: 20px; }
.hero-next { right: 20px; }

.hero-dots {
  right: 0;
  bottom: 70px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              background-color 0.35s ease;
}

.hero-dot.active {
  width: 32px;
  background: #ffffff;
  border: none;
}

.parallax-image {
  background-image: url("2.jpg");
}

.fade-slot {
  position: relative;
  display: inline-block;
  vertical-align: top;
  margin: 4px 2px;
  height: auto;
  overflow: hidden;
}

/* #endregion */

/* #region АНОНСИ Й КНИЖКИ */

.banners-name,
.section-bar {
  display: flex;
  justify-content: center;
  height: 40px;
  margin: 8px;
  color: rgb(255, 255, 255);
  gap: 0%;
}

/* Let the content following the hero overlap its fading lower edge. */
.top-banners,
.top-headers {
  position: relative;
  z-index: 70;
  width: 99%;
  margin: -35px auto 6px;
  box-sizing: border-box;
}

.banners-name div,
.section-bar div {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #289655;
  font-family: "CreativeBlock", sans-serif;
  font-size: clamp(13px, 1.5vw, 20px);
  text-align: center;
  box-sizing: border-box;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.banners-name.news-banner div,
.section-bar.news-header-bar div {
  width: 100%;
  border-radius: 5px;
}

.banners-name div:first-child,
.section-bar div:first-child {
  width: 47%;
  border-radius: 5px 0 0 5px;
}

.banners-name div:last-child,
.section-bar div:last-child {
  width: 53%;
  border-radius: 0 5px 5px 0;
}

.banners-name.news-banner div:last-child,
.section-bar.news-header-bar div:last-child {
  width: 100%;
  border-radius: 5px;
}

.books-banner,
.books-header-bar {
  display: none;
  justify-content: center;
  height: 40px;
  color: rgb(255, 255, 255);
}

.books-banner div,
.books-header-bar div {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #289655;
  font-family: "CreativeBlock", sans-serif;
  font-size: clamp(15px, 1.5vw, 20px);
  text-align: center;
  width: 100%;
  border-radius: 5px;
}

.news-anons-cont {
  display: flex;
  position: relative;
  z-index: 66;
  width: 99%;
  aspect-ratio: 16 / 7;
  margin: 6px auto;
  gap: 8px;
}

.news-anons-cont::before,
.news-anons-cont::after {
  content: "";
  position: absolute;
  left: 0;
  width: var(--controls-width, 9.5vw);
  z-index: 4;
  pointer-events: none;
  height: 14px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.news-anons-cont::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
}

.news-anons-cont::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
}

.news-anons-cont.can-scroll-top::before {
  opacity: 1;
}

.news-anons-cont.can-scroll-bottom::after {
  opacity: 1;
}

html.dark-mode .news-anons-cont::before {
  background: linear-gradient(to bottom, rgba(18, 27, 20, 0.95), rgba(18, 27, 20, 0)) !important;
}

html.dark-mode .news-anons-cont::after {
  background: linear-gradient(to top, rgba(18, 27, 20, 0.95), rgba(18, 27, 20, 0)) !important;
}

.anons-controls-wrapper {
  width: 10%;
  height: 100%;
  position: relative;
}

.news-anons-cont ul {
  width: 100%;
  margin: 0;
  padding: 5px 6px;
  list-style: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 4px;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: contain;
  scroll-padding-block: 12px;
  box-sizing: border-box;
}

.news-anons-cont ul::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.news-anons-cont ul li {
  flex: 1 1 0px;
  min-height: clamp(42px, 3.4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 5px;

  text-align: center;
  font-family: "CreativeBlock", sans-serif;
  font-size: clamp(10px, 1vw, 15px);
  line-height: 1.15;
  color: white;
  text-shadow:
    3px 3px 0 rgba(0, 0, 0, 0.233),
    0 0 15px rgba(255, 254, 206, 0.356);

  /* Shared-looking gradient per li */
  background: linear-gradient(to bottom, #289655, #2d9e29);
  background-clip: padding-box;
  background-size: 100% calc(100% * var(--count));
  background-repeat: no-repeat;
  background-position: 0 calc(100% * var(--index) / var(--count));

  box-shadow: none;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 0.25s ease,
    color 0.25s ease,
    text-shadow 0.25s ease,
    border-color 0.25s ease,
    filter 0.25s ease;
  overflow: hidden;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.news-anons-cont ul li {
  position: relative;
  padding-left: 12px !important;
  padding-right: 20px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  box-sizing: border-box;
  border-left: 3px solid transparent !important;
}

.news-anons-cont ul li::after {
  content: "▶";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%) translateX(0);
  font-size: 0.65em;
  opacity: 0.45;
  color: inherit;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.25s ease,
              color 0.25s ease;
  pointer-events: none;
}

.news-anons-cont ul li:hover {
  transform: scale(1.025);
  filter: brightness(1.15);
  box-shadow: none;
  z-index: 2;
}

.news-anons-cont ul li:hover::after {
  opacity: 0.85;
  transform: translateY(-50%) translateX(3px);
}

.news-anons-cont ul li:active {
  transform: scale(0.97);
  filter: brightness(0.95);
  transition: transform 0.08s ease, filter 0.08s ease;
}

.news-anons-cont ul li.active {
  color: #ffee56 !important;
  text-shadow: 0 0 10px rgba(255, 238, 86, 0.5), 2px 2px 0 rgba(0, 0, 0, 0.3) !important;
  border-left: 3px solid #ffee56 !important;
  box-shadow: none;
}

.news-anons-cont ul li.active:hover {
  transform: scale(1.025);
  z-index: 2;
}

.news-anons-cont ul li.active:active {
  transform: scale(0.97);
}

.news-anons-cont ul li.active::after {
  opacity: 1;
  color: #ffee56 !important;
  transform: translateY(-50%) translateX(3px);
}


/* #endregion */

/* #region АНОНСИ */

.anons-square {
  background: linear-gradient(to bottom, #289655, #2d9e29);
  /* Lock scaling range */
  width: 37%;
  height: auto;
  aspect-ratio: 2 / 3;
  /* Consistent rectangle shape */
  display: flex;
  background-clip: border-box;
  box-sizing: border-box;
  position: relative;
  border-radius: 5px;

  justify-content: center;
  align-items: center;
}

.anons-square::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #f6fcdd;
  /* inner background */
  margin: 20px 30px;
  /* width of the border */
  border-radius: inherit;
  z-index: 0;

  box-shadow:
    4px 3px 0 rgba(61, 37, 0, 0.24),
    0 0 30px rgba(176, 238, 96, 0.445);
}

.anons-square > * {
  position: relative;
  z-index: 1;
}

.anons-square img {
  flex: 1;
  padding: 20px;
}

.anons-square .fade-img {
  position: absolute;
  width: 80%;
  max-height: 85%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25));
}

.anons-square img.fade-img.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.anons-square.has-multiple-slides img.fade-img.active {
  pointer-events: auto;
  cursor: pointer;
}

.anons-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 9;
  display: none;
  padding: 0;
  background: transparent;
  color: #207744;
  font-family: "CreativeBlock", sans-serif;
  font-size: clamp(9px, 0.9vw, 14px);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  box-shadow: none;
  pointer-events: none;
}

.anons-dots {
  position: absolute;
  top: 34px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 10;
}

.anons-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(0, 143, 26, 0.274);
  cursor: pointer;
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              background-color 0.35s ease,
              transform 0.25s ease,
              box-shadow 0.35s ease;
}

.anons-dot:hover {
  transform: scale(1.2);
  background: rgba(40, 150, 86, 0.5);
}

.anons-dot.active {
  width: 26px;
  border-radius: 999px;
  background: #289655;
  border: none;
  transform: scale(1);
  box-shadow: 0 0 8px rgba(40, 150, 86, 0.4);
}

/* #endregion */

/* #region ПРОПОНУЄМ ПОЧИТАТИ */

.books-square {
  background: linear-gradient(to bottom, #289655, #2d9e29);
  width: 60%;
  aspect-ratio: 2 / 3;
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  box-sizing: border-box;
}

.books-square .inside {
  position: absolute;
  inset: 0;
  margin: 20px 10%;
  box-sizing: border-box;
  background: #f6fcdd;
  border-radius: inherit;

  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;

  box-shadow:
    4px 3px 0 rgba(61, 37, 0, 0.24),
    0 0 30px rgba(176, 238, 96, 0.445);
}

/* NEW wrapper that controls layout */
.book {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
  overflow: hidden;
  padding: 12px 10px 10px;
  box-sizing: border-box;
}

.book.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.book img {
  width: min(clamp(100px, 30%, 160px), 100%);
  max-height: 35%;
  height: auto;
  flex-shrink: 0;
  transition: max-height 0.25s ease, width 0.25s ease;
  display: block;
  object-fit: contain;
}

.book::after {
  content: "";
  position: absolute;
  inset: 20px;
  background-image: var(--book-bg-img);
  background-size: auto 100%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.20;
  filter: brightness(1.05);
  pointer-events: none;
  z-index: 0;
}

.book > img,
.book .text2read {
  position: relative;
  z-index: 1;
}

.books-square .text2read {
  padding: 0 15px 12px;
  font-family: "fira", sans-serif;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(32, 119, 68, 0.4) transparent;
}

.books-square .text2read::-webkit-scrollbar {
  width: 5px;
}
.books-square .text2read::-webkit-scrollbar-track {
  background: transparent;
}
.books-square .text2read::-webkit-scrollbar-thumb {
  background-color: rgba(32, 119, 68, 0.4);
  border-radius: 999px;
}

html.dark-mode .books-square .text2read,
html.dark-mode .book .text2read {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  scrollbar-color: rgba(168, 189, 174, 0.4) transparent;
}

html.dark-mode .books-square .text2read::-webkit-scrollbar-thumb {
  background-color: rgba(168, 189, 174, 0.4);
}

.text2read p {
  text-align: center;
  margin: 0px;
  color: #1a250e;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.45;
}

html.dark-mode .books-square .text2read p {
  color: #d4e4d9 !important;
}

.text2read h1 {
  margin-block: 0 6px;
  color: #207744;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.25;
}

html.dark-mode .books-square .text2read h1 {
  color: #82d887 !important;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6) !important;
}

.books-square button {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: #f6fcdd; color: #49430f;
  border: 0; border-radius: 30%;
  height: clamp(36px, 4vw, 55px);
  display: flex;
  align-items: center; justify-content: center;
  aspect-ratio: 1/1;
  margin: 0 15px;
  cursor: pointer;
  font-size: 20px;

  box-shadow: 4px 3px 0 rgba(61, 37, 0, .24), 0 0 30px rgba(176, 238, 96, .445);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s, filter .22s
}

.books-square button:hover {
  transform: translateY(-50%) scale(1.06) rotate(-4deg);
  box-shadow: 6px 6px 16px rgba(0, 0, 0, .25), 0 0 36px rgba(176, 238, 96, .55);
  filter: brightness(1.04)
}

.books-square .prev {
  left: 0;
}

.books-square .next {
  right: 0;
}

/* #endregion */

/* #region НОВИНИ */

.news-square {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(280px, auto);
  gap: 14px;
  padding: 3px 10px;
  margin: 8px auto;
  max-width: 1680px;
  align-items: stretch;
  justify-items: stretch;
  border-radius: 22px;
  font-size: 15px;
  text-align: left;
}

.news-square .news-loading {
  grid-column: 1 / -1;
  padding: 26px 0;
  font-size: 18px;
  color: #1c6f31;
  text-align: center;
}

.news-square .index-news-preview {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid rgba(31, 106, 54, 0.14);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  min-height: 280px;
  height: 100%;
  box-sizing: border-box;
  box-shadow: 4px 4px rgba(0, 0, 0, 0.048);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.news-square .index-news-preview:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
  border-color: rgba(31, 106, 54, 0.26);
}

.news-square .index-news-preview-media {
  width: 100%;
  height: 145px;
  flex-shrink: 0;
  overflow: hidden;
  background: #000;
  position: relative;
}

.news-square .index-news-preview-media.video-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.22), rgba(0,0,0,0.35));
  pointer-events: none;
}

.news-square .index-news-preview-media.video-preview::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.85);
  clip-path: polygon(30% 22%, 30% 78%, 78% 50%);
  pointer-events: none;
}

.news-square .index-news-img,
.news-square .index-news-video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-square .index-news-video-preview {
  pointer-events: none;
}

.news-square .index-news-title,
.news-square .index-news-desc,
.news-square .index-news-tags {
  padding: 0 14px;
  box-sizing: border-box;
}

.news-square .index-news-title {
  margin-top: 10px;
  font-family: "CreativeBlock", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  color: #113b1f;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
  overflow-wrap: break-word;
  flex-shrink: 0;
}

.news-square .index-news-desc {
  margin-top: 4px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #344d3c;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
  overflow-wrap: break-word;
  flex: 1;
  min-height: 0;
}

.news-square .index-news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 12px;
  flex-shrink: 0;
  margin-top: auto;
}

.news-square .index-news-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(40, 150, 86, 0.16);
  color: #1a5c2a;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 3px 7px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-all-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80%;
  background: linear-gradient(to bottom, #289655, #2f9e2a);
  border-radius: 12px;
  font-family: "CreativeBlock", sans-serif;
  font-size: 19px;
  color: white;
  padding: 16px 24px;
  margin: 0 auto 16px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;

  text-shadow:
    3px 3px 0 rgba(0, 0, 0, 0.233),
    0 0 15px rgba(255, 254, 206, 0.356);
}

.news-square + .news-all-link {
  display: flex;
}

.news-all-link:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1420px) {
  .news-square {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1220px) {
  .news-square {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .news-square {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (max-width: 520px) {
  .news-square {
    grid-template-columns: 1fr;
  }
}

/* #endregion */

/* #region ІНШЕ */

/* #endregion */




@media (max-width: 825px) {

  .background-wrapper {
    height: clamp(250px, 35vw, 260px) !important;
    min-height: 180px !important;
  }

  .home-hero-title {
    top: 6%;
    right: 0;
    left: 0;
    margin: 0;
    max-width: none;
    font-size: clamp(20px, 4.5vw, 32px);
    line-height: 1.15;
  }

  .home-hero-title .hero-title-sub {
    font-size: 0.75em;
    margin-top: 2px;
  }

  .hero-control {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .hero-prev { left: 10px; }
  .hero-next { right: 10px; }

  .hero-scroll-arrow {
    bottom: 35px;
    width: 42px;
    height: 28px;
  }

  .hero-scroll-arrow svg {
    width: 42px;
    height: 28px;
  }

  .hero-dots {
    bottom: 22px !important;
    gap: 6px;
  }

  .hero-dot {
    width: 8px;
    height: 8px;
  }

  .hero-dot.active {
    width: 22px;
  }

/* #region НОВИНИ-АНОНСИ */

  .news-anons-cont {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-areas:
      "controls"
      "anons"
      "banner"
      "books";

    width: 98%;
    margin: 6px auto;
    gap: 10px;

    aspect-ratio: auto !important;
    /* VERY important */
  }

  .anons-controls-wrapper {
    grid-area: controls;
    position: relative;
    width: 100%;
    min-width: 0;
  }

  .anons-controls-wrapper::before,
  .anons-controls-wrapper::after {
    content: "";
    display: block !important;
    position: absolute;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 17px;
    z-index: 10;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.25s ease;
  }

  .anons-controls-wrapper::before {
    left: 0;
    right: auto;
    background: linear-gradient(to right, #ffffff 20%, rgba(255, 255, 255, 0) 100%);
  }

  .anons-controls-wrapper::after {
    right: 0;
    left: auto;
    background: linear-gradient(to left, #ffffff 20%, rgba(255, 255, 255, 0) 100%);
  }

  html.dark-mode .anons-controls-wrapper::before {
    background: linear-gradient(to right, #121b14 20%, rgba(18, 27, 20, 0) 100%) !important;
  }

  html.dark-mode .anons-controls-wrapper::after {
    background: linear-gradient(to left, #121b14 20%, rgba(18, 27, 20, 0) 100%) !important;
  }

  #anons-controls::before,
  #anons-controls::after {
    display: none !important;
  }

  #anons-controls {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    padding: 6px 2px !important;
    gap: 8px !important;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    align-self: stretch;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }

  #anons-controls::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .news-anons-cont ul li {
    flex: 0 0 auto !important;
    width: 40% !important;
    max-width: 80vw;
    min-height: clamp(40px, 9vw, 52px);
    padding: 8px 16px !important;
    font-size: clamp(11px, 2.8vw, 14px);
    line-height: 1.2;
    white-space: normal;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-left: none !important;
    border-bottom: 3px solid transparent !important;
    box-sizing: border-box;
  }

  .news-anons-cont ul li::after {
    display: none !important;
  }

  .news-anons-cont ul li.active {
    border-left: none !important;
    border-bottom: 3px solid #ffee56 !important;
  }

  .anons-square {
    grid-area: anons;
    width: 100%;
    min-width: 0;
  }

  .books-square {
    grid-area: books;
    width: 100%;
  }

  /* prevent weird shrinking */
  #anons-controls,
  .anons-square,
  .books-square {
    min-width: 0;
  }

  /* IMPORTANT: make images responsive */
  .anons-square img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
  }

  .anons-square::before {
    margin: 30px 20px;
  }

  .anons-dots {
    top: 42px !important;
  }

  .anons-hint {
    bottom: 36px;
    font-size: clamp(9px, 2.2vw, 13px);
  }

  .top-banners,
  .top-headers {
    width: 98%;
    margin: -18px auto 6px;
    box-sizing: border-box;
    padding: 0;
  }

  .top-banners div:last-child,
  .top-headers div:last-child {
    display: none;
  }

  .top-banners div:first-child,
  .top-headers div:first-child {
    width: 100%;
    border-radius: 5px;
  }

  .books-banner,
  .books-header-bar {
    display: flex;
    grid-area: banner;
    width: 100%;
    margin: -2px auto;
  }

  .news-banner,
  .news-header-bar {
    width: 98%;
    margin: 8px auto;
    box-sizing: border-box;
  }

  .news-banner div,
  .news-header-bar div {
    width: 100%;
    border-radius: 5px;
  }

  .news-square {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    grid-auto-rows: minmax(260px, auto);
  }

  .news-square .index-news-preview {
    min-height: 240px;
  }

  .news-square .index-news-preview-media {
    height: 125px;
  }

  .news-square .index-news-title {
    font-size: 0.88rem;
    -webkit-line-clamp: 2;
    margin-top: 8px;
  }

  .news-square .index-news-desc {
    font-size: 0.78rem;
    -webkit-line-clamp: 3;
    margin-top: 4px;
  }

  .news-square > .news-all-link {
    margin-inline: auto;
    justify-self: center;
  }
/* #endregion */

/* #region КНИЖКИ */

.books-square {
  height: 100vh;
  min-height: 420px;
  width: 100%;
  aspect-ratio: unset;
}

.books-square .inside {
  margin: 20px 13%;
}

.books-square button {
  height: 50px;
  z-index: 3;
}

.books-square .text2read p {
  font-size: clamp(15px, 3.4vw, 19px);
  line-height: 1.45;
}

.books-square .text2read h1 {
  margin-block: 0 6px;
  font-size: clamp(22px, 5vw, 28px);
  line-height: 1.25;
}

/* #endregion */
}
