/* ========================================================
   GLOBAL.CSS — Stili condivisi di TargaPolacca.com
   Caricato PRIMA dei <style> page-specific in ogni pagina.
   I valori di ogni pagina sovrascrivono quelli qui sotto.
   ======================================================== */

/* --- VARIABILI --- */
:root {
  --primary: #00529b;
  --secondary: #003a6d;
  --accent: #27ae60;
  --bg: #f1f5f9;
  --white: #ffffff;
  --text: #1e293b;
  --border: #cbd5e1;
}

/* --- BASE --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 65px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  margin: 0;
  padding: 0;
  color: var(--text);
  line-height: 1.6;
}

/* --- LOGO --- */
.logo-container {
  background: var(--white);
  text-align: center;
  margin: 0;
  padding: 0;
  line-height: 0;
}
.logo-container img {
  width: 340px;
  height: auto;
  margin: 0;
  padding: 0;
  display: inline-block;
  vertical-align: bottom;
}

/* --- HEADER E NAVIGAZIONE --- */
.main-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--white);
  border-bottom: 1px solid #e2e8f0;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  isolation: isolate;
  margin: 0;
  padding: 0;
}
.main-header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px;
  display: flex;
  justify-content: center;
}
nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 0;
  padding: 0;
}
nav a {
  text-decoration: none;
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.85rem;
}
nav a:hover {
  color: var(--accent);
}

/* --- LAYOUT --- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 16px;
}
section {
  background: var(--white);
  border-radius: 30px;
  padding: 35px;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* --- TIPOGRAFIA --- */
h1, h2 {
  color: var(--primary);
  font-size: 1.6rem;
  margin-top: 0;
  border-bottom: 2px solid var(--bg);
  padding-bottom: 10px;
}
h3 {
  color: var(--primary);
  font-size: 1.3rem;
  margin-top: 25px;
}
p {
  margin-bottom: 15px;
  text-align: justify;
}
ul {
  margin-bottom: 15px;
}

/* --- IMMAGINI --- */
.img-fluid {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 16px auto;
  box-shadow: 0 8px 16px -4px rgba(0,0,0,0.08);
}

/* --- FORM --- */
.contact-form {
  background: #f8fafc;
  padding: 30px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.form-group {
  margin-bottom: 20px;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-sizing: border-box;
  font-size: 0.95rem;
}
.form-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 20px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 10px;
}

/* --- BOTTONE SUBMIT --- */
.btn-submit {
  display: block;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 1rem;
  transition: background 0.3s;
  margin-top: 10px;
}
.btn-submit:hover {
  background: #219150;
}

/* --- STATI FORM --- */
#statusMsg {
  display: none;
  padding: 15px;
  margin-top: 15px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
}
.loading {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fef08a;
}
.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* --- PRIVACY / CHECKBOX --- */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.checkbox-row label {
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.privacy-container {
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.privacy-row {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px;
  cursor: pointer;
}
.privacy-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
}
.privacy-row span {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #475569;
}

/* --- DISCLAIMER SCROLLABILE --- */
.disclaimer-minimal {
  height: 40px;
  width: 100%;
  overflow-y: scroll;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 5px 8px;
  font-size: 0.65rem;
  color: #94a3b8;
  border-radius: 5px;
  line-height: 1.2;
  margin-bottom: 5px;
}
.disclaimer-minimal::-webkit-scrollbar { width: 4px; }
.disclaimer-minimal::-webkit-scrollbar-thumb { background: #cbd5e1; }

/* --- FOOTER --- */
footer {
  background: var(--secondary);
  color: var(--white);
  padding: 30px 20px;
  text-align: center;
  margin-top: 50px;
  border-radius: 40px 40px 0 0;
  font-size: 0.8rem;
}
.footer-content {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  text-align: left;
}
.footer-content a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.footer-content a:hover {
  border-bottom: 1px solid var(--accent);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 30px;
  padding-top: 20px;
  font-size: 0.8rem;
  opacity: 0.8;
}

/* --- TABELLA COMPARATIVA (index.html) --- */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}
.comparison-table th,
.comparison-table td {
  padding: 10px 12px;
  font-size: 0.88rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .footer-content { grid-template-columns: 1fr; text-align: center; }
}