/* GLOBAL */
body { font-family: 'Poppins', sans-serif; margin:0; padding:0; }

/* CAPÇALERA */
.hero-parallax {
  position: relative;
  min-height: 75vh;
  background-image: url("assets/background_fornite.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(123,44,255,0.85), rgba(0,212,255,0.75));
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 40px 0;
}

.hero-logo {
  margin-top: -20px;
  max-width: 60%;
  display: inline-block; /* permet que el h1 s’alineï exactament */
  vertical-align: middle;
}

.hero-content h1{
    font-family: 'Bungee', cursive;
    font-size: 4rem;
    color: #fff;
    margin-top: -20px;   /* tira el títol cap amunt, enganxat al logo */
    margin-bottom: 10px; /* opcional, espai minimal amb subtítol */
    font-size: 3rem;     /* ajusta la grandària si cal */
    line-height: 1.1;
}
.hero-content h2{
    font-family: 'Bungee', cursive;
    font-size: 2rem;
    color: #fff;
    margin-top: -30px;
}
.hero-subtitle, .hero-date {
  margin: 10px 0;
  
}

/* Animacions */
@keyframes float { 0%,100%{transform:translateY(0);}50%{transform:translateY(-12px);} }
.animate-float { animation: float 4s ease-in-out infinite; }

@keyframes popIn { from{transform:scale(0.8);opacity:0;} to{transform:scale(1);opacity:1;} }
.animate-pop { animation: popIn 0.8s ease forwards; }

@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }
.animate-fade { animation: fadeIn 1.2s ease forwards; }

@keyframes slideUp { from{transform:translateY(20px);opacity:0;} to{transform:translateY(0);opacity:1;} }
.animate-slide { animation: slideUp 1s ease forwards; }


