/* ================================
   RESET BASE
================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  background-color: #0d0d0d;
  color: #e5e5e5;
  line-height: 1.6;
  padding-bottom: 40px;
}

img {
  max-width: 100%;
  display: block;
}

/* ================================
   NAVBAR
================================= */
header {
  background: #111;
  padding: 15px 20px;
  border-bottom: 1px solid #222;
}

nav {
  display: flex;
  justify-content: center;
  gap: 30px;
}

nav a {
  color: #d9d9d9;
  text-decoration: none;
  font-weight: 500;
  transition: 0.2s;
}

nav a:hover {
  color: #00e0c6;
}

/* ================================
   SEZIONI
================================= */
main {
  width: 90%;
  max-width: 900px;
  margin: 40px auto;
}

h1, h2, h3 {
  color: #ffffff;
  margin-bottom: 10px;
}

p {
  margin-bottom: 15px;
}

.highlight {
  color: #00e0c6;
}

/* ================================
   HOME - HERO
================================= */
#hero {
  text-align: center;
  margin-bottom: 40px;
}

#hero h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

#hero p {
  font-size: 1.2rem;
  opacity: 0.85;
}

.img-wrapper {
  display: flex;
  justify-content: center;
}

.main-img {
  /* opzionale */
  max-width: 100%;
}


/* ================================
   ULTIMI ARTICOLI
================================= */
#ultimi-articoli {
  margin-top: 40px;
}

#ultimi-articoli h2 {
  margin-bottom: 25px;
  text-align: center;
  font-size: 1.8rem;
}

.post-list {
  display: grid;
  gap: 20px;
  margin: 20px 0;
}

.post {
  background: #161616;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #222;
  transition: 0.2s;
}

.post:hover {
  border-color: #00e0c6;
}

.post h3 a {
  text-decoration: none;
  color: #00e0c6;
  font-size: 1.1rem;
}

.post p {
  color: #c7c7c7;
  font-size: 0.9rem;
}

/* ================================
   CTA BUTTON
================================= */

.center {
  text-align: center;
  margin-top: 20px;
}

.cta {
  display: inline-block;
  padding: 10px 20px;
  background: #00e0c6;
  color: #000;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  transition: 0.2s;
  font-size: 1.1rem;
}

#cta-contatti {
  display: flex;
  flex-direction: column;
  align-items: center;   /* centra tutto orizzontalmente */
  text-align: center;    /* centra i testi dentro */
}


.cta:hover {
  background: #00c7ac;
}

/* ================================
   BLOG ESTETICO E CURATO
================================= */
.subtitle {
  opacity: 0.75;
  font-size: 1.05rem;
  margin-bottom: 35px;
}

.categorie-grid {
  display: grid;
  gap: 25px;
}

.categoria-box {
  background: #141414;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #1f1f1f;
  transition: 0.25s ease;
  box-shadow: 0 0 0px rgba(0,0,0,0.2);
}

.categoria-box:hover {
  border-color: #00e0c6;
  transform: translateY(-4px);
  box-shadow: 0 5px 15px rgba(0, 224, 198, 0.1);
}

.categoria-box h3 {
  margin-bottom: 10px;
  color: #00e0c6;
  font-size: 1.3rem;
}

.categoria-box p {
  opacity: 0.85;
  margin-bottom: 15px;
}

.categoria-btn {
  display: inline-block;
  padding: 8px 18px;
  background: #00e0c6;
  color: #000;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
  transition: 0.2s;
}

.categoria-btn:hover {
  background: #00cbb1;
}

/* Grid responsive */
@media (min-width: 700px) {
  .categorie-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}

@media (min-width: 900px) {
  .categorie-grid {
    justify-items: stretch;
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ================================
   FORM CONTATTI
================================= */
.contact-form {
  background: #161616;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #222;
}

.contact-form label {
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 6px;
  color: #e5e5e5;
}

.contact-form button {
  margin-top: 20px;
  width: 100%;
  padding: 12px;
  background: #00e0c6;
  color: #000;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
}

.contact-form button:hover {
  background: #00c7ac;
}

/* ================================
   RESPONSIVE (TABLET + DESKTOP)
================================= */
@media (min-width: 600px) {
  #hero h1 {
    font-size: 2.4rem;
  }

  .post-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .post-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.categoria-elenco .articolo-list-item {
  background: #161616;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  border: 1px solid #222;
  transition: 0.2s;
}

.categoria-elenco .articolo-list-item:hover {
  border-color: #00e0c6;
}

.categoria-elenco .articolo-list-item h3 a {
  color: #00e0c6;
  text-decoration: none;
}

.data {
  opacity: 0.6;
  font-size: 0.9rem;
  margin-top: 5px;
}

/* Badge categoria */
.categoria-tag {
  background: #00e0c6;
  color: #000;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: bold;
}

.categoria-tag:hover {
  background: #00b5a0;
  color: #000;
}

/* ================================
   FOOTER
================================= */
footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid #222;
  margin-top: 40px;
  font-size: 1.0rem;
}