/* Desktop tyylit koneel yk */
@media (min-width: 650px) {
  .navbar {
    border-radius: 8px;
    border: 2px solid #f33;
    background-color: transparent;
    box-shadow: 16px 16px 64px #224b;
    margin: 8em 8px 0 auto;
  }
  .navbar > .links {
    padding: 8px 0;
    display: flex;
    border-radius: 0 0 8px 8px;
  }

  .links > ul {
    margin: 0 auto;
    padding: 0;
  }

  .links > ul > li {
    list-style-type: none; /* Remove bullet points */
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: 4px;
    border: 2px dashed transparent;
  }

  #toggles {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .navbar > #toggles > h3 {
    cursor: help;
    user-select: none;
  }
  .navbar a {
    display: block;
    text-align: center;
    padding: 4px 8px;
    color: #eef;

    border-radius: 8px; /* hienot kulmat */
    text-decoration: none;
    background-color: #b23;

    transition-property: padding, margin, letter-spacing, opacity,
        box-shadow, border-radius, border;
    transition-duration: 1.2s;
    transition-timing-function: ease;
    border: 2px dashed #0000;
  }

  .navbar a:hover {
    border: 2px dashed #3c7;
    border-radius: 4px;
    letter-spacing: 2px;

    opacity: 0.7;
    box-shadow: 2px 4px 24px #110a;
  }

  .navbar a.navActive {
    background-color: #64c !important;

    border: none;

    font-weight: bold;
    border-right: 5px solid #a08;
    overflow: hidden;
    border-radius: 4px;

    color: #fbf;
  }

  /*Dark theme backgrounds for desktop navbar*/

  #toggles {
    background-color: #87d;
    
  }

  .dark-theme #toggles {
    background-color: #325;
  }

  .links {
    background-color: #bbd;
  }

  .dark-theme .links {
    background-color: #213;
  }


  [popover] {
    transition-timing-function: cubic-bezier(.2,.1,0,1);
    transition:
      opacity 0.5s,
      transform 0.5s cubic-bezier(.2,.1,0,1);,
      display 0.5s allow-discrete;

    opacity: 0;
    transform: translateY(3rem);
  }

  [popover]:popover-open {
    opacity: 1;
    transform: none;
  }

  @starting-style {
    [popover]:popover-open { 
      opacity: 0;
      transform: translateY(-1.5rem);
    }
  }
}

/* Responsive Styles niinku mobiilille you know */
@media (max-width: 650px) {
  #navigation {
    width: 100vw;
    height: 100vh;
    background-color: #235a;
    backdrop-filter: blur(22px); /* Adjust the blur amount as needed */
    border: none;
  }



  #toggles {
    display: flex;
    justify-content: flex-end; /* Align items to the right */
    position: relative; /* Positioning context for absolute elements */
  }

  #toggles > h3 {
    position: absolute; /* Positioning the h3 absolutely */
    left: 50%; /* Centering it */
    transform: translateX(-50%); /* Adjust for its own width */
    margin: 0; /* Remove default margin */
    text-align: center; /* Center text within the h3 */
    color: #eef;
  }

  #toggles > #burgerbutton {
    background-color: #444;
    padding: 12px;
    border-radius: 4px;
    transition-duration: 1.2s;
    transition-timing-function: ease;
    box-shadow: 2px 4px 4px #0014;
    font-size: 16px;
  }
  #toggles > #burgerbutton:hover {
    box-shadow: 0 8px 16px #0014;
  }

  .links {
    display: flex;
    margin-top: 12vh;
  }
  .links > ul {
    margin: 0 auto;
    padding: 0;
  }

  .links > ul > li {
    width: 128px;
    list-style-type: none; /* Remove bullet points */
    padding: 8px 0; /* Initial padding for top and bottom */
    text-align: center;
    transition:
      transform 0.3s ease,
      opacity 0.3s ease; /* Transition for transform and opacity */
  }
  .links > ul > li {
    box-sizing: inherit;
    transition-property: padding, margin, letter-spacing, opacity,
      box-shadow;
    transition-duration: 1.2s;
    transition-timing-function: ease;
    cursor: pointer;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    font-family: lato, serif;
  }

  .links > ul > li > a {
    text-decoration: none;
    color: #eef;
  }
  .links > ul > li:hover {
    letter-spacing: 2px;
    opacity: 0.6;
    box-shadow: 2px 2px 2px 2px;
  }

  [popover] {
    transition:
      opacity 0.3s,
      transform 0.3s cubic-bezier(.2,.5,0,1),
      display 0.3s allow-discrete;
    opacity: 0;
    transform: translateY(0rem);
  }

  [popover]:popover-open {
    opacity: 1;
    transform: none;
  }

  @starting-style {
    [popover]:popover-open {
      opacity: 0;
      transform: translateY(-1.5rem);
    }
  }
}
