/* Template Costruzioni Edili — variabili allineate a Siitoo */
:root {
  --color-primary: #1e3a5f;
  --color-secondary: #2d4a6f;
  --color-accent: #c45c26;
  --color-background: #f6f4f0;
  --color-text: #1a1f26;
  --bg: #f6f4f0;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-muted: #ebe8e2;
  --text: #1a1f26;
  --text-muted: #5c6570;
  --text-dim: #7a828c;
  --accent: #c45c26;
  --accent-soft: rgba(196, 92, 38, 0.12);
  --accent-dim: #9a471c;
  --accent-glow: rgba(196, 92, 38, 0.35);
  --border: #d9d4cc;
  --border-hover: #b8b0a4;
  --font-heading: "Montserrat", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 12px 40px rgba(30, 58, 95, 0.08);
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-dim);
}

.container {
  width: min(1140px, 100% - 2.5rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(30, 58, 95, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
  padding-block: 0.75rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
}

.logo-text {
  letter-spacing: -0.02em;
}

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--accent);
}

.btn-nav {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: 999px;
  font-weight: 600;
}

.btn-nav:hover {
  background: var(--accent-dim);
  color: #fff !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 20px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 1px;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.5rem;
    display: none;
    box-shadow: var(--shadow);
  }

  .nav.is-open {
    display: block;
  }

  .nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  background: linear-gradient(145deg, var(--bg-muted) 0%, var(--bg) 55%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231e3a5f' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.9;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }
}

.hero-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-primary);
  letter-spacing: -0.03em;
}

.hero-desc {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 42ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-dim);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.hero-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.section--alt {
  background: var(--bg-muted);
}

.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.section-intro {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 700px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  padding: 1.5rem 1.25rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-card strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.stat-card span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Services grid home */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.service-card {
  padding: 1.75rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(30, 58, 95, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  border-color: var(--accent-soft);
  box-shadow: 0 8px 32px rgba(30, 58, 95, 0.1);
}

.service-card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--accent);
}

.service-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
}

.service-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.service-card a {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

/* Content split */
.content-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.content-split:last-child {
  margin-bottom: 0;
}

.content-split--reverse .content-split__visual {
  order: -1;
}

@media (max-width: 900px) {
  .content-split {
    grid-template-columns: 1fr;
  }

  .content-split--reverse .content-split__visual {
    order: 0;
  }
}

.content-split__body h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
}

.content-split__body p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.content-split__body ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.content-split__visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
}

.content-split__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.06);
}

.project-card__visual {
  aspect-ratio: 16/11;
  overflow: hidden;
}

.project-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-card__visual img {
  transform: scale(1.04);
}

.project-card__body {
  padding: 1.25rem 1.35rem 1.5rem;
}

