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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    background: #f5f5f5;
    color: #222;
}

.site-header {
    position: sticky;   /* header sticky */
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #ddd;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    color: #1c4f82;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.main-nav a:hover {
    color: #1c4f82;
}


.badge {
  text-align: center;
  border: 1px solid #065F46;
  color: #000;;
  background: #F3FEF7;
  border-radius: 999px;
  font-size: 10px;
  padding: 6px 10px;
}

.badge.count-firme {
    font-size: 15px;
    margin-top: 0;
    /*max-width: 150px;*/
}

.badge.count-firme.accent{
    background-color: #F29237;
}

.badge.count-firme.accent:hover{
    background-color: #E20613;  
    font-style: !important;  
}



.site-main {
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 0 1rem 2rem;
    background: transparent;
    border-radius: 8px;
   /* box-shadow: 0 2px 6px rgba(0,0,0,0.06); */
}

.site-footer {
    margin-top: 2rem;
    padding: 1.5rem 1rem;
    background: #222;
    color: #eee;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    font-size: 0.9rem;
}

/* tipografia base */

h1, h2, h3 {
    margin-bottom: 0.5rem;
    color: #1c4f82;
}

p {
    margin-bottom: 0.8rem;
}

.lead {
    font-size: 1.05rem;
    font-weight: 500;
}

.notice {
    background: #fff7d1;
    border-left: 4px solid #d39e00;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
}

.btn-primary {
    background: #1c4f82;
    color: #fff;
}

.btn-primary:hover {
    background: #163c63;
}

.mozione{
    width: 450px;
    height: auto;
}

/* =========================================================
   FORM
   ========================================================= */
.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.input,
.textarea,
select {
  background: var(--panel);
  border: 1px solid grey;
  color: var(--text);
  padding: 12px;
  border-radius: 12px;
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 6px;
  color: var(--muted);
}

.notice {
  font-size: 12px;
  color: var(--muted);
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.disabled {
  opacity: .6;
  cursor: not-allowed;
}


.privacy-note {
    font-size: 0.8rem;
    color: #555;
    margin-top: 0.3rem;
}

/* overlay conferma / errore */

.overlay-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.overlay-box {
    background: #ffffff;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    position: relative;
}

.overlay-box.success {
    border-left: 5px solid #2e7d32;
}

.overlay-box.error {
    border-left: 5px solid #c62828;
}

.overlay-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.overlay-message {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.overlay-close {
    position: absolute;
    top: 0.4rem;
    right: 0.6rem;
    font-size: 1.1rem;
    cursor: pointer;
    border: none;
    background: transparent;
}

/* admin firme */

.admin-controls {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #f5f5f5;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.admin-controls h2 {
    margin-bottom: 0.5rem;
}

.admin-controls .cols {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    font-size: 0.9rem;
}

.admin-controls .cols label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.admin-controls .buttons {
    margin-top: 0.75rem;
}

.admin-controls .buttons .btn {
    margin-right: 0.5rem;
}

.table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    border: 1px solid #ddd;
    padding: 0.4rem 0.5rem;
    text-align: left;
}

.admin-table th {
    background: #f0f4f8;
    font-weight: 600;
}

/* colonne nascoste */

.col-hidden {
    display: none;
}

/* elementi solo stampa / non stampa */

.only-print {
    display: none;
}

.no-print {
    /* elementi da nascondere in stampa */
}



/* ================================
   HERO HEADER ===================== */

.hero-header {
    position: relative;
    width: 100%;
    height: 280px;
    background-image: url("/parco-lineare/img/header-parco.png");  /* QUI METTI IL RENDERING 
    background-size: cover;*/
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    z-index: 10;
}

.hero-logo {
    width: 150px;
    height: auto;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0;
    color: #FFF;
    cursor: pointer;
}

.hero-subtitle {
    font-size: 1rem;
    margin-top: 0.2rem;
    opacity: 0.9;
}



.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
}

.hero-text{
    min-height: 576px;
}


.hero-text p {
    margin-bottom: 0.8rem;
}

.hero-cta .btn {
    margin-right: 0.5rem;
    margin-top: 0.5rem;
    border: 1px solid orange;
    border-radius: 14px;
}

.hero-image p{
    margin-top: 0px;
}

.hero-text img {
    width: 100%;
    border-radius: 10px;
    display: block;
}

.hero-image figcaption {
    font-size: 0.8rem;
    color: #555;
    margin-top: 0.3rem;
}

.mt-lg{
  background-color: transparent;
  margin-top: 15px;
}

.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
    align-items: flex-start;
}


.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    border: 1px solid #e0e7ff;
    margin-top: 20px;
}

.card h3 {
    margin-bottom: 0.4rem;
}

.schema-cer {
    margin-top: 1.5rem;
    text-align: center;
}

.schema-cer img {
    max-width: 100%;
    border-radius: 8px;
}

.schema-cer figcaption {
    font-size: 0.8rem;
    color: #555;
    margin-top: 0.4rem;
}

.home1, .home2, .home3{
    
    max-width: 450px;
    
}



/* responsive per griglie */

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

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .hero-image p{
        margin-top: 0px;  
    }  
    
    .mozione{
        width: 300px;
        height: auto;
    }

}




/* ==============================================
   SHARE BOX ==================================== */


.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.share-title {
  font-weight: 600;
  color: var(--text);
  margin-right: 4px;
}

.share-icon {
  width: 25px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: transform .15s ease;
}

.share-icon:hover {
  transform: scale(1.15);
}

.share-icon svg {
  width: 25px;
  height: 25px;
}


.legacy{
  background-color: #444;
  position: relative;
  text-align: center;
  color:#FFE661;
  margin-bottom: 0;
  font-size: 10px;   
  border-radius: 14px;
  padding: 5px;
}

.foot {
    background-color: #000;
    color:#grey;  
}

/* Pulsante share nativo solo su mobile */
@media (min-width: 900px) {
  .share-icon.mobile { 
    display: none; 
  }
}





/* Responsive */

@media (max-width: 700px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .main-nav ul {
        gap: 0.6rem;
        flex-wrap: wrap;
    }

    .site-main {
        margin: 1rem;
    }
}

/* Stampa */

@media print {
    body {
        background: #ffffff;
    }

    .site-header,
    .site-footer,
    .no-print {
        display: none !important;
    }

    .site-main {
        margin: 0;
        padding: 0;
        max-width: none;
        box-shadow: none;
        border-radius: 0;
    }

    .only-print {
        display: block !important;
        margin-bottom: 1rem;
    }

    .admin-table {
        font-size: 0.85rem;
    }
}
