/**
 * DEPENDEX.SOCIAL — DESIGN SYSTEM: HUMAN + DIGITAL + COMMUNITY
 * Versione: 2.0 (Global Restyle)
 * Filosofia: La tecnologia si fa da parte per far spazio alla relazione umana.
 */

:root {
  --dx-night-bg: #090d1a;
  --dx-night-surface: #0f1629;
  --dx-night-card: rgba(18, 26, 48, 0.88);
  --dx-night-border: rgba(224, 169, 109, 0.22);
  --dx-night-border-subtle: rgba(255, 255, 255, 0.08);

  --dx-amber: #e0a96d;
  --dx-amber-light: #fbeedb;
  --dx-amber-glow: rgba(224, 169, 109, 0.25);
  --dx-gold: #d4af37;
  
  --dx-emerald: #10b981;
  --dx-emerald-glow: rgba(16, 185, 129, 0.2);
  --dx-emerald-bg: rgba(16, 185, 129, 0.1);

  --dx-coral: #e76f51;
  --dx-sky: #38bdf8;
  --dx-indigo: #6366f1;

  --dx-text-main: #f8fafc;
  --dx-text-subtle: #cbd5e1;
  --dx-text-muted: #94a3b8;

  --dx-radius-sm: 8px;
  --dx-radius-md: 14px;
  --dx-radius-lg: 20px;
  --dx-radius-xl: 28px;
  --dx-radius-pill: 9999px;

  --dx-shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.45);
  --dx-shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(224, 169, 109, 0.15);

  --dx-font-serif: Georgia, "Times New Roman", "Playfair Display", serif;
  --dx-font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========================================================= */
/* ACCESSIBILITA' & RESET DI BASE                            */
/* ========================================================= */
*:focus-visible {
  outline: 3px solid var(--dx-amber) !important;
  outline-offset: 3px !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================================= */
/* TIPOGRAFIA & ACCENTI EMPATICI                             */
/* ========================================================= */
.font-serif-human {
  font-family: var(--dx-font-serif);
}

.text-amber { color: var(--dx-amber) !important; }
.text-gold { color: var(--dx-gold) !important; }
.text-emerald { color: var(--dx-emerald) !important; }
.text-sky { color: var(--dx-sky) !important; }
.text-coral { color: var(--dx-coral) !important; }

.badge-human {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--dx-radius-pill);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(14, 18, 28, 0.9);
  border: 1px solid rgba(0, 212, 255, 0.4);
  color: #fde68a;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.25);
}
.badge-human.emerald {
  border-color: var(--neon-green);
  color: #34d399;
  box-shadow: 0 0 16px rgba(0, 255, 119, 0.25);
}
.badge-human.sky {
  border-color: var(--neon-cyan);
  color: #38bdf8;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.25);
}
.badge-human .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rainbow-gradient-h);
  box-shadow: 0 0 10px #00ff77;
  animation: pulse-dot 2s infinite;
}

/* ========================================================= */
/* BOTTONI COMUNITARI AD ALTA USABILITA' RAINBOW NEON        */
/* ========================================================= */
.btn-community-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 26px;
  background: linear-gradient(135deg, #00f0ff 0%, #0077ff 100%) !important;
  color: #070a12 !important;
  font-weight: 850;
  font-size: 1rem;
  border-radius: var(--dx-radius-md);
  border: 1px solid rgba(0, 212, 255, 0.4);
  box-shadow: 0 4px 18px rgba(0, 212, 255, 0.3);
  text-shadow: none !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.25s ease-in-out;
}
.btn-community-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(0, 212, 255, 0.7), 0 0 50px rgba(255, 119, 0, 0.5);
  filter: brightness(1.12);
}

.btn-community-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  background: rgba(14, 18, 28, 0.88);
  color: #ffffff !important;
  font-weight: 750;
  font-size: 0.95rem;
  border-radius: var(--dx-radius-md);
  border: 1.5px solid rgba(0, 212, 255, 0.45);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
  text-decoration: none !important;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.22s ease;
}
.btn-community-outline:hover {
  background: rgba(22, 28, 46, 0.95);
  border-color: var(--neon-cyan);
  color: #38bdf8 !important;
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.55);
  transform: translateY(-2px);
}

.btn-community-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  background: rgba(0, 255, 119, 0.15);
  border: 1.5px solid #00ff77;
  color: #00ff77 !important;
  font-weight: 850;
  font-size: 0.95rem;
  border-radius: var(--dx-radius-md);
  box-shadow: 0 0 18px rgba(0, 255, 119, 0.35);
  text-decoration: none !important;
  transition: all 0.2s ease;
}
.btn-community-wa:hover {
  background: #00ff77;
  color: #06070a !important;
  box-shadow: 0 0 30px rgba(0, 255, 119, 0.7);
  transform: translateY(-2px);
}

