:root {
  --white: #ffffff;
  --bg: #dcdcdc;
  --bg-soft: #eeeeec;
  --text: #252525;
  --text-soft: #666666;
  --line: #d8d8d5;

  --accent: #ee0001;
  --accent-dark: #9f0000;
  --accent-soft: #f6e7e7;

  --max-width: 1180px;
}


/* RESET E BASE */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial light, Arial, Helvetica, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--white);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}


/* HEADER */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand img {
  display: block;
  height: 40px;
  width: auto;
}


/* NAVIGAZIONE */

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.main-nav > a,
.nav-dropdown-trigger {
  position: relative;
  display: block;
  padding: 27px 0 24px;

  color: #3d3d3d;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.main-nav > a::after,
.nav-dropdown-trigger::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 18px;

  width: 0;
  height: 2px;

  background: var(--accent);
  transition: width 0.2s ease;
}

.main-nav > a:hover::after,
.nav-dropdown:hover .nav-dropdown-trigger::after {
  width: 100%;
}


/* MENU SERVIZI */

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: -20px;
  z-index: 100;

  width: 235px;
  padding: 8px 0;

  background: var(--white);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);

  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);

  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 11px 18px;

  color: var(--text);
  font-size: 0.84rem;
  font-weight: 500;

  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.nav-dropdown-menu a:hover {
  background: var(--bg-soft);
  color: var(--accent);
}


/* ELEMENTI TIPOGRAFICI COMUNI */

.eyebrow {
  margin: 0 0 10px;

  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}


/* HERO HOME */

.hero {
  padding: 86px 0 46px;
  background: var(--white);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 46px;
}

.hero-copy {
  max-width: 560px;
}

.hero h1 {
  margin: 0;
  max-width: 620px;

  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.hero-text {
  max-width: 540px;
  margin: 18px 0 0;

  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: justify;
}

.hero-image {
  min-height: 260px;
  aspect-ratio: 3 / 2;

  overflow: hidden;
  background: var(--bg-soft);
}

.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* SEZIONI GENERALI */

.section {
  padding: 58px 0;
}

.section-muted {
  background: var(--bg);
}

.section-heading {
  max-width: 680px;
  margin-bottom: 28px;
}

.section-heading h2,
.agency-grid h2 {
  margin: 0;

  font-size: clamp(1.65rem, 3vw, 1.65rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.section-heading h2 {
  max-width: 650px;
}


/* SERVIZI */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);

  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.service-card {
  display: block;
  min-height: 190px;
  padding: 24px 24px 26px;

  background: var(--white);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);

  cursor: pointer;
  transition: background 0.2s ease;
}

.service-card:hover {
  background: var(--accent-soft);
}

.service-number {
  display: block;
  margin-bottom: 28px;

  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.service-card h3 {
  margin: 0 0 9px;

  font-size: 1.08rem;
  font-weight: 700;
}

.service-card p {
  max-width: 310px;
  margin: 0;

  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}


/* AGENZIA HOME */

.agency-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 70px;
  align-items: start;
}

.agency-copy {
  max-width: 650px;
}

.agency-copy p {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 0.95rem;
  text-align: justify;
}

#agenzia {
  padding: 52px 0;
}

.agency-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 70px;
  align-items: start;
}


/* PAGINE INTERNE */

.internal-page {
  padding: 50px 0 70px;
  background: var(--white);
}

.internal-page-header {
  max-width: 900px;
  margin-bottom: 50px;
}

.internal-page-header .eyebrow {
  margin-bottom: 8px;
}

