/*!
 * F.I.Ar.Com. - template per Joomla 5/6
 * Si appoggia al CSS base di Joomla (Bootstrap 5) e ne ridefinisce aspetto e layout.
 * Caratteri ospitati sul sito (nessuna richiesta a servizi esterni).
 */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variabili ---------- */
:root {
  --brand: #184888;
  --brand-2: #2068a8;
  --brand-dark: #0e2c57;
  --brand-tint: #eaf1fa;
  --accent: #b9511a;
  --accent-dark: #9a4113;
  --ink: #1d2733;
  --muted: #5a6776;
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #dde5ef;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(14, 44, 87, 0.06), 0 1px 3px rgba(14, 44, 87, 0.05);
  --shadow-md: 0 6px 18px rgba(14, 44, 87, 0.09);
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Source Serif 4", Georgia, "Times New Roman", serif;
  --container: 1180px;

  /* variabili del tema base di Joomla */
  --cassiopeia-color-primary: var(--brand);
  --cassiopeia-color-link: var(--brand-2);
  --cassiopeia-color-hover: var(--brand-dark);
  --link-color: var(--brand-2);
  --link-color-rgb: 32, 104, 168;
  --link-hover-color: var(--brand-dark);
  --link-hover-color-rgb: 14, 44, 87;
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--ink);
  --bs-primary: var(--brand);
  --bs-link-color: var(--brand-2);
  --bs-link-hover-color: var(--brand-dark);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body.site {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: block;
}

body.site *,
body.site *::before,
body.site *::after { box-sizing: border-box; }

