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

select, input[type="file"] {
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: bold;
  color: #0d2f5a;
}

/* GRID SERVIZI */
.servizi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.servizio {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.servizio:hover {
  transform: translateY(-5px);
}

.servizio img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.servizio h3 {
  margin: 1rem;
}

.servizio p {
  margin: 0 1rem 1rem 1rem;
}

/* ===== Pagina Servizi (pagine/servizi.php) ===== */

.servizi-section {
  margin-top: 0.5rem;
}

.servizi-header {
  text-align: center;
  margin-bottom: 2rem;
}

.servizi-header h2 {
  margin-bottom: 0.4rem;
}

.servizi-header p {
  max-width: 720px;
  margin: 0 auto;
  font-size: 0.98rem;
  color: #444;
  line-height: 1.6;
}

/* Card servizi più moderne */
.servizio {
  position: relative;
  padding: 1.5rem 1.4rem 1.4rem 1.4rem;
  border-radius: 14px;
  background: radial-gradient(circle at top left, #f5fbf5 0, #ffffff 40%, #f3f9f3 100%);
  border: 1px solid rgba(45,64,48,0.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.servizio:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  border-color: #5ab45a;
}

/* Header card: icona + titolo */
.servizio-top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.4rem;
}

.servizio-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(90, 180, 90, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.servizio h3 {
  margin: 0;
  color: #145c32;
}

.servizio p {
  font-size: 0.95rem;
  color: #444;
  margin: 0.5rem 0 0.7rem 0;
}

/* Elenco puntato sintetico dentro la card */
.servizio-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  color: #444;
}

.servizio-list li {
  margin-bottom: 0.25rem;
}

/* FORM */
form input, form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1rem;
}

form button {
  padding: 0.75rem 1.5rem;
  background-color: #0d2f5a;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

form button:hover {
  background-color: #103c75;
}

/* AUTH */
.auth-section {
  text-align: center;
  margin-top: 3rem;
}

.auth-section a {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: #0d2f5a;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.3s;
}

.auth-section a:hover {
  background-color: #145c32;
}

/* ====================================================================== */
/*                      NUOVA DASHBOARD A CARD – ESTESA                   */
/* ====================================================================== */

.dashboard-section {
  margin-top: 1.5rem;
}

.dashboard-header {
  text-align: center;
  margin-bottom: 2rem;
}

.dashboard-header h2 {
  margin-bottom: 0.25rem;
}

.dashboard-header p {
  color: #555;
}

/* Griglia card */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Top card: icona + badge */
.dashboard-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

/* Card base */
.dashboard-card {
  position: relative;
  display: block;
  background: radial-gradient(circle at top left, #f5fbf5 0, #ffffff 40%, #f3f9f3 100%);
  border-radius: 16px;
  padding: 1.5rem 1.5rem 1.3rem 1.5rem;
  text-decoration: none;
  color: #2d4030;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  border: 1px solid rgba(45,64,48,0.15);
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

/* Barra verticale colorata */
.dashboard-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 5px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(180deg, #2d4030, #5ab45a);
  opacity: 0.9;
}

/* Icona con emoji */
.dashboard-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(90, 180, 90, 0.1);
  font-size: 1.8rem;
}

/* Badge numerico */
.dashboard-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(90, 180, 90, 0.12);
  color: #145c32;
  border: 1px solid rgba(90, 180, 90, 0.6);
  box-shadow: 0 0 0 1px rgba(90, 180, 90, 0.18);
}

/* Variante chiara per logout */
.dashboard-card-badge-light {
  background: rgba(213, 80, 80, 0.1);
  color: #a52828;
  border-color: rgba(213, 80, 80, 0.6);
  box-shadow: 0 0 0 1px rgba(213, 80, 80, 0.18);
}

.dashboard-card h3 {
  margin-bottom: 0.4rem;
  color: #145c32;
}

.dashboard-card p {
  margin: 0;
  font-size: 0.95rem;
  color: #444;
}

/* Hover con effetto "neon" verde soft */
.dashboard-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 10px 24px rgba(0,0,0,0.18),
    0 0 16px rgba(90, 180, 90, 0.25);
  border-color: #5ab45a;
  background: radial-gradient(circle at top left, #f9fff9 0, #ffffff 40%, #e9f6ea 100%);
}

/* Logout card */
.dashboard-card-danger {
  background: radial-gradient(circle at top left, #fff7f7 0, #fff9f9 40%, #ffecec 100%);
  border-color: rgba(165,40,40,0.5);
  color: #a52828;
}

.dashboard-card-danger::before {
  background: linear-gradient(180deg, #a52828, #d13434);
}

.dashboard-card-danger h3 {
  color: #a52828;
}

/* Hover logout con neon rosso soft */
.dashboard-card-danger:hover {
  transform: translateY(-6px);
  box-shadow:
    0 10px 24px rgba(165,40,40,0.28),
    0 0 16px rgba(209, 52, 52, 0.32);
  border-color: #d13434;
  background: radial-gradient(circle at top left, #fffafa 0, #fff7f7 40%, #ffe0e0 100%);
}

/* Disabilitata (se ti serve) */
.dashboard-card.disabled {
  opacity: 0.6;
  pointer-events: none;
  background-color: #f0f0f0;
  border-style: dashed;
  box-shadow: none;
}

/* ===== Card riepilogo sotto la dashboard ===== */

.dashboard-summary-card {
  margin-top: 2.5rem;
  padding: 1.5rem 1.5rem 1.3rem 1.5rem;
  border-radius: 16px;
  background: #f9fdf9;
  border: 1px solid rgba(45,64,48,0.18);
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.dashboard-summary-card h3 {
  margin-bottom: 0.5rem;
  color: #145c32;
}

.dashboard-summary-line {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #333;
}

/* Due colonne su desktop, una colonna su mobile */
.dashboard-summary-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.dashboard-summary-columns h4 {
  margin-bottom: 0.4rem;
  color: #2d4030;
}

.dashboard-summary-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.dashboard-summary-list li {
  display: flex;
  flex-direction: column;
  padding: 0.4rem 0.2rem;
  border-bottom: 1px dashed rgba(0,0,0,0.08);
}

.dashboard-summary-list li:last-child {
  border-bottom: none;
}

.dashboard-summary-list .ds-label {
  font-size: 0.95rem;
}

.dashboard-summary-list small {
  font-size: 0.8rem;
  color: #777;
}

.dashboard-summary-empty {
  font-size: 0.9rem;
  color: #777;
}

/* ====================================================================== */
/*                     FINE NUOVA DASHBOARD A CARD                        */
/* ====================================================================== */


/* CONTENUTI GENERALI */
.contenuto-item {
  background-color: #f4f4f4;
  padding: 1rem;
  border-radius: 10px;
  margin: 1rem 0;
}

#aggiornamenti {
  margin-top: 3rem;
}

#contenuti-dinamici .contenuto-item {
  background-color: #eef3ee;
  padding: 1rem;
  border-left: 5px solid #0d2f5a;
  border-radius: 10px;
  margin-bottom: 1rem;
}

/* CARD GRID */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* GALLERIA */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.gallery-item {
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-item img {
  max-width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s;
}

.gallery-item img:hover {
  transform: scale(1.05);
}

/* MODAL IMMAGINI */
.modal-img {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
}

.modal-img-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(255,255,255,0.3);
}

.modal-img .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
}

/* BOTTONI */
button {
  cursor: pointer;
  padding: 0.4rem 1rem;
  border: none;
  border-radius: 6px;
  background-color: #a52828;
  color: white;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #d13434;
}

/* STRUTTURA GENERALE */
nav {
  background: linear-gradient(90deg, #2d4030, #145c32);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Link di navigazione */
nav .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

nav a:hover {
  background-color: #5ab45a;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  border-color: rgba(255,255,255,0.3);
}

/* Link area membri */
.nav-login-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0,0,0,0.16);
  border-color: rgba(255,255,255,0.25);
}

.nav-login-link:hover {
  background: rgba(0,0,0,0.32);
}

.nav-login-icon {
  height: 16px;
  width: 16px;
}

/* User status (a destra) */
#user-status {
  margin-left: auto;
  color: #fff;
  font-size: 0.9rem;
}

/* Mobile nav */
.menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  margin-right: auto;
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: stretch;
  }

  .menu-toggle {
    display: block;
  }

  nav .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  nav .nav-links.active {
    display: flex;
  }

  #user-status {
    width: 100%;
    margin-left: 0;
  }
}

