* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f7f4ef;
  color: #333;
}

/* HEADER */

.top-header {
  background: #7b3e1c;
  padding: 18px 20px;
  color: #fff;
}

.top-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
}

.top-header .logo img {
  height: 60px;
}

.top-header nav a {
  color: #ffeecf;
  margin: 0 12px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
}

.top-header nav a:hover {
  text-decoration: underline;
}

/* GENERALE */

.content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.hero {
  background: #7b3e1c;
  color: white;
  text-align: center;
  padding: 70px 20px 60px;
  border-radius: 0 0 15px 15px;
  margin-bottom: 25px;
}

.hero h2 {
  margin: 0 0 10px;
  font-size: 1.9rem;
}

.hero p {
  margin: 0;
  font-size: 1.1rem;
}

/* GRID CATEGORIE */

.grid {
  display: grid;
  gap: 20px;
  margin-bottom: 30px;
}

.grid-categorie {
  grid-template-columns: repeat(auto-fit, minmax(230px,1fr));
}

.card {
  background: white;
  padding: 18px 20px;
  border-radius: 10px;
  text-decoration: none;
  color: #333;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.card h3 {
  margin-top: 0;
}

.card:hover {
  background: #f3ebe3;
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* HOME ARTICLES */

.home-articles h2 {
  margin-bottom: 10px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px,1fr));
  gap: 18px;
}

.mini-article {
  background: #fff;
  padding: 14px 16px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.mini-article h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.mini-article a {
  color: #7b3e1c;
  text-decoration: none;
}

.mini-article a:hover {
  text-decoration: underline;
}

.mini-article p {
  margin: 0 0 8px;
  font-size: 0.9rem;
}

.tag {
  display: inline-block;
  background: #ffeecf;
  color: #7b3e1c;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
}

/* PAGINE E ARTICOLI */

.page h2,
.article h2 {
  margin-top: 0;
}

.page,
.article {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

.page p,
.article p {
  line-height: 1.6;
}

/* FORM CONTATTI */

.contact-form {
  margin-top: 15px;
  display: grid;
  gap: 12px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 0.95rem;
}

.contact-form button {
  background: #7b3e1c;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  width: fit-content;
}

.contact-form button:hover {
  background: #5f2e14;
}

/* ALERT */

.alert {
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.alert.success {
  background: #e3f7df;
  color: #256b1f;
}

.alert.error {
  background: #fbe3e3;
  color: #b42323;
}

/* FOOTER */

.site-footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  font-size: 0.9rem;
}

.site-footer a {
  color: #ffeecf;
  text-decoration: none;
}

/* RESPONSIVE */

@media (max-width: 700px) {
  .top-header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .top-header nav a {
    display: inline-block;
    margin: 3px 8px 0 0;
  }
}