body.site a { color: var(--brand-2); text-underline-offset: 0.18em; }
body.site a:hover { color: var(--brand-dark); }
body.site :focus-visible { outline: 3px solid #f0a03c; outline-offset: 2px; border-radius: 3px; }

body.site img { max-width: 100%; height: auto; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 1000;
  background: var(--brand-dark); color: #fff !important; padding: 10px 16px; border-radius: 6px;
}
.skip-link:focus { left: 12px; }

/* ---------- Barra superiore ---------- */
.topbar { background: var(--brand-dark); color: #dbe7f6; font-size: 0.875rem; }
.topbar-inner { display: flex; flex-wrap: wrap; gap: 4px 28px; justify-content: space-between; align-items: center; padding-block: 8px; }
.topbar .moduletable, .topbar .mod-custom { display: contents; }
.topbar p { margin: 0; }
body.site .topbar a { color: #fff; text-decoration: none; }
body.site .topbar a:hover { text-decoration: underline; color: #fff; }
.topbar .topbar-contacts { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.topbar .topbar-cta a {
  display: inline-block; background: var(--accent); color: #fff; padding: 4px 14px; border-radius: 999px; font-weight: 600; font-size: 0.8125rem;
}
.topbar .topbar-cta a:hover { background: var(--accent-dark); text-decoration: none; }

/* ---------- Intestazione e menu ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 rgba(14, 44, 87, 0.03);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 10px; }
.brand { display: block; flex: 0 0 auto; line-height: 0; }
.brand img { width: 200px; height: auto; display: block; }

.site-nav { flex: 1 1 auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav .mod-menu, .site-nav > ul { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
.site-nav .moduletable { margin: 0; padding: 0; background: none; border: 0; }
.site-nav li { position: relative; }
.site-nav li > a, .site-nav li > span.mod-menu__heading, .site-nav li > button.submenu-toggle {
  font-family: var(--font-body);
}
.site-nav .mod-menu > li > a,
.site-nav .mod-menu > li > span {
  display: block; padding: 10px 14px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 550; font-size: 0.97rem;
  transition: background .15s, color .15s;
}
.site-nav .mod-menu > li > a:hover,
.site-nav .mod-menu > li:focus-within > a,
.site-nav .mod-menu > li:hover > a { background: var(--brand-tint); color: var(--brand); }
.site-nav .mod-menu > li.active > a,
.site-nav .mod-menu > li.current > a { background: var(--brand); color: #fff; }

/* sottomenu a tendina */
.site-nav .mod-menu__sub {
  display: none;
  position: absolute; left: 0; top: 100%; min-width: 280px; max-width: 380px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 8px; z-index: 60;
}
.site-nav li.parent:hover > .mod-menu__sub,
.site-nav li.parent:focus-within > .mod-menu__sub,
.site-nav li.parent.open > .mod-menu__sub { display: block; }
.site-nav .mod-menu > li:last-child > .mod-menu__sub,
.site-nav .mod-menu > li:nth-last-child(2) > .mod-menu__sub { left: auto; right: 0; }
.site-nav .mod-menu__sub a {
  display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none;
  font-size: 0.9rem; line-height: 1.4; font-weight: 450;
}
.site-nav .mod-menu__sub a:hover,
.site-nav .mod-menu__sub a:focus { background: var(--brand-tint); color: var(--brand); }
.site-nav .mod-menu__sub li.current > a { background: var(--brand-tint); color: var(--brand); font-weight: 600; }

/* piccola freccia sulle voci con sottomenu */
.site-nav .mod-menu > li.parent > a::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; vertical-align: 2px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
.site-nav .submenu-toggle { display: none; }

.nav-toggle {
  display: none; align-items: center; gap: 10px; background: var(--brand); color: #fff; border: 0;
  padding: 10px 16px; border-radius: 10px; font: 600 0.95rem var(--font-body); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; position: relative; content: "";
}
.nav-toggle-bars::before { position: absolute; top: -6px; left: 0; }
.nav-toggle-bars::after { position: absolute; top: 6px; left: 0; }

/* ---------- Aree a fascia ---------- */
.band { padding-block: 40px; }
.band-a { padding-top: 48px; }
.band-b { background: #fff; border-block: 1px solid var(--line); }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 22px; }
.section-head h2 {
  font-family: var(--font-head); font-weight: 650; font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.2; letter-spacing: -0.01em; margin: 0; color: var(--brand-dark);
}
.section-head a.more { font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-head a.more:hover { text-decoration: underline; }

/* ---------- Home: apertura ---------- */
.banner-area { background: var(--brand-dark); }
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(88, 150, 222, 0.38), transparent 60%),
    radial-gradient(700px 360px at 0% 110%, rgba(32, 104, 168, 0.55), transparent 60%),
    linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.07;
  background-image: linear-gradient(90deg, #fff 1px, transparent 1px), linear-gradient(#fff 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero-inner { position: relative; z-index: 1; padding-block: clamp(44px, 7vw, 84px); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero .eyebrow { display: inline-block; font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: #bcd6f5; margin-bottom: 14px; }
.hero h1 {
  font-family: var(--font-head); font-weight: 650; color: #fff; margin: 0 0 18px;
  font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.1; letter-spacing: -0.015em;
}
.hero p.lead { font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: #e2edfb; max-width: 40em; margin: 0 0 26px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-fiarcom, .hero .btn-light {
  display: inline-block; text-decoration: none; font-weight: 650; font-size: 0.98rem; line-height: 1.2;
  padding: 13px 22px; border-radius: 10px; border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.btn-fiarcom { background: var(--brand); color: #fff !important; }
.btn-fiarcom:hover { background: var(--brand-dark); }
.hero .btn-accent { background: var(--accent); color: #fff !important; }
.hero .btn-accent:hover { background: var(--accent-dark); }
.hero .btn-light { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, 0.55); }
.hero .btn-light:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.hero-facts { display: grid; gap: 14px; }
.hero-fact {
  background: rgba(255, 255, 255, 0.09); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: var(--radius-lg);
  padding: 16px 20px; backdrop-filter: blur(2px);
}
.hero-fact strong { display: block; font-family: var(--font-head); font-size: 1.9rem; line-height: 1.1; font-weight: 650; }
.hero-fact span { color: #cfe1f7; font-size: 0.92rem; }

/* ---------- Home: notizie in evidenza ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.news-card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: var(--ink) !important;
  box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #c4d4e8; }
.news-card .thumb { aspect-ratio: 16 / 9; background: var(--brand-tint); overflow: hidden; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card .tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-2); }
.news-card h3 { font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; line-height: 1.3; margin: 0; color: var(--ink); }
.news-card .date { font-size: 0.85rem; color: var(--muted); margin-top: auto; }

/* ---------- Home: documenti e convenzioni ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.doc-card {
  display: flex; flex-direction: column; gap: 10px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 18px; text-decoration: none; color: var(--ink) !important;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.doc-card:hover { border-color: var(--brand-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.doc-card .doc-thumb { height: 120px; display: grid; place-items: center; }
.doc-card .doc-thumb img { max-height: 120px; width: auto; border-radius: 6px; box-shadow: var(--shadow-sm); }
.doc-card .doc-icon { width: 54px; height: 54px; border-radius: 14px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; font-size: 1.5rem; }
.doc-card h3 { font-size: 1.02rem; font-weight: 650; margin: 0; line-height: 1.3; color: var(--brand-dark); font-family: var(--font-body); }
.doc-card p { font-size: 0.9rem; color: var(--muted); margin: 0; line-height: 1.5; }
.doc-card .go { margin-top: auto; font-weight: 650; font-size: 0.9rem; color: var(--brand-2); }

/* ---------- Pagina e contenuti ---------- */
.page-wrap { padding-block: 34px 54px; }
.is-home .page-wrap { padding-top: 46px; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
.has-sidebar .page-grid { grid-template-columns: minmax(0, 1fr) 300px; }

.main-content { min-width: 0; }
.main-content > .com-content-article,
.main-content > .item-page,
.main-content > .blog,
.main-content > .com-content-category-blog,
.main-content > .com-content-category,
.main-content > .category-list,
.main-content > div[class^="com-"] {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(20px, 3.4vw, 40px); box-shadow: var(--shadow-sm);
}
.is-home .main-content > .com-content-article,
.is-home .main-content > .item-page { max-width: 880px; margin-inline: auto; }

.main-content h1, .main-content h2.item-title, .page-header h1, .page-header h2 {
  font-family: var(--font-head); font-weight: 650; color: var(--brand-dark); letter-spacing: -0.01em; line-height: 1.2;
}
.main-content h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 0 0 0.6em; }
.main-content .page-header { border-bottom: 1px solid var(--line); margin-bottom: 1.4em; padding-bottom: 0.6em; }
.main-content .page-header h1 { margin: 0; }
.main-content h2 { font-family: var(--font-head); font-weight: 620; color: var(--brand-dark); font-size: 1.5rem; line-height: 1.25; margin: 1.6em 0 0.5em; }
.main-content h3 { font-size: 1.2rem; font-weight: 650; color: var(--brand-dark); margin: 1.4em 0 0.4em; }

.com-content-article__body, .item-page > [itemprop="articleBody"], .com-content-article [itemprop="articleBody"] { font-size: 1.0625rem; }
.main-content p { margin: 0 0 1.05em; }
.main-content ul, .main-content ol { padding-left: 1.4em; margin-bottom: 1.1em; }
.main-content li { margin-bottom: 0.3em; }
.main-content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* i contenuti degli anni passati hanno stili in linea: li uniformiamo */
.main-content [itemprop="articleBody"] *:not([class*="icon-"]):not([class*="fa-"]),
.main-content .blog-item *:not([class*="icon-"]):not([class*="fa-"]), .main-content .blog-items *:not([class*="icon-"]):not([class*="fa-"]) {
  font-family: inherit !important;
  line-height: inherit;
}
.main-content [itemprop="articleBody"] h1, .main-content [itemprop="articleBody"] h2, .main-content [itemprop="articleBody"] h3,
.main-content [itemprop="articleBody"] h4 { font-family: var(--font-head) !important; }
.main-content [itemprop="articleBody"] p[style*="text-align: justify"] { text-align: left !important; }
.main-content [itemprop="articleBody"] span[style*="font-size"] { font-size: inherit !important; }
.main-content [itemprop="articleBody"] p[style*="margin-left"], .main-content [itemprop="articleBody"] p[style*="text-indent"] { margin-left: 0 !important; text-indent: 0 !important; }
.main-content [itemprop="articleBody"] img { border-radius: 10px; height: auto !important; }
.main-content [itemprop="articleBody"] img[style*="float"] { max-width: 46%; }

.main-content table { width: 100% !important; border-collapse: collapse; margin: 1.2em 0; font-size: 0.97rem; display: block; overflow-x: auto; }
.main-content table th, .main-content table td { padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; width: auto !important; height: auto !important; }
.main-content table th, .main-content table tr:first-child td strong { color: var(--brand-dark); }
.main-content table tr:nth-child(even) td { background: #fafcfe; }

.article-info, .com-content-article .article-info { color: var(--muted); font-size: 0.875rem; margin: 0 0 1.2em; }
.article-info dd { display: inline-block; margin: 0 14px 0 0; }
.tags a, .list-inline a { text-decoration: none; }
.tags .badge, span.badge { background: var(--brand-tint) !important; color: var(--brand) !important; font-weight: 600; padding: 5px 10px; border-radius: 999px; }

/* blog / elenchi */
.blog-items, .com-content-category-blog__items { display: grid; gap: 22px; }
.blog-item, .com-content-category-blog__item {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; background: #fff;
}
.blog-item h2, .com-content-category-blog__item h2 { font-size: 1.3rem; margin: 0 0 0.4em; }
.blog-item h2 a, .com-content-category-blog__item h2 a { text-decoration: none; color: var(--brand-dark); }
.blog-item h2 a:hover { color: var(--brand-2); text-decoration: underline; }
.readmore .btn, .readmore a { background: var(--brand); color: #fff !important; border-radius: 8px; padding: 8px 16px; text-decoration: none; font-weight: 600; font-size: 0.92rem; display: inline-block; border: 0; }
.readmore .btn:hover, .readmore a:hover { background: var(--brand-dark); }

.com-content-category table { display: table; }
.category-list table td a { text-decoration: none; font-weight: 550; }

.pagination { display: flex; gap: 6px; flex-wrap: wrap; padding: 0; list-style: none; justify-content: center; margin: 2em 0 0; }
.pagination .page-link { border-radius: 8px !important; color: var(--brand); border: 1px solid var(--line); padding: 7px 13px; text-decoration: none; }
.pagination .active .page-link, .pagination .page-item.active .page-link { background: var(--brand); border-color: var(--brand); color: #fff; }

/* briciole di pane */
.breadcrumbs-area { margin-bottom: 18px; font-size: 0.9rem; }
.breadcrumbs-area .mod-breadcrumbs, .breadcrumbs-area ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; background: none; }
.breadcrumbs-area li { color: var(--muted); }
.breadcrumbs-area li + li::before { content: "/"; margin-right: 8px; color: #a9b6c6; }
.breadcrumbs-area a { text-decoration: none; }
.breadcrumbs-area .moduletable, .breadcrumbs-area nav { background: none; border: 0; padding: 0; }
.breadcrumbs-area h3 { display: none; }
.breadcrumbs-area .float-start, .breadcrumbs-area .mod-breadcrumbs__here { display: none; }

/* modulo laterale */
.sidebar .card, .sidebar .moduletable { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.sidebar h3 { font-family: var(--font-head); font-size: 1.15rem; color: var(--brand-dark); margin: 0 0 .6em; }

/* ---------- Fascia in basso (ultimi contenuti) ---------- */
.band-bottom { background: #fff; border-top: 1px solid var(--line); }
.bottom-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.bottom-grid > .card, .bottom-grid > .moduletable, .bottom-grid > div {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px;
}
.bottom-grid h3, .bottom-grid .card-header {
  font-family: var(--font-head); font-weight: 650; font-size: 1.2rem; color: var(--brand-dark);
  margin: 0 0 12px; padding: 0 0 12px; background: none; border: 0; border-bottom: 2px solid var(--brand-2); border-radius: 0;
}
.bottom-grid ul { list-style: none; margin: 0; padding: 0; }
.bottom-grid li { padding: 9px 0; border-bottom: 1px solid var(--line); line-height: 1.4; }
.bottom-grid li:last-child { border-bottom: 0; }
body.site .bottom-grid li a { text-decoration: none; font-weight: 550; color: var(--ink); }
body.site .bottom-grid li a:hover { color: var(--brand-2); text-decoration: underline; }

/* ---------- Piè di pagina ---------- */
.site-footer { background: var(--brand-dark); color: #cfdcee; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; padding-block: 46px 34px; }
.footer-grid h3, .footer-grid h2 { font-family: var(--font-head); color: #fff; font-size: 1.15rem; margin: 0 0 12px; }
.footer-grid p { margin: 0 0 0.6em; font-size: 0.95rem; line-height: 1.6; }
body.site .footer-grid a { color: #fff; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
body.site .footer-grid li a { text-decoration: none; color: #cfdcee; }
body.site .footer-grid li a:hover { color: #fff; text-decoration: underline; }
.footer-grid .moduletable, .footer-grid .mod-custom { display: contents; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.85rem; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-block: 16px; color: #aebfd6; }
body.site .footer-bottom a { color: #dbe7f6; text-decoration: none; }

/* ---------- Pagine di servizio ---------- */
body.offline-page, body.error-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.offline-card { max-width: 560px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px 36px; text-align: center; box-shadow: var(--shadow-md); }
.offline-card img { width: 220px; height: auto; margin-bottom: 18px; }
.offline-card h1 { font-family: var(--font-head); color: var(--brand-dark); font-size: 1.8rem; margin: 0 0 12px; }
.offline-card .error-code { font-family: var(--font-head); font-size: 4rem; font-weight: 700; color: var(--brand-2); margin: 0; line-height: 1; }

/* ---------- Schermi medi e piccoli ---------- */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-facts { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-flex; }
  .header-inner { flex-wrap: wrap; }
  .site-nav { display: none; flex-basis: 100%; order: 3; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 6px; }
  .site-nav.open { display: block; }
  .site-nav .mod-menu, .site-nav > ul { flex-direction: column; flex-wrap: nowrap; justify-content: flex-start; gap: 0; }
  .site-nav .mod-menu > li > a, .site-nav .mod-menu > li > span { padding: 13px 10px; border-radius: 8px; }
  .site-nav .mod-menu > li.parent > a { padding-right: 54px; }
  .site-nav .mod-menu > li.parent > a::after { display: none; }
  .site-nav .submenu-toggle {
    display: block; position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; border-radius: 8px;
  }
  .site-nav .submenu-toggle::before {
    content: ""; display: block; width: 9px; height: 9px; margin: 0 auto; border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg); transition: transform .15s;
  }
  .site-nav li.open > .submenu-toggle::before { transform: rotate(-135deg); }
  .site-nav .mod-menu__sub { position: static; display: none; box-shadow: none; border: 0; padding: 0 0 6px 14px; max-width: none; min-width: 0; border-left: 2px solid var(--line); border-radius: 0; margin-left: 10px; }
  .site-nav li.parent:hover > .mod-menu__sub, .site-nav li.parent:focus-within > .mod-menu__sub { display: none; }
  .site-nav li.parent.open > .mod-menu__sub { display: block; }
}

@media (max-width: 860px) {
  .has-sidebar .page-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body.site { font-size: 1rem; }
  .brand img { width: 150px; }
  .news-grid { grid-template-columns: 1fr; }
  .hero-facts { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .band { padding-block: 30px; }
  .topbar-inner { justify-content: center; text-align: center; }
  .main-content table { font-size: 0.9rem; }
  .main-content [itemprop="articleBody"] img[style*="float"] { float: none !important; max-width: 100%; display: block; margin: 0 auto 1em !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .topbar, .site-header, .site-footer, .banner-area, .band, .breadcrumbs-area, .sidebar { display: none !important; }
  body.site { background: #fff; }
  .main-content > * { border: 0 !important; box-shadow: none !important; padding: 0 !important; }
}

/* Pulsante nativo del sottomenu di Joomla: sostituito da quello del template */
.site-nav .mod-menu__toggle-sub { display: none !important; }

@media (max-width: 600px) {
  .topbar .topbar-contacts span:nth-child(3) { display: none; }
  .topbar-inner { padding-block: 6px; }
  .hero-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .hero-fact { padding: 10px 10px; }
  .hero-fact strong { font-size: 1.05rem; }
  .hero-fact span { font-size: 0.72rem; line-height: 1.3; display: block; }
  .hero-inner { gap: 24px; }
}

/* Elenchi (blog): anteprima limitata, il titolo porta all'articolo completo */
.com-content-category-blog__item .item-content,
.blog-item .item-content { max-height: 17rem; overflow: hidden; position: relative; }
.com-content-category-blog__item .item-content::after,
.blog-item .item-content::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4.5rem; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 85%);
}
.com-content-category-blog__items.masonry-2, .blog-items.masonry-2 { grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .com-content-category-blog__items.masonry-2, .blog-items.masonry-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

/* Elenchi: titolo senza riquadro interno */
.blog-item .page-header, .com-content-category-blog__item .page-header { border: 0; padding: 0; margin: 0 0 .5em; background: none; }
.blog-item .page-header h2, .com-content-category-blog__item .page-header h2 { padding: 0; border: 0; }
.blog-item .article-info, .com-content-category-blog__item .article-info { font-size: .85rem; margin-bottom: .8em; }

.blog-item .item-content { padding: 18px 22px; }
.blog-item .item-content::after { left: 1px; right: 1px; bottom: 1px; }

/* Link legali nel footer + modulo contatti */
.footer-legal { display: inline-flex; gap: 18px; flex-wrap: wrap; }
body.site .footer-legal a:hover { text-decoration: underline; }
.com-contact form .control-label label, .com-contact form label { font-weight: 600; }
.com-contact .form-control, .com-contact textarea { width: 100%; max-width: 640px; }
.com-contact altcha-widget { display: block; margin-block: 8px 16px; }

/* Menu piu' compatto sui desktop medi (9 voci) */
@media (min-width: 992px) {
  .header-inner { gap: 14px; }
  .brand img { width: 170px; }
  .site-nav .mod-menu > li > a, .site-nav .mod-menu > li > span { padding: 9px 8px; font-size: 0.9rem; }
}
