/* Font Face */
@font-face {
  font-family: 'Grashrock';
  src: url('../assets/fonts/Grashrock.ttf') format('truetype');
  font-display: swap;
  font-weight: normal;
  font-style: normal;
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

/* -------- PAGE STRUCTURE -------- */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body {
  font-family:  Arial, sans-serif;
}

header {
  flex-shrink: 0;
  min-height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
}

main {
  background: url('../assets/images/SfondoDesktop.webp') center/cover no-repeat;
  flex: 1 0 auto;
  min-height: 0;
  position: relative;
}

/* -------- VIDEO RESPONSIVE -------- */
#bg-video-desktop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  display: block;
}

#bg-video-mobile {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  display: none;
}

@media (max-width: 900px) {
  #bg-video-desktop {
    display: none;
  }
  #bg-video-mobile {
    display: block;
  }
}

/* -------- MENU -------- */
#menu {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 2.5rem;
  text-align: left;
}

#menu a {
  color: #ffffff;
  font-size: 3.125rem;
  font-family: 'Grashrock', Arial, sans-serif;
  cursor: pointer;
  text-decoration: none;
  padding: 1.25rem 1rem;
  white-space: normal;
  border: none;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu a:hover,
#menu a:focus {
  transform: scale(1.2);
  color: #ff8400;
}

#menu a:active {
  color: #ff8400;
}

#menu a:focus-visible {
  outline: 2px solid #f47d00;
  outline-offset: 2px;
}

/* Link disabilitati */
#menu a.disabled {
  color: #666666;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.5;
}

#menu a.disabled:hover,
#menu a.disabled:focus {
  transform: none;
  color: #666666;
}

/* -------- HAMBURGER -------- */
#hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  margin-left: 0.75rem;
}

#hamburger span {
  display: block;
  width: 28px;
  height: 4px;
  margin: 0.25rem 0;
  background: #ffffff;
  border-radius: 2px;
  transition: 0.3s ease;
}

/* -------- INFO CONTAINER -------- */
.info-container {
  border-radius: 0.625rem;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 1);
  display: flex;
  flex-direction: column;
  text-align: center;
  font-size: 1.8rem;
  margin-top: 2rem;
  margin: 2rem;
  align-items: center;
}

.info-container h2,
.info-container h3 {
  margin: 1.5rem 0 0.75rem;
  color: #f47d00;
  text-align: center;
  font-family: 'Grashrock';
}

.info-container ul,
.info-container a,
.info-container p {
  color: #000000;
  text-align: center;
  display: block;
  margin: 0.5rem 0;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 600;
}

.info-container a {
  text-decoration: underline;
  text-align: center;
}

.info-container iframe {
  width: 100%;
  height: 300px;
  border: #f47d00 5px solid;
  margin-top: 0.75rem;
}

/* -------- RESPONSIVE MEDIA QUERIES -------- */
@media (max-width: 900px) {
  header {
    min-height: 60px;
  }

  main {
    background: url('../assets/images/SfondoMobile.webp') center/cover no-repeat;
    flex: 1 0 auto;
    min-height: 0;
    position: relative;
  }

  #bg-video {
    display: block;
  }

  #hamburger {
    display: flex;
  }

  #menu {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 1rem 0;
    display: none;
    z-index: 1000;
  }

  #menu.open {
    display: flex;
  }

  #menu a {
    width: 100%;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #222;
    text-align: center;
    font-size: 2rem;
  }

  .info-container {
    margin: 0 auto 1.5rem auto;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 1);
    display: flex;
    flex-direction: column;
    text-align: center;
    margin-top: 2rem;
    max-width: 99vw;
    font-size: 1rem;
    padding: 0.75rem 0.25rem 1rem;
    align-items: center;
    margin: 1rem;
  }

  .info-container h2 {
    margin: 1.5rem 0 0.75rem;
    color: #f47d00;
  }

  .info-container ul,
  .info-container a,
  .info-container p {
    color: #000000;
    text-align: center;
    margin: 0.5rem 0;
    display: block;
  }

  .info-container a {
    text-decoration: underline;
  }
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background-color: #000;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

/* -------- BANNER SPONSOR -------- */
.banner {
  height: 100px;
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.banner-content {
  display: flex;
  align-items: center;
  width: max-content;
  /* durata impostata via JS in proporzione al numero di sponsor */
  animation: banner-scroll var(--banner-duration, 30s) linear infinite;
  will-change: transform;
}

/* Pausa al passaggio del mouse — utile su desktop */
.banner:hover .banner-content {
  animation-play-state: paused;
}

.banner-content img {
  height: 75px;
  object-fit: contain;
  margin: 0 25px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.banner-content img:hover {
  transform: scale(1.08);
}

@keyframes banner-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); } /* -50% = una delle due copie */
}

/* Rispetta la preferenza "riduci le animazioni" */
@media (prefers-reduced-motion: reduce) {
  .banner-content { animation: none; }
}

/* -------- FOOTER CONTENT -------- */
.footer-content {
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.social-icons {
  display: flex;
  align-items: center;
}

.social-icons a {
  margin: 0 15px;
  color: #fff;
  font-size: 32px;
  text-decoration: none;
  display: inline-block;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
  color: #f47d00;
  transform: translateY(-3px) scale(1.1);
}

.credits p {
  margin: 0;
  font-size: 16px;
  opacity: 0.9;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* -------- FOOTER RESPONSIVE -------- */
@media (max-width: 768px) {
  .banner { height: 70px; }
  .banner-content img { height: 50px; margin: 0 18px; }
  .footer-content { padding: 15px 25px; flex-direction: column; gap: 12px; }
  .social-icons a { font-size: 26px; margin: 0 10px; }
  .credits p { font-size: 13px; }
}

@media (max-width: 480px) {
  .banner { height: 60px; }
  .banner-content img { height: 42px; margin: 0 15px; }
  .footer-content { padding: 12px 18px; }
  .social-icons a { font-size: 24px; margin: 0 8px; }
  .credits p { font-size: 12px; text-align: center; }
}

@media (min-width: 1200px) {
  .banner { height: 120px; }
  .banner-content img { height: 90px; margin: 0 30px; }
  .footer-content { padding: 25px 60px; }
  .social-icons a { font-size: 36px; margin: 0 18px; }
  .credits p { font-size: 18px; }
}