/* ══════════════════════════
   ORGANICO — IMMAGINE HERO
   Sostituire url() con la foto specifica della pagina
══════════════════════════ */

/* .hero-pagina-sfondo {
  background:
    linear-gradient(to right, rgba(13, 30, 48, .9) 0%, rgba(13, 30, 48, .7) 35%, rgba(13, 30, 48, .3) 65%, transparent 100%),
    url('img/foto-organico.jpg') center/cover no-repeat;
} */

/* ══════════════════════════
   SEZIONI ORGANICO
   (Utilizza classi globali: .sezione-pagina, .contenitore, .titolo-sezione)
══════════════════════════ */

.org-header {
  margin-bottom: 40px;
}

/* ══════════════════════════
   GRIGLIA CARD GIOCATORI
══════════════════════════ */

.org-griglia {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

.org-card {
  background: var(--bianco);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 4px 18px rgba(16, 41, 63, .05);
  transition: transform .25s, box-shadow .25s;
}

.org-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(16, 41, 63, .12);
}

.org-card-img {
  cursor: pointer;
}

/* ── Variante scura (staff) ── */

.org-card.scuro {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
}

.org-card.scuro:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, .25);
}

.org-card.scuro .org-card-info {
  border-top-color: rgba(255, 255, 255, .06);
}

.org-card.scuro .org-ruolo {
  color: var(--verde-chiaro);
}

.org-card.scuro h3 {
  color: #fff;
}

/* ── Immagine ── */

.org-card-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--sfondo);
  overflow: hidden;
  position: relative;
}

.org-card.scuro .org-card-img {
  background: rgba(255, 255, 255, .03);
}

.org-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.3s ease;
}

.org-card-img:hover img {
  transform: scale(1.05);
}

/* Overlay to indicate clickability */
.org-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(32, 128, 91, 0.15);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.org-card-img:hover::after {
  opacity: 1;
}

/* ── Placeholder (nessuna foto reale) ── */

.org-card-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.org-card-img--placeholder img {
  width: auto;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: .35;
}

/* ── Info ── */

.org-card-info {
  padding: 14px 16px;
  border-top: 1px solid rgba(0, 0, 0, .06);
  position: relative;
}

.org-ruolo {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--verde);
  margin-bottom: 4px;
}

.org-card-info h3 {
  font-size: 1.1rem;
  letter-spacing: .5px;
  color: var(--blu-scuro);
  line-height: 1.15;
}

.org-numero {
  position: absolute;
  top: 20px;
  right: 22px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  color: rgba(0, 0, 0, .08);
  line-height: 1;
  letter-spacing: 1px;
}

.org-card.scuro .org-numero {
  color: rgba(255, 255, 255, .1);
}

/* ══════════════════════════
   CTA FINALE
══════════════════════════ */

#org-cta {
  padding: 100px 6%;
  background: var(--blu-scuro);
  text-align: center;
}

.org-cta-interno {
  max-width: 680px;
  margin: 0 auto;
}

#org-cta p {
  color: rgba(255, 255, 255, .55);
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 8px 0 36px;
}

.org-cta-bottoni {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ══════════════════════════
   RESPONSIVE
══════════════════════════ */

@media (max-width: 1024px) {
  .org-griglia {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .org-griglia {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .org-card-img--placeholder {
    padding: 20px;
  }

  .org-card-info {
    padding: 16px 18px;
  }

  .org-card-info h3 {
    font-size: 1.1rem;
  }

  .org-numero {
    font-size: 1.4rem;
    top: 16px;
    right: 18px;
  }
}

@media (max-width: 420px) {
  .org-griglia {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .org-sezione {
    padding: 40px 4%;
  }

  .org-griglia {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .org-card-img--placeholder {
    padding: 16px;
  }

  .org-card-info {
    padding: 12px 14px;
  }

  .org-card-info h3 {
    font-size: .95rem;
  }

  .org-ruolo {
    font-size: .7rem;
  }

  .org-numero {
    font-size: 1.1rem;
    top: 10px;
    right: 12px;
  }
}

/* ══════════════════════════
   LIGHTBOX IMMAGINI ORGANICO
══════════════════════════ */

.org-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(10, 22, 36, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.35s ease;
  padding: 24px;
}

.org-lightbox-modal.aperto {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Pulsante Chiudi */
.org-lightbox-btn-chiudi {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100001;
  transition: all 0.25s ease;
}

.org-lightbox-btn-chiudi:hover {
  background: #ff4757;
  border-color: #ff4757;
  transform: rotate(90deg) scale(1.05);
}

/* Contenitore Lightbox */
.org-lightbox-contenuto {
  position: relative;
  max-width: min(800px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: orgLightboxZoomIn 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes orgLightboxZoomIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.org-lightbox-img-wrapper {
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.org-lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  object-fit: contain;
  user-select: none;
}

.org-lightbox-info {
  margin-top: 20px;
  text-align: center;
  color: #ffffff;
}

.org-lightbox-info h3 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: #ffffff;
}

.org-lightbox-info span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
}

.org-lightbox-azioni {
  margin-top: 20px;
}

.org-lightbox-btn-download {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(32, 128, 91, 0.9);
  border: 1px solid rgba(32, 128, 91, 1);
  border-radius: 24px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.org-lightbox-btn-download:hover {
  background: rgba(32, 128, 91, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(32, 128, 91, 0.4);
}

.org-lightbox-btn-download:active {
  transform: translateY(0);
}

/* Responsive Lightbox Organico */
@media (max-width: 768px) {
  .org-lightbox-btn-chiudi {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }

  .org-lightbox-img-wrapper {
    max-height: 60vh;
  }

  .org-lightbox-info h3 {
    font-size: 1.4rem;
  }

  .org-lightbox-info span {
    font-size: 0.9rem;
  }
}
