/* RLC Sistemi - foglio di stile */
:root {
  --ink: #1b2430;
  --ink-2: #4a5563;
  --muted: #6b7684;
  --line: #e2e6eb;
  --bg: #ffffff;
  --bg-alt: #f4f6f8;
  --dark: #141b24;
  --accent: #e4661c;
  --accent-ink: #b84d0f;
  --radius: 10px;
  --wrap: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 17px/1.65 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.narrow-text { max-width: 820px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: #fff; padding: 8px 12px; }

/* topbar + header */
.topbar { background: var(--dark); color: #c9d1da; font-size: 14px; }
.topbar .wrap { display: flex; gap: 22px; align-items: center; min-height: 36px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.topbar .lang { margin-left: auto; border: 1px solid #47525f; border-radius: 4px; padding: 0 8px; }
.header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { display: block; }
.brand strong { display: block; font-size: 20px; letter-spacing: .01em; }
.brand small { display: block; color: var(--muted); font-size: 13px; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a { display: block; padding: 10px 14px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 16px; border-radius: 6px; }
.nav a:hover { background: var(--bg-alt); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent-ink); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle span:first-child, .nav-toggle span:first-child::before, .nav-toggle span:first-child::after {
  position: absolute; left: 10px; width: 24px; height: 2px; background: var(--ink); content: ""; transition: transform .2s; }
.nav-toggle span:first-child { top: 21px; }
.nav-toggle span:first-child::before { top: -7px; left: 0; }
.nav-toggle span:first-child::after { top: 7px; left: 0; }
.nav-toggle[aria-expanded="true"] span:first-child { background: transparent; }
.nav-toggle[aria-expanded="true"] span:first-child::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:first-child::after { transform: translateY(-7px) rotate(-45deg); }

/* hero */
.hero { position: relative; min-height: 520px; display: flex; align-items: center; color: #fff; overflow: hidden; background: var(--dark); }
.hero-slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero-slides img.on { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,20,28,.88) 0%, rgba(14,20,28,.6) 55%, rgba(14,20,28,.25) 100%); }
.hero-text { position: relative; z-index: 1; padding-top: 60px; padding-bottom: 60px; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); max-width: 14em; margin-bottom: .35em; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 700; color: #ffb27f; margin: 0 0 14px; }
.lead { font-size: 19px; color: var(--ink-2); }
.hero .lead { color: #dde3ea; max-width: 34em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; padding: 13px 22px; border-radius: 6px; border: 2px solid var(--accent); }
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: inherit; border-color: currentColor; }
.section .btn-ghost { color: var(--ink); }

/* sezioni */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); }
.section-title { font-size: 30px; margin-bottom: 28px; }
.intro { text-align: center; font-size: 18px; color: var(--ink-2); }
.intro p { margin: 0 0 1em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.feature { display: block; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 30px; text-decoration: none; color: var(--ink); transition: box-shadow .2s, transform .2s; }
.feature:hover { color: var(--ink); box-shadow: 0 12px 30px rgba(20,27,36,.1); transform: translateY(-2px); }
.feature h2 { font-size: 26px; }
.feature p { color: var(--ink-2); }
.more { font-weight: 700; color: var(--accent-ink); }
.cta { background: var(--dark); color: #fff; text-align: center; padding: 56px 0; }
.cta a:not(.btn) { color: #fff; }
.cta h2 { font-size: 28px; }

/* page head */
.page-head { background: var(--dark); color: #fff; padding: 34px 0 30px; border-bottom: 4px solid var(--accent); }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); margin: 0; }
.crumbs { font-size: 14px; color: #aab4bf; margin-bottom: 10px; }
.crumbs a { color: #dde3ea; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; color: #fff; }
.crumbs span { margin: 0 2px; }

/* layout con menu laterale */
.with-side { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 44px; align-items: start; }
.side { position: sticky; top: 96px; font-size: 15px; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 14px; background: var(--bg-alt); }
.side h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 8px 8px; }
.side h2 a { color: var(--ink); text-decoration: none; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side ul ul { padding-left: 14px; border-left: 2px solid var(--line); margin: 2px 0 6px 10px; }
.side a { display: block; padding: 6px 8px; color: var(--ink-2); text-decoration: none; border-radius: 5px; line-height: 1.35; }
.side a:hover { background: #fff; color: var(--ink); }
.side a[aria-current="page"] { background: #fff; color: var(--accent-ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }

/* contenuti articoli */
.content { min-width: 0; }
.content::after { content: ""; display: block; clear: both; }
.content p, .content ul, .content ol, .content table { margin: 0 0 1.1em; }
.content h2, .content h3 { margin-top: 1.4em; }
.content .fl { float: left; margin: 4px 22px 14px 0; max-width: 45%; }
.content .fr { float: right; margin: 4px 0 14px 22px; max-width: 45%; }
.content .center { text-align: center; }
.content img { border-radius: 6px; vertical-align: middle; }
.content a.lb { display: inline-block; margin: 0 10px 10px 0; cursor: zoom-in; }
.content a.lb.fl { margin: 4px 22px 14px 0; }
.content a.lb.fr { margin: 4px 0 14px 22px; }
.content a.lb img { transition: opacity .2s; }
.content a.lb:hover img { opacity: .85; }
.content table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.content td, .content th { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.content th { background: var(--bg-alt); }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.content .sub { clear: both; padding-top: 1em; font-size: 24px; }

/* card */
.group { margin-bottom: 52px; }
.group > h2 { font-size: 26px; padding-bottom: 10px; border-bottom: 2px solid var(--line); margin-bottom: 22px; }
.group > h2 a { color: var(--ink); text-decoration: none; }
.group > h2 a:hover { color: var(--accent-ink); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); transition: box-shadow .2s, transform .2s; }
a.card:hover { color: var(--ink); box-shadow: 0 12px 30px rgba(20,27,36,.1); transform: translateY(-2px); }
.card-img { aspect-ratio: 16 / 10; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-img.square { aspect-ratio: 1; }
.card-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.card-ph { font-weight: 800; font-size: 28px; color: #c5ccd4; letter-spacing: .1em; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 18px; margin-bottom: 6px; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body p { font-size: 15px; color: var(--ink-2); margin: 0 0 12px; flex: 1; }
.card-body .more { font-size: 15px; }
.content .cards { margin-top: 10px; }

/* embed caricati al clic */
.embed { position: relative; background: #e9edf1; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 20px; }
.embed-map { min-height: 340px; }
.embed-video { aspect-ratio: 16 / 9; padding: 0; background: #000; color: #fff; }
.embed-video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; border-radius: 0; }
.embed-btn { position: relative; background: var(--accent); color: #fff; border: 0; font: 700 16px var(--font); padding: 12px 20px; border-radius: 6px; cursor: pointer; }
.embed-btn:hover { background: var(--accent-ink); }
.embed-note { position: relative; font-size: 13px; margin: 0; color: var(--ink-2); padding: 0 12px; }
.embed-video .embed-note { color: #fff; text-shadow: 0 1px 2px #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.card .embed-video { border-radius: 0; }
.contact .big { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.contact .big a { text-decoration: none; }

/* footer */
.footer { background: var(--dark); color: #b7c0ca; font-size: 15px; padding-top: 52px; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; color: #fff; }
.footer h2 { color: #fff; font-size: 16px; text-transform: uppercase; letter-spacing: .08em; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 6px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 36px; padding-bottom: 36px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #2a3440; padding-top: 18px; padding-bottom: 22px; font-size: 14px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10,14,20,.92); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb-close { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; }

/* responsive */
@media (max-width: 980px) {
  .with-side { grid-template-columns: 1fr; gap: 28px; }
  .side { position: static; order: 2; }
  .cards.four { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .legal { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.08); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 12px 14px; }
  .nav a { padding: 12px; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }
  .two { grid-template-columns: 1fr; }
  .hero { min-height: 440px; }
  .section { padding: 44px 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .topbar span { display: none; }
  .topbar .wrap { gap: 14px; font-size: 13px; }
  .brand small { display: none; }
  .cards, .cards.four { grid-template-columns: 1fr; }
  .content .fl, .content .fr { float: none; display: block; margin: 0 0 14px; max-width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
