* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8f8f8;
  color: #222;
  line-height: 1.5;
}
.app-header {
  background: #1b743e;
  color: white;
  text-align: center;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.app-logo {
  height: 80px;
  width: auto;
  display: block;
  margin: 0 auto;
}

.app-header h1 {
  font-size: 1.4rem;
  font-weight: 600;
}
.app-content {
  padding: 16px;
  max-width: 800px;
  margin: 0 auto;
}

/* Pulsanti notifiche: larghezza testo, compatti */
.notify-btn {
  background: #1b743e;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  display: inline-block;
  margin: 8px 8px 16px 0;
  cursor: pointer;
  transition: opacity 0.2s;
}
.notify-btn:hover {
  opacity: 0.9;
}

.news-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.news-item {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.news-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 12px;
}
.news-item h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: #111;
}
.news-item .date {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 10px;
}
.news-item p {
  color: #444;
  font-size: 1rem;
}
.loading, .error {
  text-align: center;
  padding: 32px 0;
  color: #777;
}
.error {
  color: #d32f2f;
}

/* Tabs */
.app-tabs {
  display: flex;
  background: #f0f0f0;
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.tab-btn {
  flex: 1;
  padding: 14px;
  border: none;
  background: #f0f0f0;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: background 0.2s;
}
.tab-btn:hover {
  background: #e0e0e0;
}
.tab-btn.active {
  background: #1b743e;
  color: white;
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* Contatti */
#contatti-section iframe,
#contatti-section embed {
  width: 100% !important;
  height: 280px !important;
  border: none;
  border-radius: 8px;
  margin: 12px 0;
}
#contatti-section img:nth-of-type(1),
#contatti-section img:nth-of-type(2) {
  max-height: 120px !important;
  object-fit: contain;
}
#contatti-section p,
#contatti-section div {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 12px;
}
#contatti-section a.contact-link,
#contatti-section a[href^="https://faicisltoscana.it"] {
  color: #1b743e;
  text-decoration: underline;
}
.contact-link {
  color: #1b743e;
  text-decoration: underline;
}
.territorial-buttons {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* ← allinea a sinistra */
  gap: 10px;
  margin: 12px 0;
}

.territorial-btn {
  display: inline-block; /* ← non occupa tutta la riga */
  padding: 10px 16px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 6px;
  color: #000;
  text-align: center;
  white-space: nowrap; /* ← evita a capo nel testo */
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: opacity 0.2s;
}

.territorial-btn:hover {
  opacity: 0.9;
}

/* Immagine mappa sedi: più grande su cellulare */
.sedi-map {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
  display: block;
}

/* Opzionale: forza un'altezza minima su mobile per impatto visivo */
@media (max-width: 768px) {
  .sedi-map {
    min-height: 320px;
    height: auto;
    width: 100%;
    object-fit: contain;
  }
}