.project-card__meta {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.project-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Page hero inner pages */
.page-hero {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  background: linear-gradient(180deg, var(--bg-muted) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
  color: var(--color-primary);
}

.page-hero p {
  margin: 0;
  max-width: 52ch;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.inner-content {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-form {
  background: var(--bg-elevated);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.contact-form button[type="submit"] {
  width: 100%;
  padding: 0.9rem 1.25rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.contact-form button[type="submit"]:hover {
  background: var(--accent-dim);
}

.contact-card {
  padding: 1.5rem;
  background: var(--bg-muted);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.contact-card h3 {
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-primary);
}

.contact-card p {
  margin: 0 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-card a {
  font-weight: 600;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.team-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.team-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.team-card__body {
  padding: 1rem 1.1rem 1.25rem;
}

.team-card h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
}

.team-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* CTA band */
.cta-band {
  padding: clamp(2.5rem, 5vw, 3.5rem);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
}

.cta-band p {
  margin: 0 auto 1.5rem;
  max-width: 48ch;
  opacity: 0.92;
  font-size: 1.05rem;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--color-primary);
  box-shadow: none;
}

.cta-band .btn-primary:hover {
  background: var(--bg-muted);
  color: var(--color-primary);
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 3rem 0 2rem;
  background: #141a22;
  color: #b8c0cc;
  font-size: 0.9rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 800px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

.site-footer .logo {
  color: #fff;
}

.site-footer .logo-mark {
  background: var(--accent);
}

.site-footer .footer-tagline {
  margin: 0.75rem 0 0;
  max-width: 28ch;
  line-height: 1.5;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: #b8c0cc;
  text-decoration: none;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-contact p {
  margin: 0 0 0.5rem;
}

.footer-contact a {
  color: #fff;
  font-weight: 600;
}

.footer-social {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-social a {
  color: #b8c0cc;
  font-weight: 500;
  text-decoration: none;
}

.footer-social a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  color: #8a939e;
}

main {
  min-height: 40vh;
}

:root {
  --color-primary: #0f172a !important;
  --color-secondary: #2563eb !important;
  --accent-dim: #2563eb !important;
  --color-accent: #2563eb !important;
  --accent: #2563eb !important;
  --accent-soft: #3f76ed !important;
  --accent-dim: #2157cf !important;
  --accent-glow: #2563eb33 !important;
  --cta-bg: #2563eb !important;
  --brand-bar-bg: #0f172a !important;
  --header-bg: #0f172a !important;
  --footer-bg: #0f172a !important;
  --heading-color: #0f172a !important;
  --text-on-primary-bg: #ffffff !important;
  --text-on-primary: #ffffff !important;
  --text-on-accent: #ffffff !important;
  --text-on-footer: #ffffff !important;
  --text-on-brand-bar: #ffffff !important;
  --text-muted-on-footer: #ebebeb !important;
  --text-muted-on-brand-bar: #ebebeb !important;
  --text-dim-on-footer: #d8d8d8 !important;
  --bg: #ffffff !important;
  --color-background: #ffffff !important;
  --bg-elevated: #ffffff !important;
  --bg-card: #ffffff !important;
  --bg-muted: #f5f5f5 !important;
  --border: #d9d9d9 !important;
  --border-hover: #bfbfbf !important;
  --text: #0f172a su background bianco !important;
  --color-text: #0f172a su background bianco !important;
  --text-muted: #0f172a su background bianco !important;
  --text-dim: #0f172a su background bianco !important;
}

/* === Siitoo — palette coerente + contrasto leggibile (auto) === */
:root {
  --brand-bar-bg: #0f172a;
  --header-bg: #0f172a;
  --footer-bg: #0f172a;
  --heading-color: #0f172a;
  --cta-bg: #2563eb;
  --text-on-card: #0f172a su background bianco;
  --text-muted-on-card: #0f172a su background bianco;
  --text-on-primary: #ffffff;
  --text-on-primary-bg: #ffffff;
  --text-on-accent: #ffffff;
  --text-on-footer: #ffffff;
  --text-muted-on-footer: #ebebeb;
  --text-dim-on-footer: #d8d8d8;
  --text-on-brand-bar: #ffffff;
  --text-muted-on-brand-bar: #ebebeb;
  --logo-chip-bg: transparent;
}

html {
  background: #ffffff !important;
}

body {
  background: #ffffff !important;
  color: #0f172a su background bianco !important;
}

/* ——— Header / navbar: fondo + testo sempre in contrasto ——— */
.site-header,
header.site-header,
[class^="cmp-"] .site-header,
[class*="cmp-header"] .site-header,
[class^="cmp-"] header.site-header {
  background: #0f172a !important;
  background-color: #0f172a !important;
  color: #ffffff !important;
  border-bottom-color: color-mix(in srgb, #ebebeb 22%, transparent) !important;
  box-shadow: none !important;
}

.site-header .header-inner,
[class^="cmp-"] .site-header .header-inner,
[class*="cmp-header"] .header-inner {
  color: #ffffff !important;
}

.site-header .logo,
.site-header a.logo,
.site-header .logo-text,
.site-header .site-logo,
[class^="cmp-"] .site-header .logo,
[class^="cmp-"] .site-header a.logo,
[class^="cmp-"] .site-header .logo-text,
[class*="cmp-header"] .logo,
[class*="cmp-header"] .logo-text {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.site-header .logo-mark,
.site-footer .logo-mark,
[class^="cmp-"] .site-header .logo-mark,
[class*="cmp-header"] .logo-mark {
  background: #2563eb !important;
  background-color: #2563eb !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.site-header .nav a:not(.btn-nav),
[class^="cmp-"] .site-header .nav a:not(.btn-nav),
[class*="cmp-header"] .nav a:not(.btn-nav),
.nav a:not(.btn-nav) {
  color: #ebebeb !important;
  -webkit-text-fill-color: #ebebeb !important;
}

.site-header .nav a:not(.btn-nav):hover,
[class^="cmp-"] .site-header .nav a:not(.btn-nav):hover,
.nav a:not(.btn-nav):hover {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.menu-toggle,
.header-inner button,
.site-header .menu-toggle span {
  color: #ffffff !important;
  background-color: transparent;
}
.site-header .menu-toggle span {
  background: #ffffff !important;
}

/* Logo immagine: niente filtri strani; chip solo se data-logo-needs-chip */
.site-header .logo img,
.site-header a.logo img,
[class^="cmp-"] .site-header .logo img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}
.site-header .logo-img-wrap {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: transparent;
}
body[data-logo-needs-chip="1"] .site-header .logo-img-wrap {
  background: rgba(255,255,255,0.95) !important;
}

/* ——— Footer ——— */
.site-footer,
footer.site-footer,
[class^="cmp-"] .site-footer,
[class*="cmp-footer"] .site-footer {
  background: #0f172a !important;
  background-color: #0f172a !important;
  color: #ffffff !important;
  border-top-color: color-mix(in srgb, #ebebeb 22%, transparent) !important;
}

.site-footer .logo,
.site-footer .logo-text,
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4,
.site-footer strong,
.site-footer .footer-brand,
[class^="cmp-"] .site-footer .footer-brand {
  color: #ffffff !important;
}

.site-footer p,
.site-footer li,
.site-footer span,
.footer-tagline,
.footer-contact,
.footer-links,
.footer-nav,
.footer-social,
.footer-bottom,
.footer-copy,
.site-footer a:not(.btn):not(.btn-nav),
[class^="cmp-"] .site-footer a:not(.btn):not(.btn-nav) {
  color: #ebebeb !important;
}

.site-footer a:not(.btn):not(.btn-nav):hover,
.footer-nav a:hover,
.footer-social a:hover {
  color: #ffffff !important;
}

.footer-contact a,
.site-footer .footer-contact a {
  color: #ffffff !important;
}

.footer-bottom,
.footer-copy {
  color: #d8d8d8 !important;
}

main,
.section,
section:not(.site-header):not(.site-footer):not(.cta-band):not(.cta-box),
article,
.page-hero {
  color: #0f172a su background bianco;
}

/* Titoli pagina (non overlay su foto) */
.page-hero h1, .page-hero h2, .page-hero h3,
main > section:not(.hero) h1,
main > section:not(.hero) h2,
main > section:not(.hero) h3,
main > section:not(.hero) h4,
.section-title,
.inner-content h1, .inner-content h2, .inner-content h3 {
  color: #0f172a !important;
}

/* Hero split / tipografico: testo su superficie pagina */
.hero h1, .hero h2, .hero h3, .hero h4,
.hero-title {
  color: #0f172a !important;
}

.hero-eyebrow, .section-label, .section-eyebrow, [class*="eyebrow"],
.hero .brand:not(.logo) {
  color: #2563eb !important;
}

.hero p, .hero li, .hero-desc,
.page-hero p,
.section-desc, .section-intro,
main p, main li, main label, main td, main th {
  color: #0f172a su background bianco;
}

/* Overlay full-bleed: testo CHIARO su foto scura (mai scuro-su-scuro) */
.hero:has(.hero-media) .hero-inner,
.hero:has(.hero-media) .hero-inner h1,
.hero:has(.hero-media) .hero-inner h2,
.hero:has(.hero-media) .hero-inner h3,
.hero:has(.hero-media) .hero-inner .brand,
.hero:has(.hero-media) .hero-inner .lead,
.hero:has(.hero-media) .hero-inner p,
.hero:has(.hero-media) .hero-inner .hero-desc,
.hero:has(.hero-media) .hero-inner .hero-eyebrow,
.hero:has(> .bg) .content,
.hero:has(> .bg) .content h1,
.hero:has(> .bg) .content h2,
.hero:has(> .bg) .content .lead,
.hero:has(> .bg) .content p,
.hero:has(> .bg) .content .brand {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}

.hero:has(.hero-media) .hero-inner .lead,
.hero:has(.hero-media) .hero-inner p,
.hero:has(> .bg) .content .lead,
.hero:has(> .bg) .content p {
  color: rgba(248,250,252,0.88) !important;
  -webkit-text-fill-color: rgba(248,250,252,0.88) !important;
}

/* Pannelli/card sull'hero: testo scuro su fondo chiaro (mai chiaro-su-chiaro) */
.hero .panel,
.hero .card,
.hero .hero-card,
.hero [class*="panel"] {
  background-color: #ffffff !important;
  color: #0f172a su background bianco !important;
  text-shadow: none !important;
}
.hero .panel h1, .hero .panel h2, .hero .panel h3,
.hero .panel .brand, .hero .panel .lead, .hero .panel p,
.hero .card h1, .hero .card h2, .hero .card h3,
.hero .card p, .hero .hero-card h1, .hero .hero-card p {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  text-shadow: none !important;
}
.hero .panel .lead, .hero .panel p, .hero .card p, .hero .card .lead {
  color: #0f172a su background bianco !important;
  -webkit-text-fill-color: #0f172a su background bianco !important;
}

.service-card,
[class*="-card"]:not(.site-header):not(.site-footer):not(.hero-card),
.card {
  background-color: #ffffff !important;
  color: #0f172a su background bianco !important;
}

.service-card h1, .service-card h2, .service-card h3, .service-card h4,
[class*="-card"] h1, [class*="-card"] h2, [class*="-card"] h3, [class*="-card"] h4,
.card h1, .card h2, .card h3, .card h4 {
  color: #0f172a !important;
}

.service-card p, .service-card li, .service-card span,
[class*="-card"] p, [class*="-card"] li, [class*="-card"] span,
.card p, .card li, .card span,
.service-link, [class*="card"] a:not(.btn) {
  color: #0f172a su background bianco !important;
}

.section--alt, [class*="section--alt"], .bg-muted {
  background-color: #f5f5f5 !important;
  color: #0f172a su background bianco !important;
}

.section--alt h1, .section--alt h2, .section--alt h3, .section--alt h4,
[class*="section--alt"] h1, [class*="section--alt"] h2, [class*="section--alt"] h3 {
  color: #0f172a !important;
}

.section--alt p, .section--alt li, .section--alt span,
[class*="section--alt"] p, [class*="section--alt"] li {
  color: #0f172a su background bianco !important;
}

main a:not(.btn):not(.btn-nav):not(.btn-primary),
section:not(.site-header):not(.site-footer) a:not(.btn):not(.btn-nav):not(.btn-primary) {
  color: #0f172a !important;
}

/* CTA */
.btn-primary, .btn-nav, [class*="btn-primary"],
.site-header .btn-nav,
[class^="cmp-"] .btn-nav {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.btn-primary:hover, .btn-nav:hover, [class*="btn-primary"]:hover {
  background: #2157cf !important;
  border-color: #2157cf !important;
  color: #ffffff !important;
}

.btn-secondary, .btn-outline, .btn-ghost,
[class*="btn-secondary"], [class*="btn-outline"] {
  color: #0f172a !important;
  border-color: color-mix(in srgb, #0f172a 55%, transparent) !important;
}

.hero:has(.hero-media) .btn-ghost,
.hero:has(> .bg) .btn-ghost {
  color: #ffffff !important;
  border-color: color-mix(in srgb, #ffffff 65%, transparent) !important;
  -webkit-text-fill-color: #ffffff !important;
}

.cta-band, .cta-box, [class*="cta-band"], [class*="cta-box"] {
  background: #0f172a !important;
  color: #ffffff !important;
}

.cta-band h1, .cta-band h2, .cta-band h3, .cta-band p, .cta-band li,
.cta-box h1, .cta-box h2, .cta-box h3, .cta-box p {
  color: #ffffff !important;
}

.hero-stat span, .stat-label, [class*="stat"] span {
  color: #0f172a su background bianco !important;
}
