:root {
  --bg: #f4f7fa;
  --surface: #ffffff;
  --surface-soft: #eef3f8;
  --text: #153047;
  --text-soft: #425b72;
  --primary: #0b4b7a;
  --primary-dark: #083a5f;
  --border: #ced9e4;
  --radius: 14px;
  --shadow: 0 10px 24px rgba(15, 40, 65, 0.08);
  --max: 1500px;
  --header-h: 76px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f7fafc 0%, #f2f6fa 100%);
  line-height: 1.55;
}

a {
  color: var(--primary);
  text-decoration: none;
}

.container {
  width: min(100% - 15rem, var(--max));
  margin: 0 auto;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .container {
    width: min(100% - 2.5rem, var(--max));
  }
}

.narrow {
  width: min(100% - 2.4rem, 860px);
}

.pre-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  background: #eff3f8
}

.pre-header-inner {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pre-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-weight: 600;
}

.pre-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.pre-brand-text {
  font-size: 0.95rem;
  line-height: 1.2;
}

.pre-header-cta {
  min-width: 104px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  padding-top: 20px;
  padding-bottom: 20px;

  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
  font-weight: 700;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.brand-text {
  white-space: nowrap;
}

.primary-nav {
  margin-left: auto;
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-link:hover {
  background: var(--surface-soft);
  color: var(--primary-dark);
}

.nav-link.is-active,
.nav-link.active,
.nav-link[aria-current="page"] {
  background: transparent;
  color: var(--text-soft);
  border: none;
  box-shadow: none;
}

.header-cta {
  margin-left: 0.5rem;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  margin-left: auto;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero {
  position: relative;
  padding: 9rem 0 5.8rem;
  scroll-margin-top: calc(var(--header-h) + 12px);
  background-image: url("../images/IMG_20260104_174838.jpg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 32, 50, 0.56);
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
}

.eyebrow {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: #4f6f8a;
  margin: 0 0 1rem;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin-bottom: 1.1rem;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
}

.lead {
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.1rem;
}

.hero h1 {
  color: #ffffff;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.7rem;
}

.action-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

#accedi .hero-actions.access-actions {
  gap: 5rem;
}

#accedi .container > div {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

#accedi .steps-list {
  display: inline-block;
  text-align: left;
  margin-top: 2rem;
}

#accedi .hero-actions {
  justify-content: center;
}

.action-label {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-soft);
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  padding: 0.7rem 1rem;
  font-weight: 700;
  border: 1px solid transparent;
  min-height: 44px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.section {
  padding: 5rem 0;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

#perche.section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-alt {
  background: var(--surface-soft);
  border-top: 1px solid #e1e9f1;
  border-bottom: 1px solid #e1e9f1;
}

.split-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.4rem;
}

#blocco-istituzionale .split-grid {
  gap: 5.2rem;
}

#chi .split-grid {
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2.6rem;
}

#chi .image-card {
  min-height: 0;
  height: 260px;
  align-self: start;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.info-card,
.placeholder-card,
.pricing-box,
.highlight-box,
.timeline article,
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.info-card,
.timeline article,
.news-card {
  box-shadow: var(--shadow);
}

.info-card {
  text-align: center;
}

.card-icon {
  width: 60px;
  height: auto;
  margin-bottom: 20px;
}

.highlight-box {
  margin-top: 1rem;
  background: #f8fbfe;
}

.highlight-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}

.highlight-grid .highlight-box,
.highlight-grid .strategic-card {
  margin-top: 0;
}

.strategic-card {
  margin-top: 1.1rem;
  padding: 1.25rem 1.35rem;
  background: #f7fbff;
  border: 1px solid #cfe0ef;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(18, 44, 68, 0.06);
}

.strategic-card h3 {
  margin-bottom: 0.6rem;
  color: var(--primary-dark);
}

.strategic-card p {
  margin: 0 0 0.75rem;
  color: var(--text);
}

.strategic-list {
  margin: 0;
  padding-left: 1.2rem;
}

.strategic-list li {
  margin-bottom: 0.5rem;
  color: var(--text-soft);
}

.service-highlight {
  margin-top: 2.4rem;
  padding: 2rem 2.2rem;
  background: #f7fafc;
  border: 1px solid #caddee;
  border-radius: 14px;
}

.service-highlight p {
  margin: 0;
  font-size: 1.03rem;
  line-height: 1.7;
  color: var(--text);
}

.service-highlight a {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 40px;
}

.pricing-box {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1rem;
}

.price-main {
  background: #f7fbff;
  border: 1px solid #c7dbed;
  border-radius: 12px;
  padding: 1rem;
}

.service-label {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(11, 75, 122, 0.1);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
}

.price-label {
  margin: 0;
  color: #4f6f8a;
  font-weight: 600;
}

.price-value {
  margin: 0.3rem 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--primary-dark);
}

.price-note {
  margin: 0;
  color: var(--text-soft);
}

.features-list,
.steps-list {
  margin: 0;
  padding-left: 1.1rem;
}

.pricing-box .features-list {
  margin-left: 2rem;
}

.features-list li,
.steps-list li {
  margin-bottom: 0.45rem;
}

