/* ==================================================================
   CQA System - Foglio di stile condiviso (IT + EN)
   ================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 11px;
  color: #000000;
  background-color: #E8EEF5;
  line-height: 1.45;
}

a { color: #1E5BA0; text-decoration: underline; }
a:hover { color: #143A6F; }

/* ============ LAYOUT PAGINA ============ */
.page {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  background: #FFFFFF;
  box-shadow: 0 0 8px rgba(0,0,0,0.08);
}

/* ============ TOPBAR (LINGUA) ============ */
.topbar {
  background: #143A6F;
  color: #FFFFFF;
  padding: 5px 14px;
  font-size: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  letter-spacing: 0.3px;
}

.topbar .topbar-left {
  color: #C9D7E8;
}

.topbar .topbar-left strong { color: #FFFFFF; }

.topbar .lang-switch {
  display: flex;
  gap: 4px;
  align-items: center;
}

.topbar .lang-switch a {
  color: #FFFFFF;
  text-decoration: none;
  padding: 2px 8px;
  font-weight: bold;
  font-size: 10px;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  letter-spacing: 0.5px;
}

.topbar .lang-switch a:hover {
  background: rgba(255,255,255,0.15);
  color: #FFFFFF;
}

.topbar .lang-switch a.active {
  background: #FFFFFF;
  color: #143A6F;
  border-color: #FFFFFF;
}

.top-border, .bottom-border {
  border-top: 2px solid #1E5BA0;
  border-bottom: 2px solid #1E5BA0;
  height: 6px;
  background: #FFFFFF;
}

/* ============ BANNER NAZIONALE ============ */
.banner {
  background: #FFFFFF;
  color: #143A6F;
  text-align: center;
  font-family: Verdana, sans-serif;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1.5px;
  padding: 8px 6px;
  border-bottom: 1px solid #C9D7E8;
}

/* ============ HEADER ============ */
.header-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.col-left {
  width: 220px;
  vertical-align: top;
  padding: 0 10px;
}

.col-right {
  vertical-align: top;
  padding: 15px 25px 20px 18px;
  background: #F4F7FB;
  border-left: 1px solid #C9D7E8;
}

/* ============ LOGO ============ */
.logo-box { width: 200px; margin: 0 auto; }
.logo-box img { width: 100%; height: auto; display: block; }
.logo-box a { display: block; }

/* ============ MENU LATERALE ============ */
.menu-box {
  background: #F4F7FB;
  border: 1px solid #C9D7E8;
  padding: 14px 16px;
  margin-top: 10px;
}

.menu-box ul { list-style: none; }

.menu-box li {
  padding: 5px 0;
  font-family: Verdana, sans-serif;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
  border-bottom: 1px dotted #C9D7E8;
}

.menu-box li:last-child { border-bottom: none; }

.menu-box li a {
  color: #143A6F;
  text-decoration: none;
  text-transform: uppercase;
}

.menu-box li a:hover {
  color: #1E5BA0;
  text-decoration: underline;
}

.menu-box li.active a { color: #1E5BA0; }
.menu-box li.active a::before {
  content: "▸ ";
  color: #143A6F;
  font-weight: bold;
}

/* ============ BADGES ============ */
.badges {
  margin-top: 12px;
  display: flex;
  gap: 6px;
  justify-content: space-between;
  padding: 0 4px;
}

.badge {
  width: 96px;
  height: 100px;
  border: 2px solid;
  text-align: center;
  color: #FFFFFF;
  font-family: Verdana, sans-serif;
  font-weight: bold;
  font-size: 11px;
  padding-top: 60px;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.badge.qualita {
  background: linear-gradient(180deg, #1E5BA0 0%, #143A6F 100%);
  border-color: #0E2D5A;
}

.badge.ambiente {
  background: linear-gradient(180deg, #2D7A47 0%, #1E5530 100%);
  border-color: #143A1F;
}

.badge::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.45);
}

.badge.qualita::after,
.badge.ambiente::after {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: #FFFFFF;
  font-family: 'Arial Black', sans-serif;
  font-size: 24px;
  line-height: 36px;
}

.badge.qualita::after  { content: "Q"; }
.badge.ambiente::after { content: "E"; }

/* ============ CONTENT AREA ============ */
.content { font-size: 11px; color: #000; line-height: 1.55; }
.content p { margin-bottom: 10px; text-align: justify; }

.content h2.section-title {
  color: #143A6F;
  font-family: Verdana, sans-serif;
  font-size: 15px;
  font-weight: bold;
  margin-top: 4px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid #1E5BA0;
  padding-bottom: 6px;
}

.content h3.subsection {
  color: #143A6F;
  font-family: Verdana, sans-serif;
  font-size: 12px;
  font-weight: bold;
  text-decoration: underline;
  margin-top: 14px;
  margin-bottom: 6px;
}

.content strong { color: #143A6F; font-weight: bold; }
.content em { font-style: italic; color: #1E5BA0; }

.content ul.norm-list { list-style: none; margin: 4px 0 12px 0; padding-left: 4px; }
.content ul.norm-list li { padding: 3px 0 3px 14px; position: relative; font-size: 11px; }
.content ul.norm-list li::before {
  content: "■";
  color: #1E5BA0;
  font-size: 7px;
  position: absolute;
  left: 0;
  top: 7px;
}

/* ============ HOME: 3 CARDS DIVISIONI ============ */
.divisions { margin: 16px 0 8px 0; }

.division-card {
  display: table;
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  border: 1px solid #C9D7E8;
  background: #FFFFFF;
  border-left: 4px solid;
  transition: box-shadow 0.2s;
}

.division-card:hover { box-shadow: 0 2px 6px rgba(30,91,160,0.15); }

.division-card.consulting { border-left-color: #1E5BA0; }
.division-card.proto      { border-left-color: #B8893B; }
.division-card.sourcing   { border-left-color: #2D7A47; }

.division-card .div-icon {
  display: table-cell;
  width: 80px;
  vertical-align: middle;
  text-align: center;
  background: #F4F7FB;
  padding: 14px 8px;
  border-right: 1px solid #E0E8F2;
}

.division-card .div-icon span {
  display: inline-block;
  width: 50px;
  height: 50px;
  line-height: 48px;
  text-align: center;
  font-family: 'Arial Black', sans-serif;
  font-size: 24px;
  color: #FFFFFF;
  border-radius: 50%;
}

.division-card.consulting .div-icon span { background: #1E5BA0; }
.division-card.proto      .div-icon span { background: #B8893B; }
.division-card.sourcing   .div-icon span { background: #2D7A47; }

.division-card .div-body { display: table-cell; vertical-align: top; padding: 12px 16px; }

.division-card h3 {
  color: #143A6F;
  font-family: Verdana, sans-serif;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.division-card .div-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: bold;
  color: #FFFFFF;
  padding: 2px 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 6px;
}

.division-card.consulting .div-tag { background: #1E5BA0; }
.division-card.proto      .div-tag { background: #B8893B; }
.division-card.sourcing   .div-tag { background: #2D7A47; }

.division-card p {
  font-size: 11px;
  color: #000;
  margin: 6px 0;
  text-align: left;
  line-height: 1.5;
}

.division-card .div-link {
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #1E5BA0;
  text-decoration: none;
  border-bottom: 1px solid #1E5BA0;
  padding-bottom: 1px;
}

.division-card .div-link:hover { color: #143A6F; border-bottom-color: #143A6F; }

/* ============ TABELLE GENERICHE 2 COLONNE ============ */
.serv-table, .cat-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 14px 0;
}

.serv-table td, .cat-table td {
  width: 50%;
  vertical-align: top;
  padding: 12px 14px;
  border: 1px solid #C9D7E8;
  background: #FAFCFE;
}

.serv-table td.qualita-cell  { border-top: 3px solid #1E5BA0; }
.serv-table td.ambiente-cell { border-top: 3px solid #2D7A47; }

.serv-table td h3, .cat-table td h3 {
  color: #143A6F;
  font-family: Verdana, sans-serif;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #C9D7E8;
}

.serv-table td.ambiente-cell h3 { color: #1E5530; }

.serv-table td p, .cat-table td p {
  font-size: 10px;
  margin-bottom: 6px;
  text-align: left;
  line-height: 1.5;
}

.serv-table td ul, .cat-table td ul { list-style: none; padding: 0; margin: 0; }

.serv-table td ul li, .cat-table td ul li {
  font-size: 10px;
  padding: 2px 0 2px 12px;
  position: relative;
  line-height: 1.45;
}

.serv-table td ul li::before, .cat-table td ul li::before {
  content: "›";
  color: #1E5BA0;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.serv-table td.ambiente-cell ul li::before { color: #2D7A47; }

/* ============ TABELLE PROCESSO + GEO ============ */
.proc-table, .geo-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 12px 0;
}

.proc-table td {
  padding: 6px 8px;
  border-bottom: 1px dotted #C9D7E8;
  vertical-align: top;
  font-size: 10px;
}

.proc-table td.num {
  width: 28px;
  color: #1E5BA0;
  font-weight: bold;
  font-size: 12px;
}

.proc-table td.fase {
  width: 130px;
  color: #143A6F;
  font-weight: bold;
}

.geo-table { font-size: 10px; }

.geo-table th {
  background: #1E5BA0;
  color: #FFFFFF;
  padding: 5px 8px;
  font-size: 10px;
  text-align: left;
  font-weight: bold;
}

.geo-table td { padding: 4px 8px; border-bottom: 1px solid #E0E8F2; }
.geo-table tr:nth-child(even) td { background: #F4F7FB; }

/* ============ BOX CREDENZIALI ============ */
.cred-box {
  background: #FFFFFF;
  border: 1px solid #1E5BA0;
  border-left: 4px solid #1E5BA0;
  padding: 12px 14px;
  margin: 14px 0;
}

.cred-box h4 {
  color: #143A6F;
  font-family: Verdana, sans-serif;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 6px;
}

.cred-box p { font-size: 11px; margin-bottom: 6px; text-align: left; }

/* ============ CTA BOX ============ */
.cta-box {
  background: #F4F7FB;
  border: 2px dashed #1E5BA0;
  padding: 14px 16px;
  margin: 16px 0 8px 0;
  text-align: center;
}

.cta-box h4 {
  color: #143A6F;
  font-family: Verdana, sans-serif;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.cta-box p { font-size: 11px; margin: 4px 0; text-align: center; }

.cta-box .free-tag {
  display: inline-block;
  background: #2D7A47;
  color: #FFFFFF;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 4px 0;
}

/* ============ SETTORI / TAG ============ */
.sectors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 14px 0;
}

.sector-tag {
  background: #FFFFFF;
  border: 1px solid #1E5BA0;
  color: #143A6F;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============ FOOTER ============ */
.footer-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  background: #F4F7FB;
}

.footer-cell {
  padding: 10px 14px;
  font-size: 10px;
  line-height: 1.5;
  color: #000;
}

.footer-cell strong { color: #143A6F; }
.footer-cell a { color: #1E5BA0; }

.footer-right {
  text-align: right;
  width: 130px;
  padding: 10px;
  vertical-align: bottom;
  font-size: 9px;
  color: #666;
}

.footer-right a { color: #143A6F; text-decoration: none; }
.footer-right a:hover { text-decoration: underline; }

/* ============ PRIVACY / LEGAL ============ */
.legal-page .content h3.subsection { margin-top: 18px; }
.legal-page .content p { margin-bottom: 8px; font-size: 11px; }
.legal-page .content ul { margin: 6px 0 12px 18px; font-size: 11px; }
.legal-page .content ul li { margin-bottom: 4px; line-height: 1.5; }

.legal-page .small-note {
  font-size: 10px;
  color: #555;
  font-style: italic;
  margin-top: 14px;
  padding-top: 8px;
  border-top: 1px dotted #C9D7E8;
}

/* ============ 404 PAGE ============ */
.error-404 { text-align: center; padding: 40px 20px; }

.error-404 .err-code {
  font-size: 72px;
  color: #1E5BA0;
  font-weight: bold;
  font-family: 'Arial Black', sans-serif;
  line-height: 1;
}

.error-404 .err-title {
  font-size: 18px;
  color: #143A6F;
  font-weight: bold;
  margin: 10px 0;
  text-transform: uppercase;
}

.error-404 .err-message {
  font-size: 12px;
  color: #000;
  margin: 16px auto;
  max-width: 480px;
  text-align: center;
}

.error-404 .err-back {
  display: inline-block;
  background: #1E5BA0;
  color: #FFFFFF;
  padding: 10px 24px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  margin-top: 14px;
  border: 2px solid #143A6F;
}

.error-404 .err-back:hover { background: #143A6F; color: #FFFFFF; }

/* ============ PRINT ============ */
@media print {
  body { background: #FFFFFF; }
  .topbar, .menu-box, .badges, .cta-box { display: none !important; }
  .page { box-shadow: none; max-width: 100%; }
}

/* ============ TABLET (900px) ============ */
@media (max-width: 900px) {
  .col-right { padding: 12px 16px 16px 14px; }
  .content h2.section-title { font-size: 14px; }
}

/* ============ MOBILE (700px) ============ */
@media (max-width: 700px) {
  body { font-size: 12px; }

  .topbar { padding: 6px 10px; font-size: 10px; }
  .topbar .topbar-left { display: none; }
  .topbar .lang-switch { width: 100%; justify-content: flex-end; }

  .header-table, .header-table tbody, .header-table tr, .header-table td {
    display: block;
    width: 100% !important;
  }
  .col-left { padding: 10px; }
  .col-right { border-left: none; border-top: 1px solid #C9D7E8; padding: 14px 14px 18px 14px; }
  .logo-box { margin: 0 auto; max-width: 220px; }
  .menu-box { margin-top: 10px; }
  .badges { justify-content: center; }
  .serv-table, .serv-table tbody, .serv-table tr, .serv-table td,
  .cat-table, .cat-table tbody, .cat-table tr, .cat-table td {
    display: block; width: 100% !important;
  }
  .footer-table, .footer-table tbody, .footer-table tr, .footer-table td {
    display: block; width: 100% !important; text-align: left;
  }
  .footer-right { text-align: left; }
  .banner { font-size: 10px; letter-spacing: 0.5px; }
  .division-card { display: block; }
  .division-card .div-icon, .division-card .div-body { display: block; width: 100%; }
  .division-card .div-icon { border-right: none; border-bottom: 1px solid #E0E8F2; padding: 10px; }
  .content { font-size: 12px; }
  .content h2.section-title { font-size: 14px; }
  .content h3.subsection { font-size: 13px; }

  .geo-table { font-size: 11px; }
  .proc-table td.fase { width: auto; display: block; padding-bottom: 0; }
  .proc-table td.num { display: inline-block; }

  .error-404 .err-code { font-size: 56px; }
  .error-404 .err-title { font-size: 16px; }
}

/* ============ SMALL PHONES (400px) ============ */
@media (max-width: 400px) {
  .badges { gap: 4px; }
  .badge { width: 80px; height: 90px; padding-top: 52px; font-size: 10px; }
  .badge::before { width: 30px; height: 30px; top: 10px; }
  .badge.qualita::after, .badge.ambiente::after { font-size: 20px; top: 12px; line-height: 30px; }
  .col-right { padding: 12px 12px 16px 12px; }
  .content { font-size: 11px; }
  .division-card h3 { font-size: 12px; }
  .division-card .div-tag { display: block; margin-left: 0; margin-top: 4px; width: max-content; }
}
