:root {
  --nature-bg: #f1f8ff;
  --nature-bg-alt: #e0f8ea;
  --nature-panel: #ffffff;
  --nature-accent: #22c55e;
  --nature-accent-soft: rgba(34, 197, 94, 0.15);
  --nature-accent-strong: #16a34a;
  --nature-text: #064e3b;
  --nature-muted: #64748b;
  --nature-warm: #d97706;
  --font-heading: 'Nunito', 'Poppins', system-ui, sans-serif;
  --font-body: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 0% 0%, #bbf7d0 0, transparent 45%),
    radial-gradient(circle at 100% 0%, #bfdbfe 0, transparent 45%),
    radial-gradient(circle at 0% 100%, #fef3c7 0, transparent 40%),
    var(--nature-bg);
  color: var(--nature-text);
}

h1, h2, h3, .navbar-brand, .font-heading {
  font-family: var(--font-heading);
}

.bg-nature-dark {
  background: transparent;
  color: var(--nature-text);
}

/* Contenuto principale: testo scuro su sfondo chiaro (evita bianco su bianco) */
main {
  color: var(--nature-text);
}

/* Pannelli/card bianchi: testo sempre leggibile */
.bg-nature-panel {
  color: var(--nature-text);
}
.bg-nature-panel .text-light,
.bg-nature-panel .form-select.text-light,
.bg-nature-panel .form-control.text-light {
  color: var(--nature-text) !important;
}
.bg-nature-panel .list-group-item:not(.active) {
  color: var(--nature-text);
  border-color: rgba(34, 197, 94, 0.35);
}
.bg-nature-panel .list-group-item.active {
  background: var(--nature-accent-strong);
  color: #fff;
  border-color: var(--nature-accent-strong);
}
.bg-nature-panel .badge.bg-outline-light,
.bg-nature-panel .badge.text-light {
  color: var(--nature-text) !important;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.bg-nature-panel h1,
.bg-nature-panel h2,
.bg-nature-panel h3,
.bg-nature-panel h4,
.bg-nature-panel h5,
.bg-nature-panel h6,
.bg-nature-panel .form-label {
  color: var(--nature-text);
}
.bg-nature-panel .text-secondary {
  color: var(--nature-muted) !important;
}
.bg-nature-panel .btn-outline-light {
  color: var(--nature-text);
  border-color: rgba(34, 197, 94, 0.5);
}
.bg-nature-panel .btn-outline-light:hover {
  color: var(--nature-accent-strong);
  border-color: var(--nature-accent-strong);
  background: rgba(34, 197, 94, 0.08);
}
.bg-nature-input {
  color: var(--nature-text) !important;
}

.bg-nature-nav {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.bg-nature-panel {
  background: var(--nature-panel);
  border-radius: 1.4rem;
  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(148, 163, 184, 0.15);
}

.bg-nature-input {
  background-color: #f9fafb;
}

.text-nature-accent {
  color: var(--nature-accent-strong);
}

.btn-nature-accent {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  border: none;
  color: #064e3b;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.35);
}

.btn-nature-accent:hover {
  filter: brightness(1.05);
  color: #022c22;
  box-shadow: 0 12px 30px rgba(22, 163, 74, 0.45);
}

.letter-spacing-wide {
  letter-spacing: 0.12em;
}

.pointer {
  cursor: pointer;
}

.top-4 {
  top: 1.5rem;
}

.site-footer {
  background: rgba(241, 245, 249, 0.95);
}
.footer-eu-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.card {
  border-radius: 1.4rem;
}

.card-body {
  padding: 1.25rem 1.35rem;
}

.navbar-brand span {
  text-shadow: 0 0 14px rgba(74, 222, 128, 0.6);
}

.form-select,
.form-control {
  color: var(--nature-text);
}

/* Drag & drop upload */
.upload-dropzone {
  border: 1px dashed rgba(34, 197, 94, 0.6);
  border-radius: 0.9rem;
  padding: 1.2rem;
  background: rgba(15, 23, 42, 0.02);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.upload-dropzone.drag-over {
  border-color: var(--nature-accent-strong);
  background: rgba(34, 197, 94, 0.08);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
}

/* Anteprima audio in manage_sounds.php */
.manage-sound-preview audio.manage-sound-player {
  border-radius: 0.5rem;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(241, 248, 255, 0.9);
}
.manage-sound-preview audio.manage-sound-player::-webkit-media-controls-panel {
  background: rgba(34, 197, 94, 0.08);
}

.form-select:focus,
.form-control:focus {
  border-color: var(--nature-accent-strong);
  box-shadow: 0 0 0 0.15rem rgba(34, 197, 94, 0.25);
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.35rem;
  transition: transform 0.15s ease;
}

details[open] summary::before {
  transform: rotate(90deg);
}

/* Gallery: pulsante immagine e modal lightbox */
.gallery-image-btn {
  cursor: pointer;
  display: block;
}
.gallery-image-btn:focus {
  outline: none;
  box-shadow: none;
}
.gallery-thumb {
  transition: opacity 0.2s ease;
}
.gallery-image-btn:hover .gallery-thumb {
  opacity: 0.9;
}
#galleryModal .modal-content {
  border-radius: 1.2rem;
  overflow: hidden;
}
#galleryModal .modal-header {
  background: rgba(8, 35, 24, 0.06);
}
#galleryModal .modal-body {
  background: var(--nature-panel);
}
#galleryModal #galleryModalCaption {
  background: rgba(0, 0, 0, 0.03);
}

/* Frontend Home: card hover (legacy) */
.card-hover-nature {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover-nature:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(34, 197, 94, 0.2);
}

/* ========== Home WOW: hero + cards ========== */
.home-hero {
  position: relative;
  padding: 3rem 0 3.5rem;
  margin: -0.5rem -0.5rem 2rem -0.5rem;
  overflow: hidden;
  background: linear-gradient(145deg, #0d2818 0%, #134e2a 35%, #166534 70%, #22c55e 100%);
  color: #fff;
  box-shadow: 0 8px 32px rgba(6, 78, 59, 0.25);
}
.home-hero-shape {
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  height: 120px;
  background: var(--nature-bg);
  transform: skewY(-2deg);
  pointer-events: none;
}
.home-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}
.home-hero-badge {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.75rem;
}
.home-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
.home-hero-title-accent {
  color: #86efac;
  text-shadow: 0 0 30px rgba(134, 239, 172, 0.3);
}
.home-hero-lead {
  font-size: 1.05rem;
  opacity: 0.95;
  max-width: 32rem;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
}
.btn-hero-cta {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: #064e3b;
  background: #fff;
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.2);
  color: #022c22;
}

