/* ==========================================================================
   HB TALK - RESPONSIVE STYLES (responsive.css)
   Desktop, Tablet, Mobile Optimization
   ========================================================================== */

/* Tablet & Smaller Desktops (Max 1024px) */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-trust {
    justify-content: center;
  }

  .hero-mockup-card {
    max-width: 580px;
    margin: 0 auto;
  }

  .steps-grid,
  .features-grid,
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .chat-details-panel {
    display: none; /* Hide 3rd column on tablet */
  }
}

/* Mobile Devices (Max 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    display: none;
    box-shadow: var(--shadow-lg);
  }

  .nav-links.show {
    display: flex;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .steps-grid,
  .features-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .safety-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .cta-banner {
    padding: 40px 24px;
  }

  .cta-banner h2 {
    font-size: 1.85rem;
  }

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

  /* Auth Split Screen stack on mobile */
  .auth-wrapper {
    flex-direction: column;
  }

  .auth-sidebar {
    padding: 32px 20px;
    min-height: auto;
  }

  .auth-main {
    padding: 36px 20px;
  }

  /* App Shell Sidebar on Mobile */
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .app-main {
    margin-left: 0;
    padding-bottom: 70px; /* Room for mobile nav bar */
  }

  .app-topbar {
    padding: 0 16px;
  }

  .topbar-search {
    display: none; /* Can be toggled or moved into search modal */
  }

  .dashboard-content {
    padding: 20px 16px;
  }

  .welcome-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Mobile Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    z-index: 100;
    align-items: center;
    justify-content: space-around;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    gap: 4px;
    flex: 1;
    height: 100%;
  }

  .mobile-nav-item.active, .mobile-nav-item:hover {
    color: var(--primary);
  }

  .mobile-nav-item svg {
    width: 20px;
    height: 20px;
  }

  /* Chat full-screen responsive */
  .chat-sidebar {
    width: 100%;
  }

  .chat-wrapper.in-conversation .chat-sidebar {
    display: none;
  }

  .chat-wrapper.in-conversation .chat-main {
    display: flex;
  }

  .chat-main {
    display: none;
  }

  .chat-back-btn {
    display: inline-flex !important;
  }

  /* Call screen overlay mobile */
  .video-local-pip {
    width: 110px;
    height: 140px;
    bottom: 80px;
    right: 16px;
  }
}

/* Very Small Mobile Screens (Max 480px) */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .btn {
    width: 100%;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .partners-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-select {
    width: 100%;
  }
}
