html,body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Montserrat', Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;         /* niente scroll orizzontale */
  overflow-y: auto;           /* abilita lo scroll verticale dove serve (es. mobile con tanti bottoni) */
  background-color: #003766; /* blu più chiaro */
}

:root {
  --rog-blue: #0066cc;
}

/* =========================
   HOME LAYOUT
   ========================= */

.home-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #001122;
}

.home-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.home-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 3px solid var(--rog-blue);
  border-radius: 5px;
  box-shadow: 0 0 15px rgba(0, 102, 204, 0.3);
}

.home-overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

/* Blocco mobile nascosto di default (desktop) */
.pagecel {
  display: none;
}

/* Sicurezza extra: su schermi larghi nascondi SEMPRE il layout mobile */
@media (min-width: 769px) {
  .pagecel,
  .pagecel2,
  .pagecel-btn,
  .pagecel-link {
    display: none !important;
  }
}

/* =========================
   INVISIBLE HOME BUTTONS
   ========================= */

.home-btn {
  position: absolute;
  display: block;
  cursor: pointer;
  background: transparent; /* trasparente */
  border: none;
  border-radius: 999px;
  color: transparent;
  text-decoration: none;
  outline: none;
  padding: 0;
}

/* Posizioni iniziali (puoi aggiustarle) */
.btn-obiettivi   { top: 58.5%; left: 47%; width: 20%; height: 7%; }
.btn-progetti    { top: 59%; left: 69%; width: 24%; height: 7%; }
.btn-filosofia   { top: 70.5%; left: 47%; width: 20%; height: 7%; }
.btn-chisiamo    { top: 72%; left: 70%; width: 24%; height: 7%; }
.btn-community   { top: 82.5%; left: 47%; width: 20%; height: 7%; }
.btn-gia-iscritto{ top: 83.5%; left: 69%; width: 24%; height: 7%; }

.home-btn:hover {
  background: rgba(0, 255, 0, 0.6);
}

.home-btn:active {
  transform: translateY(1px);
}

/* =========================
   ALTRE COSE (immagini, auth, ecc.)
   ========================= */

.section-image {
  width: calc(100% - 40px);
  max-width: 1200px;
  margin: 15px auto;
  border: 3px solid var(--rog-blue);
  border-radius: 5px;
  box-shadow: 0 0 15px rgba(0, 102, 204, 0.3);
  display: block;
}

.return-home {
  position: fixed;
  top: 20px;
  left: 20px;   /* spostata in alto a sinistra */
  right: auto;
  z-index: 9999;
  width: 90px;   /* casetta più grande e cliccabile */
  height: 90px;
  min-width: 80px;
  min-height: 80px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;  /* icona più grande */
  text-decoration: none;
  border: 3px solid var(--rog-blue);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 102, 204, 0.6);
}

.return-home:hover {
  background-color: var(--rog-blue);
  transform: scale(1.08);
  box-shadow: 0 6px 30px rgba(0, 102, 204, 0.8);
}

@media (max-width: 768px) {
  /* Nascondi i vecchi hotspot desktop su mobile */
  .home-btn {
    display: none;
  }

  /* Layout generale mobile */
  .home-container {
    overflow: hidden;
  }

  /* Sfondo leggermente scurito e morbido sotto la versione mobile */
  .home-background {
    filter: blur(0.8px) brightness(0.6);
    transform: scale(1.01);
  }

  .home-image {
    border-width: 0;
    border-radius: 0;
    box-shadow: none;
  }

  /* L'overlay diventa un contenitore flessibile che riempie tutto lo schermo */
  .home-overlay {
    display: flex;
    align-items: stretch;
  }

  .pagecel {
    position: relative;
    z-index: 3;
    min-height: 100vh;      /* permette scroll verticale se il contenuto è più alto dello schermo */
    height: auto;
    width: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;  /* tutti i blocchi partono dall'alto, niente spazio vuoto in basso */
    align-items: stretch;
    color: #ffffff;
    text-align: center;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.35),
      rgba(0, 0, 0, 0.75)
    );
  }

  .pagecel-main {
    margin-top: 12px;      /* alza il blocco principale per lasciare più spazio ai 6 bottoni */
    margin-left: auto;
    margin-right: auto;
    max-width: 340px;
  }

  .pagecel-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
  }

  .pagecel-subtitle {
    font-size: 0.95rem;
    margin: 0 auto 20px;
    max-width: 420px;
  }

  .pagecel-btn {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 10px;
    padding: 12px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
  }

  .pagecel-btn-primary {
    background-color: #ff7a59;
    color: #ffffff;
  }

  .pagecel-btn-secondary {
    background-color: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
  }

  .pagecel-btn:active {
    transform: scale(0.98);
  }

  .pagecel2 {
    margin: 8px auto 16px;  /* avvicina i 6 bottoni al blocco principale e li alza leggermente */
    width: 100%;
    max-width: 340px;      /* leggermente più stretto */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .pagecel-link {
    display: inline-block;
    padding: 10px 8px;
    border-radius: 999px;
    background-color: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.35);
  }

  .pagecel-link:active {
    transform: scale(0.97);
  }

  .home-content {
    gap: 1.5rem;
    padding: 1rem;
  }

  .btn-row {
    gap: 1rem;
    flex-direction: column;
    width: 100%;
  }

  .rog-logo {
    width: 120px;
  }

  .return-home {
    width: 80px;   /* su mobile comunque ben grande */
    height: 80px;
    font-size: 2.6rem;
    top: 12px;
    left: 12px;
    right: auto;
  }
}

@media (max-width: 480px) {
  .pagecel-title {
    font-size: 1.4rem;
  }

  /* Su mobile molto stretto i 6 link diventano una colonna singola
     e vengono alzati così il bottone "Già iscritto" rimane dentro lo schermo */
  .pagecel2 {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-bottom: 20px;
  }

  .pagecel-subtitle {
    font-size: 0.9rem;
  }

  .pagecel-btn {
    font-size: 0.95rem;
  }

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

  .home-content {
    gap: 1rem;
  }

  .rog-logo {
    width: 100px;
  }

  .section-image {
    width: calc(100% - 20px);
    margin: 10px auto;
  }
}

.auth-container {
  max-width: 600px;
  margin: 50px auto;
  padding: 30px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 102, 204, 0.5);
  border: 3px solid var(--rog-blue);
}

.auth-title {
  color: var(--rog-blue);
  margin-bottom: 20px;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-input {
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.auth-input:focus {
  border-color: var(--rog-blue);
  outline: none;
  box-shadow: 0 0 5px rgba(0, 102, 204, 0.3);
}

.auth-button {
  background-color: var(--rog-blue);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.auth-button:hover {
  background-color: #0055aa;
  transform: translateY(-2px);
}