:root{
  --bg:#ffffff; /*colore background body*/
  --bg-card:#f4f6ff; /*colore background header*/
  --text:#1c1c1e; /*colore testo*/

  --primary:#bffe2c66; /*colore box bottoni*/
  --primary-light:#063b8034; /*colore hover bottoni*/

  --link:#1b1b1b97; /*colore link*/
  --link-hover:#rgb(22, 49, 87); /*hover badge github*/

  --border:#d4d4d4; /*colore linee del sito*/
  --muted:#000000; /*colore titoli in about us*/

  --primary-hover-text:#000000; /*colore testo*/
  --primary-hover-bg: #063b8034; /*hover immagini*/

  --download-bottone-c: #8c8c8c;
  --download-hover: #000000;

  --highlight-bg:#ff00dd;
  --highlight-color:#ff00dd; 

  --radius:8px;
  --transition:.20s ease;

}

@media (prefers-color-scheme: dark) {
  :root:not(.light-mode) {

    /* DARK MODE PROFESSIONALE */
  --bg:#131313; /*colore background body*/
  --bg-card:#1d1d1d; /*colore background header*/
  --text:#f0f0f0; /*colore testo*/

  --primary:#bffe2c5a; /*colore box bottoni*/
  --primary-light:#c5c5c56b; /*colore hover bottoni*/

  --link:#afafaf; /*colore link*/
  --link-hover:#ffffff; /*hover badge github*/

  --border:#54545495; /*colore linee del sito*/
  --muted:#ffffff; /*colore titoli in about us*/

  --primary-hover-text:#ffffff; /*colore testo*/
  --primary-hover-bg: #999999c3; /*hover immagini*/

  --highlight-bg:#ff00dd;
  --highlight-color:#ff00dd; 

  }
}
 
:root.dark-mode {

  /* DARK MODE F */
  --bg:#131313; /*colore background body*/
  --bg-card:#1d1d1d; /*colore background header*/
  --text:#f0f0f0; /*colore testo*/

  --primary:#bffe2c5a; /*colore box bottoni*/
  --primary-light:#c5c5c56b; /*colore hover bottoni*/

  --link:#afafaf; /*colore link*/
  --link-hover:#ffffff; /*hover badge github*/

  --border:#54545495; /*colore linee del sito*/
  --muted:#ffffff; /*colore titoli in about us*/

  --primary-hover-text:#ffffff; /*colore testo*/
  --primary-hover-bg: #999999c3; /*hover immagini*/

  --download-bottone-c: #7a7a7a;
  --download-hover: #ffffff;

  --highlight-bg:#ff00dd;
  --highlight-color:#ff00dd; 

}


html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  width: 92%;
  margin: auto;
  padding: 0.5rem 0;
}
#docs-section,
#about-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}
#sections-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 auto;
}
#sections-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

* {
  margin:0;padding:0;box-sizing:border-box;
  font-family:"Inter",system-ui,sans-serif
}
body {
  background:var(--bg);
  color:var(--text);
  line-height:1.55;
}
header {
  padding: 1.5rem 0 0.5rem;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
nav {
  display:flex;
  justify-content:space-between;
  align-items:center;
  max-width: 1400px;
  width: 92%;
  margin: 0 auto;
}
#header-logo {cursor: default;pointer-events: none;}
#header-logo img {
  height: 4rem;
  width: auto;
  display: block;
}
nav ul {
  list-style:none;
  display:flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
nav a {
 text-decoration:none;
 padding: .4rem .8rem;
 border-radius:var(--radius);
 color:var(--text);
 font-weight:500;
 font-size: .9rem;
 transition:var(--transition);
 cursor:pointer;
}
nav a:hover {
  background:var(--primary-light);
  color:var(--primary)
}
nav a.active {
  background:var(--primary);
  color:#fff!important
}

.theme-wrapper {
  position: relative;
}

#theme-button {
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
  transition: transform .15s ease, opacity .15s ease, color .15s ease;
}

#theme-button:hover {
  color: var(--primary);
  transform: translateY(-1px);
  background: transparent;
}

#theme-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

.theme-menu {
  position: absolute;
  right: -0.6em;
  top: 100%;
  margin-top: 0.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,0.15);
  min-width: 140px;
  z-index: 20;
}
.theme-menu > div {
  padding: .55rem .8rem;
  cursor: pointer;
  font-size: .9rem;
  transition: var(--transition);
  white-space: nowrap;
  text-align: right;
}
.theme-menu > div:hover {
  background: var(--primary-light);
  color: var(--primary);
}

#search-container {margin:1rem 0 .7rem}
#document-search {
 width:100%;
 padding:.8rem 1rem;
 border-radius:var(--radius);
 border:1px solid var(--border);
 background:var(--bg-card);
 font-size: 1rem;
}
#document-search:focus {
 border-color:var(--primary);
 outline:none;
 box-shadow:0 0 0 3px var(--primary-light);
}