.internal-page-header h1 {
  margin: 0;

  font-size: clamp(2rem, 3.5vw, 2.0rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.internal-page-image {
  width: 90%;
  height: 450px;
  margin: 0 auto;

  overflow: hidden;
  background: var(--bg-soft);
}

.internal-page-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.internal-page-content {
  position: relative;

  max-width: 820px;
  margin: -24px auto 0;
  padding: 30px 46px;

  background: var(--bg);
}

.internal-page-content p {
  margin: 0 0 22px;

  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.65;
  font-weight: 400;
  text-align: justify;
}

.internal-page-content p:last-child {
  margin-bottom: 0;
}

.internal-page-content .internal-page-intro {
  margin-bottom: 22px;
}

.internal-page-content h2 {
  margin: 34px 0 14px;

  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.internal-page-content h3 {
  margin: 28px 0 12px;

  font-size: 1.1rem;
}

.internal-page-content strong {
  color: var(--text);
  font-weight: 600;
}


/* CONTATTI */

.contact-section {
  padding: 48px 0;

  background: #2d2d2d;
  color: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.contact-section .eyebrow {
  color: var(--accent);
}

.contact-section h2 {
  margin: 0;

  font-size: 1.55rem;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.contact-section p {
  max-width: 540px;

  color: #d4d4d4;
  font-size: 0.8rem;
}

.contact-details {
  display: grid;
  border-top: 1px solid #545454;
}

.contact-details div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;

  padding: 10px 0;
  border-bottom: 1px solid #545454;
}

.contact-details span {
  color: #bcbcbc;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-details strong {
  font-size: 0.9rem;
  font-weight: 600;
}


/* FOOTER */

.site-footer {
  background: #222222;
  color: #ffffff;
}

.footer-inner {
  min-height: 42px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;

  font-size: 0.60rem;
}

.footer-inner p {
  margin: 0;
}

/* PAGINA CONTATTI */

.contacts-page {
  padding: 54px 0 70px;
  background: var(--white);
}

.contacts-page-header {
  margin-bottom: 30px;
}

.contacts-page-header .eyebrow {
  margin-bottom: 8px;
}

.contacts-page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 500;
}


/* MAPPA + FOTO */

.contacts-visual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.contacts-map,
.contacts-photo {
  height: 360px;
  overflow: hidden;
  background: var(--bg-soft);
}

.contacts-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* RIQUADRO GOOGLE MAPS */

.contacts-map {
  height: 360px;
  overflow: hidden;
  background: var(--bg-soft);
}

.map-link {
  display: flex;
  width: 100%;
  height: 100%;

  align-items: center;
  justify-content: center;

  background: var(--bg);
  transition: background 0.2s ease;
}

.map-link:hover {
  background: #d3d3d3;
}

.map-link-content {
  padding: 30px;
  text-align: center;
}

.map-link-label {
  display: block;
  margin-bottom: 12px;

  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.map-link-content strong {
  display: block;

  font-size: 1.25rem;
  font-weight: 500;
}

.map-link-content > span:not(.map-link-label):not(.map-link-button) {
  display: block;
  margin-top: 4px;

  color: var(--text-soft);
  font-size: 0.9rem;
}

.map-link-button {
  display: inline-block;
  margin-top: 24px;
  padding: 9px 16px;

  border: 1px solid var(--text);

  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.map-link:hover .map-link-button {
  background: var(--text);
  color: var(--white);
}


/* DATI CONTATTO */

.contacts-info {
  max-width: 760px;
  margin: 42px auto 0;
  text-align: center;
}

.contacts-info h2 {
  margin: 0 0 14px;
  font-size: 1.5rem;
  font-weight: 500;
}

.contacts-address {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.7;
}

.contacts-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);

  margin-top: 28px;

  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contacts-info-grid div {
  padding: 16px 20px;
}

.contacts-info-grid div + div {
  border-left: 1px solid var(--line);
}

.contacts-info-grid span {
  display: block;
  margin-bottom: 4px;

  color: var(--text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contacts-info-grid strong {
  font-size: 0.92rem;
  font-weight: 500;
}

/* Immagine pagina Chi siamo */
.chi-siamo-image {
  width: 70%;
  max-width: 720px;
  margin: 0 auto 80px;
}

.chi-siamo-image img {
  display: block;
  width: 100%;
  height: auto;
}


/* RESPONSIVE CONTATTI */

@media (max-width: 900px) {

  .contacts-visual-grid {
    gap: 18px;
  }

  .contacts-map,
  .contacts-photo {
    height: 300px;
  }
}


@media (max-width: 650px) {

  .contacts-page {
    padding: 40px 0 50px;
  }

  .contacts-page-header {
    margin-bottom: 22px;
  }

  .contacts-page-header h1 {
    font-size: 2rem;
  }

  .contacts-visual-grid {
    grid-template-columns: 1fr;
  }

  .contacts-map,
  .contacts-photo {
    height: 240px;
  }

  .contacts-info {
    margin-top: 32px;
  }

  .contacts-info-grid {
    grid-template-columns: 1fr;
  }

  .contacts-info-grid div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* RESPONSIVE TABLET */

@media (max-width: 900px) {

  .hero-grid,
  .agency-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero {
    padding: 52px 0 48px;
  }

  .hero-image {
    min-height: 260px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 48px 0;
  }

  .internal-page-image {
    height: 330px;
  }

  .internal-page-content {
    max-width: 720px;
    margin-top: 28px;
    padding: 30px 34px;
  }
}


/* RESPONSIVE MOBILE */

@media (max-width: 650px) {

  .container {
    width: min(calc(100% - 28px), var(--max-width));
  }

@media (max-width: 768px) {
  .chi-siamo-image {
    width: 100%;
    max-width: none;
    margin: 0 0 25px;
  }

  .chi-siamo-image img {
    width: 100%;
    height: auto;
    display: block;
  }
}

  /* HEADER */

  .header-inner {
    min-height: auto;
    padding: 16px 0 12px;

    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .main-nav {
    width: 100%;
    gap: 20px;
  }

  .main-nav > a,
  .nav-dropdown-trigger {
    padding: 8px 0 11px;
    font-size: 0.82rem;
  }

  .main-nav > a::after,
  .nav-dropdown-trigger::after {
    bottom: 5px;
  }

  .nav-dropdown-menu {
    left: 0;
    width: 210px;
  }

  .nav-dropdown-menu a {
    padding: 10px 15px;
    font-size: 0.8rem;
  }


  /* HERO */

  .hero {
    padding: 42px 0;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .hero-text {
    font-size: 0.94rem;
  }

  .hero-image {
    min-height: 220px;
  }


  /* SEZIONI */

  .section {
    padding: 42px 0;
  }

  .section-heading {
    margin-bottom: 22px;
  }


  /* SERVIZI */

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: auto;
    padding: 20px;
  }

  .service-number {
    margin-bottom: 18px;
  }


  /* PAGINE INTERNE */

  .internal-page {
    padding: 40px 0 50px;
  }

  .internal-page-header {
    margin-bottom: 22px;
  }

  .internal-page-header h1 {
    font-size: 2rem;
  }

  .internal-page-image {
    width: 100%;
    height: 240px;
  }

  .internal-page-content {
    margin: 20px 0 0;
    padding: 24px 20px;
  }

  .internal-page-content p {
    font-size: 0.94rem;
    line-height: 1.7;
  }

  .internal-page-content .internal-page-intro {
    font-size: 0.94rem;
  }


  /* CONTATTI */

  .contact-section {
    padding: 24px 0;
  }

  .contact-grid {
    gap: 24px;
  }

  .contact-details div {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 9px 0;
  }


  /* FOOTER */

  .footer-inner {
    min-height: auto;
    padding: 10px 0;

    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

}

/* PAGINE LEGALI */

.legal-page-content a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-page-content a:hover {
  color: var(--accent);
}

.legal-page-content h2:first-child {
  margin-top: 0;
}

/* Regolazioni individuali */

.internal-page-image img.img-auto {
  object-position: center 90%;
}

.internal-page-image img.img-casa {
  object-position: center 80%;
}


.internal-page-image img.img-impresa {
  object-position: center 35%;
}

.internal-page-image img.img-catastrofali {
  object-position: center 40%;
}

.internal-page-image img.img-associazioni {
  object-position: center 60%;
}

.internal-page-image img.img-infortuni {
  object-position: center 35%;
}