
:root {
  --primary: #2c3e50;
  --accent: #c59d5f;
  --bg: #f8f9fa;
  --text: #333;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Container */
.container {
  width: 90%;
  max-width: 900px;
  margin: auto;
}

.container-small {
  width: 90%;
  max-width: 400px;
  margin: auto;
}

/* Header */
.header {
  background: white;
  border-bottom: 1px solid #eee;
  padding: 20px 0;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
}

.nav {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
}

/* Card articoli */
.card {
  background: white;
  padding: 25px;
  margin: 30px 0;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  overflow: hidden;
  font-size: 1.2rem; /* 1.2 volte la dimensione predefinita */
}

.card h2 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

/* Immagini */
.card img {
  width: 100%;
  border-radius: 12px;
  display: block;
  margin: 10px auto;
}

.card img-left {
  width: 50%;
  float: left;
  margin-right: 15px;
  margin-bottom: 0px;
  margin-top: -20px;
}

/* Testo */
.card p {
  text-align: left;
  margin-bottom: 20px;
  font-size: 1.2rem; /* 1.2 volte la dimensione predefinita */
}

/* Pulsanti */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  background: var(--primary);
  color: white;
  transition: 0.3s;
}

.btn:hover {
  background: var(--accent);
}

.btn.secondary {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn.secondary:hover {
  background: var(--primary);
  color: white;
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px;
  color: #777;
}

/* Grid */
.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
  grid-gap: 16px;
  /*grid-auto-rows: minmax(180px, auto);*/
  grid-auto-flow: dense;
  padding: 1px;

  align-items: start;
}

/* ITEM semplice della griglia*/
.grid-item {
  padding: 1rem;
  font-size: 14px;
  border: 2px dotted rgb(96 139 168);
  font-weight: bold;
  text-transform: uppercase;
  color: #000000;
  background-color: #ffffff;
  border-radius: 10px;
}

/* Pezzi di grid-layout */
.span-1 {
  grid-column-end: span 2;
  grid-row-end: span 1;
}

.span-2 {
  grid-column-end: span 2;
  grid-row-end: span 2;
}

/* Pezzi di grid-layout */
.span-3 {
  grid-column-end: span 3;
  grid-row-end: span 4;
}

/* Galleria di carte nel DB */
.gallery { 
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: start;
}

/* Immagini delle carte nel DB */
.gallery img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;

  filter: blur(10px);
  transition: filter 0.3s ease;
}

.gallery img.unspoiler {
  filter: blur(0);
}

/* Pulsante "spoiler" */
.spoiler-switch {
  display: flex;
  /* align-items: center; */
  gap: 10px;
  /* justify-content: center; */
  margin: 10px 0 20px;
  cursor: pointer;
  user-select: none;
}

/* hide checkbox */
.spoiler-switch input {
  display: none;
}

/* base switch */
.slider {
  width: 44px;
  height: 24px;
  background: #b6b6b6;
  border-radius: 999px;
  position: relative;
  transition: 0.25s;
  border: 1px solid rgba(255,255,255,0.2);
}

/* knob */
.slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  background: #ffffff;
  border-radius: 50%;
  transition: 0.25s;
}

/* ON state */
.spoiler-switch input:checked + .slider {
  /* background: rgba(255,255,255,0.35); */
  background: rgb(64, 200, 80);
}

.spoiler-switch input:checked + .slider::before {
  left: 22px;
}

/* label */
.label-text {
  font-size: 14px;
  color: #000000;
  opacity: 0.9;
} 

/* Responsive */
@media (max-width: 768px) {
  .nav {
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    /* border: 2px dotted rgb(96 139 168); */
  }

  .logo {
    text-align: center;
  }
}

