/*
 * SardegnaMondo — override custom su Bootstrap Italia 2.
 * Contiene le DIFFERENZE rispetto al BI2 stock necessarie per la parità visiva
 * con la produzione (che usava un build custom di BI1 con tipografia e regole
 * tema proprie). Carica DOPO bootstrap-italia (2.x) e PRIMA di ras.min.css.
 * I valori sono estratti 1:1 dal riferimento static/css/bootstrap-italia_1.3.8.min.css
 * (file NON caricato dalle pagine: solo documentazione dei valori di prod).
 */

/* --- Root font-size: BI1 porta html/body a 18px da 576px in su (BI2 resta a 16px) --- */
body, html {
	font-size: 16px;
	line-height: 1.5;
}
@media (min-width: 576px) {
	body, html {
		font-size: 18px;
	}
}

/* --- Neutralizza il bump tipografico di BI2 (p,ul,ol,dl a 1.125rem/1.75rem):
       in BI1 questi elementi NON hanno regole proprie → ereditano dal contesto
       (body 1rem/1.5, ma anche #briciole .889em, sub_nav, ecc. via ras.min.css).
       "inherit" replica esattamente l'assenza della regola. --- */
p, ul, ol, dl {
	font-size: inherit;
	line-height: inherit;
}

/* --- Peso base del testo: BI1 body{font-weight:300} (BI2: 400) --- */
body {
	font-weight: 300;
}

/* --- Heading: valori esatti del build BI1 custom (BI2: h4-h6 w500, size/lh diversi) --- */
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
	margin-bottom: 8px;
	font-weight: 700;
	line-height: 1.2;
}
.h1, h1 { font-size: 2.5rem; letter-spacing: -1px; }
.h2, h2 { font-size: 2rem; line-height: 1.25; letter-spacing: normal; }
.h3, h3 { font-size: 1.75rem; line-height: 1.1428; letter-spacing: normal; }
.h4, h4 { font-size: 1.5rem; line-height: 1.1666; letter-spacing: normal; }
.h5, h5 { font-size: 1.25rem; font-weight: 400; letter-spacing: normal; }
.h6, h6 { font-size: 1rem; font-weight: 600; line-height: 1.5; letter-spacing: normal; }
@media (min-width: 576px) {
	.h1, h1 { font-size: 2.666rem; letter-spacing: -1.2px; line-height: 1.25; }
	.h2, h2 { font-size: 2.222rem; line-height: 1.2; }
	.h3, h3 { font-size: 1.777rem; line-height: 1.25; }
	.h4, h4 { font-size: 1.555rem; line-height: 1.428; font-weight: 600; }
	.h5, h5 { font-size: 1.333rem; }
}

/* --- small: BI1 .9375rem base / .8888rem ≥576px (BI2: .875rem) --- */
.small, small {
	font-size: .9375rem;
	font-weight: 400;
}
@media (min-width: 576px) {
	.small, small {
		font-size: .8888rem;
	}
}

/* --- .lead: BI1 1.25rem w300 (BI2 lo porta a 1.5rem desktop) --- */
.lead {
	font-size: 1.25rem;
	font-weight: 300;
}

/* --- Bottoni: dimensioni BI1 in px fissi (con root 18px i rem di BI2 crescerebbero) --- */
.btn {
	padding: 12px 24px;
	font-size: 16px;
	line-height: 1.5;
}
.btn-lg, .btn-group-lg > .btn {
	padding: 14px 28px;
	font-size: 18px;
	line-height: 1.6;
}
.btn-sm, .btn-group-sm > .btn {
	padding: 10px 20px;
	font-size: 14px;
	line-height: 1.45;
}

/* --- Stati bottoni primary: derivazioni arancio del build BI1 custom
       (BI2 calcola gli hover scurendo il bordeaux) --- */
.btn-primary {
	--bs-btn-hover-bg: #b14010;              /* BI1 .btn-primary:hover background */
	--bs-btn-hover-border-color: #A32E34;    /* BI1 .btn-primary:hover border */
	--bs-btn-active-bg: #A32E34;             /* BI1 .btn-primary:active background */
	--bs-btn-active-border-color: #99380e;   /* BI1 .btn-primary:active border */
	--bs-btn-focus-shadow-rgb: 212, 77, 19;  /* focus ring arancio BI1 */
}
.btn-outline-primary:hover {
	color: #9c3f18;
	box-shadow: inset 0 0 0 1px #9c3f18;     /* BI1 .btn-outline-primary:hover */
}

