/* Lanhorz mobile responsive layer — matches desktop polish on phones & tablets */

body.mobile-nav-open {
  overflow: hidden;
}

/* ---------- Mobile header menu (portaled to body) ---------- */
.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(214, 164, 53, 0.45);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.mobile-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #f4dca0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.lux-header.mobile-nav-open .mobile-nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.lux-header.mobile-nav-open .mobile-nav-toggle span:nth-child(2) {
  opacity: 0;
}

.lux-header.mobile-nav-open .mobile-nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.25s ease;
}

.mobile-nav-overlay.open {
  pointer-events: auto;
  visibility: visible;
}

.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-nav-overlay.open .mobile-nav-backdrop {
  opacity: 1;
}

.mobile-nav-panel {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 340px);
  height: 100%;
  padding: 20px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  border-left: 1px solid rgba(214, 164, 53, 0.35);
  background: linear-gradient(180deg, rgba(12, 11, 9, 0.98), rgba(2, 2, 2, 0.98));
  box-shadow: -24px 0 48px rgba(0, 0, 0, 0.55);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
}

.mobile-nav-overlay.open .mobile-nav-panel {
  transform: translateX(0);
}

.mobile-nav-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mobile-nav-kicker {
  margin: 0;
  color: #d4af52;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mobile-nav-close {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(214, 164, 53, 0.35);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  color: #f4dca0;
  font-size: 16px;
  line-height: 1;
}

.mobile-nav-links {
  display: grid;
  gap: 4px;
  margin-bottom: 20px;
}

.mobile-nav-links button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #f5f0e6;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
}

.mobile-nav-links button.active {
  border-color: rgba(214, 164, 53, 0.45);
  background: linear-gradient(90deg, rgba(214, 164, 53, 0.16), rgba(0, 0, 0, 0.2));
  color: #f4dca0;
}

.mobile-nav-auth {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(214, 164, 53, 0.22);
}

.mobile-nav-auth .header-cta,
.mobile-nav-auth a.header-cta {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  font-size: 14px;
  padding: 12px 16px;
}

