/* Montserrat (SIL OFL), self-hosted: same typeface as semiodigital.it, no third-party requests (CSP + GDPR). */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/montserrat-v25-latin-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/montserrat-v25-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/montserrat-v25-latin-700.woff2") format("woff2");
}

/* Semiodigital palette (semiodigital_public_web/web/colors.php). */
:root {
  --vm-blue: #11183e;
  --vm-blue-2: #1b2560;
  --vm-yellow: #e8b321;
  --vm-lightblue: #2fb3fc;
  --vm-bg: #f6f7fb;
  --vm-border: #e3e6f0;
  --vm-muted: #5a617f; /* 6.1:1 on white */
  --vm-radius: 0.85rem;
  --vm-shadow: 0 1px 2px rgba(17, 24, 62, 0.05), 0 4px 16px rgba(17, 24, 62, 0.06);
  --vm-shadow-hover: 0 2px 4px rgba(17, 24, 62, 0.06), 0 10px 28px rgba(17, 24, 62, 0.1);
  --bs-body-font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-focus-ring-color: rgba(47, 179, 252, 0.35);
}

body {
  background-color: var(--vm-bg);
  font-family: var(--bs-body-font-family);
  color: #23284a;
}

h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .h5, .vm-heading {
  color: var(--vm-blue);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* #0b6fa8: 5.45:1 on white, 5.09:1 on the page background (WCAG AA). */
a {
  color: #0b6fa8;
}

/* Links inside alerts follow the alert text colour (AA on tinted backgrounds). */
.alert a:not(.btn) {
  color: inherit;
  text-decoration: underline;
}

.alert {
  border-radius: var(--vm-radius);
}

::selection {
  background: var(--vm-yellow);
  color: var(--vm-blue);
}

/* ---- Navbar ---- */

.vm-navbar {
  background-color: var(--vm-blue);
  border-bottom: 3px solid var(--vm-yellow);
}

.vm-navbar .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
}

.vm-navbar .navbar-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.vm-navbar .navbar-brand .vm-accent {
  color: var(--vm-yellow);
}

.vm-navbar .nav-link {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85); /* >= 11:1 on navy */
}

.vm-navbar .nav-link:hover,
.vm-navbar .nav-link:focus {
  color: var(--vm-yellow);
}

/* "by Semiodigital" lockup next to the product name. */
.vm-by {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.25rem;
  padding-left: 0.85rem;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  color: #aeb6dd; /* 8.4:1 on navy */
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.vm-by img {
  height: 26px;
  width: auto;
}

.vm-by:hover {
  color: #fff;
}

/* Logout is a POST form rendered as a nav link. */
.vm-navbar .btn-link.nav-link {
  text-decoration: none;
  border: 0;
}

/* ---- Buttons ---- */

.btn {
  font-weight: 600;
  border-radius: 0.6rem;
}

.btn-vm {
  background-color: var(--vm-yellow);
  border-color: var(--vm-yellow);
  color: var(--vm-blue);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(232, 179, 33, 0.3);
}

.btn-vm:hover, .btn-vm:focus {
  background-color: #d2a21c;
  border-color: #d2a21c;
  color: var(--vm-blue);
}

.btn-outline-blue {
  color: var(--vm-blue);
  border-color: var(--vm-blue);
}

.btn-outline-blue:hover {
  background-color: var(--vm-blue);
  color: #fff;
}

/* Outline button on the dark hero. */
.btn-outline-light-vm {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-outline-light-vm:hover, .btn-outline-light-vm:focus {
  background-color: #fff;
  border-color: #fff;
  color: var(--vm-blue);
}

/* ---- Forms ---- */

.form-control, .form-select {
  border-radius: 0.55rem;
  border-color: #d3d7e6;
}

.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--vm-lightblue);
  box-shadow: 0 0 0 0.2rem rgba(47, 179, 252, 0.25);
}

.form-check-input:checked {
  background-color: var(--vm-blue);
  border-color: var(--vm-blue);
}

.form-label {
  font-weight: 600;
  color: var(--vm-blue);
}

/* ---- Hero ---- */

.vm-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--vm-blue) 0%, var(--vm-blue-2) 100%);
  color: #fff;
  border-radius: 1.1rem !important;
}

.vm-hero > :not(.vm-hero-art) {
  position: relative;
  z-index: 1;
}

/* Semiodigital mark, purely decorative. */
.vm-hero-art {
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  height: 82%;
  width: auto;
  opacity: 0.22;
  pointer-events: none;
}

.vm-hero h1, .vm-hero p.lead {
  color: #fff;
}

.vm-hero h1 .vm-accent {
  color: var(--vm-yellow);
}

.vm-hero a:not(.btn) {
  color: #8fd3fe; /* >= 8.7:1 on the hero gradient */
}

