/* Reset e base */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Blocca overflow orizzontale */
  max-width: 100vw;
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  color: #333;
}

/* Immagini e media responsivi */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Sezione banner */
.banner-section {
  padding: 30px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.banner-heading {
  text-align: center;
  font-size: 2em;
  margin-bottom: 30px;
  color: #222;
}

/* Banner singolo */
.banner {
  background: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  gap: 20px;
  transition: transform 0.2s;
  max-width: 100%;
  overflow: hidden; /* Previene overflow interno */
}

.banner:hover {
  transform: translateY(-3px);
}

/* Logo banner dentro cerchio */
.banner-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  border: 2px solid #eee;
  flex-shrink: 0;
  overflow: hidden; /* Assicura taglio */
}

/* Testo e contenuti */
.banner-text {
  flex: 1;
}

.banner-title {
  margin: 0;
  font-size: 1.5em;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.banner-description {
  font-size: 1em;
  margin: 8px 0 16px 0;
  color: #444;
}

.banner-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

/* Bottoni */
.btn {
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  font-size: 0.95em;
  transition: background 0.3s ease;
}

.tnc {
  font-size: 0.85em;
  color: #999;
  margin-top: 5px;
}

.adm-logo {
  height: 24px;
  margin-top: 10px;
}

/* Rating vicino al titolo */
.rating {
  order: 0;
  margin-left: 10px;
}

/* Media query */
@media screen and (max-width: 768px) {
  .banner {
    flex-direction: column;
    text-align: center;
    padding: 20px 15px;
  }

  .banner-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
  }

  .banner-buttons {
    justify-content: center;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .banner-title {
    flex-direction: column;
    align-items: center;
  }

  .rating {
    order: 1;
    margin-left: 0;
    margin-bottom: 8px;
  }

  .banner-description {
    order: 2;
  }
}

/* Main */
main {
  background: #ffffff;
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto 40px auto; /* margine in basso aggiunto */
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  overflow-wrap: break-word;
}

main section {
  line-height: 1.7;
  color: #333;
  font-size: 1.05em;
  border-radius: 12px;
}

main h2 {
  font-size: 1.8em;
  margin-bottom: 20px;
  color: #222;
  text-align: center;
  line-height: 1.3;
}

main p {
  margin-bottom: 18px;
}

main strong {
  color: #007bff; /* blu vivo */
  font-weight: bold;
}

main a {
  color: #007bff; /* blu vivo */
  font-weight: bold;
  text-decoration: underline;
  transition: color 0.3s ease;
}

main a:hover {
  color: #005ec2; /* blu più scuro in hover */
  text-decoration: none;
}

@media screen and (max-width: 768px) {
  main {
    padding: 25px 15px;
  }

  main h2 {
    font-size: 1.4em;
  }

  main section {
    font-size: 1em;
  }
}

/* Banner grid */
.banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 100%;
  overflow: hidden;
}

.banner-item {
  text-align: center;
  overflow: hidden;
}

/* Cerchio per immagine banner */
.banner-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
  border: 3px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
}

.banner-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Responsive grid */
@media (max-width: 768px) {
  .banner-grid {
    grid-template-columns: 1fr;
  }
}

/* Cover guide */
.casino-cover-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  border-radius: 12px;
  overflow: hidden;
  display: block;
}

.casino-cover {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* Bottoni */
.btn {
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  font-size: 0.95em;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Bottone principale: fondo blu scuro, testo giallo */
.btn-primary {
  background-color: #102347;   /* blu scuro */
  color: #FFD700;              /* giallo oro */
  border: none;
}

.btn-primary:hover {
  background-color: #08152c;   /* blu ancora più scuro */
  color: #FFEA00;              /* giallo acceso */
}

/* Bottone secondario: fondo giallo oro, testo blu scuro */
.btn-secondary {
  background-color: #FFD700;   /* giallo oro */
  color: #102347;              /* blu scuro */
  border: none;
}

.btn-secondary:hover {
  background-color: #FFEA00;   /* giallo più acceso */
  color: #08152c;              /* blu più scuro */
}
/* Bottone Sport: verde/blu sportivo */
.btn-sport {
  background-color: #28a745;  /* verde brillante */
  color: #ffffff;
  border: none;
}

.btn-sport:hover {
  background-color: #1e7e34;  /* verde più scuro */
  color: #eaffea;
}
/* Layout affiancato da desktop per offerte casino/sport */
.banner-offers {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.offer-box {
  flex: 1;
}

/* Su desktop affianca CASINO e SPORT */
@media (min-width: 769px) {
  .banner-offers {
    flex-direction: row;
    gap: 40px;
  }

  .offer-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .offer-box .btn {
    max-width: 200px;
  }
}
/* Footer banner con ADM e guida */
.banner-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  text-align: center;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

/* Blocco ADM logo + testo */
.adm-block {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.adm-logo {
  height: 24px;
}

.tnc {
  font-size: 0.85em;
  color: #999;
}

/* Bottone guida (da mobile: centrato) */
.guida-btn {
  margin-top: 10px;
}

/* Su tablet e desktop: bottone guida in basso a destra */
@media (min-width: 768px) {
  .banner-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .guida-btn {
    margin-top: 0;
    align-self: flex-end;
  }
}
@media (max-width: 767px) {
  .banner-footer {
    flex-direction: column;
  }

  /* Inverti l'ordine: bottone sopra, ADM sotto */
  .guida-btn {
    order: 0;
    margin-top: 10px;
  }

  .adm-block {
    order: 1;
  }
}
