/* Reset и общие стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

body {
  display: flex;
  flex-direction: column;
}

/* === Кнопка-ярлык меню (всегда видна, ширина 92px) === */
.menu-toggle {
  position: fixed;
  top: 15px;
  left: 0; /* Прикреплен к левому краю меню */
  z-index: 1100;
  background: #2c3e50;
  color: white;
  border: none;
  width: 90px;
  height: 48px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 10px;
  box-shadow: -4px 4px 10px rgba(0, 0, 0, 0.2);
  transition: left 0.4s ease, background 0.3s ease;
  border-radius: 0 5px 5px 0;
  white-space: nowrap;
}

.menu-toggle i {
  margin-right: 10px;
}

.menu-toggle:hover {
  background: #1abc9c;
}

/* === Боковое меню с анимацией === */
.sidebar {
  width: 250px;
  background-color: #2c3e50;
  height: 100vh;
  position: fixed;
  top: 0;
  left: -245px; /* Выступает на 5px */
  padding-top: 20px;
  font-size: 120%;
  z-index: 1099;
  transform: translateX(0);
  opacity: 0.8;
  transition: left 0.4s ease, transform 0.4s ease, opacity 0.4s ease;
}

.sidebar.active {
  left: 0;
  transform: translateX(0);
  opacity: 1;
}

/* === Ярлык двигается вместе с меню === */
.sidebar.active ~ .menu-toggle {
  left: 247px; /* Двигается вместе с меню */
}

/* === Пункты меню === */
.sidebar ul {
 
  padding: 0;
}

.sidebar ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;

  text-decoration: none;
  color: white;
  transition: all 0.3s ease;
}

.sidebar ul li a:hover,
.sidebar ul li a:focus {
  color: #1abc9c;
  background-color: #34495e;
}


@media (max-width: 1023px) {
  .sidebar ul li a {
    font-size: 18px;
    padding: 20px 25px;
    min-height: 56px;
    align-items: center;
  }

  .sidebar ul li a i {
    font-size: 20px;
  }

  .submenu li a {
    padding-left: 40px;
    font-size: 16px;
  }
}

@media (max-width: 1023px) {
  .sidebar {
    width: 300px; /* увеличиваем ширину */
    left: -295px;  /* смещаем за экран на 5px */
  }

  .sidebar.active ~ .menu-toggle {
    left: 297px; /* двигается вместе с расширенным меню */
  }

  .page-content {
    margin-left: 0 !important;
    padding: 55px 10px 10px 10px;
  }
}

/* === Вложенные пункты меню === */
.has-submenu .submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background-color: #34495e;
}

.has-submenu.open .submenu {
  max-height: 200px;
}

.submenu-icon {
  margin-left: auto;
  transition: transform 0.3s ease;
}

.has-submenu.open .submenu-icon {
  transform: rotate(180deg);
}

/* === Основной контент === */
.page-content {
  flex: 1 0 auto;

  padding: 20px;
  transition: margin-left 0.4s ease;
}

@media (min-width: 1024px) {
  .page-content {
    margin-left: 250px;
  }
}

@media (max-width: 1023px) {

  .page-content {
    margin-left: 0 !important; /* Убираем отступ полностью */
    padding: 55px 10px 10px 10px ; /* Делаем небольшой внутренний отступ, чтобы не "прилипало" к краям */
  }

.menu-toggle {
  position: fixed;
  top: 5px; }

  .policy-section-toggle::after {
    color: #999;
  }
}


/* === Overlay затемнения фона === */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease, display 0.3s ease;
}

.overlay.show {
  display: block;
  opacity: 1;
}

ol>li {margin-left: 20px;}

ol>li>ul {margin-left: 40px;}


