/* ══════════════════════════════════════════════════════════
   RESPONSIVE.CSS — Vaivox General Responsive Rules
   Media queries for: navbar, hero, floating words, forms,
   auth modal, pricing, how-it-works, FAQ, footer, CTA,
   download section, mode selector, general page elements.
   Extracted from main.css.
   NOTE: player.css, result.css, dashboard.css, admin.css
   have their own responsive sections — not duplicated here.
   ══════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════
   max-width: 480px — Small phones
   ═══════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  /* Auth modal */
  .auth-box { padding: 32px 24px; margin: 0 12px; border-radius: 14px; }
}


/* ═══════════════════════════════════════════════════════
   max-width: 520px — Compact mobile
   ═══════════════════════════════════════════════════════ */
@media (max-width: 520px) {
  /* Form row stacked */
  .form-row { flex-direction: column; align-items: stretch; }
  .form-row > .field[style*="flex:0"] { flex: 1 1 auto !important; }
  .voice-toggle {
    width: 100%;
    justify-content: center;
  }
  .voice-btn {
    flex: 1;
    justify-content: center;
    padding: 10px 12px;
    font-size: 0.78rem;
    min-width: 0;
  }
  /* Form compatto su mobile */
  .hero-form-card { padding: 18px 14px; }
  .field { margin-bottom: 14px; }
  label { font-size: 0.72rem; margin-bottom: 5px; }
  input[type="text"], select { padding: 12px 14px; font-size: 0.82rem; }
  .form-row { gap: 8px; }
  /* Language selector mobile */
  .cs-trigger { padding: 12px 14px !important; font-size: 0.82rem !important; }

  /* Download section */
  .download-platforms { grid-template-columns: 1fr; }
  .download-card { padding: 32px 20px; }
}


/* ═══════════════════════════════════════════════════════
   max-width: 600px — General mobile
   ═══════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  /* Contrasto aumentato per uso all'aperto */
  label, .label, .step-label, .stat-label,
  .extras-header-title, .progress-label,
  .loading-note, .step-sublabel { color: #ffffff !important; }

  .stat-value, .step-sublabel { color: rgba(255,255,255,0.75) !important; }

  input, select, textarea {
    color: #ffffff !important;
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.3) !important;
  }
  input::placeholder { color: rgba(255,255,255,0.4) !important; }

  .card, .result-card, .extras-card {
    background: rgba(15,12,25,0.98) !important;
    border-color: rgba(255,255,255,0.12) !important;
  }

  /* Watch how it works button */
  #watch-demo-btn {
    padding: 7px 14px !important;
    font-size: 0.78rem !important;
    gap: 7px !important;
    margin-top: 10px !important;
  }
  #watch-demo-btn > span:first-child {
    width: 22px !important; height: 22px !important;
  }

  /* Contatori hero */
  #hero-counters {
    padding: 7px 14px !important;
    gap: 12px !important;
  }
  #hero-counters .counter-num { font-size: 0.8rem !important; }
  #hero-counters .counter-label { font-size: 0.58rem !important; }
  #hero-counters .counter-emoji { font-size: 0.9rem !important; }

  /* Pipeline box */
  .loading-card {
    padding: 14px 14px !important;
    margin: 8px 0 !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }
  .card-label { font-size: 0.62rem !important; margin-bottom: 10px !important; }
  .step-row { padding: 7px 0 !important; gap: 10px !important; }
  .step-icon { width: 24px !important; height: 24px !important; flex-shrink: 0; }
  .step-num { font-size: 0.7rem !important; }
  .step-label { font-size: 0.82rem !important; }
  .step-sublabel { font-size: 0.72rem !important; }
  .step-badge { font-size: 0.6rem !important; padding: 2px 6px !important; }
  .progress-bar-wrap { margin-top: 10px !important; }
  .progress-label { font-size: 0.62rem !important; }

  /* Wrapper principale */
  .wrapper { padding-left: 0 !important; padding-right: 0 !important; }

  /* Card form e card generiche */
  .card {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    padding: 20px 16px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 12px !important;
  }
}


