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

/* SFONDO */
.bg {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  object-fit: cover;
  min-width: 100%;
  min-height: 100%;
  z-index: -1;
  opacity: 12%;
}

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

/* LINK */
a {
  text-decoration: none;
  color: inherit;
}

/* HEADER */
header {
  width: 100%;
  position: fixed;
  top: 0;
  z-index: 50;
  background-color: black;
  border-bottom-left-radius: 2rem;
  border-bottom-right-radius: 2rem;
  box-shadow: 0 2px 10px black;
  height: 100px;
}

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;
}

/* NAVBAR MOBILE */
#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;
}

/* Da desktop (>=768px) torna normale */
@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;
  }
}

/* SLIDESHOW */
.slideshow-container {
  position: relative;
  width: 100%;
  height: 65vh;
  overflow: hidden;
  margin-top: 4.5rem;
}

.slideshow-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  cursor: pointer;
  color: white;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.prev {
  left: 1rem;
}

.next {
  right: 1rem;
}

/* 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);
}

/* CONTENUTO GENERALE */
.container {
  max-width: 80%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  padding-top: 100px;
  flex: 1;
  margin-bottom: 3rem;
}

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

  .slideshow-container {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    margin-top: 4.5rem;
  }

  .lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 2rem;
  }

}

.page-cover {
  width: 100%;
  max-height: 550px;
  object-fit: cover;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  opacity: 100%;
  margin-top: 3rem;
}

.cat-banner {
  width: 100%;
  max-height: 100px;
  object-fit: cover;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  opacity: 100%;
}

h1.section-title {
  text-align: center;
  vertical-align: top;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

/* ARTICOLI */
.article-link {
  display: block;
  transition: transform 0.3s;
  margin-bottom: 2rem;
}

.article-link:hover {
  transform: scale(1.02);
  z-index: 10;
}

/* TABELLE */
.article-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.article-table td {
  padding: 0.5rem;
  vertical-align: top;
}

td.img-cell {
  width: 20%;
  vertical-align: middle;
}

td.text-cell {
  width: 73.75%;
  vertical-align: middle;
}

td.meta-cell {
  width: 31.25%;
  padding-left: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

td {
  overflow-wrap: break-word;
  word-break: break-word;
  vertical-align: top;
}

/* Immagine */
.article-img-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 0.5rem;
}

.article-img {
  height: auto;
  border-radius: 0.5rem;
  max-height: 200px;
  object-fit: contain;
}

.article-header {
  margin-bottom: 0.5rem;
}

/* Testo principale */
.article-title {
  text-align: left;
  font-size: 1.3rem;
  font-weight: bold;
  padding: 1rem 0.5rem 0 0.5rem;
  margin-bottom: 0.25rem;
  color: #fff;
  padding-left: 1rem
}

.article-subtitle {
  text-align: left;
  font-size: 1rem;
  font-style: italic;
  color: #aaa;
  padding: 0 0.5rem 0.5rem 0.5rem;
  margin-top: -0.3rem;
  padding-left: 1rem;
}

.article-text {
  text-align: justify;
  padding: 0 1rem 0 0.5rem;
  margin: 0;
  vertical-align: center;
}

.article-text {
  color: #ddd;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .article-text {
    font-size: regular;
  }

  .article-subtitle {
    text-align: center;
    font-size: 1rem;
    font-style: italic;
    color: #aaa;
    padding: 0 0.5rem 0.5rem 0.5rem;
    margin-top: -0.3rem;
    padding-left: 1rem;
  }
}

/* Info laterali (metadati) */
.article-info {
  text-align: left;
  padding: 0 1.5rem 0 0.5rem;
  border-left: 2px solid white;
  white-space: normal;
  word-break: break-word;
  width: 35%;
  box-sizing: border-box;
}

.article-info {
  vertical-align: middle !important;
  text-align: left;
}

.article-info span {
  display: block;
  margin-bottom: 0.25rem;
  width: fit-content;
}

.label {
  display: block;
  background-color: white;
  color: black;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: bold;
  margin-top: 0.5rem;
}

@media (max-width: 768px) {
  .label {
    display: inline-block;
    width: fit-content;
    height: fit-content;
    background-color: white;
    color: black;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
    margin-top: 0.5rem;
  }

  .article-img {
    height: auto;
    border-radius: 0.5rem;
    max-height: 200px;
    object-fit: contain;
    margin-bottom: 1rem;
  }
  
  /* Testo principale */
  .article-title{
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1rem 0.5rem 0 0.5rem;
    margin-bottom: 0.5em;
    color: #fff;
  }
}

.separator {
  border-top: 1px solid white;
  margin: 2rem 0;
}

.dots {
  color: red;
  font-weight: bold;
}

/* TAGS */
.tag-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.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;
}

.tag-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* LINK ED ELEMENTI INTERATTIVI */
.equip-link {
  color: white;
  cursor: pointer;
  transition: transform 0.2s, color 0.2s;
}

.equip-link:hover {
  color: #f00;
  transform: scale(1.05);
}

.desc-box {
  display: none;
  background: #222;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
  text-align: justify;
}