/* === Подвал сайта === */
.site-footer {
  flex-shrink: 0;
  background-color: #2c3e50;
  color: white;
  padding: 20px 0;
  font-size: 14px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-content p {
  margin: 5px 0;
}

.footer-content a {
  color: #1abc9c;
  text-decoration: none;
}

.footer-content a:hover {
  text-decoration: underline;
}


/* === стили для графиков === */


.infoupdates {position: fixed; top:50%; left: 50%; transform: translate(-50%, -50%); min-height: 300px;  z-index: 1060;  overflow: hidden;  background: url("/images/pinred.png") no-repeat right 10px bottom 10px, #fff3cd; border: 1px solid #ffeaa7; padding: 20px;  color: #856404; font-size: 15px; align-items: flex-start;}

.darkbtn {text-align: right; padding: 1em; width: 100%; color: black; font-weight: 900; }

.whitecircle {font-size: 12px; background-color: rgba(184, 134, 11, 0.9); color: white; width: 2em; height: 2em; line-height: 2em; border-radius: 1em;  text-align: center;}
.picktfest {width: 100; aspect-ratio: 2 / 1;}
.listregion {position: absolute; top: 10%; left: 50%; width: 600px; margin-left: -300px;  z-index: 1000;  transition: max-height 0.6s ease, opacity 1s ease-in; background-color: white; border: 2px solid #1abc9c; color: black; max-height: 5000px; overflow: hidden; opacity: 1;}
.btnturquoise { background-color: #1abc9c;  color: white;  padding: 1em;  text-align: center;  cursor: pointer;  margin: 0.5em auto;  display: block; font-size: 14px;}
.mflex-fest {display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; width: 100%; justify-content: space-between; align-items: flex-start; }


.calclogo {width: 100%;  max-width: 800px;  aspect-ratio: 1 / 1; overflow: hidden; transition: aspect-ratio 1s ease, background-position 1.3s ease-in-out; background: url("/images/calculator.svg") no-repeat right 10px bottom 10px , linear-gradient(180deg, rgba(42, 123, 155, 1) 0%, rgba(62, 84, 112, 1) 100%);  margin: auto;}
.calclogo:not(.pinred):hover img {animation: rotatebun 1.2s;}
.calclogo.collapse {aspect-ratio: 2 / 1;}

.imgbun {width: 100%;   height: 100%;  object-fit: cover;  display: block;  margin: 0;  transition: max-height 0.6s ease-in-out;  max-height: 100%;}
.infofest {width: 100%; max-height: 500px; aspect-ratio: 2 / 1;  transition: max-height 1s ease, border-radius 1s ease; border-bottom: 1px solid white;  background: rgba(0, 0, 0, 0.2); color: white; border-radius: 0; }



@media (max-width: 767px) {

.listregion {position: absolute; top: 10%; left: 50%; width: 350px; margin-left: -175px;}
.mflex-fest { align-items: flex-end; }

.calclogo { box-shadow: none; transition: max-height 1s ease, background-position 1s ease; background: url("/images/calculator.svg") no-repeat right 10px top 10px , linear-gradient(180deg, rgba(42, 123, 155, 1) 0%, rgba(62, 84, 112, 1) 100%); border-radius: 30px 30px 0 0;}
.calclogo img { box-shadow: none; border-radius: 30px 30px 0 0;}
.calclogo.collapse {transition: aspect-ratio 1s ease, background-position 1s ease-out; background: url("/images/calculator.svg") no-repeat right 10px bottom 10px , linear-gradient(180deg, rgba(42, 123, 155, 1) 0%, rgba(62, 84, 112, 1) 100%);}

.infofest {border-top: 1px solid white;}

.calclogo.collapse .infofest {border-radius: 30px 30px 0 0;}
.whitecircle {font-size: 16px;}


} 

.infofest.zeroheight {max-height: 0;}
.imgbun.zeroheight {max-height: 0;}
.listregion.zeroheight {max-height: 0; opacity: 0; pointer-events: none;}


/* == кнопки навигации == */

#scrollToTop, #scrollToBottom {
  position: fixed;
  left: 120px;
  z-index: 1050;
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(
    rgba(184, 134, 11, 0.9),
    rgba(184, 134, 11, 0.6)
  );
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#scrollToTop {
  bottom: 80px;
}

#scrollToBottom {
  bottom: 30px;
}

#scrollToTop:hover, #scrollToBottom:hover {
  background-color: #0056b3;
  transform: scale(1.1);
}


@media (max-width: 1023px) {

#scrollToTop, #scrollToBottom {
  left: auto;	
  right: 15px;	
}

}



/* === куки === */

  #cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 14px;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  }

  #cookie-banner button {
    margin-left: 15px;
    padding: 8px 15px;
    border: none;
    background-color: #1abc9c;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
  }

  #cookie-banner button:hover {
    background-color: #16a085;
  }


