/* Pagine interne del sito pubblico: stessi principi della home (tap-business.css).
   Regole: niente emoji come icone, niente style= nelle viste, titoli a peso 500, bordi sottili, arancio solo per l'azione principale. */
.tap-public { --primary: #348273; --primary-hover: #2a6b5e; --primary-color: #348273; --tap-tint: #f4f8f6; }

/* Testata di pagina */
.tap-page-head { padding: 55px 5% 44px; border-bottom: 1px solid var(--tap-line); text-align: center; }
.tap-page-head .tap-eyebrow { justify-content: center; margin-bottom: 18px; }
.tap-page-head h1 { font-size: clamp(32px, 4vw, 52px); font-weight: 500; letter-spacing: -.04em; line-height: 1.1; margin: 0; color: var(--tap-ink); }
.tap-page-head p { max-width: 640px; margin: 20px auto 0; color: var(--tap-muted); font-size: 16px; line-height: 1.8; }
.tap-page-head .tap-action { width: auto; display: inline-flex; margin-top: 28px; text-decoration: none; }

/* Sezioni */
.tap-section { max-width: 1422px; margin: auto; padding: 48px 5%; }
.tap-section + .tap-section { border-top: 1px solid var(--tap-line); }
.tap-section-narrow { max-width: 900px; }
.tap-band { background: var(--tap-tint); border-block: 1px solid var(--tap-line); }
.tap-section h2 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 500; letter-spacing: -.02em; line-height: 1.25; margin: 0 0 14px; }
.tap-section > p, .tap-lead { color: var(--tap-muted); font-size: 15px; line-height: 1.8; max-width: 640px; }

/* Schede */
.tap-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.tap-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tap-card { padding: 26px; border: 1px solid var(--tap-line); border-radius: 10px; background: #fff; min-width: 0; }
.tap-card-symbol { display: block; color: var(--tap-green); font-size: 21px; line-height: 1; margin-bottom: 16px; }
.tap-card h2, .tap-card h3 { font-size: 18px; font-weight: 500; letter-spacing: -.01em; margin: 0 0 10px; }
.tap-card p { font-size: 14px; color: var(--tap-muted); line-height: 1.8; margin: 0; }
.tap-card p + p { margin-top: 10px; }
.tap-checklist { list-style: none; padding: 0; margin: 18px 0 0; }
.tap-checklist li { position: relative; padding: 5px 0 5px 24px; font-size: 14px; color: var(--tap-ink); line-height: 1.6; }
.tap-checklist li::before { content: '✓'; position: absolute; left: 0; color: var(--tap-green); }

/* Due colonne: testo a sinistra, elenco o modulo a destra */
.tap-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.tap-split .tap-business-item p { font-size: 13px; color: var(--tap-muted); line-height: 1.7; margin: 0; }

/* Testi lunghi (pagine legali, articoli) */
.tap-prose { max-width: 780px; margin: auto; padding: 44px 5% 64px; font-size: 15px; line-height: 1.85; }
.tap-prose h2 { font-size: 20px; font-weight: 500; letter-spacing: -.01em; margin: 36px 0 12px; color: var(--tap-ink); }
.tap-prose h3 { font-size: 16px; font-weight: 600; margin: 24px 0 8px; }
.tap-prose p, .tap-prose li { color: var(--tap-muted); }
.tap-prose p { margin: 0 0 14px; }
.tap-prose ul, .tap-prose ol { padding-left: 22px; margin: 0 0 14px; }
.tap-prose li { margin-bottom: 6px; }
.tap-prose a { color: var(--tap-green); text-decoration: underline; text-underline-offset: 3px; }
.tap-prose strong { color: var(--tap-ink); font-weight: 600; }
.tap-prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14px; }
.tap-prose th, .tap-prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--tap-line); color: var(--tap-muted); }
.tap-prose th { color: var(--tap-ink); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tap-prose-meta { font-size: 12px; color: var(--tap-muted); margin-bottom: 26px; }
.tap-identity { border: 1px solid var(--tap-line); border-radius: 10px; padding: 20px 22px; margin: 0 0 26px; background: var(--tap-tint); font-size: 14px; line-height: 1.8; }
.tap-identity strong { display: block; font-size: 16px; font-weight: 600; color: var(--tap-ink); margin-bottom: 4px; }
.tap-identity span { display: block; color: var(--tap-muted); }
.tap-draft { border: 1px dashed #e0b37a; background: #fff8ee; color: #7a4a0c; border-radius: 8px; padding: 12px 16px; font-size: 13px; line-height: 1.6; margin: 0 0 26px; }

/* Domande frequenti: <details>, senza JavaScript */
.tap-faq { max-width: 860px; margin: auto; padding: 30px 5% 64px; }
.tap-faq h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 1.4px; font-weight: 600; color: var(--tap-muted); margin: 34px 0 6px; }
.tap-faq details { border-bottom: 1px solid var(--tap-line); }
.tap-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; min-height: 48px; font-size: 16px; font-weight: 500; color: var(--tap-ink); }
.tap-faq summary::-webkit-details-marker { display: none; }
.tap-faq summary::after { content: '+'; flex-shrink: 0; font-size: 22px; font-weight: 400; color: var(--tap-green); line-height: 1; }
.tap-faq details[open] summary::after { content: '−'; }
.tap-faq .tap-faq-body { padding: 0 0 22px; color: var(--tap-muted); font-size: 14px; line-height: 1.85; max-width: 720px; }
.tap-faq .tap-faq-body p { margin: 0 0 10px; }
.tap-faq .tap-faq-body ul { margin: 0 0 10px; padding-left: 20px; }
.tap-faq .tap-faq-body a { color: var(--tap-green); text-decoration: underline; }
.tap-faq .tap-faq-body strong { color: var(--tap-ink); font-weight: 600; }

