@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap");

body {
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  background-color: black;
}

.main-content {
  padding: 0 2rem;
}

.background-image {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url("/home/img/campo.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}

.hero-title {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 3.5rem;
  padding-top: 6rem;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-title .white {
  color: white;
}

.hero-title .red {
  color: #e91922;
}

.title-desktop {
  display: inline;
}

.title-mobile {
  display: none;
}

.hero-flex-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hero-image {
  max-width: 100px;
  width: 100%;
  height: auto;
  margin-bottom: 10px;
}

.grid-wrapper {
  display: flex; 
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
}

.row-boxes {
  display: flex;
  gap: 4rem;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: nowrap;
}

.row-boxes .team-section:first-child {
  flex: 0 0 auto;
}

.row-boxes .team-section:last-child {
  flex: 1 1 auto;
}

.widget-box {
  width: 100%;
  height: 940px;           
  background-color: white;
  padding: 1rem;
  border: 3px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  box-sizing: border-box;
}

.sfvFullHeight {
  width: 100%;
  height: 920px;
  border: none;
  display: block;
}

.video-title-section {
  background-color: #e91922;
  color: white;
  font-size: 1.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.video-title {
  background-color: transparent;
  color: #e91922;
  font-size: 1.3rem;
  font-family: 'Bebas Neue', sans-serif;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  margin: 0 auto 0.5rem;
  text-align: center;
}

.youtube-iframe {
  width: 100%;
  height: 700px;
  border: none;
  margin-bottom: 1.5rem;
}

.news-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  overflow: visible;
}

.widget-row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.widget-row .team-section {
  flex: 1 1 48%;
}

.youtube-box {
  min-width: 420px;
  width: 100%;
  height: 1418px;
  margin: 0 auto;
  background-color: white;
  padding: 1rem;
  border: 3px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  overflow: hidden;
}

.youtube-iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
  max-height: 210px; 
}

.news-row-wrapper {
  position: relative;
  overflow: hidden;
  max-height: 376px;
  padding-top: 10px; 
  margin-top: -10px; 
}

.team-section {
  margin-right: 0;
}

.column-right {
  display: flex;
  flex-direction: column;
  gap: 0rem;
  flex: 1 1 auto;
}

.column-right .team-section:first-of-type {
  margin-bottom: 2rem;
}

.news-card-small {
  background-color: white;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: white;
  font-family: 'Open Sans', sans-serif;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  border: 3px solid white;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  height: 360px;
  width: 100%;
  max-width: 240px;
}

.news-card-small:hover {
  transform: translateY(-6px);
}

.news-card-small .image-container {
  position: relative;
  width: 100%;
  height: 150px;
  overflow: hidden;
  background-color: white;
}

.news-card-small .image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: white;
}

.news-card-small .news-date {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #e91922;
  color: white;
  font-family: 'Bebas Neue', sans-serif;
  padding: 0.3rem 0.7rem;
  font-size: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.news-card-small .news-content {
  background-color: #e91922;
  padding: 0.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

.news-card-small .news-title {
  font-size: 1.2rem;
  font-family: 'Bebas Neue', sans-serif;
  margin: 0 0 0.5rem;
  text-align: center;
}

.news-card-small .news-text {
  font-size: 0.75rem;
  line-height: 1.3;
  text-align: center;
  color: white;
  margin: 0.5rem 0;
  padding: 0 0.5rem;
}

.news-card-small .news-link {
  margin-top: auto;
  padding-top: 0.5rem;
  text-align: center;
}

.news-card-small .news-link a {
  color: white;
  background-color: #b81414;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.news-card-small .news-link a:hover {
  background-color: #930f0f;
}

.full-width-section {
  width: 100%;
  max-width: 100%;
  margin: 0 0 1rem;
}

  .video-title-section.ultime-notizie {
	margin-left: 0px;
  }

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

.widget-box.immagini-box.desktop-only {
  width: 100%;
  height: auto;
  background-color: white;
  border: 3px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  overflow: hidden;
  padding: 1rem;  
  display: flex;
  flex-direction: column;
}

.snapwidget-widget {
  width: 100%;
  aspect-ratio: 6 / 1;
  border: none;
}

@media (max-width: 768px) {
  .main-content {
    padding: 0 1rem 1rem 1rem;
}
  
    .title-desktop {
    display: none !important;
  }

  .title-mobile {
    display: inline !important;
  }

.hero-image {
  margin-bottom: 0;
}
  .grid-wrapper {
    flex-direction: column;
    gap: 2rem;
  }
  
  .row-boxes {
    width: 100%;
    min-width: 358px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .widget-box {
    width: 100%;
    box-sizing: border-box;
	margin: 0;
  }

  .widget-row {
    display: block; 
    width: 100%;
    overflow: hidden;
		margin: 0;
  }

  .row-boxes .team-section:last-child {
    padding-right: 0;
  }
  
  .news-row {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 0 1rem;

	}
    .news-row-wrapper {
    max-height: none;
    overflow: visible;
  }

  .news-card-small {
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 2 / 3;
    margin: 0 auto;
  }
  
    .news-row .news-card-small:nth-of-type(n+4) {
    display: none;
  }

  .hero-image {
    max-width: 110px;
    width: 100%;
    height: auto;
  }

  .hero-flex-container {
    flex-direction: column;
    gap: 0.6rem;
  }

  .title-desktop {
    display: none;
  }

  .title-mobile {
    display: block;
    text-align: center;
  }

  .widget-box {
    width: 100%;
  }

  .news-card-small:hover {
    transform: none;
  }

  .video-title-section {
    font-size: 1.6rem;
    padding: 0.2rem 0.6rem;
  }
    #youtube-videos.youtube-box {
	min-width: 358px;
	height: auto;
  }
  .video-title-section.ultime-notizie {
	margin-left: 35px;
  }
    #ultime-notizie {
    order: 1;
  }

  #partite-classifica {
    order: 2;
  }

  #ultimi-video {
    order: 4;
  }

  #immagini {
    order: 3;
  }
  
  .widget-box.immagini-box.mobile-only {
  width: 100%;
  height: auto;
  background-color: white;
  border: 3px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  overflow: hidden;
  padding: 1rem;           
  display: flex;
  flex-direction: column;
}

.snapwidget-widget {
  width: 100%;
  aspect-ratio: 2 / 1; 
  border: none;
}
  
  .team-section .widget-box.immagini-box.desktop-only {
    display: none !important;
  }

  .team-section .widget-box.immagini-box.mobile-only {
    display: flex !important;
  }
  
}