/* --- Focus ring: BI1 usa box-shadow arancio rgba(212,77,19,.25)
       (BI2: alone bordeaux .25rem) --- */
.btn {
	--bs-btn-focus-box-shadow: 0 0 0 .2rem rgba(212, 77, 19, .25);
}
.form-control:focus,
.form-select:focus {
	border-color: #5c6f82;
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 0 .2rem rgba(212, 77, 19, .25);
}

/* --- Link: hover sottolineato come in prod (colore #8d330d già nel build custom) --- */
a:hover {
	text-decoration: underline;
}

/* --- b/strong: BI1 usa 600 (BS5 reboot: bolder→700) --- */
b, strong {
	font-weight: 600;
}

/* --- Breadcrumb come BI1: nessuna dimensione propria (eredita da #briciole .889em
       di ras.min.css), colori del build custom. BI2 imposta font-size via
       --bs-breadcrumb-font-size e colori slate propri. --- */
.breadcrumb {
	font-size: inherit;
	line-height: inherit;
}
.breadcrumb-item.active {
	color: #656566;
}
.breadcrumb-item + .breadcrumb-item::before {
	color: #656566;
}
.breadcrumb-container .breadcrumb .breadcrumb-item a {
	color: #5b6f82;
	font-weight: 600;
}
.breadcrumb-container .breadcrumb .breadcrumb-item span.separator {
	color: inherit; /* BI1 non imposta colore: eredita (#555 dal body via ras) */
}
.breadcrumb-container .breadcrumb.dark .breadcrumb-item a,
.breadcrumb-container .breadcrumb.dark .breadcrumb-item span.separator {
	color: #fff;
}

/* --- a.read-more: valori BI1 (BI2: .875rem e colore link primary) --- */
a.read-more {
	font-size: .77778rem;
	color: #30373d;
}

/* --- Card: titoli e testo come BI1 (BI2: 1.11111rem e colore slate #30475F) --- */
.card .card-body h5.card-title {
	font-size: 1.125rem;
	line-height: 1.44444rem;
	font-weight: 700;
	color: #17324d;
	margin-bottom: 16px;
}
.card.card-img h5.card-title {
	font-size: 1.11111rem;
	line-height: 1.55556rem;
}
.card .card-body .card-text {
	font-family: "Titillium Web", Geneva, Tahoma, sans-serif;
	font-size: 1rem;
	line-height: 1.5rem;
	color: #435a70;
}
.card.card-big .card-body .card-text {
	font-size: .88889rem;
	line-height: 1.33333rem;
}
.card .card-body .card-text,
.card .card-body h5.card-title {
	font-size: 1rem;
}

/* --- min-width lock: nel build BI1 sta dentro @media print (SOLO stampa) --- */
@media print {
	.container, body {
		min-width: 992px !important;
	}
}

/* ============================================================================
   Regole custom compilate DENTRO il build BI1 di prod (assenti sia nel BI1
   stock che in BI2). Estratte 1:1 da bootstrap-italia_1.3.8.min.css (coda del
   file + diff selettori vs build stock). Unico adattamento: data-toggle →
   data-bs-toggle (markup migrato a BI2).
   ========================================================================= */

