@font-face {
  font-family: Manrope;
  src: url("font/Manrope,Oswald,Space_Grotesk,Tuffy/Manrope/Manrope-VariableFont_wght.ttf");
}

.bg {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 100%;
  min-height: 100%;
  z-index: -1;
  opacity: 12%;
}

body {
  background-color: black;
  color: white;
  font-family: Manrope, sans-serif;
  margin: 0;
  padding: 0;
  font-size: large;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover{
  color:red;
  transition: background 0.3s, color 0.3s;
}

header {
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 50;
  background-color: rgba(0, 0, 0, 0.9);
  border-bottom-left-radius: 2rem;
  border-bottom-right-radius: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 1);
  height: 80px;
}

/* NAV MENU */
nav ul {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  position: relative;
}

nav a {
  display: flex;
  align-items: center;
  padding: 0.5rem 0;
  transition: color 0.3s;
}

nav a:hover {
  color: red;
}

nav ul ul {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  background-color: black;
  padding: 0.5rem;
  border-radius: 0.5rem;
  min-width: max-content;
  white-space: nowrap;
  z-index: 100;
}

nav li:hover > ul {
  display: block;
}

nav ul ul li a {
  padding: 0.5rem 1rem;
  display: block;
}

/* MOBILE MENU */
#menuToggle {
  font-size: 2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 100;
}

#navMenu {
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

#navMenu ul {
  flex-direction: column;
  gap: 1rem;
}

#navMenu ul li a {
  display: block;
  padding: 0.75rem 1rem;
  color: white;
  border-radius: 0.5rem;
  transition: background 0.3s, color 0.3s;
}

#navMenu ul li a:hover {
  background: white;
  color: black;
}

/* SWITCH LINGUA */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switch span {
  font-size: 0.9rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: red;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* DESKTOP MENU */
@media (min-width: 768px) {
  #navMenu {
    position: static;
    width: auto;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  #navMenu ul {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
  }

  #navMenu ul li a {
    padding: 0.5rem 0;
    background: none;
    color: white;
  }

  #navMenu ul li a:hover {
    background: none;
    color: red;
  }
}

/* CONTAINER */
.container {
  max-width: 90%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  padding-top: 100px;
}

@media (max-width: 768px) {
  .container {
    max-width: 80%;
    padding: 1rem;
    padding-top: 100px;
  }
}

/* ARTICOLO */
.article-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.article-subtitle {
  font-size: 1rem;
  font-weight: bold;
  font-style: italic;
  margin-bottom: 1rem;
  color:grey;
}

/* --- METADATI (DATA, LUOGO) --- */
.article-meta {
  font-size: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  line-height: 1.6;
  color: #ddd;
}

.fullscreen-image {
  height: 100%;
  overflow: hidden;
  margin-top: 3rem;
}

.fullscreen-image img {
  width: 60%;
  height: 100%;
  object-fit: cover;
  margin: auto;
  border-radius: 1rem;
}

/* --- LAYOUT ORIZZONTALE --- */
.horizontal-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: 4rem;
  margin-bottom: 4rem;
}

.horizontal-layout .article-img {
  width: 50%;
  height: auto;
  object-fit: cover;
  border-radius: 1rem;
}

.horizontal-layout .article-text {
  text-align: justify;
  font-size: 1.1rem;
  line-height: 1.8;
  hyphens: auto;
}

/* --- LAYOUT VERTICALE --- */
.vertical-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 4rem;
  margin-bottom: 4rem;
}

.vertical-layout .article-header {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 1.5rem;
}

.vertical-layout .article-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 1rem;
}

.vertical-layout .article-text {
  text-align: justify;
  font-size: 1.1rem;
  line-height: 1.8;
  hyphens: auto;
}

/* --- LAYOUT SENZA IMMAGINE --- */
.article-layout.no-img-layout {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

.article-layout.no-img-layout .article-title {
  font-size: 2.5rem;
  text-align: center;
}

.article-layout.no-img-layout .article-text {
  width: 100%;
  text-align: justify;
  margin-bottom: 1rem;
  margin-top: 2.5rem;
  hyphens: auto;
}

.article-layout.no-img-layout .article-meta {
  font-size: 1rem;
  color: #ccc;
  text-align: center;
  margin-top: 2rem;
}

/* --- PULSANTI TAG / DOWNLOAD --- */
.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.tag-btn {
  padding: 0.5rem 1.5rem;
  border: 1px solid white;
  background-color: transparent;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  outline: none;
  box-sizing: border-box;
}

.tag-btn:hover,
.tag-btn.active {
  background-color: white;
  color: black;
  border: 1px solid white;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .vertical-layout {
    grid-template-columns: 1fr;
  }

  .vertical-layout .article-img {
    max-width: 100%;
    margin: 1.5rem auto 0;
  }

  .horizontal-layout .article-img {
    max-height: 300px;
  }

  .article-layout.no-img-layout .article-title {
    font-size: 1rem;
    text-align: center;
  }

  .article-title {
    font-size: 1.75rem;
  }

  .article-subtitle {
    font-size: 1rem;
    font-weight: bold;
    color: grey;
    font-style: italic;
    margin-bottom: 1rem;
  }
}

/*INDICI PUBBLICAZIONI*/
.dettaglio-opera {
  border-bottom: 1px solid #e1e1e1;
  width: 100%;
}
.dettaglio-opera tr {
  border-top: 1px solid #e1e1e1;
}
.dettaglio-opera tr.even {
  background: #fdfdfd;
}
.dettaglio-opera tr th {
  padding: 8px 10px 8px;
  border-right: 0.5px solid #e1e1e1;
  border-left: 0.5px solid #e1e1e1;
}
.dettaglio-opera tr td {
  padding: 8px 10px 8px;
  border-right: 0.5px solid #e1e1e1;
  border-left: 0.5px solid #e1e1e1;
}
.dettaglio-opera tr td:first-child {
  width: auto;
}