.home-cards-wrap {
  margin-top: 0.5rem;
}
.home-card-col {
  animation: homeCardFadeIn 0.5s ease backwards;
}
.home-card-col:nth-child(1) { animation-delay: 0.05s; }
.home-card-col:nth-child(2) { animation-delay: 0.12s; }
.home-card-col:nth-child(3) { animation-delay: 0.19s; }
.home-card-col:nth-child(4) { animation-delay: 0.26s; }
@keyframes homeCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-card-link {
  display: block;
  color: inherit;
}
.home-card {
  background: var(--nature-panel);
  border-radius: 1.25rem;
  color: var(--nature-text);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(34, 197, 94, 0.12);
}
.home-card-link:hover .home-card {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(34, 197, 94, 0.2);
}
.home-card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--nature-text);
}
.home-card-desc {
  font-size: 0.9rem;
  color: var(--nature-muted);
  margin: 0;
  line-height: 1.4;
}
.home-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.25s ease;
}
.home-card-link:hover .home-card-icon {
  transform: scale(1.08);
}
.home-card-icon-1 { background: linear-gradient(135deg, #16a34a, #22c55e); box-shadow: 0 8px 24px rgba(22, 163, 74, 0.35); }
.home-card-icon-2 { background: linear-gradient(135deg, #0d9488, #14b8a6); box-shadow: 0 8px 24px rgba(13, 148, 136, 0.35); }
.home-card-icon-3 { background: linear-gradient(135deg, #d97706, #f59e0b); box-shadow: 0 8px 24px rgba(217, 119, 6, 0.35); }
.home-card-icon-4 { background: linear-gradient(135deg, #7c3aed, #8b5cf6); box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35); }

.home-cta-block {
  margin-top: 0.5rem;
}
.home-cta-text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--nature-text);
}
.btn-nature-accent {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-nature-accent:hover {
  transform: translateY(-1px);
}

@media (max-width: 575.98px) {
  .home-hero { padding: 2rem 0 2.5rem; }
  .home-hero-title { font-size: 1.5rem; }
}

/* ========== Pagine interne: hero e card più wow (stessa larghezza centrata dell'header) ========== */
.page-hero {
  background: linear-gradient(135deg, #134e2a 0%, #166534 50%, #22c55e 100%);
  color: #fff;
  padding: 1.75rem 0 2rem;
  margin-bottom: 2rem;
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px rgba(22, 163, 74, 0.2);
}
.page-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-left: 1rem;
  padding-right: 1rem;
}
.page-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 800;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
  text-align: center;
}
.page-hero-lead {
  font-size: 0.95rem;
  opacity: 0.95;
  margin: 0;
  text-align: center;
}
.page-hero-with-img {
  background-size: cover;
  background-position: center;
  background-color: #134e2a;
  border-radius: 1.25rem;
}
.page-hero-with-img .page-hero-inner {
  background: linear-gradient(90deg, rgba(19, 78, 42, 0.92) 0%, rgba(19, 78, 42, 0.75) 100%);
  padding: 1.75rem 1rem 2rem;
  border-radius: 1.25rem;
  text-align: center;
}

.activity-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  border-radius: 1.25rem;
}
.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}
.activity-card-thumb {
  height: 140px;
  object-fit: cover;
  width: 100%;
  background: linear-gradient(135deg, #bbf7d0, #86efac);
}
.sound-card {
  border-left: 4px solid var(--nature-accent-strong);
  transition: box-shadow 0.2s ease;
}
.sound-card:hover {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}
.sound-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gallery-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 1.25rem;
  overflow: hidden;
}
.gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}
.gallery-card .gallery-thumb { height: 200px; }

.dash-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 1.25rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}
.dash-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.15);
  color: inherit;
}
.dash-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 0.75rem;
}
.dash-card-icon-1 { background: linear-gradient(135deg, #16a34a, #22c55e); }
.dash-card-icon-2 { background: linear-gradient(135deg, #0d9488, #14b8a6); }
.dash-card-icon-3 { background: linear-gradient(135deg, #d97706, #f59e0b); }
.dash-card-icon-4 { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.dash-card-icon-5 { background: linear-gradient(135deg, #dc2626, #ef4444); }
.dash-card-icon-6 { background: linear-gradient(135deg, #0891b2, #06b6d4); }

.article-hero {
  background: linear-gradient(135deg, #134e2a 0%, #166534 100%);
  color: #fff;
  padding: 2rem 1rem;
  margin-bottom: 2rem;
  border-radius: 1.25rem;
  text-align: center;
}
.article-hero .breadcrumb { justify-content: center; }
.article-hero-title { font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.25rem, 3vw, 1.6rem); margin: 0; }
.article-hero-meta { font-size: 0.85rem; opacity: 0.9; margin-top: 0.35rem; }

.bg-success-subtle { background-color: rgba(34, 197, 94, 0.12); }
.text-success-emphasis { color: #15803d; }
.border-success-subtle { border-color: rgba(34, 197, 94, 0.35); }
.alert-outline-light { color: inherit; }

/* ========== Manuale: layout figo e semplice ========== */
.manual-wrap {
  padding-bottom: 3rem;
}
.manual-hero {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 50%, #4ade80 100%);
  color: #fff;
  padding: 2.5rem 1rem 3rem;
  margin-bottom: 2rem;
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px rgba(22, 163, 74, 0.25);
  text-align: center;
}
.manual-hero-inner {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.manual-hero-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}
.manual-hero-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.manual-hero-lead {
  font-size: 1.05rem;
  opacity: 0.95;
  margin: 0;
  line-height: 1.5;
}
.manual-body {
  margin-top: -0.5rem;
}
.manual-nav {
  padding-top: 0.25rem;
}
.manual-nav-title {
  color: var(--nature-muted);
  margin-bottom: 0.75rem;
}
.manual-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.manual-nav-list li {
  margin-bottom: 0.25rem;
}
.manual-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.85rem;
  color: var(--nature-text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease;
  border: 1px solid transparent;
}
.manual-nav-link:hover {
  background: rgba(34, 197, 94, 0.1);
  color: var(--nature-accent-strong);
}
.manual-nav-link.active {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.2), rgba(34, 197, 94, 0.15));
  color: var(--nature-accent-strong);
  font-weight: 600;
  border-color: rgba(34, 197, 94, 0.35);
}
.manual-nav-num {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.2);
  color: var(--nature-accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.manual-nav-link.active .manual-nav-num {
  background: var(--nature-accent-strong);
  color: #fff;
}
.manual-nav-text {
  flex: 1;
  line-height: 1.3;
}
.manual-empty {
  padding: 3rem 1rem;
  text-align: center;
}
.manual-article {
  background: var(--nature-panel);
  border-radius: 1.25rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(148, 163, 184, 0.12);
  overflow: hidden;
  color: var(--nature-text);
}
.manual-article-header {
  padding: 2rem 2rem 0;
  border-left: 4px solid var(--nature-accent-strong);
  padding-left: 1.25rem;
}
.manual-article-meta {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nature-muted);
  display: block;
  margin-bottom: 0.35rem;
}
.manual-article-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  color: var(--nature-text);
}
.manual-prose {
  padding: 1.5rem 2rem 2rem;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--nature-text);
  max-width: 42em;
}
.manual-prose p {
  margin-bottom: 1rem;
}
.manual-prose p:last-child {
  margin-bottom: 0;
}
.manual-article-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem 1.75rem;
  border-top: 1px solid rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.04);
}
.manual-prev,
.manual-next {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--nature-accent-strong);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.manual-prev:hover,
.manual-next:hover {
  opacity: 0.85;
  color: var(--nature-accent-strong);
}
.manual-next {
  margin-left: auto;
}
@media (max-width: 991.98px) {
  .manual-hero { padding: 1.75rem 0 2rem; }
  .manual-article-header,
  .manual-prose,
  .manual-article-footer { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* PWA install / update banner */
.pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--nature-panel);
  border-top: 1px solid rgba(34, 197, 94, 0.3);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  z-index: 1030;
}
.pwa-install-banner[hidden],
#pwa-update-banner[hidden] {
  display: none !important;
}
.pwa-install-banner .small {
  color: var(--nature-text);
}

