:root {
    --bs-primary: #003a5d;
    --bs-primary-rgb: 0, 58, 93;
    --bs-link-color: #4a90e2;
    --bs-link-color-rgb: 74, 144, 226;
    --bs-link-hover-color: #003a5d;
    --bs-body-bg: #f6f8fa;
}

html { -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; display: flex; flex-direction: column; }
.app-main { flex: 1 0 auto; }
.app-header { background: #fff; border-bottom: 1px solid #dde3e8; position: sticky; top: 0; z-index: 10; }
.app-footer { border-top: 1px solid #dde3e8; }
.container-narrow { max-width: 560px; }

/* Bootstrap: il colore primario personalizzato sui componenti usati */
.btn-primary { --bs-btn-bg: #003a5d; --bs-btn-border-color: #003a5d; --bs-btn-hover-bg: #00274a; --bs-btn-hover-border-color: #00274a; --bs-btn-active-bg: #00274a; --bs-btn-active-border-color: #00274a; }
.btn-outline-primary { --bs-btn-color: #003a5d; --bs-btn-border-color: #003a5d; --bs-btn-hover-bg: #003a5d; --bs-btn-hover-border-color: #003a5d; --bs-btn-active-bg: #003a5d; --bs-btn-active-border-color: #003a5d; }
.text-bg-primary { background-color: #003a5d !important; }
.form-control:focus, .form-select:focus { border-color: #4a90e2; box-shadow: 0 0 0 .25rem rgba(74, 144, 226, .25); }
.page-link { color: #003a5d; }
.page-item.active .page-link { background-color: #003a5d; border-color: #003a5d; }

/* Mobile first: campi alti, testo a 16px (iOS non ingrandisce la pagina al focus) */
.contatto-form .form-control { font-size: 1rem; min-height: 3rem; padding: .625rem .875rem; }
.contatto-form .mb-3 { margin-bottom: .75rem !important; }
.contatto-form .form-label { margin-bottom: .25rem; }
.contatto-form .form-label, .contatto-form legend.form-label { font-weight: 600; font-size: .95rem; }
.contatto-form .form-text { font-size: .8rem; }

/* Scelte a pulsante */
.tile-choices { display: grid; gap: .5rem; grid-template-columns: 1fr; }
.tile-choices-multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 480px) { .tile-choices-single { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) { .tile-choices-multi { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile-choice { min-height: 3rem; display: flex; align-items: center; justify-content: center; text-align: center; padding: .5rem .75rem; font-size: .95rem; line-height: 1.2; border-width: 2px; user-select: none; -webkit-tap-highlight-color: transparent; }
.btn-check:checked + .tile-choice { font-weight: 600; }
.btn-check:focus-visible + .tile-choice { box-shadow: 0 0 0 .25rem rgba(74, 144, 226, .4); }

/* Pulsante di invio ancorato in basso su telefono */
.submit-bar { position: sticky; bottom: 0; background: linear-gradient(to top, var(--bs-body-bg) 75%, rgba(246, 248, 250, 0)); padding: .5rem 0 calc(.75rem + env(safe-area-inset-bottom)); margin-top: .5rem; }
.submit-bar .btn { min-height: 3.25rem; font-weight: 600; }

/* Honeypot: fuori schermo, non display:none (alcuni bot lo rispettano) */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Admin */
.admin-nav a { margin-left: 1rem; color: #525151; text-decoration: none; font-weight: 500; }
.admin-nav a.active { color: #003a5d; border-bottom: 2px solid #003a5d; }
.dl-compact dt { font-size: .75rem; text-transform: uppercase; color: #6c757d; margin-top: .5rem; }
.dl-compact dd { margin-bottom: 0; }
.qr-preview { max-width: 260px; }
.contatti-list .list-group-item { padding: .75rem 1rem; }