/* INTRO - QUÈ ÉS AIXÒ? */
.intro-centered {
  background: linear-gradient(135deg,#7b2cff,#00d4ff);
  padding: 80px 20px;
  text-align: center;
  color: #fff;
}

.intro-centered h2 {
  font-family: 'Bungee', cursive;
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.intro-text {
  max-width: 700px;
  margin:auto;
  font-size:1.2rem;
  color: #fff;
}

/* PASSOS - COM INSCRIURE'S */
.steps-diagonal {
  background: linear-gradient(135deg,#00d4ff,#7b2cff);
  padding: 100px 20px;
  position: relative;
}

.steps-diagonal h2 {
  font-family: 'Bungee', cursive;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 60px;
  color: #fff;
}

.step-diagonal {
  text-align:center;
  transition: transform 0.3s ease;
}

.step-diagonal:hover { transform: translateY(-10px); }

.step-number-big {
  font-family:'Bungee',cursive;
  font-size:6rem;
  opacity:0.25;
  margin-bottom:15px;
}

.step-content h3 {
  font-family:'Bungee',cursive;
  font-size:2rem;
  margin-top:10px;
}

.step-content p { font-size:1.1rem; }

.step-img { width:120px; height:120px; margin-bottom:10px; }

.step-diagonal {
  text-align: center;
  transition: transform 0.3s ease;
  position: relative;  /* Important: per als elements absoluts dins */
  min-height: 300px;   /* Ajusta segons necessitis, per donar espai */
}

.step-diagonal:hover {
  transform: translateY(-10px);
}

.step-number-big {
  font-family: 'Bungee', cursive;
  font-size: 30rem;    /* Més gran per fer de fons */
  opacity: 0.15;       /* Més transparent per no tapar gaire */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;          /* Darrere de tot */
  pointer-events: none; /* Perquè no interfereixi amb clics */
}

.step-icon-wrapper {
  position: relative;
  z-index: 2;          /* Davant del número */
  display: inline-block;
}

.step-img {
  width: 140px;        /* Una mica més gran per destacar */
  height: 140px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.step-content h3 {
  font-family: 'Bungee', cursive;
  font-size: 2rem;
  margin-top: 10px;
}

.step-content p {
  font-size: 1.1rem;
}

/* Contenidor per l'efecte flip */
.flip-container {
  perspective: 1000px; /* Dona sensació de profunditat 3D */
  display: inline-block; /* Perquè no ocupi més espai del necessari */
  margin-bottom: 20px;
}

.flip-container .step-img {
  transition: transform 0.8s ease-in-out;
  transform-style: preserve-3d;
  display: block;
  margin: 0 auto;
}

/* Quan es fa hover sobre tot el pas, flip a la imatge */
.step-diagonal:hover .flip-container .step-img {
  transform: rotateY(360deg); /* Gir complet de 360° */
}

/* Opcional: suavitza el hover existent del card */
.step-diagonal:hover {
  transform: translateY(-10px);
}

/* REGALA LA INSCRIPCIÓ */

.gift-visual {
  position: relative;
  background-image: url("assets/background_fornite.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding:120px 20px 60px 20px;
  text-align:center;
}
.gift-visual::before {
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(135deg, rgba(123,44,255,0.85), rgba(0,212,255,0.75));
  z-index:1;
  border-radius:0;
}

.gift-visual h2, .gift-visual h3, .gift-visual ul, .gift-visual p, .gift-image, .gift-present {
  position: relative;
  z-index:2;
}
.gift-image, .gift-present {
    position: relative;
    z-index:2;
    text-align: center;
    width: 100% !important;
}
.gift-present{
    opacity: 0.5;
    max-width: 400px;
}

.gift-visual h2 {
  font-family:'Bungee', cursive;
  font-size:2.5rem;
  margin-bottom:30px;
  color:#fff;
}

.gift-image {
  max-width:100%;
  border-radius:20px;
  box-shadow:0 20px 40px rgba(0,0,0,0.3);
}

/* FORMULARI */
.form-section {
  padding: 80px 20px;
}

.form-card {
  background:#fff;
  padding:50px;
  border-radius:20px;
  max-width:500px;
  margin:auto 0 50px 0; /* marge inferior afegit per aire abans del block regala */
  box-shadow:0 10px 30px rgba(0,0,0,0.1);
}

.btn-gamer {
  background: linear-gradient(90deg, #7b2cff, #00d4ff);
  border:none;
  color:#fff;
  font-weight:600;
  padding:14px;
  border-radius:30px;
}

.btn-gamer:hover { opacity:0.9; }

.gift-extra {
  display:none;
  background:#e6dbff;
  padding:10px;
  border-radius:10px;
  font-size:0.9rem;
  margin-top:10px;
}

/* FOOTER */
.footer {
  background:#111;
  padding:50px 20px 30px 20px;
  font-size:0.9rem;
  text-align:center;
}

/* FORMULARI - PLACES DISPONIBLES */
.form-section .badge {
  margin-bottom:20px;
  font-size:1rem;
}

.bg-success, .bg-danger, .bg-warning{
  font-size: 1rem;
  color: #fff;
  border-radius: 20px;
  padding: 1em;
}

/* CTA Donacions en format pastilla */
.donation-pill {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: 'Bungee', cursive;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-decoration: none;
  color: #fff;

  background: linear-gradient(
    135deg,
    #ffbb33,
    #ff7b00
  );

  box-shadow:
    0 6px 0 #c95a00,
    0 10px 20px rgba(0,0,0,0.35);

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover = botó “clicable” */
.donation-pill:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 0 #c95a00,
    0 12px 25px rgba(0,0,0,0.45);
}

/* Click */
.donation-pill:active {
  transform: translateY(2px);
  box-shadow:
    0 2px 0 #c95a00,
    0 6px 15px rgba(0,0,0,0.35);
}

/* Contenidor de cada jugador */
.player-card {
  height: 100%;
  padding: 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #93fafe, #fc64d3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: playerPop 0.4s ease both;
}

/* Hover amb feeling Fortnite */
.player-card:hover {
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* Nom del jugador */
.player-name {
  font-family: 'Bungee', cursive;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: #010818;
  text-transform: uppercase;
  line-height: 1.1;
  word-break: break-word;
}

/* Animació d’entrada */
@keyframes playerPop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* TABLETS (fins a 992px) */
@media (max-width: 992px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content h2 {
    font-size: 1.8rem;
    margin-top: -20px;
  }
  
  .hero-logo {
    max-width: 70%;
  }
  
  /* Redueix una mica el número de fons en els passos */
  .step-number-big {
    font-size: 25rem;
  }
  
  .step-img {
    width: 120px;
    height: 120px;
  }
  
  .step-diagonal {
    min-height: 280px;
  }
  
  .intro-centered h2,
  .steps-diagonal h2,
  .gift-visual h2 {
    font-size: 2.2rem;
  }

  .player-card {
    padding: 0.6rem;
  }

  .player-name {
    font-size: 0.7rem;
  }
}

/* MÒBILS GRANS (fins a 768px) */
@media (max-width: 768px) {
  /* Hero parallax */
  .hero-parallax {
    min-height: 60vh;
    background-attachment: scroll; /* fixed pot donar problemes en molts mòbils */
  }
  
  .hero-content {
    padding: 30px 0;
  }
  
  .hero-content h1 {
    font-size: 2.2rem;
    margin-top: 0;
  }
  
  .hero-content h2 {
    font-size: 1.6rem;
    margin-top: -10px;
  }
  
  .hero-logo {
    max-width: 80%;
    margin-top: 0;
  }
  
  /* Seccions generals */
  .intro-centered,
  .steps-diagonal,
  .gift-visual,
  .form-section {
    padding: 60px 15px;
  }
  
  .intro-text {
    font-size: 1.1rem;
  }
  
  /* Passos */
  .steps-diagonal h2 {
    margin-bottom: 40px;
  }
  
  .step-number-big {
    font-size: 25rem; /* Encara visible però no surt de la pantalla */
  }
  
  .step-diagonal {
    min-height: 320px; /* Compensa la reducció del número */
    margin-bottom: 30px;
  }
  
  .step-img {
    width: 100px;
    height: 100px;
  }
  
  .step-content h3 {
    font-size: 1.8rem;
  }
  
  .step-content p {
    font-size: 1rem;
  }
  
  /* Formulari */
  .form-card {
    padding: 40px 30px;
  }
}

/* MÒBILS PETITS (fins a 576px) */
@media (max-width: 576px) {
  .hero-parallax {
    min-height: 55vh;
  }
  
  .hero-content h1 {
    font-size: 1.9rem;
  }
  
  .hero-content h2 {
    font-size: 1.4rem;
  }
  
  .hero-logo {
    max-width: 90%;
  }
  
  /* Títols seccions */
  .intro-centered h2,
  .steps-diagonal h2,
  .gift-visual h2 {
    font-size: 1.9rem;
  }
  
  /* Passos - apilats verticalment i més espai */
  .step-number-big {
    font-size: 20rem;
    opacity: 0.1;
  }
  
  .step-diagonal {
    min-height: 300px;
    margin-bottom: 40px;
  }
  
  .step-img {
    width: 90px;
    height: 90px;
  }
  
  .step-content h3 {
    font-size: 1.6rem;
  }
  
  .step-content p {
    font-size: 0.95rem;
  }
  
  /* Padding general més reduït */
  .intro-centered,
  .steps-diagonal,
  .gift-visual,
  .form-section {
    padding: 50px 15px;
  }
  
  .form-card {
    padding: 30px 20px;
    border-radius: 15px;
  }
  
  .btn-gamer {
    padding: 12px;
    font-size: 1rem;
  }
}

/* MÒBILS MOLT PETITS (fins a 400px) - opcional però útil */
@media (max-width: 400px) {
  .hero-content h1 {
    font-size: 1.7rem;
  }
  
  .step-number-big {
    font-size: 20rem;
  }
  
  .step-diagonal {
    min-height: 280px;
  }
}