/*
   TargaBulgara.com — shared editorial surfaces
   Inspired by the local TargaPolacca structure, with a distinct
   blue/green palette, tighter radius and a calmer spacing rhythm.
*/
:root {
  --tg-blue: #0a5688;
  --tg-blue-deep: #123a5a;
  --tg-green: #168b5b;
  --tg-green-soft: #e8f6ef;
  --tg-page: #edf3f7;
  --tg-surface: #ffffff;
  --tg-surface-soft: #f7fafc;
  --tg-border: #b9d8c9;
  --tg-text: #243746;
  --tg-muted: #5d7180;
  --tg-radius: 18px;
  --tg-shadow: 0 12px 30px rgba(22, 139, 91, 0.11);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-padding-top: 84px; }

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(10, 86, 136, 0.08), transparent 28rem),
    var(--tg-page);
  color: var(--tg-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.68;
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
}

img,
svg,
video { max-width: 100%; }

/* L'Osservatorio presenta prima la lettura editoriale e poi il corpus documentale. */
.observatory-layout { display: flex; flex-direction: column; }
.observatory-layout > * { order: 3; }
.observatory-layout > .query-map { order: 0; }
.observatory-layout > h1 { order: 1; }
.observatory-layout > p:first-of-type { order: 2; }
.observatory-layout > .green-cta-box { order: 4; }
.observatory-layout > .observatory-corpus-completo { order: 5; }

.focus-answer {
  margin: 1rem 0 1.5rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--tg-green);
  border-radius: 0 12px 12px 0;
  background: var(--tg-surface-soft);
  color: var(--tg-text);
  font-weight: 600;
}

.main-logo,
.logo-container {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(22, 139, 91, 0.24);
  box-sizing: border-box;
  line-height: 0;
  padding: 12px 18px 10px;
  text-align: center;
}

.main-logo img,
.logo-container img {
  display: inline-block;
  height: auto;
  max-width: min(340px, 82vw);
  width: 340px;
  vertical-align: middle;
}

.main-header {
  background: #fff;
  border-bottom: 1px solid rgba(22, 139, 91, 0.28);
  border-top: 0;
  box-shadow: 0 5px 16px rgba(18, 58, 90, 0.07);
  position: sticky;
  top: 0;
  z-index: 20;
}

.main-header-inner {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 1120px;
  padding: 10px 18px;
}

