/* =============================================
   Piacenza Infrastrutture S.p.A. — Stylesheet
   ============================================= */

/* Reset base */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  color: #333;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#main {
  flex: 1;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }

/* ---- HEADER ---- */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.site-header {
  max-width: 1310px;
  margin: 0 auto;
  padding: 0 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
}

.site-logo img {
  height: 70px;
  width: auto;
  display: block;
}

#header nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}

#header nav ul li a {
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  color: #333;
  letter-spacing: 0.3px;
  white-space: nowrap;
  height: 100px;
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

#header nav ul li a:hover {
  border-bottom-color: #c0392b;
  color: #c0392b;
}

/* Push content below fixed header */
#main {
  padding-top: 110px;
  flex: 1;
}

/* ---- HAMBURGER ---- */
.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  position: relative;
  background: none;
  border: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background: #333;
  height: 3px;
  width: 28px;
  border-radius: 2px;
  position: absolute;
  transition: transform 0.3s;
}

.nav-toggle-label span { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.nav-toggle-label span::before { content: ''; top: -8px; }
.nav-toggle-label span::after { content: ''; top: 8px; }

/* X animation when open */
.nav-toggle-label.open span { background: transparent; }
.nav-toggle-label.open span::before { top: 0; transform: rotate(45deg); }
.nav-toggle-label.open span::after { top: 0; transform: rotate(-45deg); }

/* ---- MOBILE ---- */
@media screen and (max-width: 768px) {
  .site-header { padding: 0 20px; }

  .nav-toggle-label { display: block; }

  #header nav {
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  #header nav.open { max-height: 400px; }

  #header nav ul {
    flex-direction: column;
    padding: 10px 0;
  }

  #header nav ul li a {
    height: auto;
    padding: 14px 35px;
    border-bottom: none;
    text-align: right;
    justify-content: flex-end;
  }

  #header nav ul li a:hover {
    background: #f5f5f5;
    border-bottom: none;
    color: #c0392b;
  }
}
