body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-image: url('../images/background-site.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  background-color: rgb(253,253,251);
  color: #333;
}

header {
  background-color: #ff6600;
  border-top: 0.3em solid #ff6600;
  border-bottom: 0.3em solid #ff6600;
  color: #001f3f;
  padding: 0.5em 0.8em 0.8em 0.8em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  background-image: url('../images/logo.png');
  background-repeat: no-repeat;
  background-position: 0.3em;
  background-size: contain;
  height: 3em;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: flex-start;
  padding-left: 4.5em;
}

.company-name {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 0.2em;
}

.email-link {
  font-size: 0.9em;
  font-weight: 500;
  color: #001f3f;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 0.1em solid transparent;
  transition: all 0.3s ease;
}

.email-link:hover {
  color: #f2f2f2;
  border-bottom-color: rgba(242, 242, 242, 0.8);
  transform: scale(1.2);
  margin-left: 0.8em;
}


nav {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}

nav a {
  color: #001f3f;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

nav a:hover {
  color: #f2f2f2;
  border-bottom: 0.1em solid rgba(242,242,242,0.8);
  transform: scale(1.2);
}

.lang-switch {
  background-color: white;
  color: #ff6600;
  padding: 5px 10px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
}

.lang-switch:hover {
  color: #001f3f;
}

.hero-gallery {
  position: relative;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  display: flex;
  width: 100vw;
  height: 70vh;
  scrollbar-width: none;
  margin: 0 auto;
  cursor: grab;
  max-width: 100%;
  scroll-behavior: smooth;
}

.hero-gallery::-webkit-scrollbar {
  display: none;
}

.hero-gallery.dragging {
  cursor: grabbing;
}

.hero-track {
  display: flex;
  width: max-content;
  height: 100%;
}

.hero-slide {
  flex: 0 0 100vw;
  height: 100%;
  scroll-snap-align: center;
  position: relative;
  margin: 0 auto;
  max-width: 100%;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-text {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0,0,0,0.6);
  color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

.hero-nav {
  position: absolute;
  top: 70vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 10;
  padding-top: 1em;
}

.hero-arrow {
  background: rgba(253,253,251,0.7);
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 5px;
  transition: all 0.5s ease;
  color: rgba(0,95,115,0.5);
}

.hero-dots {
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  background: rgba(253,253,251,0.6);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.5s ease;
}

.hero-arrow:hover, .dot:hover {
  background: rgba(255,102,0,0.6);
  transform: scale(1.3);
  color: rgba(0,95,115,0.7);
}

.hero-arrow:active, .dot.active, .dot:active {
  background: rgba(255,102,0,0.8);
  transform: scale(1.2);
  color: rgba(0,95,115,0.9);
}

.section {
  padding: 40px 20px;
  text-align: center;
  margin: 0 auto;
  max-width: 1200px;
  color: #2e2e2e;
}

.section p {
  text-align: justify;
}

.services-flex, .fleet-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 40px auto;
  max-width: 1200px;
}

.service-card, .fleet-card {
  flex: 0 1 280px;
  height: 40vh;
  max-height: 300px;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: overlay;
  background-color: rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transition: all 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: zoom-in;
}

.service-card:hover, .fleet-card:hover {
  transform: scale(1.1);
  background-color: rgba(0, 0, 0, 0.0);
}

.service-text, .fleet-text {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  background-color: rgba(244, 233, 220, 0.8);
  color: #005f73;
  padding: 2px 0;
  text-align: center;
  transition: all 0.5s ease;
}

.service-card:hover .service-text, .fleet-card:hover .fleet-text {
  top: 90%;
  transform: translateY(-50%);
  padding: 1px 0;
  font-size: 0.8em;
}


/* Responsive override: disattiva animazioni su mobile */
@media screen and (max-width: 768px) {
  .service-card, .fleet-card {
    height: 200px;
    transform: none !important;
  }

  .service-text, .fleet-text {
    top: auto;
    bottom: 10px;
    transform: none;
    font-size: 0.9em;
    padding: 2px 0;
  }

  .service-card:hover .service-text, .fleet-card:hover .fleet-text {
    top: auto;
    bottom: 5px;
    transform: none;
  }
  
  nav a {
	display: none;
  }
  
  nav a.lang-switch {
	display: inline;
	font-size: 0.8em;
  }
}

.badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.badges img {
  height: 5.5em;
  margin: 0.8em;
  transition: transform 0.3s ease;
}

.badges img:hover {
  transform: scale(1.1);
}

.pdf-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.pdf-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #222;
  width: 6em;
  transition: transform 0.2s ease;
}

.pdf-item:hover {
  transform: scale(1.05);
}

.pdf-item img {
  width: auto;
  height: 5em;
  margin-bottom: 0.5em;
}

.pdf-item span {
  font-size: 0.9em;
  text-align: center;
  word-wrap: break-word;
}


.site-footer {
  background-color: #222;
  color: #eee;
  padding: 1em 0.4em;
  font-size: 0.9rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.footer-item {
  flex: 1 1 auto;
  min-width: 200px;
}

.footer-item a {
  color: #ddd;
  text-decoration: none;
}

.footer-item a:hover {
  text-decoration: underline;
}

.site-footer p {
	padding-top: 1em;
	text-align: center;
}


/* Lightbox styles */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
  animation: fadeIn 0.5s ease;
}

#lightbox img {
  max-width: 80%;
  max-height: 80vh;
  border-radius: 10px;
}

#lightbox button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(0,95,115,0.7);
  font-size: 3em;
  cursor: pointer;
  padding: 0 20px;
  user-select: none;
  transition: all 0.5s ease;
  height: 100vh;
  max-height: 100%;
  max-width: 10%;
  background: rgba(253,253,251,0.5);
}

#lightbox button:hover {
  font-size: 4em;
  background: rgba(255,102,0,0.4);
  color: rgba(0,95,115,0.8);  
}

#lightbox button:active {
  font-size: 3.5em;
  background: rgba(255,102,0,0.6);
  color: rgba(0,95,115,0.9);
}

#prev {
  left: 0;
}

#next {
  right: 0;
}

/* Animazioni */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

.slide-up {
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 1s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Titoli e contenuti */
.section h1, .section h2 {
	border-bottom: 0.1em solid rgba(255, 102, 0, 0.6);
	border-left: 0.1em solid rgba(255, 102, 0, 0.6);
	border-bottom-left-radius: 1em;
}

.light {
	font-weight: lighter;
	font-size: 0.9 em;
	font-style: italic;
}

/* No Script */
.noscript-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #ffcc00;
  color: #000;
  text-align: center;
  padding: 0.5em;
  font-size: 1em;
  font-weight: bolder;
  font-family: sans-serif;
  z-index: 9999;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
  transition: all 0.5s ease;
  opacity: 0.8;
}

.noscript-banner:hover {
  opacity: 0.1;
}