
body {
  font-family: 'Source Code Pro', monospace;
  margin: 0;
  padding: 0;
  background-color: #000;
  color: #fff;
  overflow-x: hidden;
}

/* NAVIGATION */

.branding {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  max-width: 100%;
}

.logo {
  display: flex;
  align-items: center;
}

.site-title {

    display: block;
    color: #e64a19;
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 20px;
  white-space: normal;
  word-break: break-word;
    line-height: 1.2;
  text-align: left;
     flex-shrink: 1;
     max-width: none; /* control when line breaks */
  }

.site-title .line {
  display: inline;
}

/* Only allow the <br> to break on mobile */
.mobile-break {
  display: none;
}

  .site-title span {
  display: inline;
}

nav {
  background: rgba(0, 0, 0, 0.8);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.nav-inner {
  max-width: 1700px;
  margin: 0 auto;
  padding-left: 30px;
  padding-right: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  padding-top: 10px;
  padding-bottom: 10px;
    width: auto;
  height: 70px;
  width: auto;
  flex-shrink: 0; /* prevents logo from shrinking too small */
}


.nav-menu {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li a {
  text-decoration: none;
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  transition: color 0.3s;
}

.nav-menu li a:hover {
  color: #e64a19;
}

.hamburger {
  display: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

/* HERO SECTION */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 90%;
  max-width: 800px;
}

.festival-title {
  font-size: 3rem;
  color: #e64a19;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
  font-size: 1.5rem;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8);
}

.btn {
  display: inline-block;
  margin-top: 15px;
  padding: 20px 25px;
  background: #e64a19;
  color: white;
  text-decoration: none;
  font-size: 20px;
  font-weight: bold;
  border-radius: 10px;
  transition: background 0.3s;
}

.btn:hover {
  background: #c0392b;
}

/* INTRO SECTION */
.intro {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: 60px 10%;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.video-container {
  flex: 1;
  max-width: 500px;
}

.video-wrapper {
  position: relative;
  border: 1px solid white;
  border-radius: 10px;
  overflow: hidden;
}


.video-wrapper::before {
  content: "";
  background: url('Media_directory/play-icon.png') no-repeat center center;
  background-size: 60px;
  width: 60px;
  height: 60px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}

.video-wrapper.playing::before {
  display: none;
}


.video-wrapper video {
  width: 100%;
  display: block;
}

.text-container {
  flex: 1;
  max-width: 500px;
}

.text-container h2 {
  font-size: 2rem;
  color: #e64a19;
  margin-bottom: 10px;
}

.text-container p {
  font-size: 1.2rem;
  color: #fff;
}

/* CONTACT & NEWSLETTER */
.contact-section {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  padding: 50px 10%;
  background: #000;
  color: #fff;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.divider {
  width: 1px;
  background-color: #e64a19;
  min-height: 300px;
  align-self: stretch;
}

.contact, .newsletter {
  flex: 1;
  max-width: 500px;
}

form input,
form textarea,
form button {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #fff;
  border-radius: 5px;
  font-size: 1rem;
  color: #000;
  box-sizing: border-box;
}

form button {
  background: #e64a19;
  color: white;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

form button:hover {
  background: #c0392b;
}

/* FOOTER */


.footer-gallery {
  position: relative;
  left: 0;
  right: 0;
  width: 100vw;
  background-color: #000;
  color: white;
  text-align: center;
  padding: 20px 0;
  margin: 0 calc(-50vw + 50%);
  box-sizing: border-box;
}

footer {
  width: 100%;
  background: #000;
  padding: 20px;
  text-align: center;
  box-sizing: border-box;
  margin: 0;
}

.footer-logo {
    text-align: center;
  margin-bottom: 15px;
}

.footer-logo a {
  display: inline-block;
}

.footer-logo img {
  width: 100px;
  height: auto;
}

.logo_sponsor img {
  max-width: 150px;
}

.logo_sponsors {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 20px 0;
}

.logo_sponsor_ipitch img {
  max-width: 110px;
}

.logo_sponsor_filmstro img {
  max-width: 130px;
}

.logo_sponsors img {
  height: 70px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.social-icons a {
  margin: 0 10px;
}

.social-icons img {
  width: 30px;
  height: 30px;
  transition: transform 0.3s;
}

.social-icons img:hover {
  transform: scale(1.2);
}

.privacy_cookie {
  color: #fff;
  text-decoration: none;
}


/* MOBILE STYLES */
@media screen and (max-width: 877px) {

    .branding {
    flex-direction: row; /* mantieni logo e titolo in riga */
    align-items: center;
    gap: 10px;
  }

  .festival-title {
    font-size: 1.8rem;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    max-width: 90%;
    margin: 0 auto;
  }

.mobile-break {
  display: none;
}

@media screen and (max-width: 877px) {
  .mobile-break {
    display: inline;
  }
}

  .site-title {
    font-size: 1rem;
    max-width: 110px; /* forza l'andata a capo interna */
    word-break: break-word;
  }
    .site-title .line {
    display: block;
  }

    .mobile-break {
    display: inline;
  }

  .intro {
    flex-direction: column;
    text-align: center;
  }

  .contact-section {
    flex-direction: column;
    align-items: center;
  }

  .contact,
  .newsletter {
    width: 100%;
    max-width: 400px;
  }

  .divider {
    display: none;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    gap: 15px;
    background: rgba(0, 0, 0, 0.95);
    position: absolute;
    top: 70px;
    right: 40px;
    padding: 20px;
    border-radius: 8px;
    z-index: 2000;
  }

  .nav-menu.show {
    display: flex;
  }

  .hamburger {
    display: block;
  }


  .logo_sponsors {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .logo_sponsors img {
    max-width: 20vw;
    height: auto;
  
}
}

/* Responsive tweaks for Previous Editions page */
@media screen and (max-width: 877px) {
  .edition-entry {
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
  }

  .edition-entry img {
    width: 100%;
    height: auto;
    max-height: none;
  }

  .edition-entry .description {
    padding-top: 15px;
    width: 100%;
  }

  .origin-trailer {
    flex-direction: column;
    align-items: flex-start;
    row-gap: 8px;
    margin-top: 15px;
  }

  .origin-trailer p,
  .origin-trailer a {
    min-width: unset;
    width: 100%;
  }
}

.rules-page {
  background-color: #f8f8f8;
  color: #222;
  padding-left: 30px;
  padding-right: 30px;
}

.content-wrapper {
  max-width: 1000px;
  margin: 140px auto 0 auto;
  line-height: 1.6;
  font-size: 1.1rem;
}

.rules-page h1 {
  color: #e64a19;
  font-size: 2.5rem;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
  position: relative;
}

/* PREVIOUS EDITIONS PAGE */
.page-subtitle {
  text-align: center;
  color: #888;
  font-size: 1rem;
  margin-top: -10px;
  margin-bottom: 30px;
}

.previous_editions h1 {
  color: #e64a19;
  font-size: 2.5rem;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
  position: relative;
}



    .year-filters {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 50px;
      margin-bottom: 30px;
    }

    .year-filters button {
      padding: 10px 20px;
      border: 1px solid #e64a19;
      background-color: white;
      color: #e64a19;
      font-weight: bold;
      cursor: pointer;
      transition: background 0.3s, color 0.3s;
    }

    .year-filters button:hover {
      background-color: #e64a19;
      color: white;
    }

    .year-filters button.active-year {
      background-color: #e64a19;
      color: white;
      border-color: white;
    }

    .edition-entry {
      display: flex;
      align-items: stretch;
      margin: 0 auto;
      max-width: 1000px;
      padding: 20px 30px;
      gap: 30px;
      border-bottom: 1px solid #e64a19;
    }

    .editions-grid {
      display: flex;
      flex-direction: column;
      gap: 0;
      max-width: 1000px;
      margin: 0 auto;
    }

    .edition-entry img {
      width: 160px;
      height: 100%;
      max-height: 230px;
      object-fit: cover;
      flex-shrink: 0;
      border: 1px solid #ccc;
      border-radius: 8px;
    }

    .edition-entry .description {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .edition-entry .description h3 {
      margin-top: 0;
      color: #e64a19;
    }

    .origin-trailer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.origin-trailer p {
  margin: 0;
}

.origin-trailer a {
  margin: 0;
  text-decoration: none;
  color: #e64a19;
  font-weight: bold;
}

.edition-entry .description h2,
.edition-entry .description h3,
.edition-entry .description h4 {
  margin-top: 0.3em;
  margin-bottom: 0.3em;
}
    /* LIGHTBOX POSTER VIEW */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border: 4px solid white;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(0,0,0,0.7);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  z-index: 10000;
}

   /* CONTACT FORM STYLE MESSAGE */
.form-message {
  margin-top: 15px;
  font-weight: bold;
  font-size: 1rem;
}
@media screen and (max-width: 768px) {
  .editions-grid {
    padding: 0 15px;
  }

  .edition-entry {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 0;
  }

  .edition-entry img {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-bottom: 15px;
  }

  .edition-entry .description {
    width: 100%;
  }

  .origin-trailer {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 15px;
  }

  .origin-trailer p,
  .origin-trailer a {
    width: 100%;
    text-align: center;
  }

  .year-filters {
    padding: 0 10px;
    text-align: center;
  }

  .year-filters button {
    flex: 1 1 100px;
  }
}

form input[type="email"],
form input[type="submit"] {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 0px solid #fff;
  border-radius: 5px;
  font-size: 1rem;
}

form input[type="submit"] {
  background: #e64a19;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

form input[type="submit"]:hover {
  background: #c0392b;
}

  /* GALLERY PAGE */

.gallery-page  {
  background-color: #f8f8f8;
  color: #222;
}


.gallery-wrapper {
  max-width: 1000px;
  margin: 60px auto 40px auto;
  padding: 0 20px;
}

.main-image {
  text-align: center;
  margin-bottom: 20px;
}

.main-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #e64a19;
}

.thumbnail-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.gallery-arrow {
  background: none;
  border: none;
  font-size: 2rem;
  color: #e64a19;
  cursor: pointer;
  padding: 0 10px;
  transition: transform 0.3s;
}

.gallery-arrow:hover {
  transform: scale(1.2);
}

.thumbnails {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 10px;
  padding: 10px 0;
}

.thumbnails img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  scroll-snap-align: center;
  transition: border 0.3s;
}

.thumbnails img:hover {
  border: 2px solid #e64a19;
}

@media screen and (max-width: 768px) {
  .main-image img {
    max-height: 300px;
  }

  .thumbnails img {
    width: 80px;
    height: 60px;
  }

  .gallery-arrow {
    font-size: 1.5rem;
  }
}