/* Moduli */
.tap-form-card { border: 1px solid var(--tap-line); border-radius: 12px; background: #fff; padding: 28px; box-shadow: 0 12px 35px #102e3509; }
.tap-form-card h2 { font-size: 22px; font-weight: 500; margin: 0 0 6px; }
.tap-form-card .tap-panel-sub { margin-bottom: 20px; }
.tap-fields textarea { display: block; width: 100%; border: 1px solid var(--tap-line); border-radius: 6px; background: #fff; color: var(--tap-ink); padding: 12px; margin-top: 7px; font: inherit; font-size: 16px; min-height: 130px; resize: vertical; }
.tap-fields input[type=file] { padding: 10px; font-size: 14px; }
.tap-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: 13px; line-height: 1.6; color: var(--tap-muted); font-weight: 400; cursor: pointer; }
.tap-check input[type=checkbox] { width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--tap-green); }
.tap-check a { color: var(--tap-green); text-decoration: underline; }
.tap-check strong { color: var(--tap-ink); font-weight: 600; }
.tap-field-error { display: block; color: #963623; font-size: 12px; font-weight: 400; margin-top: 6px; }
.tap-alert-ok { background: #eef7f3; color: #1f5c4f; border: 1px solid #cfe5dc; border-radius: 6px; padding: 12px 14px; font-size: 14px; margin-bottom: 18px; }
.tap-notice { border-left: 3px solid var(--tap-accent); background: #fffaf3; padding: 12px 16px; font-size: 13px; line-height: 1.7; color: var(--tap-ink); border-radius: 0 6px 6px 0; }
.tap-notice + .tap-notice { margin-top: 10px; }

.tap-form-section { margin-top: 32px !important; }
.tap-error ul { margin: 0; padding-left: 18px; }
.tap-page-head p a { text-decoration: underline; text-underline-offset: 3px; }

/* Contatti */
.tap-contact-list { margin: 26px 0 0; }
.tap-contact-list div { padding: 18px 0; border-bottom: 1px solid var(--tap-line); }
.tap-contact-list div:first-child { border-top: 1px solid var(--tap-line); }
.tap-contact-list dt { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--tap-muted); margin-bottom: 6px; }
.tap-contact-list dd { margin: 0; font-size: 15px; line-height: 1.7; color: var(--tap-ink); }
.tap-contact-list a { text-decoration: underline; text-underline-offset: 3px; }

/* Esempio di codice */
.tap-code { background: #163e43; color: #e8f1ef; border-radius: 10px; padding: 22px; font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-x: auto; margin: 0; white-space: pre; }
.tap-code em { font-style: normal; color: #f6a34a; }

/* Notizie e avvisi */
.tap-news-list { max-width: 1422px; margin: auto; padding: 38px 5% 60px; }
.tap-news-list .tap-news-grid article p { margin: 0 0 8px; }
.tap-empty { padding: 40px 0; color: var(--tap-muted); font-size: 15px; }
.tap-article-head { max-width: 780px; margin: auto; padding: 50px 5% 0; }
.tap-article-head h1 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 500; letter-spacing: -.035em; line-height: 1.15; margin: 14px 0 0; }
.tap-article-cover { max-width: 980px; margin: 34px auto 0; padding: 0 5%; }
.tap-article-cover img { width: 100%; height: auto; border-radius: 12px; display: block; }
.tap-notice-row { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--tap-line); }
.tap-notice-row time { font-size: 12px; color: var(--tap-muted); padding-top: 3px; }
.tap-notice-row h2 { font-size: 18px; font-weight: 500; margin: 0 0 8px; }
.tap-notice-row p { font-size: 14px; color: var(--tap-muted); line-height: 1.8; margin: 0; }

/* Piede: dati della società */
.tap-public .footer .navbar-brand { display: block; }
.tap-footer-links { display: flex; gap: 24px; }
.tap-footer-links a { color: inherit; }
.tap-footer-legal { max-width: 1280px; margin: 18px auto 0; font-size: 11px; line-height: 1.8; color: var(--tap-muted); }
.tap-footer-legal strong { color: var(--tap-ink); font-weight: 600; }

/* Nota sui cookie: informativa breve, non un muro di consenso */
.tap-cookie-note { position: fixed; left: 16px; bottom: 16px; z-index: 900; max-width: 420px; background: #fff; border: 1px solid var(--tap-line); border-radius: 10px; box-shadow: 0 12px 35px #102e3520; padding: 16px 18px; font-size: 13px; line-height: 1.6; color: var(--tap-muted); display: flex; gap: 14px; align-items: flex-start; }
.tap-cookie-note p { margin: 0; }
.tap-cookie-note a { color: var(--tap-green); text-decoration: underline; }
.tap-cookie-note button { flex-shrink: 0; border: 1px solid var(--tap-line); background: #fff; color: var(--tap-ink); border-radius: 6px; min-height: 40px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; }
.tap-cookie-note button:hover { border-color: var(--tap-green); }

/* Pagine non ancora riscritte (spedisci, tracking, accesso): stessa pelle sui loro moduli */
.tap-public .form-control { border: 1px solid var(--tap-line); border-radius: 6px; background: #fff; color: var(--tap-ink); min-height: 48px; padding: 12px; font-size: 16px; box-shadow: none; }
.tap-public .form-control:focus { border-color: var(--tap-green); box-shadow: 0 0 0 3px #34827322; outline: none; }
.tap-public .form-label { font-size: 12px; font-weight: 600; color: var(--tap-ink); }
.tap-public .btn { border-radius: 6px; font-weight: 600; }
.tap-public .btn-primary:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 850px) {
    .tap-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tap-split { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
    .tap-page-head { padding: 34px 5% 30px; }
    .tap-section { padding-block: 34px; }
    .tap-cards, .tap-cards-2 { grid-template-columns: 1fr; }
    .tap-form-card { padding: 22px 18px; }
    .tap-notice-row { grid-template-columns: 1fr; gap: 6px; }
    .tap-cookie-note { left: 10px; right: 10px; bottom: 92px; max-width: none; } /* sopra il bottone della chat */
    .tap-page-head .tap-action { width: 100%; }
}

/* Copertine degli articoli e paginazione */
.tap-news-cover { display: block; margin-bottom: 16px; }
.tap-news-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; }
.tap-pagination { margin-top: 36px; display: flex; justify-content: center; font-size: 13px; }
.tap-pagination nav > div:first-child { display: none; }
.tap-pagination a, .tap-pagination span[aria-current] span, .tap-pagination span[aria-disabled] span { display: inline-block; padding: 8px 12px; border: 1px solid var(--tap-line); border-radius: 6px; margin: 0 2px; color: var(--tap-ink); }
.tap-pagination span[aria-current] span { background: var(--tap-tint); font-weight: 600; }
.tap-pagination svg { width: 16px; height: 16px; vertical-align: middle; }
.tap-prose img { max-width: 100%; height: auto; border-radius: 8px; }

/* Tracking */
.tap-partner-tracking .tap-utility, .tap-partner-tracking .tap-site-header { display: none; }
.tap-partner-bar { max-width: 900px; margin: auto; padding: 22px 5% 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.tap-partner-bar > img { max-height: 64px; max-width: 50%; object-fit: contain; }
.tap-partner-bar span { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--tap-muted); }
.tap-track-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 34px 0 0; border: 1px solid var(--tap-line); border-radius: 10px; overflow: hidden; }
.tap-track-summary div { padding: 18px 20px; border-right: 1px solid var(--tap-line); min-width: 0; }
.tap-track-summary div:last-child { border-right: 0; }
.tap-track-summary dt { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--tap-muted); margin-bottom: 6px; }
.tap-track-summary dd { margin: 0; font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.tap-track-title { font-size: 20px !important; margin: 38px 0 8px !important; }
.tap-timeline { list-style: none; margin: 0; padding: 0; }
.tap-timeline li { position: relative; padding: 18px 0 18px 30px; border-bottom: 1px solid var(--tap-line); display: grid; gap: 3px; }
.tap-timeline li::before { content: ''; position: absolute; left: 4px; top: 25px; width: 9px; height: 9px; border-radius: 50%; background: var(--tap-ink); }
.tap-timeline li.is-done::before { background: var(--tap-green); }
.tap-timeline li.is-problem::before { background: #b73525; }
.tap-timeline time { font-size: 12px; color: var(--tap-muted); }
.tap-timeline strong { font-size: 15px; font-weight: 500; color: var(--tap-ink); }
.tap-timeline span { font-size: 13px; color: var(--tap-muted); }
.tap-timeline p { font-size: 13px; color: var(--tap-muted); margin: 4px 0 0; line-height: 1.7; }
@media (max-width: 650px) {
    .tap-track-summary { grid-template-columns: 1fr; }
    .tap-track-summary div { border-right: 0; border-bottom: 1px solid var(--tap-line); }
    .tap-track-summary div:last-child { border-bottom: 0; }
}

/* Niente scorrimento orizzontale sul telefono: colonne che possono restringersi e tabelle che diventano elenchi */
.tap-split > * { min-width: 0; }
.tap-code { max-width: 100%; }
.tap-prose td, .tap-prose th { overflow-wrap: anywhere; }
@media (max-width: 650px) {
    .tap-prose table, .tap-prose tbody, .tap-prose tr, .tap-prose td { display: block; }
    .tap-prose thead { display: none; }
    .tap-prose tr { padding: 12px 0; border-bottom: 1px solid var(--tap-line); }
    .tap-prose td { border: 0; padding: 2px 0; }
    .tap-prose td:first-child { color: var(--tap-ink); font-weight: 600; }
}