/* Paginazione (blocco custom BI1) */
.pagination .page-item { margin-right: 5px; }
.pagination .page-item.disabled a.page-link { color: #c2c7cc; }
.pagination .page-item.disabled a.page-link .icon { fill: #c2c7cc; }
.pagination .page-item span.page-link { pointer-events: none; }
.pagination .page-item .page-link {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 2.5rem;
	min-width: 2.5rem;
	border-radius: 4px;
	border: none;
	font-size: .88889rem;
	font-weight: 600;
	color: #5b6f82;
	background-color: transparent;
}
.pagination .page-item .page-link[aria-current] { border: 1px solid #A32E34; color: #A32E34; pointer-events: none; }
.pagination .page-item .page-link.text { color: #A32E34; }
.pagination .page-item .page-link span.d-inline-block { margin-right: .5rem; }
.pagination .page-item .page-link:hover { color: #A32E34; background-color: transparent; }
.pagination .page-item .page-link:hover .icon { fill: #A32E34; }

/* Utility e componenti custom */
.bg-lightgrey { background-color: #ececec; }
.custom-search-wrapper { background-color: #fff; height: 38px; width: 38px; border-radius: 50%; text-align: center; line-height: 36px !important; align-self: center; }
.category-top { font-size: .77778rem; text-transform: uppercase; color: #435a70; }
.card-footer { padding: 1rem 0; background-color: transparent; border-top: 1px solid #d9dadb; margin-left: 24px; margin-right: 24px; }
.text-sans-serif, .text-serif { font-family: "Titillium Web", Geneva, Tahoma, sans-serif !important; }
a.share-link { position: absolute; bottom: 24px; right: 24px; }
.linetop { border-top: 1px solid #e5e5e5; width: 100%; margin: 0 14px; }
#articolo-dettaglio .lineright { border-right: 1px solid #e5e5e5; }
figure.image-wrapper img { object-fit: cover; height: 480px; width: 100%; }
figure.image-wrapper figcaption.didascalia { font-size: .778em; text-align: center; margin: 24px 0 16px; }
.article header time { font-size: 90%; }

/* Header slim: bottoni zona destra (arancio scuro brand) */
.it-header-slim-wrapper .it-header-slim-wrapper-content .header-slim-right-zone .it-access-top-wrapper > a,
.it-header-slim-wrapper .it-header-slim-wrapper-content .header-slim-right-zone button,
.it-header-slim-wrapper .it-header-slim-wrapper-content .it-header-slim-right-zone .it-access-top-wrapper > a,
.it-header-slim-wrapper .it-header-slim-wrapper-content .it-header-slim-right-zone button { background: #802e0b; padding-top: 7.5px; padding-bottom: 7.5px; }
.it-header-slim-wrapper .it-header-slim-wrapper-content .header-slim-right-zone .it-access-top-wrapper > a:hover,
.it-header-slim-wrapper .it-header-slim-wrapper-content .header-slim-right-zone button:hover,
.it-header-slim-wrapper .it-header-slim-wrapper-content .it-header-slim-right-zone .it-access-top-wrapper > a:hover,
.it-header-slim-wrapper .it-header-slim-wrapper-content .it-header-slim-right-zone button:hover { background: #99380e; }
.it-header-slim-wrapper.theme-light .it-header-slim-wrapper-content .header-slim-right-zone button,
.it-header-slim-wrapper.theme-light .it-header-slim-wrapper-content .it-header-slim-right-zone button { background: #A32E34; }
.it-header-slim-wrapper.theme-light .it-header-slim-wrapper-content .header-slim-right-zone button:hover,
.it-header-slim-wrapper.theme-light .it-header-slim-wrapper-content .it-header-slim-right-zone button:hover { background: #30373D; }

/* Header sticky (bordeaux) */
.it-header-wrapper.is-sticky .it-nav-wrapper .it-header-center-wrapper { background-color: #A32E34; color: #fff; }
.it-header-wrapper.is-sticky .it-nav-wrapper .it-header-center-wrapper .it-brand-wrapper a { color: #fff; }
.it-header-wrapper.is-sticky .it-nav-wrapper .custom-navbar-toggler svg { fill: #fff; margin-top: 70%; }
.it-header-wrapper.is-sticky .it-header-navbar-wrapper { top: 24px !important; }
.it-header-wrapper.is-sticky .it-header-navbar-wrapper .menu-wrapper .it-brand-wrapper.cloned a { color: #fff !important; }
.it-header-wrapper.is-sticky .it-header-navbar-wrapper .menu-wrapper .navbar-nav li a.nav-link { padding-top: 25px; padding-bottom: 25px; }
.it-header-wrapper.is-sticky .it-header-slim-wrapper { display: block !important; position: fixed; top: 0; width: 100%; z-index: 100; height: 24px; line-height: 24px !important; }
.it-header-wrapper.is-sticky .it-header-slim-wrapper .it-header-slim-wrapper-content { line-height: 12px; height: 12px; }
@media (min-width: 992px) {
	.it-header-wrapper.is-sticky .it-header-slim-wrapper .it-header-slim-wrapper-content { line-height: 24px; height: 24px; }
}
.it-header-wrapper .navbar-collapsable.expanded .navbar-nav { padding-top: 48px; }

/* Footer (grigio scuro, testo 14px fisso) */
.it-footer { background-color: #4c4c4d; color: #fff; font-size: 14px !important; }
.it-footer .it-footer-main { font-size: 14px !important; }
.it-footer a { color: #fff; text-decoration: none; }
.it-footer .link-list a { display: inline-block; }
.it-footer .it-footer-small-prints { background-color: #4c4c4d; }
.it-footer .underlined { padding-bottom: 8px; border-bottom: 1px solid #efefef; margin-bottom: 7px; }

/* Backdrop modali bianco (come prod) */
.modal-backdrop { background-color: #fff !important; }

/* Menu sinistro (pagine interne: istituzioni/normativa/assessorato) */
#menu-sinistro .menu-separatore { height: 4px; border-radius: 1px; background-color: #e5e5e5; margin-right: -14px; }
#menu-sinistro h4.dropdown { color: #555; font-weight: 600; font-size: .778em; text-transform: uppercase; padding: 16px 24px; margin: 0; letter-spacing: 0; }
#menu-sinistro h4.dropdown [data-bs-toggle=collapse] svg.icon { float: right; fill: #003882; width: 22px; height: 22px; }
#menu-sinistro h4.dropdown [data-bs-toggle=collapse][aria-expanded=false] svg.icon { transform: scaleY(-1); }
#menu-sinistro .list-group-item { font-size: .889em; padding: 6px 24px; color: #003882; border: 0; background-color: unset !important; }
#menu-sinistro .list-group-item:hover { background-color: unset; font-weight: 600; }

/* ============================================================================
   Override in-file del build custom BI1 (stesso selettore dello stock ma
   valori diversi — trovati col diff regola-per-regola custom vs stock).
   ========================================================================= */

/* Chip: testo ridotto a .778rem da 576px in su (BI2 resta .875rem) + colori */
.chip .chip-label { color: #5c6f82; }
@media (min-width: 576px) {
	.chip .chip-label { font-size: .778rem; }
	.chip.chip-lg .chip-label { font-size: .889rem; }
}

/* Card calendario eventi: font .778em (stock/BI2: piu' grande) */
.card .card-calendar { height: 80%; max-height: 80px; width: 80px; border-radius: 4px; background-color: #fff; box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .1), 0 4px 8px 0 rgba(0, 0, 0, .1); position: absolute; right: 32px; top: 10%; color: #455a64; text-align: center; font-size: .778em; font-weight: 600; line-height: 1.3; text-transform: capitalize; }
.card .card-calendar .card-date { font-size: 1.667em; font-weight: 700; display: block; }

/* Card: firma, margini e :after come nel build custom */
.card { border: none; margin-right: -15px; }
.card:after { content: ''; display: block; margin-top: 24px; margin-left: 24px; }
.card .card-body .card-signature { font-style: italic; font-family: "Titillium Web", Geneva, Tahoma, sans-serif; color: #435a70; font-weight: 700; font-size: .88889rem; margin-bottom: 24px; display: block; }
.card .it-card-footer .card-signature { font-style: italic; font-family: "Titillium Web", Geneva, Tahoma, sans-serif; color: #435a70; font-weight: 700; font-size: .88889rem; display: block; margin-bottom: 0; }

/* Paginazione: line-height BS4 (BI2: 1.5) */
.pagination .page-item .page-link { line-height: 1.25; }

/* Hero: paragrafi a 1rem (stock/BI2 piu' grandi) */
.it-hero-wrapper .it-hero-text-wrapper p { font-size: 1rem; font-family: "Titillium Web", Geneva, Tahoma, sans-serif; }

/* Callout e dimmer */
.callout p { font-family: "Titillium Web", Geneva, Tahoma, sans-serif; font-size: .889rem; color: #5b6f82; }
.dimmer p { text-align: justify; font-family: "Titillium Web", Geneva, Tahoma, sans-serif; font-size: 1rem; }

/* Header slim: altezza 48px come il build custom */
.it-header-slim-wrapper .it-header-slim-wrapper-content { height: 48px; align-items: center; }
.it-header-wrapper .it-nav-wrapper .it-header-navbar-wrapper nav { padding: 0; }

/* Footer main: base 16px (la regola .it-footer 14px !important resta prioritaria) */
.it-footer-main { color: #fff; font-size: 16px; }

/* Megamenu: spaziature e heading del build custom */
.navbar .dropdown-menu .link-list-wrapper ul li .divider { width: 65px; background: #e6ecf2; margin-left: 24px; }
.navbar .dropdown-menu .margin-right-col .it-external { padding: 0 15px; }
.navbar .navbar-collapsable .menu-wrapper .nav-item.megamenu .dropdown-menu h3.it-heading-megacolumn { margin: .5em 84px; line-height: 1.2em; font-size: .833em; text-transform: uppercase; padding-bottom: .5em; }
.navbar .navbar-collapsable .menu-wrapper .nav-item.megamenu .dropdown-menu .col-12:not(:first-child) .it-heading-megacolumn { margin-top: 60px; line-height: 2.3em; }
.navbar .navbar-collapsable .menu-wrapper .nav-item.megamenu .dropdown-menu .col-12:not(:first-child) .link-list-wrapper h3 { margin-top: 60px; }
.navbar .navbar-collapsable .menu-wrapper .nav-item.megamenu .dropdown-menu .link-list-wrapper ul.link-list li.it-more a i { margin-left: 15px; }
.navbar .navbar-collapsable .menu-wrapper .nav-item.megamenu .dropdown-menu .row.max-height-col { min-height: 100%; margin-right: -40px; }
.navbar .navbar-collapsable .menu-wrapper .nav-item.megamenu .dropdown-menu .row.max-height-col .row.max-height-col { margin-right: -15px; }
.navbar .navbar-collapsable .menu-wrapper .nav-item.megamenu .dropdown-menu .it-vertical { background: #f5f6f7; padding-top: 32px; margin: -32px -24px -32px -15px; }
.navbar .navbar-collapsable .menu-wrapper .nav-item.megamenu .dropdown-menu .it-vertical.it-description .description-content { padding-left: 36px; padding-right: 36px; }
.navbar .navbar-collapsable .menu-wrapper .nav-item.megamenu .dropdown-menu .it-vertical.it-description .description-content img { display: block; width: 100%; margin-bottom: 30px; }

/* Carousel landscape: larghezze come i container custom */
@media (min-width: 992px) {
	.it-carousel-wrapper.it-carousel-landscape-abstract,
	.it-carousel-wrapper.it-carousel-landscape-abstract-3 { max-width: 960px; }
}
@media (min-width: 1200px) {
	.it-carousel-wrapper.it-carousel-landscape-abstract,
	.it-carousel-wrapper.it-carousel-landscape-abstract-3 { max-width: 1160px; }
}

/* Gutter 15px per variable-gutters (build custom) */
.row.variable-gutters { margin-right: -15px; margin-left: -15px; }
.row.variable-gutters > .col,
.row.variable-gutters > [class*=col-] { padding-right: 15px; padding-left: 15px; }

/* Timeline pin e blockquote */
.it-timeline-wrapper .it-pin-wrapper { display: flex; align-items: center; position: absolute; top: -24px; z-index: 5; left: 9px; }
.blockquote, blockquote { font-family: "Titillium Web", Geneva, Tahoma, sans-serif; margin: 1.5rem 0; }

/* btn-link senza underline, bordeaux */
.btn-link { font-weight: 400; color: #A32E34; text-decoration: none; }

/* btn-outline-secondary: fondo #fcfdff e anello chiaro (layer custom BI1) */
.btn-outline-secondary { color: #5c6f82; background: #fcfdff; box-shadow: inset 0 0 0 1px #e6e9f2; }
.btn-outline-secondary:hover { color: #50565c; box-shadow: inset 0 0 0 1px #c9cedc; }
.bg-dark .btn-outline-secondary { color: #fff; background-color: transparent; background-image: none; box-shadow: none; }