/* ========================================================= */
/* HERO DELLA HOMEPAGE CON BORDO RAINBOW & GLOW NEON         */
/* ========================================================= */
.human-hero-card {
  position: relative;
  background: linear-gradient(#0a0e1a, #0e1526) padding-box, var(--rainbow-gradient) border-box !important;
  border: 2px solid transparent !important;
  border-radius: var(--dx-radius-xl);
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
  box-shadow: 0 0 35px rgba(0, 212, 255, 0.35), 0 16px 50px rgba(0, 0, 0, 0.9) !important;
  overflow: visible;
  margin-bottom: 2.5rem;
  z-index: 1;
  transition: box-shadow 0.3s ease;
}
.human-hero-card::before {
  display: none !important;
}
.human-hero-card:hover {
  box-shadow: 0 0 45px rgba(0, 212, 255, 0.55), 0 0 65px rgba(184, 41, 255, 0.35), 0 20px 60px rgba(0, 0, 0, 0.95) !important;
}

.human-hero-title {
  font-family: var(--dx-font-serif);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
  color: #ffffff;
  margin: 0.8rem 0 1.2rem;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 25px rgba(0,0,0,0.95);
}

.human-hero-desc {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.7;
  color: #e2e8f0;
  max-width: 760px;
  margin-bottom: 2rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* ========================================================= */
/* RICERCA COMUNITARIA & CARD DEL CLUB                       */
/* ========================================================= */
.community-search-container {
  position: relative;
  background: rgba(12, 16, 28, 0.92) !important;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: var(--dx-radius-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 212, 255, 0.2);
  margin-bottom: 3rem;
}

.community-search-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

@media (max-width: 600px) {
  .community-search-form {
    flex-direction: column;
  }
  .community-search-input,
  .community-search-form button,
  .community-search-form a {
    width: 100% !important;
    min-width: 0 !important;
  }
}

.community-search-input {
  flex: 1;
  min-width: 240px;
  min-height: 52px;
  padding: 12px 18px;
  background: rgba(9, 13, 26, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--dx-radius-md);
  color: #ffffff;
  font-size: 1.05rem;
  font-family: var(--dx-font-sans);
  transition: border-color 0.2s ease;
}
.community-search-input:focus {
  border-color: var(--dx-amber);
}

.club-door-card {
  background: var(--dx-night-card);
  border: 1px solid var(--dx-night-border-subtle);
  border-radius: var(--dx-radius-lg);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--dx-shadow-soft);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.club-door-card:hover {
  transform: translateY(-4px);
  border-color: var(--dx-amber);
  box-shadow: var(--dx-shadow-hover);
}
.club-door-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--dx-amber), var(--dx-emerald));
  opacity: 0.8;
}

/* ========================================================= */
/* VIAGGIO IN 6 TAPPE: "COSA SUCCEDE AL PRIMO INCONTRO?"     */
/* ========================================================= */
.journey-stepper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 18px;
  margin: 2rem 0;
}

.journey-step-card {
  background: rgba(14, 18, 30, 0.88) !important;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--dx-radius-lg);
  padding: 1.8rem;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.journey-step-card:hover {
  transform: translateY(-4px);
}
.journey-stepper-grid > *:nth-child(6n+1) { border-top: 3px solid var(--neon-cyan) !important; }
.journey-stepper-grid > *:nth-child(6n+1):hover { box-shadow: 0 16px 40px rgba(0,0,0,0.8), var(--glow-cyan) !important; }
.journey-stepper-grid > *:nth-child(6n+1) .step-num { color: #38bdf8 !important; text-shadow: var(--glow-cyan); }

.journey-stepper-grid > *:nth-child(6n+2) { border-top: 3px solid var(--neon-green) !important; }
.journey-stepper-grid > *:nth-child(6n+2):hover { box-shadow: 0 16px 40px rgba(0,0,0,0.8), var(--glow-green) !important; }
.journey-stepper-grid > *:nth-child(6n+2) .step-num { color: #34d399 !important; text-shadow: var(--glow-green); }

.journey-stepper-grid > *:nth-child(6n+3) { border-top: 3px solid var(--neon-gold) !important; }
.journey-stepper-grid > *:nth-child(6n+3):hover { box-shadow: 0 16px 40px rgba(0,0,0,0.8), var(--glow-gold) !important; }
.journey-stepper-grid > *:nth-child(6n+3) .step-num { color: #fde68a !important; text-shadow: var(--glow-gold); }

.journey-stepper-grid > *:nth-child(6n+4) { border-top: 3px solid var(--neon-orange) !important; }
.journey-stepper-grid > *:nth-child(6n+4):hover { box-shadow: 0 16px 40px rgba(0,0,0,0.8), var(--glow-orange) !important; }
.journey-stepper-grid > *:nth-child(6n+4) .step-num { color: #ffa333 !important; text-shadow: var(--glow-orange); }

.journey-stepper-grid > *:nth-child(6n+5) { border-top: 3px solid var(--neon-indigo) !important; }
.journey-stepper-grid > *:nth-child(6n+5):hover { box-shadow: 0 16px 40px rgba(0,0,0,0.8), 0 0 25px rgba(99,102,241,0.5) !important; }
.journey-stepper-grid > *:nth-child(6n+5) .step-num { color: #a5b4fc !important; text-shadow: 0 0 16px rgba(165,180,252,0.65); }

.journey-stepper-grid > *:nth-child(6n+6) { border-top: 3px solid var(--neon-violet) !important; }
.journey-stepper-grid > *:nth-child(6n+6):hover { box-shadow: 0 16px 40px rgba(0,0,0,0.8), var(--glow-violet) !important; }
.journey-stepper-grid > *:nth-child(6n+6) .step-num { color: #e879f9 !important; text-shadow: var(--glow-violet); }

.journey-step-card .step-num {
  font-size: 2.6rem;
  font-family: var(--dx-font-serif);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 12px;
}
.journey-step-card .step-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 8px;
}
.journey-step-card .step-desc {
  font-size: 0.94rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin: 0;
}

/* ========================================================= */
/* STORIE DI COMUNITA' CON NEON ACCENTS                     */
/* ========================================================= */
.story-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 24px;
  margin: 2rem 0;
}

.story-card {
  background: rgba(13, 17, 28, 0.88) !important;
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--dx-radius-lg);
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75);
  transition: all 0.3s ease;
}
.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 212, 255, 0.3);
}
.story-card-grid > *:nth-child(3n+1) { border-top: 3px solid var(--neon-cyan) !important; }
.story-card-grid > *:nth-child(3n+2) { border-top: 3px solid var(--neon-green) !important; }
.story-card-grid > *:nth-child(3n+3) { border-top: 3px solid var(--neon-violet) !important; }

