/* Reset e base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Boogaloo", cursive;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;

  background-image: url(assets/background.webp);
  background-size: 300% auto;
  background-position: top;
  background-repeat: no-repeat;
  /* background-attachment: fixed; */
  background-color: #ff970f;
}
h2 {
  font-size: 50px;
  text-align: center;
}
/* Container generico */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Sezione 1: Hero */
.hero-section {
  min-height: 70vh;

  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  padding-bottom: 20px;
  flex-direction: column;
}
.textDescription {
  font-size: 30px;
  color: #fff;
  line-height: 1;
  text-shadow: 2px 2px 0px #000;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 90%;
  width: 700px;
  padding-bottom: 50px;
}
section {
  margin-bottom: 150px;
}
.logo {
  max-width: 100%;
  height: auto;
  margin-bottom: 2rem;
  max-height: 50vh;
  animation: float 4s ease-in-out infinite;
}

.date {
  max-width: 100%;
  height: auto;
  max-height: 5vh;

  margin-bottom: 20px;
}

/* Sezione 2: Programma */
.program-section {
  background: #017bf0;
  position: relative;
}

.program-section::before,
.program-section::after {
  content: "";
  position: absolute;
  right: 0;
  background-image: url(assets/wow_blu_3_top.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  top: -200px;
  width: 100%;
  height: 200px;
  background-position: 0 0;
}
.program-section::after {
  top: unset;
  bottom: -198px;
  transform: rotate(180deg);
}
@media screen and (min-width: 768px) {
  body {
    background-size: 200% auto;
    background-position: center -700px;
  }
  .program-section {
    padding: 80px 0;
    width: 100%;
    margin: 40px auto 0px;
    border: 2px solid #000;
  }
  .program-container {
    max-width: 700px;
    background-color: #017bf0;
  }
  .textDescription {
    font-size: 40px;
  }
  .balloon {
    margin-bottom: 100px !important;
  }
  .sponsors-section {
  }
  .program-section::before,
  .program-section::after,
  .sponsors-section::before {
    display: none;
  }
}
.program-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.program-title {
  text-align: center;
  color: white;
  font-size: 50px;
  margin-bottom: 60px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-weight: bold;
}

.balloon-container {
  display: flex;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto 60px;
}

.balloon {
  max-width: 500px;
  width: 100%;
  position: relative;
  margin: 0 20px;
  transition: transform 0.3s ease;
}

.balloon:hover {
  transform: translateY(-5px);
}

.balloon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background-image: url("assets/comic_baloon/top_baloon.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center top;
  z-index: 0;
}

.balloon::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: 0;
  right: 0;
  height: 120px;
  background-image: url("assets/comic_baloon/bottom_baloon.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center bottom;
  z-index: 0;
}
.balloon-header,
.balloon-content {
  background: transparent;
  background-image: url(assets/comic_baloon/mid_ballon.png);
  background-repeat: repeat-y;
  background-position: center;
  background-size: 100%;
  background-color: transparent;
  color: #000;
}
.balloon-header {
  padding: 20px;
  cursor: pointer;
  text-align: center;
  transition: background 0.3s ease;
  position: relative;
  z-index: 2;
  margin-top: 25px;
}

.balloon-header h3 {
  font-size: 53px;
  margin-bottom: 10px;
  font-weight: bold;
}

.balloon-arrow {
  font-size: 30px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.balloon-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  position: relative;
  z-index: 2;
}

.balloon-content.active {
  max-height: none;
}

.balloon-content.active .balloon-arrow {
  transform: rotate(180deg);
}

.program-events {
  padding: 20px;
  background: white;
  margin: 0 15px;
  border-radius: 10px;
}

.balloon-footer {
  padding: 20px;
  text-align: center;
  background: white;

  margin: 0 15px 25px 15px;
  border-radius: 0 0 10px 10px;
  position: relative;
  z-index: 2;
}

.close-button {
  background: white;
  color: #000;
  border: 2px solid #000;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.close-button:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.close-button:active {
  transform: translateY(0);
}

.event {
  display: block;
  margin-bottom: 0;
  padding: 15px 0;
  background: transparent;
  border-radius: 0;
  border-left: none;
  border-bottom: 1px solid black;
  transition: none;
  font-family: "Work Sans", sans-serif;
  font-size: 20px;
}

.event:last-child {
  margin-bottom: 0;
}

.time {
  background: transparent;
  color: #000;
  padding: 0;
  border-radius: 0;
  font-weight: normal;
  font-size: 20px;
  min-width: auto;
  text-align: left;
  margin-right: 0;
  margin-bottom: 0px;
  flex-shrink: 0;
  display: block;
  font-family: "Work Sans", sans-serif;
}

.event-details {
  flex: 1;
}

.event-details strong,
.location-header {
  color: #000;
  display: block;
  margin: 10px 0px;
  font-size: 20px;
  font-family: "Work Sans", sans-serif;
  font-weight: normal;
  line-height: 1;
  text-transform: uppercase;
}

.location-header strong {
  font-weight: bold;
  font-size: 22px;
  margin: 15px 0 10px 0;
}

.location-header + .event {
  margin-left: 15px;
}

.event + .event {
  margin-left: 15px;
}

.event-details em {
  color: #000;
  font-size: 20px;
  font-weight: bold;
  font-style: normal;
  font-family: "Work Sans", sans-serif;
  text-transform: uppercase;
}

/* Sezione 3: Gallery */
.gallery-section {
}

.section-title {
  text-align: center;
  font-size: 50px;
  margin-bottom: 50px;
  color: #333;
  font-weight: bold;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
}

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

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Mobile Gallery Slider */
.gallery-slider {
  display: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 20px 0;
}

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

.gallery-slider-container {
  display: flex;
  gap: 15px;
  padding: 0 20px;
}

.gallery-slider .gallery-item {
  flex: 0 0 280px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.gallery-slider .gallery-item img {
  height: 345px;
}

/* Gallery Navigation Dots */
.gallery-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 0 20px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.gallery-dot.active {
  background: #017bf0;
  transform: scale(1.2);
}

/* Modal Gallery */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
}

.close:hover {
  color: #bbb;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}

.modal-nav button {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  font-size: 24px;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.modal-nav button:hover {
  background: rgba(255, 255, 255, 1);
}

#prev-btn {
  left: 20px;
}

#next-btn {
  right: 20px;
}

/* Sezione 4: Mappa */
.map-section {
  padding: 80px 0px;
  background: #ff970f;
}
.map-section h2 {
  color: #fff;
}
.map-container {
  width: 100%;
  margin-top: 40px;
  border-radius: 10px;
  overflow: hidden;
}

.map-iframe {
  width: 100%;
  height: 60vh;
  border: none;
  background: transparent;
  transition: opacity 0.3s ease;
  border-radius: 10px;
}

.map-iframe:hover {
  opacity: 1;
}

.map-iframe.loading {
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.map-iframe.loading::before {
  content: "Caricamento mappa...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #6c757d;
  font-size: 1.2rem;
  font-weight: bold;
}

.map-iframe.loading::after {
  content: "";
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid #e9ecef;
  border-top: 4px solid #017bf0;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.map-placeholder {
  background: #e9ecef;
  border-radius: 10px;
  padding: 60px 20px;
  text-align: center;
  border: 2px dashed #adb5bd;
  margin-top: 40px;
}

.map-content h3 {
  font-size: 1.8rem;
  color: #6c757d;
  margin-bottom: 15px;
}

.map-content p {
  color: #6c757d;
  font-size: 1.1rem;
}

/* Sezione 5: Sponsor */
.sponsors-section {
  padding: 20px 0;
  background: #fd0019;
  position: relative;
  margin-bottom: 0px !important;
}

.sponsors-section::before {
  content: "";
  position: absolute;
  right: 0;
  background-image: url(assets/wow_red_3_top.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  top: -200px;
  width: 100%;
  height: 200px;
  background-position: 0 0;
}
.sponsor-title {
  text-transform: uppercase;
  color: #b00000;
}
.sponsors-container {
  max-width: 80vw;
  padding: 40px;
  border-radius: 20px;
  background-color: white;
  border: 4px solid #000;
  margin: 0 auto;
}
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 180px);
  gap: 50px;
  align-items: center;
  margin-top: 40px;
}

.sponsor-logo {
  max-width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: contain;
  transition: filter 0.3s ease, transform 0.3s ease;
  margin: 0 auto;
  display: block;
}

.sponsor-logo:hover {
  filter: grayscale(0%);
  transform: scale(1.1);
}

/* Partner container dentro la sezione sponsor */
.partner-title {
  text-transform: uppercase;
  color: #495057;
}

.partners-container {
  max-width: 80vw;
  padding: 40px;
  border-radius: 20px;
  background-color: #f8f9fa;
  border: 4px solid #6c757d;
  margin: 40px auto 0;
}

.partners-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  align-items: center;
  margin-top: 40px;
}

