/* =========================================================
   General Pol S.R.L — Vigilanza Armata
   Riscrittura HTML5/CSS del sito legacy (CMS Abaco)
   Palette e tipografia fedeli all'originale.
   ========================================================= */

:root {
  --rosso: #E30F00;
  --rosso-scuro: #b60c00;
  --navy: #001320;
  --navy2: #04263b;
  --testo: #1a1a1a;
  --grigio: #6b6b6b;
  --chiaro: #f4f5f6;
  --bianco: #ffffff;
  --serif: 'Domine', Georgia, serif;
  --sans: 'Montserrat', Arial, Helvetica, sans-serif;
  --header-h: 122px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--testo);
  background-color: var(--bianco);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--rosso); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--rosso-scuro); }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.25; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------------- Header ---------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--navy);
  transition: background .3s ease;
}
.site-header.solid { background: var(--navy); box-shadow: 0 2px 10px rgba(0,0,0,.35); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: .6rem 1.5rem;
}

.brand img { height: 60px; width: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; align-items: center; }
.main-nav a {
  color: #fff;
  font-weight: 300;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: .4em 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.active { color: #fff; border-bottom-color: var(--rosso); }

.header-extra { display: flex; align-items: center; gap: 1rem; color: #fff; white-space: nowrap; }
.header-extra .phone { color: #fff; font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; }
.header-extra .phone i { color: var(--rosso); }
.header-extra .lang a { color: #cfd6dc; font-size: .85rem; font-weight: 700; }

/* selettore lingua */
.lang-switch { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; }
.lang-switch a { color: #9fb0bd; letter-spacing: .04em; }
.lang-switch a:hover { color: #fff; }
.lang-switch a.active { color: #fff; }
.lang-switch .sep { color: rgba(255,255,255,.35); }

/* mobile toggle */
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }

/* ---------------- Hero ---------------- */
.hero { position: relative; background: var(--navy); }
.hero-slides { position: relative; height: clamp(560px, 100vh, 1000px); }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,19,32,.72), rgba(0,19,32,.25));
  pointer-events: none;
}
.hero-caption {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 12%;
  max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; color: #fff;
}
.hero-caption h1 { font-size: clamp(1.8rem, 4vw, 3rem); text-transform: uppercase; margin: 0 0 .4rem; }
.hero-caption p { font-size: 1.1rem; max-width: 640px; margin: 0; }
.hero-caption .btn { margin-top: 1.2rem; }

/* internal page hero band */
.page-hero {
  position: relative;
  background: var(--navy) center/cover no-repeat;
  padding: calc(var(--header-h) + 2.4rem) 0 2.4rem;
  color: #fff;
  text-align: center;
}
.page-hero::after { content: ""; position: absolute; inset: 0; background: rgba(0,19,32,.66); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); text-transform: uppercase; margin: 0; }
.breadcrumb { position: relative; z-index: 2; color: #cfd6dc; font-size: .85rem; margin-top: .6rem; }
.breadcrumb a { color: #cfd6dc; }
.breadcrumb a:hover { color: #fff; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  background: var(--rosso);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .85rem;
  padding: .8em 1.6em;
  border-radius: 2px;
}
.btn:hover { background: var(--rosso-scuro); color: #fff; }

/* ---------------- Content ---------------- */
.section { padding: 3.5rem 0; }
.section.alt { background: var(--chiaro); }
.section h2 { color: var(--navy); font-size: 1.9rem; text-transform: uppercase; margin: 0 0 1.2rem; }
.section .lead { font-size: 1.15rem; color: var(--grigio); }
.prose p { margin: 0 0 1.1em; }
.prose { max-width: 820px; }
.text-center { text-align: center; }
.section-title { text-align: center; color: var(--navy); font-size: 2rem; text-transform: uppercase; margin: 0 0 .4rem; }
.section-title + .subtitle { text-align: center; color: var(--rosso); font-weight: 700; margin: 0 0 2.5rem; text-transform: uppercase; letter-spacing: .03em; }

/* service cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.5rem; }
.card {
  background: #fff; border: 1px solid #e6e6e6; border-radius: 4px;
  padding: 2.2rem 1.5rem; text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(0,0,0,.12); }
.card .ico {
  width: 74px; height: 74px; margin: 0 auto 1.2rem;
  display: grid; place-items: center;
  background: var(--navy); color: #fff; border-radius: 50%;
  font-size: 1.8rem;
}
.card:hover .ico { background: var(--rosso); }
.card h3 { color: var(--navy); font-size: 1.15rem; text-transform: uppercase; margin: 0 0 .6rem; }
.card p { color: var(--grigio); font-size: .95rem; margin: 0 0 1.2rem; flex: 1; }
.card .more { color: var(--rosso); font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .04em; }

/* map */
.map-wrap { border: 0; }
.map-wrap iframe { display: block; width: 100%; height: 420px; border: 0; }

/* contact layout */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.contact-info dt { font-weight: 700; color: var(--navy); text-transform: uppercase; font-size: .8rem; letter-spacing: .04em; margin-top: 1.1rem; }
.contact-info dd { margin: .1rem 0 0; }
.contact-form label { display: block; font-size: .8rem; font-weight: 700; text-transform: uppercase; color: var(--navy); margin: .9rem 0 .3rem; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: .7em .8em; border: 1px solid #ccc; border-radius: 3px; font: inherit;
}
.contact-form .btn { border: 0; cursor: pointer; margin-top: 1.2rem; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--navy); color: #cfd6dc; font-size: .95rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
.footer-top .brand-f { color: #fff; font-family: var(--serif); font-size: 1.2rem; margin: 0 0 .8rem; }
.site-footer address { font-style: normal; line-height: 1.8; }
.site-footer a { color: #cfd6dc; }
.site-footer a:hover { color: #fff; }
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: .4rem 0; }
.footer-red { color: var(--rosso); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 1rem 0 1.4rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem;
  font-size: .8rem;
}
.footer-credit { font-size: .62rem; opacity: .75; }
.footer-credit a { color: #cfd6dc; font-weight: 700; }
.footer-credit a:hover { color: #fff; }

/* ===== Header rivisto: logo, menu a tendina, ricerca ===== */
.brand img { height: 104px; width: auto; }
.main-nav { flex: 1 1 auto; }
.main-nav > ul { justify-content: center; gap: 2.2rem; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a { font-weight: 400; }
.main-nav .has-sub > a::after {
  content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  font-size: .55rem; margin-left: .5rem; vertical-align: middle;
}
.submenu {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 220px; margin: 0; padding: .4rem 0; list-style: none;
  background: var(--navy2); border-top: 3px solid var(--rosso);
  box-shadow: 0 12px 26px rgba(0,0,0,.4);
  opacity: 0; visibility: hidden; transition: all .2s ease;
}
.main-nav .has-sub:hover .submenu,
.main-nav .has-sub:focus-within .submenu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.submenu li { display: block; width: 100%; }
.submenu a { display: block; padding: .55rem 1.3rem; border: 0; text-transform: none; letter-spacing: 0; font-size: .9rem; text-align: left; white-space: nowrap; }
.submenu a:hover { background: var(--rosso); border: 0; color: #fff; }

.header-search { display: inline-flex; align-items: center; gap: .4rem; }
.header-search input { background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,.5); color: #fff; padding: .2rem .2rem; width: 120px; font: inherit; font-size: .85rem; }
.header-search input::placeholder { color: rgba(255,255,255,.55); }
.header-search button { background: none; border: 0; color: var(--rosso); font-size: 1.05rem; cursor: pointer; padding: 0; }

.lang-alt { color: #fff; font-weight: 700; letter-spacing: .05em; font-size: .95rem; }
.lang-alt:hover { color: var(--rosso); }

/* ===== Hero galleria 3 immagini (home) ===== */
.hero-home { padding-top: var(--header-h); background: var(--navy); }
.hero-gallery { display: flex; height: clamp(420px, 82vh, 800px); }
.hero-gallery .cell { flex: 1 1 0; min-width: 0; background-size: cover; background-position: center; }
.hero-dots { display: flex; justify-content: center; gap: .5rem; padding: .9rem 0; background: #fff; }
.hero-dots span { width: 11px; height: 11px; border-radius: 50%; background: #cfcfcf; }
.hero-dots span.active { background: var(--rosso); }

/* ===== Certificati (home) ===== */
.certs { display: flex; flex-wrap: wrap; gap: 1.6rem; justify-content: center; padding-top: 1rem; }
.certs img { max-height: 380px; width: auto; border: 1px solid #e3e3e3; box-shadow: 0 6px 18px rgba(0,0,0,.1); }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .header-inner { flex-wrap: wrap; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: .2rem; width: 100%; padding: .6rem 0; }
  .main-nav a { display: block; width: 100%; }
  .site-header { background: var(--navy); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .submenu { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; min-width: 0; background: rgba(255,255,255,.06); border-top: 0; padding-left: 1rem; }
  .main-nav .has-sub > a::after { display: none; }
  .hero-gallery { flex-direction: column; height: auto; }
  .hero-gallery .cell { height: 220px; }
  .header-search { display: none; }
  .header-extra { flex-wrap: wrap; }
}
