﻿/* WinCoge2 Manuale — sidebar navigation */

.navigation {
  --nav-bg: #ff7d00;
  --nav-bg-deep: #e06d00;
  --nav-text: #ffffff;
  --nav-line: rgba(255, 255, 255, 0.2);

  width: 100%;
  background: linear-gradient(180deg, var(--nav-bg) 0%, var(--nav-bg-deep) 100%);
  font-family: system-ui, "Segoe UI", Tahoma, Geneva, sans-serif;
  text-transform: none;
  font-size: 13.5px;
  line-height: 1.35;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(224, 109, 0, 0.28);
  overflow: visible;
  position: relative;
  z-index: 40;
}

.navigation ul,
.navigation ul li,
.navigation ul ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.navigation > ul {
  width: 100%;
  position: relative;
}

.navigation ul li {
  position: relative;
  float: none;
}

.navigation a,
.navigation a:link,
.navigation a:visited,
.navigation a:active,
.navigation a:hover,
.navigation a:focus {
  display: block;
  padding: 0.78em 1.9em 0.78em 1.05em;
  color: var(--nav-text) !important;
  text-decoration: none !important;
  border: none;
  border-bottom: 1px solid var(--nav-line);
  font-weight: 700;
  letter-spacing: 0.01em;
  background: transparent;
  outline: none;
}

.navigation > ul > li:first-child > a {
  border-radius: 12px 12px 0 0;
}

.navigation > ul > li:last-child > a {
  border-bottom: none;
  border-radius: 0 0 12px 12px;
}

/* Solo la voce sotto il cursore (non tutta la catena) */
.navigation > ul > li > a:hover,
.navigation > ul > li > a:focus {
  background: rgba(0, 0, 0, 0.14) !important;
  color: #fff !important;
  text-decoration: none !important;
}

.navigation > ul > li:hover > a {
  background: rgba(0, 0, 0, 0.1) !important;
  color: #fff !important;
  text-decoration: none !important;
}

/* Sottomenu a destra */
.navigation ul ul {
  position: absolute;
  top: 0;
  left: 100%;
  z-index: 60;
  width: 16.5em;
  margin: 0;
  padding: 0.35rem 0;
  background: #fff;
  border: 1px solid #e2e6ea;
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(26, 31, 38, 0.16);
  display: none;
}

.navigation ul li:hover > ul,
.navigation ul li:focus-within > ul {
  display: block;
}

.navigation ul ul li {
  border: none;
}

.navigation ul ul a,
.navigation ul ul a:link,
.navigation ul ul a:visited,
.navigation ul ul a:active {
  color: #1a1f26 !important;
  font-weight: 600;
  border-bottom: none;
  padding: 0.7em 1.05em;
  border-radius: 0;
  background: transparent !important;
}

.navigation ul ul a:hover,
.navigation ul ul a:focus {
  background: #fff4eb !important;
  color: #e06d00 !important;
  text-decoration: none !important;
}

.navigation ul ul ul {
  top: 0;
  left: 100%;
}

.navigation ul li.has-sub > a:after {
  content: '\203A';
  position: absolute;
  right: 0.7em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2em;
  font-weight: 400;
  opacity: 0.9;
  color: inherit;
}

.navigation ul ul li.has-sub > a:after {
  color: #8a95a1;
}

@media (max-width: 960px) {
  .navigation {
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .navigation a {
    padding: 0.65em 1.7em 0.65em 0.9em;
    font-size: 12.5px;
  }

  .navigation ul ul {
    position: static;
    width: 100%;
    display: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.14);
    padding: 0;
  }

  .navigation ul li:hover > ul,
  .navigation ul li:focus-within > ul {
    display: block;
  }

  .navigation ul ul a,
  .navigation ul ul a:link,
  .navigation ul ul a:visited {
    color: #fff !important;
    padding-left: 1.45em;
  }

  .navigation ul ul a:hover,
  .navigation ul ul a:focus {
    background: rgba(0, 0, 0, 0.18) !important;
    color: #fff !important;
  }

  .navigation ul ul ul a {
    padding-left: 2.1em;
  }
}
