html {scroll-behavior: smooth;}

body {font-family: 'Roboto', sans-serif;}

:root {
    --primary-color: #003366;
    --secondary-color: #AB1E35;
    --light-color: #F0F7F9;
    --dark-color: #333333;
    --accent-color: #D4E5EB;
}

.w300 {font-weight:300;}
.w400 {font-weight:400;}
.w500 {font-weight:500;}
.w600 {font-weight:600;}
.w700 {font-weight:700;}
.w800 {font-weight:800;}

.white {color:#fff;}
.bg-petrol {
  background-color: #323573 !important;
}
.bg-redbrown {
  background-color: #808598;
}
#pre-header {padding-left:10px;}
.imglogoheaderdesktop {width:300px;}

.titolo_dipartimento {
	margin-left:20px; font-size:30px; font-family: 'Roboto Slab', sans-serif;
	color:#c04c6f; font-weight:600; /* COLORE COMPLIANCE #c04c6f NOCOMPLIANCE CON #d65b7f */
	display: flex;
    align-items: center;
}
.nounderline {text-decoration:none !important;}
.contentpagetitle {
    font-weight: 800;
    font-size: 20px;

}


.global-section {
  margin-bottom: 50px;
}
.global-section-title {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary-color);
}

.hero-img {
  background-position: center;
  background-size: cover;
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
  width: 50%;
}
.section-hero-left {
  position: relative;
  padding: 5rem 0;
  min-height: 400px;
}
.nav-list-secondary {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.nav-list-secondary a.activelink {
  background-color: #fff;
  border-radius: 5px 0px 0px 0px;
  margin: 0px 5px 0px 0px;
  font-weight: 800;
}

.nav-list-secondary li {
  margin: 0px -5px 0px 0px;
  border-left: 1px solid;
  border-radius: 5px 0px 0px 0px;
  border-top: 1px solid;
  background-color: #ddd;
}

.nav-list-secondary a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  padding: 1rem 0;
  display: block;
}
.nav-list-secondary a:hover {
  color: #fff;
  text-decoration: underline;
  font-weight:800;
  background-color:#D1344C;
/* DA VALUTARE PER 3DFX se non interferisce con accessibilità
  margin:1px 6px 0px 1px;  
  border-radius: 5px 5px 0px 0px;   */ 
}
.container-border-top {
  border-top: 1px solid #eee;
}
.pt84 {
  padding-top: 84px;
}
.menu-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.menu-card {
	background-color: #f8f9fa;
	padding: 15px;
	border-radius: 5px;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}
.menu-card p {flex-grow: 1; font-weight:400;}

.menu-card:hover {
  background-color: #e9ecef;
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.menu-card h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.menu-card-footer {
  margin-top: auto;
  text-align: right;
}

.menu-card .btn-outline-primary:hover {
	background-color: white !important;
	color: #007bff !important;
	font-weight:800 !important;
}

.footer-wrapper {
  background-color: #323573;
  padding: 40px 0;
  margin-top: 50px;
}
.footer-inline-menu {
  display: flex;
  list-style: none;
  padding-left: 0;
  justify-content: center;
  margin-bottom: 20px;
}
.footer-inline-menu li {
  margin: 0 10px;
}
.footer-text {
  text-align: center;
  color: #fff;
}
.footer-text a {
  font-weight:600;
}

/* Hamburger Menu Styles */
.hamburger-wrapper {
  position: relative;
  margin-left: auto;
}

.hamburger-button {
  position: relative;
  z-index: 1000;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.hamburger-button.active {
  position: fixed;
  top: 10px;
  right: 10px;
}

.hamburger-button span {
  display: block;
  width: 30px;
  height: 3px;
  margin: 6px 0;
  background-color: #323573;
  transition: all 0.3s ease;
}

.hamburger-button.active span {
  background-color: #323573;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background-color: #ffffff;
  z-index: 999;
  overflow-y: auto;
  transition: right 0.3s ease;
  box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  padding: 60px 20px 20px;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu li {
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.mobile-menu a {
  color: #333;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  display: block;
}

.mobile-menu a:hover {
  color: #D1344C;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.hamburger-button.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-button.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-button.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.imglogounipvfooter {padding-right:10px;}
.mobile-only {display:none !important;}


/* DOWNLOAD BOTTONI GLOBALI */
.global-btn-download {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff !important;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
  text-decoration: none;
  margin-top: 10px;
  font-weight: 600;
}
.global-btn-download:hover {
  background-color: var(--secondary-color);
  text-decoration: underline;
  color: white;
}


/***** CSS PER ACCESSIBILITA' ******/

/* INDICATORE DI FOCUS DA TASTIERA */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 3px solid #FFBF00; /* Colore ad alto contrasto, giallo ambrato */
  outline-offset: 2px;
  box-shadow: 0 0 0 3px #FFBF00; /* Ombra per aumentare la visibilità */
}

/* SKIP LINK PER ANDARE AL MAIN CONTENT */
.skip-link {
  position: absolute;
  top: -999px; /* testato in alternativa a transform: translateY(-100%); */
  left: 10px;
  padding: 10px 15px;
  background-color: #333;
  color: #fff;
  text-decoration: none;
  z-index: 99999; /* sopra gli altri elementi */
  border-radius: 3px;
}
.skip-link:focus {
  top: 10px; /* testato in alternativa a transform: translateY(0); */
}
.skip-link:hover {
  color:#fff;
}

@media all and (max-width:768px) {
  .desktop-only {display:none !important;}
  .mobile-only {display:block !important;}
  .header-bottom {display: none !important;}
  .titolo_dipartimento {margin-left:10px; font-size:20px; font-weight:600;}
  .contentpagetitle {padding-left: 8px;}
  .footer-inline-menu {row-gap:5px; column-gap: unset;}
}

@media all and (max-width:550px) {
  .titolo_dipartimento {font-size:16px; font-weight:600; letter-spacing:-0.5px;}
}

@media all and (max-width:400px) {
  .imglogoheader {display:none;}
  .footer-inline-menu li {margin: 5px 5px;}
  .footer-inline-menu {row-gap:unset;}
  .imglogounipvfooter {max-width:100px;}
}