.vm-hero .badge {
  white-space: normal;
  text-align: left;
  line-height: 1.3;
  background-color: var(--vm-yellow);
  color: var(--vm-blue);
  font-weight: 600;
  padding: 0.45em 0.8em;
  border-radius: 2rem;
}

.vm-hero-note {
  color: #c9cfee; /* 10:1 on navy */
}

.vm-hero-by img {
  height: 34px;
  width: auto;
}

/* Semiodigital + CNA Catania logos, separated by a hairline. */
.vm-hero-logos a + a {
  padding-left: 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.vm-hero-by .vm-hero-logos a + a img {
  height: 40px;
}

.vm-footer-cna img {
  height: 40px;
  width: auto;
}

@media (max-width: 767.98px) {
  .vm-hero-art {
    opacity: 0.1;
    right: -8%;
  }
}

/* ---- Cards ---- */

.vm-card {
  border: 1px solid var(--vm-border);
  border-radius: var(--vm-radius);
  background: #fff;
  box-shadow: var(--vm-shadow);
}

a.vm-card, .vm-card-lift {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

a.vm-card:hover, .vm-card-lift:hover {
  box-shadow: var(--vm-shadow-hover);
  transform: translateY(-2px);
}

.vm-card-accent {
  border-top: 4px solid var(--vm-yellow);
}

.vm-card-accent-blue {
  border-top: 4px solid var(--vm-lightblue);
}

/* Small uppercase label above a section title. */
.vm-eyebrow {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vm-muted);
}

/* Key figures on the landing page. */
.vm-stat {
  display: block;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--vm-blue);
}

@media (max-width: 575.98px) {
  .vm-stat {
    font-size: 1.5rem;
  }
}

.vm-stat-label {
  color: var(--vm-muted);
  font-size: 0.9rem;
}

/* Numbered steps. */
.vm-steps {
  list-style: none;
  counter-reset: vm-step;
  padding-left: 0;
}

.vm-steps li {
  counter-increment: vm-step;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 0.9rem;
}

.vm-steps li::before {
  content: counter(vm-step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--vm-blue);
  color: var(--vm-yellow);
}

.vm-steps-light li::before {
  background: var(--vm-lightblue);
  color: var(--vm-blue);
}

/* Date timeline. */
.vm-timeline {
  list-style: none;
  padding-left: 0;
  margin: 0;
  border-left: 2px solid var(--vm-border);
}

.vm-timeline li {
  position: relative;
  padding: 0 0 0.85rem 1.1rem;
}

.vm-timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--vm-yellow);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--vm-yellow);
}

.vm-timeline li:last-child {
  padding-bottom: 0;
}

/* ---- Badges, score, misc ---- */

.badge-verified {
  background-color: var(--vm-lightblue);
  color: var(--vm-blue);
}

.badge-partner {
  background-color: #eef0f6;
  color: var(--vm-muted);
}

.vm-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.vm-score {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--vm-blue);
}

.vm-tipologia-covered {
  font-weight: 600;
}

.table > thead th {
  color: var(--vm-blue);
  font-weight: 600;
  border-bottom-color: var(--vm-blue);
}

/* ---- Tabs ---- */

.nav-tabs .nav-link {
  color: var(--vm-blue);
  font-weight: 600;
}

/* Inset shadow, not a border: keeps the active tab on the same baseline. */
.nav-tabs .nav-link.active {
  box-shadow: inset 0 3px 0 var(--vm-yellow);
}

/* Tabs scroll horizontally on narrow screens instead of wrapping. */
.vm-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
}

.vm-tabs .nav-link {
  white-space: nowrap;
}

/* ---- Footer ---- */

footer.vm-footer {
  background-color: var(--vm-blue);
  color: #aeb6dd; /* 8.4:1 on navy */
  font-size: 0.9rem;
  border-top: 3px solid var(--vm-yellow);
}

footer.vm-footer a {
  color: #8fd3fe; /* 10:1 on navy */
}

footer.vm-footer a:hover {
  color: #fff;
}

.vm-footer-logo img {
  height: 44px;
  width: auto;
}

.vm-footer-title {
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.vm-social {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

footer.vm-footer .vm-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background-color 0.2s ease, color 0.2s ease;
}

footer.vm-footer .vm-social a:hover,
footer.vm-footer .vm-social a:focus {
  background: var(--vm-yellow);
  color: var(--vm-blue);
}

.vm-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.vm-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #959dc6; /* 6.3:1 on navy */
  font-size: 0.8rem;
}

@media (prefers-reduced-motion: reduce) {
  a.vm-card, .vm-card-lift, .vm-social a {
    transition: none;
  }

  a.vm-card:hover, .vm-card-lift:hover {
    transform: none;
  }
}
