:root {
	  --appbar-height:  100px;
    --footer-height:  1.5rem;
    --bgcolor: #f3f4f6;
    --border-color: #d0d1d3;
    --header-bgcolor: white;
    --footer-bgcolor: white;
    --text-color: black;
    --active-menu-color: blue;
    --appbar-color: var(--bgcolor);
    --ua-gradient: linear-gradient(to bottom, #005BBB 50%, #ffd500 50%);
  }

.under {
  border-bottom: 1px solid var(--border-color);
}

main {
    display: grid;
    grid-template-areas:
    'logo     topban  topban'
    'leftmenu article  aside'
    'leftmenu bside  aside'
    'footer footer footer';
    grid-template-columns: minmax(15rem, max-content) auto 1fr;;
    grid-template-rows: var(--appbar-height) 1fr;
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
  }
  #logo, #topban, nav {
    z-index: 900;
    background-color: var(--header-bgcolor);
    box-sizing: border-box;
  }
  
  #logo {
    grid-area: logo;
    position: sticky;
    top: 0; 
    display: flex;
    align-items: center;
    justify-content: center;
  
  }

  #topban {
    grid-area: topban;
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    padding-left: 1.5rem;
    gap: 3rem;
  }

  #litleUA {
    display: none;
    width: 100%;
  }
  
  #litleUA >a {
    display: block;
    width: 100%;
    text-decoration: none;
    text-align: center;
    color: white;
    text-shadow: 1px 1px 1px #000;
    font-weight: bold;
  }

  .upnav {
    grid-area: appbar;
    position: sticky;
    top: 0;
    display: none;
    background: var(--appbar-color);
    color: black;
  }
  
  section {
    grid-area: leftmenu;
    border-right: 1px solid var(--border-color);
    
  }

  section.collapse:not(.show) {
    display: block;
  }

  aside {
    grid-area: aside;
  }

  #rda {
    padding: 1em;
    flex-direction: column;
    gap: 1em;
    display: flex;
  }

  #bside {
    grid-area: bside;
    position: sticky;
    bottom: var(--footer-height);
    display: none;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    overflow: hidden;
  }

  #bside > div {
    max-width: 700px;
    width: 100%;
    margin-bottom: .5rem;
  }

  #bside > div img {
    border-radius: 4px;
  }

  section div, aside div {
    position: sticky;
    top: var(--appbar-height);
  }
  
  article {
    grid-area: article;
    max-width: 900px;
    position: relative;
    padding: 1rem;
    overflow: auto;
  }
  
  .flagUA {
    padding: .2rem;
    background: var(--ua-gradient);
    width: max-content;
  }

  .flagUA>a {
    padding: .1rem 1rem;
    background: var(--header-bgcolor);
    display: block;
    color: black;
    text-decoration: none;
  }

  footer {
    grid-area: footer;
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: -0px;
    height: var(--footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    background-color: var(--footer-bgcolor);
  }

  .wowa {
    text-decoration: none;
    font-size: .8rem;
    font-weight: bold;
    display:  block;
}

  #leftmenudiv {
    grid-area: leftmenudiv;
    max-height: calc(100vh - var(--footer-height) - var(--appbar-height));
    overflow-y: auto;
  }

  #leftmenudiv::-webkit-scrollbar {
    width: .3em;
}

#leftmenudiv::-webkit-scrollbar-track {
    background-color: var(--bgcolor);
}

#leftmenudiv::-webkit-scrollbar-thumb {
    box-shadow: inset 0 0 6px var(--border-color);
}

  #leftmenudiv>ul {
    padding-top: 1em;
    list-style: none;
    padding-left: 0px;
  }

  #leftmenudiv > ul li>a {
    color: var(--text-color);
    padding: 0px;
  }

  #leftmenudiv > ul li a>span {
    margin-left: .5rem;
    height:2rem;
    display: inline-block;   
  }
  #leftmenudiv > ul li>ul a>span {
    border-left: 1px solid var(--border-color);
  }

  #leftmenudiv > ul li a>i {
    align-self: center;
    width: 2rem;
    display: inline-block;
    text-align: center;
    margin-left: .5rem;
  }

  #leftmenudiv > ul li > ul.collapse span {
    padding-left:.8rem;
  }


  #leftmenudiv .nav-item.current_ancestor>a>i, #leftmenudiv .nav-item.active>a>i {
    color: var(--active-menu-color);
  }
  #leftmenudiv .nav-item.active>a>span {
    border-color: var(--active-menu-color);
  }

  a.nav-link:hover {
    background-color: var(--bgcolor);
  }

  .iconDefault::before {
    content: ' ';
  }

  #movingBallG{
    position:relative;
    margin:auto;
    display: inline-block;
  }
  
  .animated-gradient {
    display: inline-block;
    background: repeating-linear-gradient(to right, rgb(94, 199, 94) 0%, white 50%, rgb(94, 199, 94) 100%);
    height: 3px;
    width: 80%;
    border-radius: 2px;
    background-size: 200% auto;
    background-position: 0 100%;
    animation: gradient 2s infinite;
    animation-fill-mode: forwards;
    animation-timing-function: linear;
  }

  .o-none {
    transition: opacity 1s ease-in-out 5s;
    opacity: .1;
  }
  
  @keyframes gradient { 
    0%   { background-position: 0 0; }
    100% { background-position: -200% 0; }
  }
    
  @media (max-width: 1020px) {
    #sva {
      display: none;
    }
    #bside > div {
        margin-bottom: 0px;
        max-width: 100%;
      }
      #bside > div img {
        border-radius: 0px;
      }      
    }

  @media (max-width: 1340px) {
    article {
        max-width: none;
    }
    aside {
        display: none;
    }
    #bside {
        display: flex;
    }
  }
  
  @media (max-width: 700px) {
    :root {
      --appbar-height:  80px;
    }

    main {
        grid-template-areas:
        'appbar'
        'leftmenu'
        'topban'
        'article'
        'bside'
        'footer';    
        grid-template-rows: var(--appbar-height) 0 min-content 1fr min-content min-content;
    }
    #logo {
        display: none;
    }
    #topban {
      top: var(--appbar-height);
    }

    section {
      position: sticky;
      top: var(--appbar-height);
      background-color: var(--header-bgcolor);
      z-index: 999;
      height: calc(100vh - var(--appbar-height) - var(--footer-height));
      height: calc(var(--vh, 1vh) * 100 - var(--appbar-height) - var(--footer-height));
    }

    #leftmenudiv {
      font-size: 1.2em;
    }

    section.collapse:not(.show) {
      display: none;
    }
      
    .upnav {
      display: flex;
    }

    .upnav img {
      width: 70%;
      max-height: calc(var(--appbar-height) / 1.3);
    }

    #bigUA {
      display: none;
    }

    #topban {
      background: var(--ua-gradient);
      padding: 0;
      height: fit-content;
      justify-content: center;
    }

    #litleUA
    {
      display: block; 
    }
  
}