:root {
  --rea-green: #0a7a4a;
  --rea-green-dark: #0b4a32;
  --rea-green-deep: #08402b;
  --rea-ink: #14231c;
  --rea-bg: #eef3f0;
  --rea-gold: #c9a24a;
  --bs-body-font-family: 'Open Sans', system-ui, sans-serif;
  --bs-body-color: #26332d;
}

body { font-size: .95rem; }
h1, h2, h3, h4, .navbar, .btn, .eyebrow { font-family: 'Montserrat', sans-serif; }
a { text-decoration: none; }
img { max-width: 100%; }

/* Immagini: se il file non esiste resta il gradiente di fallback */
.bg-img {
  background-image: var(--img, none), linear-gradient(135deg, #2b4a3f, #6d8a7c);
  background-size: cover;
  background-position: center;
}

/* Bottoni */
.btn-rea {
  background: var(--rea-green); color: #fff; border: 1px solid var(--rea-green);
  border-radius: 50rem; font-weight: 600; font-size: .85rem; padding: .55rem 1.2rem;
}
.btn-rea:hover { background: var(--rea-green-dark); border-color: var(--rea-green-dark); color: #fff; }
.btn-outline-rea {
  color: var(--rea-green-dark); border: 1px solid var(--rea-green-dark);
  border-radius: 50rem; font-weight: 600; font-size: .85rem; padding: .5rem 1.2rem; background: transparent;
}
.btn-outline-rea:hover { background: var(--rea-green-dark); color: #fff; }
.btn-outline-light-rea {
  color: #fff; border: 1px solid rgba(255,255,255,.8);
  border-radius: 50rem; font-weight: 600; font-size: .85rem; padding: .5rem 1.2rem; background: transparent;
}
.btn-outline-light-rea:hover { background: #fff; color: var(--rea-green-dark); }
.btn-sm { font-size: .8rem; padding: .4rem 1rem; }

/* Titoli */
.eyebrow { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .03em; color: var(--rea-green); margin-bottom: .4rem; }
.section-title { font-weight: 800; color: var(--rea-ink); text-transform: uppercase; font-size: 1.9rem; line-height: 1.15; }
.services .section-title { text-transform: none; font-weight: 700; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: .5rem; color: var(--rea-green-dark); }
.logo-mark { font-size: 2rem; color: var(--rea-gold); line-height: 1; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text strong { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 2.4rem; letter-spacing: -.02em; }
.logo-text small { font-size: .55rem; letter-spacing: .38em; font-weight: 700; margin-top: 2px; }
.logo-light { color: #fff; }

/* Header */
.site-header { background: #fff; z-index: 1030; box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.site-header .navbar { padding-block: .6rem; }
.site-header .nav-link { color: var(--rea-ink); font-size: .82rem; font-weight: 500; padding: .4rem .2rem; border-bottom: 2px solid transparent; }
.site-header .nav-link.active, .site-header .nav-link:hover { border-bottom-color: var(--rea-green); color: var(--rea-ink); }

/* Hero */
.hero { position: relative; }
.hero-slide { height: 62vh; min-height: 420px; max-height: 560px; position: relative; }
.hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,40,28,.75) 0%, rgba(8,40,28,.25) 55%, rgba(0,0,0,0) 100%); }
.hero-caption { position: absolute; inset: 0; display: flex; align-items: center; z-index: 2; pointer-events: none; }
.hero-caption .btn { pointer-events: auto; }
.hero-caption h1 { color: #fff; font-weight: 700; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; margin-bottom: 1rem; }
.hero-caption .lead { color: #fff; font-size: clamp(1rem, 2vw, 1.35rem); margin-bottom: 1.5rem; }
.hero-indicators { justify-content: flex-start; margin: 0 0 1.2rem max(1rem, calc((100vw - 1320px) / 2 + .75rem)); z-index: 3; }
.hero-indicators button { width: 10px !important; height: 6px !important; border-radius: 3px; border: 0 !important; }
.hero-indicators button.active { width: 14px !important; background: var(--rea-green); }

/* Valori */
.values { background: #f6f8f7; padding: 1.5rem 0; }
.value-item { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; }
.value-item > i { font-size: 2.2rem; color: var(--rea-green-dark); }
.value-item h3 { font-size: .85rem; font-weight: 700; margin: 0 0 .15rem; color: var(--rea-ink); }
.value-item p { font-size: .72rem; margin: 0; color: #5b6862; }
@media (min-width: 992px) { .value-item + .value-item { border-left: 1px solid #dfe5e2; } }

/* Chi siamo */
.about { padding: 3rem 0 0; background: #fff; overflow: hidden; }
.about p { font-size: .88rem; }
.about { position: relative; }
.about-right { min-height: 340px; }
.about { --sw: max(34vw, 380px); }
.about-img { position: absolute; top: 0; bottom: 0; left: calc(50% - 90px); right: 0; clip-path: polygon(0 0, calc(100% - var(--sw) + 56px) 0, calc(100% - var(--sw) - 24px) 100%, 0 100%); }
.stats { position: absolute; top: 0; bottom: 0; right: 0; width: var(--sw); padding: 1.5rem 2rem 1.5rem 8rem; background: var(--rea-bg); clip-path: polygon(80px 0, 100% 0, 100% 100%, 0 100%); display: flex; flex-direction: column; justify-content: center; z-index: 1; }
.stat { margin-bottom: 1.1rem; text-align: left; line-height: 1.1; }
.stat:last-child { margin-bottom: 0; }
.stat-num { display: inline-block; }
.stat-label { display: block; }
.stat-num { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 2.1rem; line-height: 1.1; color: var(--rea-green-deep); }
.stat-small { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 1rem; }
.stat-label { font-size: .8rem; margin-top: .1rem; }
.about .row { padding-bottom: 3rem; }

/* Servizi */
.services { background: #f6f8f7; padding: 2.5rem 0; }
.service-card { position: relative; display: flex; flex-direction: column; height: 260px; padding: 1.4rem; color: #fff; overflow: hidden; border-radius: 4px; }
.service-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.65)); }
.service-card > * { position: relative; }
.service-icon { font-size: 2rem; display: block; margin-bottom: auto; }
.service-card h3 { font-weight: 700; font-size: 1.35rem; margin: 0; }
.service-card p { font-size: .8rem; margin: 0; max-width: 70%; }
.service-card .go { position: absolute; right: 1rem; bottom: 1rem; font-size: 1.6rem; transition: transform .2s; }
.service-card:hover .go { transform: translateX(4px); }

/* Sostenibilità */
.sustain { position: relative; background: var(--rea-green-deep); color: #fff; padding: 2.5rem 0; overflow: hidden; }
.sustain-img { position: absolute; top: 0; bottom: 0; left: 28%; right: 26%; opacity: .55; mask-image: linear-gradient(90deg, transparent, #000 25%, #000 80%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 80%, transparent); }
.sustain p { font-size: .85rem; max-width: 520px; }
.sustain-leaf { font-size: 2.2rem; }
.sustain > .container { position: static !important; }
.sustain-list { list-style: none; padding: 0; margin: 0; max-width: 300px; background: rgba(0,0,0,.18); }
.sustain-list li { display: flex; align-items: center; gap: .9rem; padding: .55rem 1rem; font-size: .85rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.sustain-list li:last-child { border-bottom: 0; }
.sustain-list i { font-size: 1.2rem; }

/* Sicurezza */
.safety { position: relative; background: #fff; padding: 2rem 0; overflow: hidden; }
.safety-img { position: absolute; top: 0; bottom: 0; right: 0; width: 28%; clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%); }
.safety-icons i { display: block; font-size: 2rem; color: var(--rea-green-dark); margin-bottom: .4rem; }
.safety-icons span { display: block; font-size: .72rem; padding: 0 .4rem; }
.safety-icons > div + div { border-left: 1px solid #dfe5e2; }

/* Lavora con noi */
.work { position: relative; background: #fff; padding: 1.8rem 0; overflow: hidden; border-top: 1px solid #eef1ef; }
.work-img { position: absolute; top: 0; bottom: 0; left: 0; width: 24%; clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%); }
.work-roles i { display: block; font-size: 2.3rem; color: var(--rea-green-dark); }
.work-roles strong { font-family: 'Montserrat', sans-serif; font-size: 1rem; }
.work-roles > div + div { border-left: 1px solid #dfe5e2; }

/* Footer */
.site-footer { background: var(--rea-green-deep); color: #fff; }
.site-footer a { color: #fff; }
.footer-cta { border-left: 1px solid rgba(255,255,255,.25); padding-left: 1.5rem; }
.social a { font-size: 1.3rem; }
.footer-bottom { background: #f6f8f7; color: #333; font-size: .72rem; padding: .9rem 0; }
.footer-bottom a { color: #333; padding: 0 .4rem; }

/* Responsive */
@media (min-width: 992px) {
  .sustain-list { position: absolute; right: 0; top: 0; bottom: 0; width: calc(var(--gap) + 290px); padding-right: calc(var(--gap) + 12px); max-width: none; display: flex; flex-direction: column; justify-content: center; padding-left: 1rem; margin: 0 !important; }
  .sustain { --cw: 960px; --gap: max(0px, calc((100vw - var(--cw)) / 2)); }
}
@media (min-width: 1200px) { .sustain { --cw: 1140px; } }
@media (min-width: 1400px) { .sustain { --cw: 1320px; } }
@media (max-width: 991.98px) {
  .site-header .nav-link { border-bottom: 0; padding: .6rem 0; }
  .hero-slide { min-height: 380px; }
  .hero-indicators { margin-left: 1rem; }
  .about { padding-top: 2.5rem; }
  .about-right { min-height: 0; display: flex; flex-direction: column; }
  .about-img, .stats { position: static; width: 100%; clip-path: none; margin: 0; }
  .about-img { height: 240px; }
  .stats { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1rem; padding: 1.2rem; }
  .about .row { padding-bottom: 0; }
  .sustain-img, .safety-img, .work-img { position: static; display: block; width: 100%; height: 180px; clip-path: none; mask-image: none; -webkit-mask-image: none; opacity: 1; margin: 0 0 1.5rem; }
  .sustain-img { margin-top: -2.5rem; }
  .safety-img { margin-top: -2rem; order: 2; margin-bottom: -2rem; margin-top: 1.5rem; }
  .safety, .work { display: flex; flex-direction: column; }
  .work-img { margin-top: -1.8rem; }
  .sustain-list { max-width: none; }
  .footer-cta { border-left: 0; padding-left: .75rem; border-top: 1px solid rgba(255,255,255,.25); padding-top: 1rem; }
}
@media (max-width: 575.98px) {
  .section-title { font-size: 1.5rem; }
  .service-card { height: 220px; }
  .service-icon { margin-bottom: 2.5rem; }
  .logo-text strong { font-size: 2rem; }
}

.logo img { height: 52px; width: auto; display: block; }
.logo-light img { filter: brightness(0) invert(1); }

/* Pagine interne */
.page-hero { background: var(--rea-green-deep); color: #fff; padding: 2.5rem 0; }
.page-hero h1 { font-weight: 800; text-transform: uppercase; font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0; }
.page-body { padding: 2.5rem 0 3.5rem; min-height: 40vh; }
.page-body h2, .page-body h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--rea-ink); margin-top: 1.5rem; }

/* ===== Pagina Sostenibilità ===== */
.sx-hero { position: relative; min-height: 400px; display: flex; align-items: center; color: #fff; padding: 3rem 0 6rem; background-position: center right; }
.sx-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,40,28,.92) 0%, rgba(5,40,28,.6) 40%, rgba(5,40,28,.05) 75%); }
.sx-hero-inner { position: relative; }
.sx-eyebrow { display: block; font-family: 'Montserrat', sans-serif; font-size: .8rem; font-weight: 600; letter-spacing: .35em; margin-bottom: .8rem; }
.sx-hero h1 { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: clamp(2.2rem, 5.5vw, 3.6rem); line-height: 1; margin: 0 0 1.1rem; }
.sx-hero h1 span { color: #3fe08f; }
.sx-sub { font-size: clamp(1rem, 2vw, 1.3rem); font-weight: 500; max-width: 26rem; margin-bottom: 1.4rem; }
.sx-btn { padding: .7rem 1.6rem; font-size: .95rem; }
.sx-bar { position: absolute; right: 0; bottom: 0; width: min(66%, 900px); display: flex; justify-content: space-around; align-items: center; background: rgba(8, 64, 43, .94); padding: 1.1rem 1.5rem 1.1rem 4rem; clip-path: polygon(40px 0, 100% 0, 100% 100%, 0 100%); }
.sx-bar-item { display: flex; align-items: center; gap: .7rem; font-size: .8rem; font-weight: 500; }
.sx-bar-item i { font-size: 1.8rem; }

.sx-actions { background: #f4f6f5; padding: 2.2rem 0 2.5rem; }
.sx-actions-head { margin-bottom: 1.6rem; }
.sx-actions-head h2 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .95rem; letter-spacing: .01em; color: var(--rea-green-deep); margin: 0; }
.sx-actions-head p { font-size: .85rem; margin: 0; }
.sx-card { background: #fff; border-radius: 6px; overflow: hidden; height: 100%; box-shadow: 0 2px 10px rgba(0,0,0,.06); display: flex; flex-direction: column; }
.sx-card-img { position: relative; height: 200px; }
.sx-badge { position: absolute; left: 1rem; bottom: -22px; width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center; color: var(--rea-green); font-size: 1.3rem; }
.sx-card-body { padding: 2rem 1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.sx-card-body h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.1rem; line-height: 1.2; color: var(--rea-green-deep); margin-bottom: .7rem; }
.sx-card-body p { font-size: .82rem; line-height: 1.5; margin-bottom: 1.1rem; flex: 1; }
.sx-more { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .82rem; color: var(--rea-green-deep); display: inline-flex; align-items: center; gap: .6rem; }
.sx-more:hover { color: var(--rea-green); }

.sx-banner { display: flex; align-items: stretch; min-height: 180px; background: #fff; overflow: hidden; }
.sx-banner-left { position: relative; flex: 0 0 36%; display: flex; align-items: center; color: #fff; padding: 1.5rem 3.5rem 1.5rem max(1.5rem, 4vw); clip-path: polygon(0 0, 100% 0, 91% 100%, 0 100%); }
.sx-banner-left::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,40,28,.75), rgba(5,40,28,.45)); }
.sx-banner-left blockquote { position: relative; margin: 0; }
.sx-banner-left p { font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: clamp(1.05rem, 1.8vw, 1.35rem); line-height: 1.15; margin: 0 0 .6rem; }
.sx-q { font-style: normal; font-size: 1.8em; line-height: 0; vertical-align: -.3em; margin: 0 .15em; }
.sx-banner-left cite { font-style: normal; font-size: .72rem; letter-spacing: .25em; font-weight: 600; }
.sx-banner-mid { flex: 1; display: flex; align-items: center; justify-content: center; gap: 1.3rem; padding: 1.5rem 1rem; }
.sx-leaf { font-size: 3rem; color: var(--rea-green-deep); }
.sx-banner-mid h2 { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--rea-green-deep); margin-bottom: .4rem; }
.sx-banner-mid p { font-size: .75rem; margin-bottom: .9rem; }
.sx-banner-right { flex: 0 0 29%; display: flex; align-items: center; padding: 1.5rem 1.5rem 1.5rem 18%; clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); background-color: #e8efea; }
.sx-banner-right p { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: clamp(.9rem, 1.4vw, 1.15rem); line-height: 1.25; color: var(--rea-green-deep); margin: 0; }

@media (max-width: 991.98px) {
  .sx-hero { padding-bottom: 2rem; flex-direction: column; align-items: stretch; justify-content: center; }
  .sx-hero::before { background: linear-gradient(180deg, rgba(5,40,28,.85), rgba(5,40,28,.55)); }
  .sx-hero-inner { padding-block: 1rem; }
  .sx-bar { position: relative; width: 100%; clip-path: none; padding: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1.5rem; }
  .sx-banner { flex-direction: column; }
  .sx-banner-left, .sx-banner-right { flex: none; clip-path: none; padding: 2rem 1.5rem; min-height: 150px; }
  .sx-banner-right { padding-left: 1.5rem; }
}
@media (max-width: 575.98px) { .sx-banner-mid { flex-direction: column; text-align: center; } }
.sx-banner-right.bg-img { background-image: var(--img, none), linear-gradient(135deg, #eef4f0, #cfe1d6); background-size: cover; background-position: left center; }
.sx-card-img.bg-img { background-image: var(--img, none), linear-gradient(135deg, #cfe1d6, #8fb5a0); }

/* Banner finale contenuto nella stessa larghezza delle card */
.sx-banner-wrap { background: #f4f6f5; padding: 0 0 2.5rem; }
.sx-banner-wrap .sx-banner { border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.sx-banner-wrap .sx-banner-left { padding-left: 2rem; flex-basis: 38%; }
.sx-banner-wrap .sx-banner-right { flex-basis: 30%; }