.section-filters {
 display:flex;
 flex-wrap:wrap;
 gap:.6rem;
 margin: 2rem 0 1.2rem;
}
.filter-chip {
 padding: .35rem .75rem;
 border:1px solid var(--border);
 background:var(--bg-card);
 border-radius:999px;
 font-size: .85rem;
 cursor:pointer;
 transition:var(--transition);
}
.filter-chip:hover {
  border-color:var(--primary);
  background:var(--primary-light);
  color:var(--primary)
}
.filter-chip.active {
  background:var(--primary);
  color:#fff;
  border-color:var(--primary)
}

ul {list-style:none;margin:0;padding:0;}
.folder-content.collapsed {display:none}

.folder-toggle {
 cursor:pointer;
 padding:7px 4px;
 font-weight:600;
 display:flex;
 align-items:center;
 gap:6px;
 color:var(--text);
 background:none;
 border:none;
 border-radius:6px;
 transition:var(--transition);
}
.folder-toggle:hover {
 background:var(--primary-light);
 color:var(--primary);
}
.folder-toggle::before {
 content:"▼";
 font-size:.92rem;
 opacity:.6;
 transition:var(--transition);
}
.folder-toggle.collapsed::before {content:"▶"}

.folder-content {
 margin-left: 0.4rem;
 padding-left: 0.4rem;
 border-left: 1px solid var(--border);
}

.pdf_row {
 display:flex;
 justify-content:space-between;
 align-items:center;
 padding: 8px 0;
 border-bottom:1px dashed var(--border);
 transition:var(--transition);
}
.pdf_row:hover {background:var(--primary-light);}

.file-name {
 text-decoration:none;
 color:var(--text);
 font-size:.95rem;
 display:flex;
 align-items:center;
 gap:6px;
}
.file-name:hover {color:var(--primary)}
.icon-pdf {
 width:15px;
 height:15px;
 opacity:.9;
}

.download-button {
  text-decoration: none;
  opacity: 1;
  color: var(--download-bottone-c);
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.download-button:hover {
  color: var(--download-hover);

}

.download-button::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px; 
  background-color: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>') no-repeat center / contain;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>') no-repeat center / contain;
  padding-right: 8px;
}

.dark-mode .download-button {
  color: #e8e8ee;
  color: var(--download-bottone-c);
}

.dark-mode .download-button:hover {
  color: var(--download-hover);
}

.signed-badge {
 background:var(--primary);
 color:white;
 padding:1px 6px;
 font-size:.75rem;
 border-radius:6px;
 margin-left:4px;
}

mark {
 background:var(--highlight-bg);
 color:var(--highlight-color);
 padding:1px 2px;
 border-radius:4px;
}

.about-info-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 0rem;
  margin: 1rem 1rem 1rem 1rem;
}

.about-intro {
  font-size: 0.95rem;
  text-align: center;
  margin: 0 auto 1.5rem auto;
  max-width: 65em;
  line-height: 1.6;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}
.contact-links {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  font-size: .92rem;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  text-align: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.contact-links p { margin: 0; }
.contact-links p strong {font-weight:500;color:var(--muted);}

.team-intro-title{
  font-size: 1rem;
  font-weight: 450;
  margin: 2rem 0 .8rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  padding-top: 0.2em;
  margin-top:  0.1em;
  margin-bottom: 0rem;
}

.team-table {
 width:100%;
 margin:0 auto 2rem;
 border-collapse:collapse;
 font-size: .85rem;
 text-align:left;
}
.team-table td {
 padding: .35rem 0.3rem;
 border-bottom:1px dashed var(--border);
}
.team-table img {
 width:32px;
 height:32px;
 border-radius:50%;
 object-fit:cover;
 transition: transform .2s ease;
 vertical-align: middle;
}
.team-table tr:hover img {transform:scale(1.09)}
.team-table a,
.contact-links a {
 color:var(--link);
 font-weight:500;
 text-decoration:none;
 transition:.2s ease;
}
.team-table a:hover,
.contact-links a:hover {
 color:var(--link-hover);
 text-decoration:underline;
}

footer {
 text-align:center;
 color:var(--muted);
 font-size:.85rem;
 padding: 1.5rem 0 1rem;
}

.dark-mode #document-search {
  color: var(--text);
}

.github-icon-link svg {
  transition: .2s ease;
  vertical-align: middle;
}

.github-icon-link:hover svg {
  color: var(--link-hover);
  transform: scale(1.1);
}

nav a:hover {
    color: var(--primary-hover-text);
}

.file-name:hover {
    color: var(--primary-hover-text);
}

.folder-toggle:hover {
    color: var(--primary-hover-text);
}

.pdf_row:hover .file-name {
    color: var(--primary-hover-text);
}

.team-table a:hover {
    color: var(--primary-hover-text);
}

.contact-links a:hover {
    color: var(--primary-hover-text);
}

#theme-button:hover {
    background: var(--primary-hover-bg);
    color: var(--primary-hover-text);
}

#theme-menu div:hover {
    background: var(--primary-hover-bg);
    color: var(--primary-hover-text);
    cursor: pointer;
}

.filter-chip:hover {
    background: var(--primary-hover-bg);
    color: var(--primary-hover-text);
}

.filter-chip.active {
    background: var(--primary);
    color: var(--primary-hover-text);
}

nav a.active {
    color: var(--primary-hover-text) !important;
}

.hidden {display:none!important;}