.partner-logo {
  flex: 0 0 180px;
  max-width: 180px;
  height: auto;
  max-height: 100px;
  object-fit: contain;
  transition: filter 0.3s ease, transform 0.3s ease;
  margin: 0 auto;
  display: block;
}

.partner-logo:hover {
  filter: grayscale(0%);
  transform: scale(1.05);
}

/* Sezione 6: Footer */
.footer {
  background: #2b1f20;
  color: white;
  padding: 40px 20px 20px;
}

.footer-container {
  max-width: 700px;
  margin: 0 auto;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo {
  flex-shrink: 0;
}

.footer-logo-img {
  max-width: 200px;
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.footer-info {
  flex: 1;
  text-align: left;
}

.footer-email {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: white;
}

.footer-tech {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 8px;
  color: white;
}

.footer-phone {
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #555;
  color: #ccc;
}

.footer-bottom p {
  font-size: 1rem;
  margin: 0;
}

/* Animazioni */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .program-title {
    font-size: 50px;
  }

  .balloon {
    margin: 0 10px 20px;
  }

  .section-title {
    font-size: 50px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 20px;
  }

  .logo {
    max-width: 80%;
    margin-bottom: 1.5rem;
  }

  .date {
    max-width: 80%;
  }

  .program-section {
    padding: 0px 0;
  }

  .program-title {
    font-size: 50px;
    margin-bottom: 40px;
  }

  .balloon-container {
    flex-direction: column;
    align-items: center;
  }

  .balloon {
    margin: 0 0 30px 0;
    max-width: 100%;
  }

  .time {
    margin-right: 0;
    margin-bottom: 0px;
    align-self: center;
  }

  /* Switch to mobile slider for gallery */
  .gallery-grid {
    display: none;
  }

  .gallery-slider {
    display: block;
  }

  .gallery-dots {
    display: flex;
  }

  .sponsors-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
  }

  .partner-logo {
    flex: 0 0 120px;
    max-width: 120px;
  }

  .section-title {
    font-size: 50px;
  }

  .modal-content {
    max-width: 95%;
    max-height: 80%;
  }

  .modal-nav button {
    font-size: 18px;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .program-container {
    padding: 15px;
  }

  .logo {
    max-width: 90%;
    margin-bottom: 1rem;
  }

  .date {
    max-width: 90%;
  }

  .balloon-header h3 {
  }

  .section-title {
    font-size: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .sponsors-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .partners-grid {
    gap: 15px;
  }

  .partner-logo {
    flex: 0 0 70px;
    max-width: 70px;
  }

  .footer-content {
    gap: 20px;
  }

  .footer-logo-img {
    max-width: 150px;
  }

  .footer-info {
  }

  .footer-email,
  .footer-tech,
  .footer-phone {
    font-size: 1rem;
  }
}