.features-list li + li {
  margin-top: 1rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.news-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.news-card {
  overflow: hidden;
}

.news-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.news-card-content {
  padding: 24px;
}

.news-date {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #607d97;
  letter-spacing: 0.06em;
}

.news-card-content h3 {
  margin-bottom: 12px;
}

.news-card-content p {
  margin-bottom: 16px;
}

.news-link {
  color: var(--primary-dark);
  font-weight: 700;
}

.placeholder-card {
  border-style: dashed;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(198, 214, 230, 0.18) 0,
    rgba(198, 214, 230, 0.18) 8px,
    rgba(255, 255, 255, 0.18) 8px,
    rgba(255, 255, 255, 0.18) 16px
  );
}

.institutional-image-card {
  padding: 0;
  min-height: 320px;
  overflow: hidden;
  border-style: solid;
  background: transparent;
}

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

.image-card {
  padding: 0;
  min-height: 320px;
  overflow: hidden;
  border-style: solid;
  background: transparent;
}

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

.placeholder-link {
  font-weight: 700;
  color: var(--primary-dark);
}

.contact-centered {
  display: flex;
  justify-content: center;
}

.contact-content {
  max-width: 600px;
  text-align: center;
}

.contact-one-line {
  white-space: nowrap;
}

.site-footer {
  margin-top: 0;
  background: #fff;
  border-top: 1px solid var(--border);
}

.footer-top,
.footer-main,
.footer-subnav {
  width: 100%;
}

.footer-top {
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  min-width: 104px;
}

.footer-main {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
}

.footer-subnav {
  background: #f7fafc;
}

.footer-top-inner,
.footer-main-inner,
.footer-subnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-top-inner {
  min-height: 62px;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.footer-main-inner {
  min-height: 74px;
  gap: 1.2rem;
}

.footer-nav {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-nav-link {
  padding: 0.42rem 0.62rem;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 600;
  text-transform: uppercase;
}

.footer-nav-link:hover {
  background: var(--surface-soft);
  color: var(--primary-dark);
}

.footer-subnav-inner {
  justify-content: center;
  gap: 1.5rem;
  min-height: 52px;
  flex-wrap: wrap;
}

.footer-sub-link {
  color: #647b90;
  font-size: 0.84rem;
  font-weight: 500;
}

.footer-sub-link:hover {
  color: var(--primary-dark);
}

.footer-main-inner .brand {
  margin-right: 0.6rem;
}

.footer-top-inner,
.footer-main-inner,
.footer-subnav-inner {
  gap: 1rem;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .primary-nav {
    gap: 0.45rem;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .footer-nav {
    gap: 0.35rem;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 68px;
  }

  .pre-header-inner {
    min-height: 56px;
  }

  .pre-brand-text {
    font-size: 0.86rem;
  }

  .pre-header-cta {
    min-width: auto;
    padding: 0.62rem 0.9rem;
  }

  .footer-main-inner,
  .footer-subnav-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    padding: 0.9rem 0;
  }

  .footer-main-inner {
    gap: 0.7rem;
  }

  .footer-top-inner {
    min-height: 56px;
  }

  .footer-nav {
    margin-left: 0;
    justify-content: center;
  }

  .footer-subnav-inner {
    gap: 0.8rem 1.2rem;
  }

  .menu-toggle {
    display: inline-block;
  }

  .primary-nav {
    position: absolute;
    top: calc(var(--header-h) + 4px);
    left: 1rem;
    right: 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: var(--shadow);
    display: none;
    margin-left: 0;
  }

  .primary-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.25rem;
    text-align: center;
    margin-left: 0;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }

  .primary-nav.is-open .nav-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
    margin-left: 0;
    margin-right: 0;
  }

  .hero {
    padding-top: 6.6rem;
    padding-bottom: 5rem;
  }

  .hero-grid,
  .split-grid,
  .pricing-box,
  .cards-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

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

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 767px) {
  .split-grid {
    gap: 10px;
  }

  #chi .split-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  :root {
    --header-h: 56px;
  }

  .container {
    width: min(100% - 1.5rem, var(--max));
  }

  .pre-header {
    padding: 0.35rem 0;
  }

  .pre-header-inner {
    min-height: 48px;
    gap: 0.7rem;
  }

  .pre-brand-mark {
    width: 34px;
    height: 34px;
    font-size: 0.64rem;
  }

  .pre-brand-text {
    font-size: 0.8rem;
    line-height: 1.1;
  }

  .pre-header-cta {
    padding: 0.5rem 0.82rem;
    min-height: 38px;
    font-size: 0.9rem;
  }

  .site-header {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
  }

  .header-inner {
    min-height: 52px;
    gap: 0.7rem;
  }

  .site-header .brand img {
    height: 38px !important;
    width: auto;
  }

  .menu-toggle {
    width: 38px;
    height: 38px;
  }

  .hero {
    padding-top: 4.25rem;
    padding-bottom: 3.25rem;
    background-position: center;
  }

  .hero-grid {
    max-width: none;
  }

  .hero h1 {
    font-size: clamp(1.95rem, 8.2vw, 2.45rem);
    line-height: 1.14;
    margin-bottom: 0.85rem;
    max-width: 14ch;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.45;
    max-width: 30ch;
  }

  .hero-actions {
    margin-top: 1.2rem;
    gap: 0.7rem;
  }

  .hero-actions .btn {
    min-height: 42px;
    padding: 0.62rem 0.92rem;
  }

  .hero-actions.access-actions,
  #accedi .hero-actions.access-actions {
    gap: 50px;
  }

  .action-group {
    margin-top: 0.35rem;
    gap: 0.55rem;
  }

  .contact-one-line {
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }

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

  .service-highlight {
    padding: 1.4rem 1.2rem;
  }
}


