/* ============================================================
   LABORATORIO METRICO S.R.L. — Stylesheet principale
   Palette: Blu #1A5276 · Nero #1A1A1A · Bianco #FFFFFF
   Font: Inter (Google Fonts)
   ============================================================ */

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', sans-serif;
  color: #1A1A1A;
  background: #FFFFFF;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }
a { color: #1A5276; text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ── Tipografia ───────────────────────────────────────────── */
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);   font-weight: 600; line-height: 1.3; }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { margin-bottom: 1rem; }

/* ── Utilità ──────────────────────────────────────────────── */
.container   { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.section     { padding: 4rem 0; }
.section--gray { background: #F5F5F5; }
.text-center { text-align: center; }
.text-blue   { color: #1A5276; }

.btn {
  display: inline-block;
  padding: .75rem 1.75rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: background .2s, color .2s;
  text-decoration: none;
}
.btn--primary {
  background: #1A5276;
  color: #FFFFFF;
  border: 2px solid #1A5276;
}
.btn--primary:hover { background: #154064; border-color: #154064; text-decoration: none; }

.btn--outline {
  background: transparent;
  color: #1A5276;
  border: 2px solid #1A5276;
}
.btn--outline:hover { background: #1A5276; color: #FFF; text-decoration: none; }

/* ── Header / Nav ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1A1A1A;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 1.5rem;
}

.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}
.nav-logo img {
  height: 52px;
  width: auto;
  background: #FFF;
  border-radius: 4px;
  padding: 4px 8px;
}
.nav-logo-text {
  color: #FFF;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: 160px;
}
.nav-logo-text span { display: block; font-size: .72rem; font-weight: 400; color: #AAA; }

.nav-inner > nav { flex: 1; }

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .2rem;
}

.nav-link {
  display: block;
  padding: .5rem .9rem;
  color: #FFFFFF;
  font-size: .87rem;
  font-weight: 500;
  border-radius: 4px;
  transition: background .2s;
}
.nav-link:hover,
.nav-link.active { background: #1A5276; color: #FFF; text-decoration: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
}
.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 26px;
  height: 2px;
  background: #FFF;
  transition: transform .3s;
}
.hamburger { position: relative; }
.hamburger::before,
.hamburger::after { content: ''; position: absolute; left: 0; }
.hamburger::before { top: -8px; }
.hamburger::after  { top:  8px; }

.nav-toggle.open .hamburger { background: transparent; }
.nav-toggle.open .hamburger::before { transform: rotate(45deg) translate(6px, 6px); }
.nav-toggle.open .hamburger::after  { transform: rotate(-45deg) translate(6px, -6px); }

/* ── Page hero (interno) ──────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, #1A1A1A 0%, #2d2d2d 50%, #1A5276 100%);
  color: #FFF;
  padding: 3.5rem 0 3rem;
}
.page-hero h1 { color: #FFF; margin-bottom: .5rem; }
.page-hero .subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  max-width: 560px;
}
.page-hero .breadcrumb { font-size: .83rem; color: #AAA; margin-bottom: .75rem; }
.page-hero .breadcrumb a { color: #6aafd4; }

/* ── Home Hero ─────────────────────────────────────────────── */
.home-hero {
  background: linear-gradient(135deg, #1A1A1A 0%, #1f3552 60%, #1A5276 100%);
  color: #FFF;
  padding: 5rem 0 4.5rem;
  text-align: center;
}
.home-hero h1 { color: #FFF; margin-bottom: 1rem; }
.home-hero h1 span { color: #6aafd4; }
.home-hero .lead {
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 2rem;
  opacity: .88;
  line-height: 1.7;
}
.home-hero .btn-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Accreditamento badge ─────────────────────────────────── */
.accred-strip {
  background: #1A5276;
  color: #FFF;
  padding: 1rem 0;
  text-align: center;
  font-size: .9rem;
  letter-spacing: .02em;
}
.accred-strip strong { font-weight: 700; }

/* ── Sezione chi siamo / intro ───────────────────────────── */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}
.intro-text p { color: #444; }
.intro-text p + p { margin-top: .25rem; }

.intro-side {
  background: #F5F5F5;
  border-radius: 8px;
  padding: 2rem;
  border-left: 4px solid #1A5276;
}
.intro-side h3 { margin-bottom: 1rem; color: #1A5276; }
.intro-side ul { list-style: none; }
.intro-side li {
  padding: .45rem 0 .45rem 1.2rem;
  position: relative;
  font-size: .92rem;
  color: #333;
  border-bottom: 1px solid #E8E8E8;
}
.intro-side li:last-child { border-bottom: none; }
.intro-side li::before { content: '▸'; color: #1A5276; position: absolute; left: 0; }

/* ── Scope cards ──────────────────────────────────────────── */
.scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.scope-card {
  background: #FFF;
  border: 1px solid #E8E8E8;
  border-top: 4px solid #1A5276;
  border-radius: 6px;
  padding: 1.75rem 1.5rem;
}
.scope-card .icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
  color: #1A5276;
}
.scope-card h3 { margin-bottom: .5rem; font-size: 1rem; }
.scope-card p  { color: #555; font-size: .88rem; margin: 0; }

/* ── Sezione titolo ───────────────────────────────────────── */
.section-header { margin-bottom: 2.5rem; }
.section-header h2 { margin-bottom: .5rem; }
.section-header p  { color: #555; font-size: 1rem; max-width: 620px; }
.section-header .line {
  width: 48px; height: 4px; background: #1A5276; margin-top: 1rem;
}

/* ── Documenti ────────────────────────────────────────────── */
.docs-list { margin-top: 1.5rem; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.25rem;
  background: #FFF;
  border: 1px solid #E8E8E8;
  border-radius: 6px;
  margin-bottom: .75rem;
  transition: box-shadow .2s, border-color .2s;
  text-decoration: none;
  color: inherit;
}
.doc-item:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.09);
  border-color: #1A5276;
  text-decoration: none;
}
.doc-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: #EBF2F9;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #1A5276;
}
.doc-info { flex: 1; }
.doc-info strong { display: block; font-size: .96rem; font-weight: 600; color: #1A1A1A; }
.doc-info span   { font-size: .82rem; color: #888; }
.doc-dl {
  flex-shrink: 0;
  font-size: .82rem;
  font-weight: 600;
  color: #1A5276;
  border: 1px solid #1A5276;
  padding: .3rem .75rem;
  border-radius: 4px;
  transition: background .2s, color .2s;
}
.doc-item:hover .doc-dl { background: #1A5276; color: #FFF; }

/* ── Reclami ──────────────────────────────────────────────── */
.info-box {
  background: #EBF2F9;
  border-left: 4px solid #1A5276;
  padding: 1.5rem 1.75rem;
  border-radius: 0 6px 6px 0;
  margin-top: 2rem;
}
.info-box p { color: #333; margin: 0; font-size: .97rem; line-height: 1.7; }
.info-box a { color: #1A5276; font-weight: 600; }

/* ── Contatti ─────────────────────────────────────────────── */
.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-info-card {
  background: #F5F5F5;
  border-radius: 8px;
  padding: 2rem;
}
.contact-info-card h3 { margin-bottom: 1.25rem; color: #1A5276; }
.contact-row {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  font-size: .93rem;
}
.contact-row .ci-label {
  font-weight: 600;
  min-width: 70px;
  color: #555;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding-top: 2px;
}
.contact-row a { color: #1A5276; }
.contact-row a:hover { text-decoration: underline; }

.logo-accred {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #DDD;
}
.logo-accred img { max-height: 80px; width: auto; }

.contact-form .form-group { margin-bottom: 1.25rem; }
.contact-form label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: .4rem; color: #333; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1px solid #DDD;
  border-radius: 4px;
  font-family: inherit;
  font-size: .95rem;
  transition: border-color .2s;
}
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: #1A5276; }
.contact-form textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: .8rem; color: #888; margin-top: .5rem; }

.form-success {
  background: #e6f4ea;
  color: #2e7d32;
  padding: 1rem 1.25rem;
  border-radius: 4px;
  display: none;
  margin-bottom: 1rem;
  font-size: .93rem;
}
.form-error {
  background: #fdecea;
  color: #c62828;
  padding: 1rem 1.25rem;
  border-radius: 4px;
  display: none;
  margin-bottom: 1rem;
  font-size: .93rem;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: #1A1A1A;
  color: #CCC;
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand img { height: 48px; margin-bottom: 1rem; background: #FFF; padding: 4px 8px; border-radius: 4px; }
.footer-brand p { font-size: .87rem; color: #999; line-height: 1.7; }

.footer-col h4     { color: #FFF; font-size: .88rem; margin-bottom: 1rem; letter-spacing: .04em; text-transform: uppercase; }
.footer-col ul li  { margin-bottom: .5rem; }
.footer-col ul li a { color: #AAA; font-size: .87rem; }
.footer-col ul li a:hover { color: #6aafd4; text-decoration: none; }
.footer-col address { font-style: normal; font-size: .87rem; color: #999; line-height: 1.9; }
.footer-col address a { color: #6aafd4; }

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  font-size: .82rem;
  color: #666;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .intro-grid    { grid-template-columns: 1fr; }
  .contatti-grid { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-inner > nav { flex: none; }

  .nav-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: #1A1A1A;
    padding: .5rem 0 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,.3);
    z-index: 99;
  }
  .nav-menu.open { display: flex; }
  .nav-link { padding: .75rem 1.25rem; border-radius: 0; }

  .section { padding: 2.5rem 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .home-hero { padding: 3rem 0 2.5rem; }
  .scope-grid { grid-template-columns: 1fr; }
}
