/**
 * Override Comuni-theme greens with Designers Italia “Blu Italia” (#0066CC).
 */

:root {
	--bs-primary: #0066cc !important;
	--bs-primary-rgb: 0, 102, 204 !important;
	--bs-link-color: #0066cc !important;
	--bs-link-hover-color: #004d99 !important;
	--bs-breadcrumb-divider-color: #5c6f82 !important;
	--bs-breadcrumb-item-active-color: #262626 !important;
}

/* Slim bar (top) */
.it-header-wrapper .it-header-slim-wrapper,
.it-header-slim-wrapper {
	background-color: #003366 !important;
}

.it-header-slim-wrapper .it-header-slim-wrapper-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.it-header-slim-wrapper .apsp-slim-phone {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem 0.75rem;
	padding: 0.35rem 0.85rem;
	border-radius: 4px;
	color: #fff !important;
	text-decoration: none !important;
	font-size: 0.875rem;
	line-height: 1.3;
	background-color: transparent;
	border: 1px solid rgba(255, 255, 255, 0.35);
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.it-header-slim-wrapper .apsp-slim-phone:hover,
.it-header-slim-wrapper .apsp-slim-phone:focus {
	background-color: #0059b3 !important;
	border-color: #fff !important;
	color: #fff !important;
	text-decoration: none !important;
}

.it-header-slim-wrapper .apsp-slim-phone__label {
	font-weight: 400;
	opacity: 0.9;
}

.it-header-slim-wrapper .apsp-slim-phone__number {
	font-weight: 600;
	letter-spacing: 0.02em;
}

/* Brand band (logo + title) */
.it-header-wrapper .it-header-center-wrapper,
.it-header-center-wrapper {
	background-color: #0066cc !important;
}

.it-header-center-wrapper .it-brand-wrapper a,
.it-header-center-wrapper .it-brand-title,
.it-header-center-wrapper .it-brand-tagline {
	color: #fff !important;
}

/* Main navigation bar — full width on wrapper; inner .navbar stays transparent (see apsp-header-nav.css) */
.it-header-wrapper .it-header-navbar-wrapper,
.it-header-navbar-wrapper {
	width: 100%;
	max-width: 100%;
	background-color: #0066cc !important;
}

@media (min-width: 992px) {
	.it-header-wrapper .it-header-navbar-wrapper,
	.it-header-navbar-wrapper {
		background-color: #0066cc !important;
	}
}

.it-header-navbar-wrapper .nav-link,
.it-header-navbar-wrapper .navbar-nav > li > a,
.it-header-navbar-wrapper nav a {
	color: #fff !important;
}

.it-header-navbar-wrapper .nav-link:hover,
.it-header-navbar-wrapper .nav-link:focus,
.it-header-navbar-wrapper .nav-link.active {
	color: #fff !important;
	opacity: 0.9;
}

/* Breadcrumbs */
.breadcrumb-container .breadcrumb,
.breadcrumb-container .breadcrumb a,
.breadcrumb .breadcrumb-item a {
	color: #5c6f82 !important;
}

.breadcrumb .breadcrumb-item.active {
	color: #262626 !important;
}

/* Buttons & links site-wide */
.btn-primary {
	--bs-btn-bg: #0066cc;
	--bs-btn-border-color: #0066cc;
	--bs-btn-hover-bg: #004d99;
	--bs-btn-hover-border-color: #004d99;
}

.text-primary {
	color: #0066cc !important;
}

/* Body/content links only — footer keeps theme light-on-dark colors */
main a:not(.nav-link):not(.btn):not(.apsp-section-card__link),
.apsp-comuni-page .entry-content a {
	color: var(--bs-link-color);
}

/* Footer: white links on dark grey band (override global link blue) */
.it-footer,
.it-footer-main,
.it-footer-small-prints {
	--bs-link-color: #fff;
	--bs-link-hover-color: #fff;
}

.it-footer a,
.it-footer-main a,
.it-footer-small-prints a,
.it-footer .footer-list a,
.it-footer .footer-list li a,
.it-footer .footer-bottom a,
.it-footer .footer-info a,
.it-footer .footer-info a.list-item,
.it-footer .link-list-wrapper a {
	color: #fff !important;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.it-footer a:hover,
.it-footer a:focus-visible,
.it-footer-main a:hover,
.it-footer .footer-list a:hover,
.it-footer .footer-bottom a:hover,
.it-footer .footer-info a:hover {
	color: #fff !important;
	opacity: 0.9;
	text-decoration: underline;
}

/* Feedback / blocks that use Comuni green */
.it-header-block-title,
.cmp-rating,
.bg-primary {
	background-color: #0066cc !important;
}

/* AT sidebar — follow APSP blue tokens, not Comuni green */
.apsp-at-comuni-nav {
	--apsp-at-menu-active: var(--bs-link-color, #0066cc);
	--apsp-at-menu-active-bg: rgba(var(--bs-primary-rgb, 0, 102, 204), 0.08);
}

.apsp-at-comuni-nav .apsp-at-menu-heading {
	color: var(--bs-gray-800, #262626) !important;
	text-decoration: none !important;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
}

.apsp-at-comuni-nav .link-list .nav-link:hover,
.apsp-at-comuni-nav .link-list .nav-item.active > .nav-link,
.apsp-at-comuni-nav .link-list .nav-link.active,
.apsp-at-comuni-nav .link-list .nav-item.ancestor > .nav-link,
.apsp-at-comuni-nav .link-list-nested .nav-item.active > .nav-link,
.apsp-at-comuni-nav .link-list-nested .nav-link.active,
.apsp-at-comuni-nav .link-list a.active {
	color: var(--apsp-at-menu-active) !important;
	border-left-color: var(--apsp-at-menu-active);
}

/* Comuni theme colors <span> inside .link-list-wrapper (beats bootstrap-italia-comuni green) */
.apsp-at-comuni-nav .link-list-wrapper ul li a span,
.apsp-at-comuni-nav .link-list-wrapper.menu-link-list ul li a span {
	color: var(--bs-gray-800, #262626) !important;
	text-decoration: none;
}

.apsp-at-comuni-nav .link-list-wrapper ul li a:hover:not(.disabled) span,
.apsp-at-comuni-nav .link-list-wrapper ul li a:focus-visible span {
	color: var(--apsp-at-menu-active) !important;
	text-decoration: underline;
}

.apsp-at-comuni-nav .link-list-wrapper ul li a.active span,
.apsp-at-comuni-nav .link-list-wrapper ul li .nav-item.active > a span,
.apsp-at-comuni-nav .link-list-wrapper ul li a.list-item.active span {
	color: var(--apsp-at-menu-active) !important;
	text-decoration: underline;
}

.apsp-at-comuni-nav .link-list-wrapper ul li a:hover:not(.disabled) .icon,
.apsp-at-comuni-nav .link-list-wrapper ul li a.active .icon {
	fill: var(--apsp-at-menu-active) !important;
	color: var(--apsp-at-menu-active) !important;
}

/* Ensure logo visible on brand band */
.it-header-center-wrapper .site-logo {
	display: block;
	margin-right: 12px;
}