.story-card-quote {
  font-family: var(--dx-font-serif);
  font-size: 1.12rem;
  line-height: 1.7;
  color: #ffffff;
  font-style: italic;
  margin-bottom: 1.4rem;
  position: relative;
}
.story-card-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(8, 11, 20, 0.8);
  border-radius: var(--dx-radius-md);
  font-size: 0.88rem;
  color: #cbd5e1;
  margin-bottom: 1.2rem;
  border-left: 3px solid var(--neon-cyan);
}

/* ========================================================= */
/* GATEWAY "PARLA CON NOI" LASER RAINBOW BORDER             */
/* ========================================================= */
.talk-gateway-box {
  position: relative;
  background: linear-gradient(#0a0e1a, #0e1526) padding-box, var(--rainbow-gradient) border-box !important;
  border: 2px solid transparent !important;
  border-radius: var(--dx-radius-xl);
  padding: clamp(2rem, 4vw, 3.5rem);
  box-shadow: 0 0 35px rgba(0, 212, 255, 0.35), 0 20px 50px rgba(0, 0, 0, 0.9) !important;
  margin: 3rem 0;
  z-index: 1;
  transition: box-shadow 0.3s ease;
}
.talk-gateway-box::before {
  display: none !important;
}
.talk-gateway-box:hover {
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.6), 0 0 70px rgba(184, 41, 255, 0.4), 0 25px 65px rgba(0, 0, 0, 0.95) !important;
}

/* ========================================================= */
/* SEZIONE IMPARA PROGRESSIVA (3 LIVELLI) CON NEON           */
/* ========================================================= */
.learn-levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 22px;
  margin: 2rem 0;
}

.learn-level-card {
  background: rgba(12, 16, 28, 0.88) !important;
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--dx-radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}
.learn-level-card:hover {
  transform: translateY(-4px);
}
.learn-levels-grid > *:nth-child(1) { border-top: 3px solid var(--neon-cyan) !important; }
.learn-levels-grid > *:nth-child(1):hover { box-shadow: 0 16px 40px rgba(0,0,0,0.8), var(--glow-cyan) !important; }
.learn-levels-grid > *:nth-child(2) { border-top: 3px solid var(--neon-gold) !important; }
.learn-levels-grid > *:nth-child(2):hover { box-shadow: 0 16px 40px rgba(0,0,0,0.8), var(--glow-gold) !important; }
.learn-levels-grid > *:nth-child(3) { border-top: 3px solid var(--neon-violet) !important; }
.learn-levels-grid > *:nth-child(3):hover { box-shadow: 0 16px 40px rgba(0,0,0,0.8), var(--glow-violet) !important; }
.learn-level-card .level-tag {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dx-amber);
  margin-bottom: 6px;
}

/* ========================================================= */
/* BARRA DI NAVIGAZIONE PRIMARIA DESKTOP A 6 PILASTRI        */
/* ========================================================= */
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 20px;
}
@media (max-width: 1023px) {
  .topbar-nav {
    display: none !important;
  }
}
.topbar-nav-link {
  color: #cbd5e1;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none !important;
  padding: 6px 12px;
  border-radius: var(--dx-radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.topbar-nav-link:hover, .topbar-nav-link.active {
  color: var(--dx-amber) !important;
  background: rgba(224, 169, 109, 0.12);
}
.topbar-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--dx-amber), #c48847);
  color: #111827 !important;
  font-weight: 800;
  font-size: 0.88rem;
  border-radius: var(--dx-radius-pill);
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(224, 169, 109, 0.28);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.topbar-nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(224, 169, 109, 0.45);
}