.main-nav ul,
nav.main-nav ul {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  border-radius: 999px;
  color: var(--tg-blue-deep);
  display: inline-block;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 7px 10px;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.is-current,
.main-nav li.is-current > a {
  background: var(--tg-green-soft);
  color: var(--tg-green);
  box-shadow: inset 0 0 0 1px rgba(17, 139, 92, .18);
  transform: translateY(-1px);
}

.language-switcher { align-items: center; display: inline-flex; }
.language-switcher select {
  appearance: auto;
  background: #fff;
  border: 1px solid var(--tg-border);
  border-radius: 999px;
  color: var(--tg-blue-deep);
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 750;
  max-width: 170px;
  width: 170px;
  padding: 7px 10px;
}
.language-switcher select:focus-visible { outline: 2px solid var(--tg-green); outline-offset: 2px; }
.sr-only { height: 1px; margin: -1px; overflow: hidden; position: absolute; width: 1px; clip: rect(0,0,0,0); }

main.container,
main#main-content,
body > .container {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 1120px;
  padding: 24px 18px 8px;
}

main#main-content > h1,
main.container > h1,
.container > h1 {
  background: linear-gradient(135deg, #ffffff 0%, #f4f9fc 100%);
  border: 1px solid rgba(22, 139, 91, 0.34);
  border-left: 5px solid var(--tg-green);
  border-radius: var(--tg-radius);
  box-shadow: var(--tg-shadow);
  color: var(--tg-blue-deep);
  line-height: 1.2;
  margin: 0 0 20px;
  padding: 22px 24px;
}

main#main-content > section,
main.container > section,
main.container > article > section,
.container > section {
  background: var(--tg-surface);
  border: 1px solid rgba(22, 139, 91, 0.34);
  border-radius: var(--tg-radius);
  box-shadow: var(--tg-shadow);
  box-sizing: border-box;
  margin: 0 0 20px;
  padding: clamp(18px, 3vw, 30px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  will-change: transform;
}

main#main-content > section:hover,
main.container > section:hover,
main.container > article > section:hover,
.container > section:hover,
.toc:hover,
.contact-form:hover,
.price-card:hover,
.package-card:hover,
.contact-info-card:hover {
  border-color: rgba(22, 139, 91, 0.52);
  box-shadow: 0 16px 34px rgba(22, 139, 91, 0.16);
  transform: translateY(-2px);
}

main#main-content > section + section,
main.container > section + section,
main.container > article > section + section {
  margin-top: 20px;
}

section h2,
section h3,
section h4 {
  color: var(--tg-blue);
  line-height: 1.28;
}

section h2 {
  border-bottom: 2px solid #e7eef3;
  margin: 0 0 16px;
  padding-bottom: 10px;
}

section h3 { margin: 20px 0 8px; }
section h4 { margin: 0 0 7px; }

section p,
section li {
  color: var(--tg-text);
  line-height: 1.72;
}

section p { margin: 0 0 13px; }
section ul { margin: 0 0 15px; padding-left: 1.25rem; }
section li { margin-bottom: 6px; }

.focus,
.ai-focus,
.trust-header,
.green-cta-box,
.saving-box,
.disclaimer-box,
.warning,
.sources,
.ai-focus-box {
  background: var(--tg-surface-soft);
  border: 1px solid rgba(22, 139, 91, 0.30);
  border-left: 4px solid var(--tg-green);
  border-radius: 12px;
  box-shadow: 0 7px 18px rgba(18, 58, 90, 0.06);
  color: var(--tg-text);
  margin: 16px 0;
  padding: 15px 17px;
}

.focus strong,
.ai-focus strong,
.trust-header strong { color: var(--tg-blue); }

.editorial-image,
figure.editorial-image,
.img-fluid,
img.hero-image {
  background: #f8fbfd;
  border: 1px solid var(--tg-border);
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(18, 58, 90, 0.10);
  box-sizing: border-box;
  display: block;
  height: auto;
  margin: 20px auto;
  max-width: 100%;
  overflow: hidden;
}

figure.editorial-image { padding: 10px; }
figure.editorial-image img { border-radius: 9px; display: block; max-width: 100%; }
figure.editorial-image figcaption { color: var(--tg-muted); font-size: 0.88rem; line-height: 1.5; padding: 10px 4px 2px; }

.toc {
  background: var(--tg-surface);
  border: 1px solid var(--tg-border);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(18, 58, 90, 0.07);
  margin: 0 0 20px;
  padding: 15px 18px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.toc-title { color: var(--tg-blue-deep); font-weight: 800; margin-bottom: 8px; }
.toc a { color: var(--tg-blue); font-weight: 650; }
.toc a:hover { color: var(--tg-green); }

.comparison-table,
table {
  border-collapse: separate;
  border-spacing: 0 6px;
  width: 100%;
}

.comparison-table th,
.comparison-table td,
table th,
table td {
  border-bottom: 1px solid #e4edf2;
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

.comparison-table th,
table th { background: #edf6fb; color: var(--tg-blue-deep); }

.contact-form,
.pricing-box,
.pricing-container,
.package-grid,
.contact-info-card,
.contact-grid,
.file-box {
  background: var(--tg-surface-soft);
  border: 1px solid var(--tg-border);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(18, 58, 90, 0.06);
}

.contact-form { padding: clamp(17px, 3vw, 26px); transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.pricing-box, .pricing-container, .package-grid, .contact-grid { gap: 14px; padding: 14px; }
.price-card, .package-card, .contact-info-card { border: 1px solid var(--tg-border); border-radius: 12px; background: #fff; box-shadow: 0 5px 12px rgba(18,58,90,.05); transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }

.contact-form label,
.form-group label { color: var(--tg-blue-deep); font-weight: 750; }

.contact-form input,
.contact-form textarea,
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  background: #fff;
  border: 1px solid #c8d7e1;
  border-radius: 9px;
  box-sizing: border-box;
  color: var(--tg-text);
  padding: 11px 12px;
  width: 100%;
}

.contact-form input[type="checkbox"] { padding: 0; width: auto; }

/* One checkbox architecture for every page and every locale. The renew page
   is the visual reference: input first, short label second, same alignment. */
.checkbox-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 12px !important;
}

.checkbox-row input[type="checkbox"] {
  width: 17px !important;
  height: 17px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto !important;
  cursor: pointer;
}

.checkbox-row label {
  color: #475569 !important;
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  line-height: 1.1 !important;
  cursor: pointer;
}

.contact-form button,
.btn-submit,
.btn-order,
.cta,
.cta-green {
  background: var(--tg-green);
  border: 0;
  border-radius: 9px;
  box-shadow: 0 6px 13px rgba(22, 139, 91, 0.20);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 12px 18px;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.contact-form button:hover,
.btn-submit:hover,
.btn-order:hover,
.cta:hover,
.cta-green:hover { background: #106d49; transform: translateY(-1px); }

footer.tg-footer {
  background: var(--tg-green);
  border-radius: 20px 20px 0 0;
  color: #fff;
  margin-top: 28px;
  overflow: hidden;
  padding-top: 26px;
}

.tg-footer .footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1000px;
  padding: 0 20px 10px;
}

.tg-footer .footer-col { flex: 1 1 220px; min-width: 0; }
.tg-footer .footer-col h3 { margin: 0 0 8px; font-size: 1rem; }
.tg-footer .footer-col p { margin: 0; font-size: .85rem; line-height: 1.5; text-align: left; }
.tg-footer .footer-col ul { list-style: none; margin: 0; padding: 0; font-size: .85rem; }
.tg-footer .footer-col li { margin: 4px 0; }
.tg-footer .footer-col a { text-decoration: none; }
.tg-footer .footer-col h3 { color: #78d8ad; }
.tg-footer .footer-col a { color: #fff; }
.tg-footer .footer-col a:hover { color: #8be4bc; }
.tg-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,.16);
  padding: 7px 20px 4px;
  text-align: center;
  font-size: .89rem;
}

@media (prefers-reduced-motion: reduce) {
  main#main-content > section,
  main.container > section,
  main.container > article > section,
  .container > section,
  .toc,
  .contact-form,
  .price-card,
  .package-card,
  .contact-info-card {
    transition: none;
    will-change: auto;
  }

  main#main-content > section:hover,
  main.container > section:hover,
  main.container > article > section:hover,
  .container > section:hover,
  .toc:hover,
  .contact-form:hover,
  .price-card:hover,
  .package-card:hover,
  .contact-info-card:hover { transform: none; }
}

@media (max-width: 720px) {
  .main-header-inner { padding: 8px 10px; }
  .main-nav a { font-size: 0.77rem; padding: 6px 8px; }
  .language-switcher select { font-size: .72rem; max-width: 145px; width: 145px; padding: 6px 8px; }
  main.container, main#main-content, body > .container { padding: 16px 10px 4px; }
  main#main-content > h1, main.container > h1, .container > h1 { padding: 17px 16px; }
  main#main-content > section, main.container > section, main.container > article > section, .container > section { border-radius: 14px; padding: 17px 15px; }
  .comparison-table { display: block; overflow-x: auto; }
  footer.tg-footer { border-radius: 14px 14px 0 0; padding-top: 14px; }
  .tg-footer .footer-content { flex-direction: column; gap: 8px; padding-bottom: 10px; }
  .tg-footer .footer-bottom { font-size: .82rem; }
}

/*
   Contratto condiviso per i caricamenti file multilingue.
   Il controllo nativo del browser resta funzionale ma non viene mostrato:
   il pulsante visibile è creato da targa-file-picker.js e viene localizzato
   in base a <html lang="...">.
*/
.file-box { position: relative; }
.file-box .targa-native-file-input {
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  height: 1px !important;
  margin: -1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
}
.file-box .targa-file-trigger {
  align-items: center;
  background: var(--tg-green);
  border: 0;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: .78rem;
  font-weight: 750;
  justify-content: center;
  margin: 7px auto 3px;
  min-height: 32px;
  padding: 6px 12px;
  transition: background-color 160ms ease, transform 160ms ease;
}
.file-box .targa-file-trigger:hover,
.file-box .targa-file-trigger:focus-visible {
  background: #106d49;
  transform: translateY(-1px);
}
.file-box .targa-file-trigger:focus-visible {
  outline: 2px solid var(--tg-blue);
  outline-offset: 2px;
}
.file-box .targa-file-name {
  color: var(--tg-muted);
  display: block;
  font-size: .72rem;
  line-height: 1.35;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-box.has-selected-file {
  background: var(--tg-green-soft) !important;
  border-color: var(--tg-green) !important;
}
