/* ============================================
   PassDriver — Responsive & Feature CSS
   Supplements style.css (mobile-first additions)
   ============================================ */

/* ---- Variables fix ---- */
:root {
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  --font-body: 'Poppins', system-ui, -apple-system, sans-serif;
}

* { font-family: var(--font-body); }

/* ---- Toast notifications ---- */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  width: calc(100vw - 48px);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff;
  color: #111;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  animation: toastIn .25s ease;
  border-left: 4px solid var(--primary-color);
}

.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--error); }
.toast.warning { border-left-color: var(--warning); }
.toast.info    { border-left-color: var(--info); }

.toast i { font-size: 1.1rem; margin-top: 2px; }
.toast.success i { color: var(--success); }
.toast.error   i { color: var(--error); }
.toast.warning i { color: var(--warning); }
.toast.info    i { color: var(--info); }
.toast-msg { flex: 1; font-size: .92rem; line-height: 1.4; }
.toast-close { background: none; border: none; cursor: pointer; padding: 0; color: #888; font-size: 1rem; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

[data-theme="dark"] .toast { background: #2a2a2a; color: #f0f0f0; }

/* ---- Hamburger menu ---- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .25s ease;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 999;
}

.nav-overlay.active { display: block; }

/* ---- Hero section ---- */
.hero-section { padding: 50px 0 40px; }

.hero-content {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 0 24px;
}

.hero-text { flex: 1; max-width: 600px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,119,0,.15);
  border: 1px solid rgba(255,119,0,.3);
  color: #FF7700;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-text h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 16px;
}

.text-orange { color: #FF7700; }

.hero-text p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Hero stats */
.hero-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 1.8rem; font-weight: 800; color: #FF7700; line-height: 1; }
.stat-label { font-size: .75rem; color: rgba(255,255,255,.6); font-weight: 500; }

/* Download buttons */
.app-download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 12px 18px;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s ease;
  min-width: 150px;
}

.download-btn:hover {
  background: rgba(255,119,0,.15);
  border-color: #FF7700;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,119,0,.25);
}

.download-btn.google-play { background: rgba(255,119,0,.12); border-color: rgba(255,119,0,.4); }
.download-btn.coming-soon { opacity: .55; pointer-events: none; }

.btn-content { display: flex; align-items: center; gap: 12px; width: 100%; }
.btn-text { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.btn-label { font-size: .65rem; font-weight: 600; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .5px; }
.btn-title { font-size: .95rem; font-weight: 700; color: #fff; }
.btn-icon i { font-size: 1.5rem; color: #fff; }

/* Hero phone */
.hero-phone {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}

.phone-mockup {
  width: 260px;
  background: #000;
  border-radius: 30px;
  padding: 8px;
  box-shadow: 0 20px 60px rgba(255,119,0,.3), 0 8px 24px rgba(0,0,0,.4);
  transition: transform .3s ease;
}

.phone-mockup:hover { transform: translateY(-8px) scale(1.02); }
.app-screenshot { width: 100%; border-radius: 22px; display: block; }

/* ---- Section shared ---- */
.section-diferencial,
.section-howto,
.faq-section,
.cta-section { padding: 80px 0; }

.section-header { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-header h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; color: var(--text-dark); margin-bottom: 12px; }
.section-header p { font-size: 1.05rem; color: var(--text-muted); }
.section-header.light h2,
.section-header.light p { color: #fff; }

/* ---- Diferencial ---- */
.section-diferencial { background: var(--light-bg); }

.taxa-destaque {
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.taxa-banner {
  background: linear-gradient(135deg, #FF7700, #FF9500);
  border-radius: 20px;
  padding: 40px 48px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(255,119,0,.4);
  transform: scale(1.05);
}

.taxa-banner .taxa-label { display: block; font-size: .9rem; font-weight: 700; color: rgba(255,255,255,.8); letter-spacing: 1px; text-transform: uppercase; }
.taxa-banner .taxa-value { display: block; font-size: 4rem; font-weight: 900; color: #fff; line-height: 1; }
.taxa-banner .taxa-desc { display: block; font-size: 1rem; color: rgba(255,255,255,.9); font-weight: 600; margin-top: 6px; }

.taxa-vs { font-size: 1.5rem; font-weight: 800; color: var(--text-muted); }

.taxa-comparativo { display: flex; flex-direction: column; gap: 12px; }
.taxa-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: 12px;
  padding: 16px 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  min-width: 260px;
}

.taxa-app { font-weight: 600; color: var(--text-dark); flex: 1; }
.taxa-pct { font-size: 1.3rem; font-weight: 800; }
.taxa-pct.high { color: #ef4444; }
.taxa-pct.mid  { color: #f59e0b; }
.taxa-mult { font-size: .8rem; color: var(--text-muted); }

[data-theme="dark"] .taxa-item { background: #333; }
[data-theme="dark"] .taxa-item .taxa-app { color: #fff; }

.calc-economia {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
  text-align: center;
}

.calc-economia h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; color: var(--text-dark); }
.calc-economia p { color: var(--text-muted); margin-bottom: 28px; }

.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }

.calc-card {
  border-radius: 14px;
  padding: 24px 20px;
  background: var(--light-bg);
  border: 2px solid transparent;
  transition: transform .2s;
}

.calc-card.winner {
  background: linear-gradient(135deg, #FF7700, #FF9500);
  border-color: #FF7700;
  transform: scale(1.04);
}

.calc-card span { display: block; }
.calc-app { font-size: .85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.calc-valor { font-size: 1.8rem; font-weight: 800; color: var(--text-dark); }
.calc-taxa { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }

.calc-card.winner .calc-app,
.calc-card.winner .calc-valor,
.calc-card.winner .calc-taxa { color: #fff; }

[data-theme="dark"] .calc-economia { background: #2a2a2a; }
[data-theme="dark"] .calc-card { background: #333; }

/* ---- How it works tabs ---- */
.section-howto { background: var(--light-bg); }

.tabs-howto { max-width: 880px; margin: 0 auto; }

.tab-buttons {
  display: flex;
  gap: 0;
  background: rgba(0,0,0,.06);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 32px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .2s;
}

.tab-btn.active {
  background: #FF7700;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,119,0,.35);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---- Benefits section ---- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* ---- CTA section ---- */
.cta-section { background: var(--dark-bg); }

.cta-box {
  background: linear-gradient(135deg, rgba(255,119,0,.15), rgba(255,149,0,.1));
  border: 1px solid rgba(255,119,0,.3);
  border-radius: 24px;
  padding: 56px 48px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.cta-box h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); color: #fff; margin-bottom: 12px; }
.cta-box p { color: rgba(255,255,255,.75); font-size: 1.05rem; margin-bottom: 32px; }

.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn-cta-primary {
  background: #FF7700;
  color: #fff;
  border: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .2s;
}
.btn-cta-primary:hover { background: #e86c00; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,119,0,.4); }

.btn-cta-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.4);
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .2s;
}
.btn-cta-secondary:hover { border-color: #FF7700; color: #FF7700; transform: translateY(-2px); }

/* ---- FAQ ---- */
.faq-section { background: var(--light-bg); }

.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.06);
}

.faq-item summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  user-select: none;
  transition: color .2s;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; color: #FF7700; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { color: #FF7700; }

.faq-item p {
  padding: 0 24px 20px;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: .95rem;
}

[data-theme="dark"] .faq-item { background: #2a2a2a; border-color: #444; }
[data-theme="dark"] .faq-item summary { color: #f0f0f0; }

/* ---- Footer additions ---- */
.footer-apk-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FF7700;
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  margin-top: 14px;
  transition: background .2s;
}
.footer-apk-link:hover { background: #e86c00; }

.footer-link-btn {
  background: none;
  border: none;
  color: inherit;
  padding: 0;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  text-align: left;
}
.footer-link-btn:hover { color: #FF7700; }

/* ---- Scroll to top ---- */
.scroll-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  background: #FF7700;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(255,119,0,.4);
  z-index: 500;
  transition: all .2s;
  opacity: 0;
  pointer-events: none;
}
.scroll-top:not([hidden]) { opacity: 1; pointer-events: auto; }
.scroll-top:hover { background: #e86c00; transform: translateY(-2px); }

/* ---- Modal improvements ---- */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,.1);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 10;
}
.modal-close:hover { background: rgba(0,0,0,.2); }

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
.btn-spinner.hidden { display: none; }

/* Link-like buttons in forms */
.link-btn, .forgot-password {
  background: none;
  border: none;
  color: #FF7700;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}
.link-btn:hover, .forgot-password:hover { color: #e86c00; }

/* Upload label */
.upload-label { display: block; cursor: pointer; }
.upload-label .upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  border: 2px dashed rgba(255,119,0,.4);
  border-radius: 10px;
  transition: all .2s;
  color: var(--text-muted);
  font-size: .9rem;
}
.upload-label .upload-area:hover {
  border-color: #FF7700;
  background: rgba(255,119,0,.05);
  color: #FF7700;
}
.upload-label .upload-area i { font-size: 1.5rem; color: #FF7700; }

/* Input with loader */
.input-with-loader { position: relative; }
.input-with-loader input { width: 100%; }
.cep-loader {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,119,0,.3);
  border-top-color: #FF7700;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ---- Responsive: Tablet ---- */
@media (max-width: 1024px) {
  .hero-content { gap: 32px; }
  .phone-mockup { width: 220px; }
}

/* ---- Responsive: Mobile ---- */
@media (max-width: 768px) {
  body { padding-top: 60px; }

  /* Mobile nav */
  .hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--dark-bg);
    flex-direction: column;
    gap: 0;
    padding: 0;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all .3s ease;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    display: block;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 1rem;
  }

  .nav-buttons .btn-login,
  .nav-buttons .btn-register { display: none; }

  /* Hero mobile */
  .hero-section { padding: 32px 0 40px; }
  .hero-content { flex-direction: column; gap: 32px; text-align: center; padding: 0 16px; }
  .hero-text { max-width: 100%; }
  .hero-text h1::after { left: 50%; transform: translateX(-50%); }

  .hero-stats { justify-content: center; gap: 24px; }
  .app-download-buttons { justify-content: center; }
  .download-btn { min-width: 140px; flex: 1; }

  .hero-phone { display: none; }

  /* Sections */
  .section-diferencial,
  .section-howto,
  .faq-section,
  .cta-section { padding: 56px 0; }

  .taxa-destaque { flex-direction: column; gap: 20px; align-items: stretch; }
  .taxa-banner { transform: none; }
  .taxa-comparativo { width: 100%; }
  .taxa-item { min-width: unset; }

  .calc-grid { grid-template-columns: 1fr; }
  .calc-card.winner { transform: none; }

  .tab-buttons { width: 100%; }
  .tab-btn { flex: 1; padding: 12px 16px; font-size: .85rem; text-align: center; }

  .cta-box { padding: 36px 24px; }
  .cta-buttons { flex-direction: column; align-items: stretch; }
  .btn-cta-primary, .btn-cta-secondary { justify-content: center; }

  .steps-container { flex-direction: column; }
  .steps-container::before { display: none; }

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

  #toast-container { bottom: 16px; right: 16px; width: calc(100vw - 32px); max-width: unset; }

  .theme-toggle { top: auto; bottom: 80px; right: 16px; }
  .scroll-top { left: 16px; bottom: 16px; }
}

@media (max-width: 480px) {
  .hero-badge { font-size: .75rem; }
  .hero-text h1 { font-size: 1.7rem; }
  .app-download-buttons { flex-direction: column; }
  .download-btn { width: 100%; min-width: unset; }

  .container { padding: 0 16px; }

  .faq-item summary { font-size: .9rem; padding: 16px 18px; }
  .faq-item p { padding: 0 18px 16px; }

  .modal-content { margin: 8px; border-radius: 16px; }
}

/* ---- Animations ---- */
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ---- Accessibility ---- */
:focus-visible {
  outline: 2px solid #FF7700;
  outline-offset: 2px;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: #FF7700;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  z-index: 99999;
  font-weight: 600;
}
.skip-link:focus { top: 16px; }