/* ═══════════════════════════════════════════════════════
   max-width: 960px — Pricing grid 4 cols → 2 cols
   ═══════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .pricing-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════
   max-width: 640px — Steps grid
   ═══════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .steps-grid { grid-template-columns: 1fr; }
  .steps-flow { flex-direction: column; align-items: center; gap: 8px; }
  .step-connector { transform: rotate(90deg); margin-top: 0; width: 50px; }
  .step-circle-ring { width: 110px; height: 110px; }
}


/* ═══════════════════════════════════════════════════════
   max-width: 700px — How-it-works cards
   ═══════════════════════════════════════════════════════ */
@media (max-width: 700px) {
  .hiw-card, .hiw-card.reverse { flex-direction: column; }
  .hiw-img { width: 100%; min-height: 180px; }
  .hiw-body { padding: 20px 22px; }
}


/* ═══════════════════════════════════════════════════════
   max-width: 768px — Tablet / large mobile
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Blocca scroll orizzontale — bg-orb e sw-ring sforano lo schermo */
  html { overflow-x: hidden !important; max-width: 100vw !important; }
  body { overflow-x: hidden !important; max-width: 100vw !important; }

  /* Floating words + sound waves + bg orbs — hide on mobile for performance */
  .floating-words { display: none; }
  .sound-waves { display: none !important; }
  .bg-orb { display: none !important; }

  /* Navbar mobile — no backdrop-filter e no animazione per evitare flicker */
  .hamburger { display: flex !important; visibility: visible !important; opacity: 1 !important; position: relative !important; z-index: 9999 !important; }
  .navbar-center-links { display: none !important; }
  #navbar-right-slot { display: none !important; width: 0 !important; overflow: hidden !important; }
  .navbar {
    padding: 0 12px;
    background: rgba(255,255,255,0.97) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .navbar::after { animation: none !important; opacity: 0.6; }
  .mobile-menu { top: 60px; height: calc(100vh - 60px); }

  /* Steps grid */
  .steps-grid { grid-template-columns: 1fr !important; }
  .steps-flow { flex-direction: column; align-items: center; gap: 8px; }
  .step-connector { transform: rotate(90deg); margin-top: 0; width: 50px; }
  .step-circle-ring { width: 100px; height: 100px; }
  .step-circle-inner { width: 56px; height: 56px; }
  .step-circle-inner svg { width: 26px; height: 26px; }

  /* Hero form card mobile */
  .hero-form-card { padding: 20px 16px; border-radius: 14px 14px 0 0; }
  .hero-form-card-bottom { padding: 12px 16px 18px; border-radius: 0 0 14px 14px; }
  .hero h1 { font-size: 1.6rem !important; }
  .hero .hero-sub { font-size: 0.9rem !important; }

  /* Trust bar mobile */
  .trust-bar { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .trust-item { min-width: 70px; }
  .trust-num { font-size: 1rem; }
  .trust-label { font-size: 0.6rem; }

  /* Input e bottoni mobile */
  input[type="text"], select { font-size: 0.82rem; padding: 12px 14px; }
  .btn-translate { font-size: 0.95rem; padding: 14px 20px; }
  .credits-badge { font-size: 0.65rem; }

  /* URL input icons */
  .url-input-icons { gap: 4px; }
  .url-input-icons svg { width: 16px; height: 16px; }

  /* Voice toggle */
  .voice-toggle {
    width: 100%;
  }
  .voice-btn {
    flex: 1;
    justify-content: center;
    padding: 9px 10px;
    font-size: 0.74rem;
  }

  /* Mode selector mobile — grid 2 colonne (5° elemento span full row) */
  .mode-option { padding: 9px 10px; }
  .mode-selector.visible { max-height: 260px; }

  /* Pricing grid */
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-free-card { flex-direction: column; text-align: center; }
  .pricing-free-left { text-align: center; }

  /* Plans grid (pricing page) */
  .plans-top { grid-template-columns: 1fr !important; }
  .plans-bottom { grid-template-columns: 1fr !important; }

  /* Trust bar (admin context) */
  .trust-bar { gap: 20px; flex-wrap: wrap; }
}


/* ═══════════════════════════════════════════════════════
   min-width: 769px — Desktop overrides
   ═══════════════════════════════════════════════════════ */
@media (min-width: 769px) {
  .navbar-center-links { display: flex !important; }
  #navbar-right-slot { display: flex !important; }
  .hamburger { display: none !important; }
  .mobile-menu { display: none !important; visibility: hidden !important; }
}