@media (max-width: 980px) {
  .lux-header {
    grid-template-columns: 1fr auto !important;
    align-items: center;
    gap: 10px 12px;
    padding: 10px 14px !important;
  }

  .lux-header .desktop-nav,
  .lux-header .header-auth-desktop {
    display: none !important;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .lux-header.marketing-header {
    grid-template-columns: 1fr auto !important;
    min-height: 56px;
  }

  .lux-header.marketing-header .brand-lockup {
    font-size: 15px;
    letter-spacing: 0.2em;
  }

  .lux-header.marketing-header .brand-lockup img {
    width: 34px;
    height: 34px;
  }
}

@media (min-width: 981px) {
  .mobile-nav-overlay {
    display: none !important;
  }

  .lux-header.marketing-header {
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto !important;
    gap: 12px 16px;
    padding: 8px clamp(16px, 3vw, 32px) !important;
  }

  .lux-header.marketing-header .desktop-nav {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 14px;
    overflow: visible;
  }

  .lux-header.marketing-header .desktop-nav button {
    font-size: 11px;
    padding: 8px 0;
    letter-spacing: 0.05em;
  }

  .lux-header.marketing-header .header-auth-actions {
    display: flex !important;
    gap: 8px;
  }

  .lux-header.marketing-header .header-cta,
  .lux-header.marketing-header a.header-cta {
    font-size: 11px;
    padding: 8px 12px;
  }
}

/* ---------- Dashboard bottom navigation ---------- */
.dashboard-mobile-nav {
  display: none;
}

@media (max-width: 980px) {
  .dashboard-sidebar {
    display: none !important;
  }

  .dashboard-shell {
    grid-template-columns: 1fr !important;
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .account-dashboard-wrap,
  .demo-page-shell {
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .account-dashboard-hero,
  .demo-page-hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .account-dashboard-hero h1,
  .demo-page-hero h1 {
    font-size: clamp(24px, 7vw, 32px);
  }

  .dashboard-full-mode-badge {
    font-size: 13px;
    padding: 10px 12px;
  }

  .dashboard-mobile-nav {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(214, 164, 53, 0.35);
    background: rgba(4, 4, 4, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.45);
  }

  .dashboard-mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 52px;
    padding: 6px 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #8f8778;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .dashboard-mobile-nav button.active {
    color: #f4dca0;
    background: transparent;
    box-shadow: inset 0 -2px 0 #d4af52;
  }

  .dashboard-mobile-nav button.active .dashboard-mobile-icon {
    color: #f4dca0;
    text-shadow: 0 0 12px rgba(214, 164, 53, 0.45);
  }

  .dashboard-mobile-icon {
    font-size: 16px;
    line-height: 1;
  }

  .dashboard-mobile-label {
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .dashboard-metrics article {
    padding: 14px;
  }

  .dashboard-metrics article strong {
    font-size: clamp(18px, 5vw, 24px);
  }

  .dashboard-panel {
    min-height: auto;
    padding: 16px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }

  .lanhorz-full-mode {
    padding: 18px 16px;
  }

  .lfm-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .lfm-breakdown-grid {
    grid-template-columns: 1fr !important;
  }

  .lfm-safe-row {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 430px) {
  .dashboard-mobile-nav button {
    font-size: 9px;
    min-height: 48px;
  }

  .dashboard-mobile-icon {
    font-size: 15px;
  }

  .lfm-hero-stats {
    grid-template-columns: 1fr !important;
  }
}

/* ---------- Marketing mobile polish ---------- */
@media (max-width: 980px) {
  .page-shell.marketing-page {
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: 40px;
  }

  .mk-section {
    margin-bottom: 44px;
  }

  .mk-section h2 {
    font-size: clamp(22px, 6vw, 32px);
  }

  .mk-lead {
    font-size: 15px;
    line-height: 1.65;
  }

  .mk-hero.mk-hero-cinematic {
    padding-top: 24px;
  }

  .mk-ai-module-showcase {
    grid-template-columns: 1fr !important;
  }

  .mk-ai-regulated-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .mk-ai-status-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .mk-ai-status-metrics {
    margin-left: 0;
    width: 100%;
  }

  .mk-trust-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .pricing-grid.tier-cards {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .pricing-card.tier-card img {
    max-height: 180px;
    object-fit: contain;
  }
}

@media (max-width: 560px) {
  .mk-trust-strip,
  .mk-ai-regulated-grid {
    grid-template-columns: 1fr !important;
  }

  .mk-ai-status-metrics article {
    flex: 1 1 calc(33% - 8px);
    min-width: 0;
  }

  .mk-footer-top {
    gap: 24px;
  }
}

/* ---------- Account tools & forms ---------- */
@media (max-width: 760px) {
  .account-finance-panel {
    padding: 16px 14px !important;
    margin-top: 12px;
  }

  .account-tools-form,
  .account-tools-block,
  .account-tools-wide {
    max-width: 100%;
  }

  .account-tools-split {
    grid-template-columns: 1fr !important;
  }

  .account-tools-actions {
    flex-direction: column;
  }

  .account-tools-actions .gold-button {
    width: 100%;
    min-height: 48px;
  }

  .account-tools-form input[type="text"],
  .account-tools-form input[type="number"],
  .account-tools-form select,
  .account-tools-form textarea {
    font-size: 16px;
    min-height: 48px;
  }

  .admin-shell {
    padding: 0 12px 32px;
  }

  .admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .login-layout {
    gap: 20px;
  }

  .login-left {
    display: none;
  }

  .login-card {
    width: 100%;
  }

  .footer {
    padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  }

  .footer-grid {
    gap: 24px;
  }
}

@media (max-width: 430px) {
  .gold-button,
  .mk-btn,
  .send-button {
    min-height: 48px;
  }

  .section-title h1 {
    font-size: clamp(32px, 11vw, 42px) !important;
  }
}