body.custom-body {
  background: linear-gradient(to bottom, #f0f4f0, #dfe3df);
  font-family: 'Segoe UI', sans-serif;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.logo-container {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  border-bottom: 2px solid #ccc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.logo {
  max-height: 130px;
}

.hero {
  height: 70vh;
  min-height: 380px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlay del hero */
.overlay {
  background: radial-gradient(circle at top left, rgba(0,0,0,0.65), rgba(0,0,0,0.82));
  padding: 2.5rem 2rem;
  border-radius: 24px;
  text-align: center;
  color: white;
  max-width: 720px;
  width: calc(100% - 2rem);
  box-shadow: 0 15px 40px rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
}

.hero-badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.6);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  background: rgba(0,0,0,0.35);
}

.hero h1 {
  font-size: 2.4rem;
  letter-spacing: 0.07em;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Pulsante principale hero */
.hero-cta {
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  background: linear-gradient(90deg, #5ab45a, #9edb7c);
  color: #083118;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
  filter: brightness(1.05);
}

/* Pulsante secondario hero */
.hero-secondary {
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.hero-secondary:hover {
  background: rgba(0,0,0,0.55);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.45);
}

@media (max-width: 768px) {
  .hero {
    height: auto;
    padding: 2.5rem 1rem;
  }

  .overlay {
    padding: 1.8rem 1.4rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-tagline {
    font-size: 0.95rem;
  }
}

.fade-in {
  animation: fadeIn 0.4s ease-in-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.errore-caricamento {
  color: red;
  font-weight: bold;
  text-align: center;
  margin: 2rem auto;
}

.content, .section-container {
  max-width: 1100px;
  margin: 1.5rem auto 2rem auto;
  padding: 1.25rem;
  background-color: #fff;
  border-radius: 16px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
}

footer {
  background-color: #2d4030;
  color: white;
  text-align: center;
  padding: 1.5rem 0;
  margin-top: auto;
}

.footer-small {
  font-size: 0.8rem;
  display: block;
  margin-top: 0.5rem;
  color: #ccc;
}

#chi-siamo {
  background: #eef3ee;
  padding: 4rem 1rem;
  text-align: center;
}

#servizi {
  background: #f9f9f9;
  padding: 4rem 1rem;
}

#contatti {
  background: #eef3ee;
  padding: 4rem 1rem;
}

/* ===== Pagina contatti (pagine/contatti.php) ===== */

.contatti-section {
  margin-top: 0.5rem;
}

.contatti-header {
  text-align: center;
  margin-bottom: 2rem;
}

.contatti-header h2 {
  margin-bottom: 0.4rem;
}

.contatti-header p {
  color: #444;
  line-height: 1.6;
  font-size: 0.98rem;
}

/* Miglioro le card della griglia contatti */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* Box info (già esisteva, lo affiniano) */
.contatti-info {
  background-color: #fff;
  padding: 1.6rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border: 1px solid rgba(45,64,48,0.15);
}

.contatti-info h3 {
  margin-bottom: 0.8rem;
}

.contatti-info p {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.contatti-info a {
  color: #145c32;
  font-weight: 600;
  text-decoration: none;
}

.contatti-info a:hover {
  text-decoration: underline;
}

.contatti-divider {
  border: none;
  border-top: 1px dashed rgba(0,0,0,0.12);
  margin: 1.1rem 0 1rem 0;
}

/* Card del form contatti */
.contatti-form-card {
  background: radial-gradient(circle at top left, #f5fbf5 0, #ffffff 45%, #f3f9f3 100%);
  padding: 1.6rem;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  border: 1px solid rgba(45,64,48,0.15);
  position: relative;
  overflow: hidden;
}

.contatti-form-card::before {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(90,180,90,0.25), transparent 60%);
  opacity: 0.7;
}

.contatti-form-card h3 {
  margin-bottom: 0.4rem;
  color: #145c32;
}

.contatti-form-intro {
  font-size: 0.92rem;
  color: #555;
  margin-bottom: 1rem;
}

/* layout dei campi, sfrutta già i tuoi form input/textarea */
.contatti-form-card .form-row {
  margin-bottom: 0.8rem;
}

/* Bottone invio form */
.contatti-submit-btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #5ab45a, #9edb7c);
  color: #083118;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.contatti-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  filter: brightness(1.05);
}

/* Area risposta form */
.contatti-risposta {
  margin-top: 1rem;
  font-size: 0.9rem;
}

h2 {
  color: #145c32;
  margin-bottom: 1rem;
  font-size: 2rem;
}

h3 {
  color: #2d4030;
  margin-top: 1rem;
}

form button {
  background-color: #2d4030;
}

form button:hover {
  background-color: #5ab45a;
}

/* NAV MOBILE */
nav {
  flex-wrap: wrap;
  flex-direction: row;
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

nav .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
  }

  form input, form textarea, form button {
    font-size: 0.9rem;
    padding: 0.5rem;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero {
    height: auto;
    padding: 2rem 1rem;
    text-align: center;
  }

  .overlay h1 {
    font-size: 2rem;
  }

  .overlay p {
    font-size: 1rem;
  }

  .logo {
    max-height: 80px;
  }
}

/* NEWS */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.news-box {
  background-color: #f9f9f9;
  border-left: 5px solid #2d4030;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.news-box:hover {
  transform: translateY(-5px);
}

.news-box h3 {
  margin-bottom: 0.5rem;
  color: #145c32;
}

.news-box p {
  color: #333;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.news-box small {
  color: #777;
  font-style: italic;
}

/* ===== Galleria pubblica cantieri ===== */

.galleria-section {
  margin-top: 0.5rem;
}

.galleria-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.galleria-header h2 {
  margin-bottom: 0.4rem;
}

.galleria-header p {
  max-width: 720px;
  margin: 0.5rem auto 0 auto;
  color: #444;
  line-height: 1.6;
  font-size: 0.98rem;
}

/* Box quando non ci sono cantieri */
.galleria-empty {
  padding: 1.5rem;
  border-radius: 12px;
  background: #fff7f7;
  border: 1px dashed rgba(165,40,40,0.5);
  text-align: center;
  color: #a52828;
  font-size: 0.95rem;
}

/* Griglia dei cantieri (ogni cantiere è una card) */
.galleria-cantieri-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
}

@media (min-width: 900px) {
  .galleria-cantieri-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cantiere-gallery-card {
  background-color: #f9fdf9;
  border-radius: 14px;
  padding: 1.2rem 1.2rem 1.3rem 1.2rem;
  border: 1px solid rgba(45,64,48,0.15);
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cantiere-gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  border-color: #5ab45a;
}

/* Header della card: icona + titolo + badge */
.cantiere-gallery-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.cantiere-gallery-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(90, 180, 90, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.cantiere-gallery-info h3 {
  margin: 0;
  color: #145c32;
}

.cantiere-photo-badge {
  display: inline-flex;
  margin-top: 0.2rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(90, 180, 90, 0.08);
  color: #145c32;
  border: 1px solid rgba(90, 180, 90, 0.55);
}

/* Descrizione cantiere */
.cantiere-gallery-desc {
  margin: 0.4rem 0 0.7rem 0;
  font-size: 0.95rem;
  color: #444;
}

/* Galleria foto pubblica */
.gallery-grid-public {
  margin-top: 0.5rem;
}

.gallery-loading {
  font-size: 0.9rem;
  color: #777;
}

/* ===== Gestione Contenuti (backoffice) ===== */

.gestione-contenuti-section {
  margin-top: 0.5rem;
}

.gestione-contenuti-header {
  margin-bottom: 1.5rem;
}

.gestione-contenuti-header h2 {
  margin-bottom: 0.4rem;
}

.gestione-contenuti-header p {
  max-width: 720px;
  font-size: 0.95rem;
  color: #444;
}

/* Griglia 2 colonne come Gestione Cantieri */
.gestione-contenuti-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 1.8rem;
}

@media (max-width: 900px) {
  .gestione-contenuti-grid {
    grid-template-columns: 1fr;
  }
}

/* Card generica gestione */
.gestione-card {
  background-color: #f9fdf9;
  border-radius: 14px;
  padding: 1.5rem 1.4rem;
  border: 1px solid rgba(45,64,48,0.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Testo di aiuto */
.gestione-contenuti-hint {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

/* Form card */
.gestione-contenuti-form-card .form-row {
  margin-bottom: 0.8rem;
}

.gestione-contenuti-submit-btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #5ab45a, #9edb7c);
  color: #083118;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.gestione-contenuti-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  filter: brightness(1.05);
}

/* Messaggi esito sotto il form */
.gestione-contenuti-messaggio {
  margin-top: 0.8rem;
  font-size: 0.9rem;
}

/* Card elenco contenuti */
.gestione-contenuti-list-header h3 {
  margin-bottom: 0.3rem;
}

/* Già hai .contenuto-item nel CSS, ma se vuoi puoi dargli un tocco in più:
   (se non ti piace, puoi commentare questo blocco) */
#elenco-contenuti .contenuto-item {
  background-color: #eef3ee;
  padding: 1rem;
  border-left: 5px solid #0d2f5a;
  border-radius: 10px;
  margin-bottom: 0.8rem;
}

/* ===== Gestione Cantieri (backoffice) ===== */

.gestione-cantieri-section {
  margin-top: 0.5rem;
}

.gestione-cantieri-header {
  margin-bottom: 1.5rem;
}

.gestione-cantieri-header h2 {
  margin-bottom: 0.4rem;
}

.gestione-cantieri-header p {
  max-width: 720px;
  font-size: 0.95rem;
  color: #444;
}

/* Griglia 2 colonne come Gestione Contenuti */
.gestione-cantieri-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 1.8rem;
}

@media (max-width: 900px) {
  .gestione-cantieri-grid {
    grid-template-columns: 1fr;
  }
}

/* Card generica (riusa stile con Gestione Contenuti) */
.gestione-card {
  background-color: #f9fdf9;
  border-radius: 14px;
  padding: 1.5rem 1.4rem;
  border: 1px solid rgba(45,64,48,0.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Testi di aiuto */
.gestione-cantieri-hint {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}

/* Form card */
.gestione-cantieri-form-card .form-row {
  margin-bottom: 0.8rem;
}

.gestione-cantieri-submit-btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #5ab45a, #9edb7c);
  color: #083118;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.gestione-cantieri-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  filter: brightness(1.05);
}

.gestione-cantieri-messaggio {
  margin-top: 0.8rem;
  font-size: 0.9rem;
}

/* Elenco cantieri */
.gestione-cantieri-list-header h3 {
  margin-bottom: 0.3rem;
}

/* Se usi .contenuto-item anche per i cantieri, puoi dare uno stile coerente */
#lista-cantieri .contenuto-item {
  background-color: #eef3ee;
  padding: 1rem;
  border-left: 5px solid #0d2f5a;
  border-radius: 10px;
  margin-bottom: 0.8rem;
}
