/*
 * mobile.css - AVTA Global Mobile Responsiveness
 * v9 - final footer polish
 */

html, body {
  max-width: 100vw;
  overflow-x: hidden !important;
}

*, *::before, *::after {
  max-width: 100%;
}

@media (hover: none), (pointer: coarse) {
  *, *::before, *::after {
    cursor: auto !important;
  }
}

img, video, iframe, embed, object, svg {
  max-width: 100%;
  height: auto;
}

video {
  width: 100%;
  height: auto;
}

.video-wrapper, .video-container, [class*="video"] video {
  width: 100% !important;
  max-width: 100%;
}

table {
  max-width: 100%;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
  table {
    display: table;
    overflow-x: visible;
  }
}

pre, code {
  max-width: 100%;
  overflow-x: auto;
  word-wrap: break-word;
  white-space: pre-wrap;
}

pre {
  white-space: pre;
  overflow-x: auto;
}

@media (max-width: 767px) {

  .dbr { display: none !important; }


  body {
    font-size: 16px;
    line-height: 1.5;
  }

  h1 { font-size: clamp(1.75rem, 7vw, 2.5rem) !important; line-height: 1.15 !important; }
  h2 { font-size: clamp(1.5rem, 6vw, 2rem) !important; line-height: 1.2 !important; }
  h3 { font-size: clamp(1.25rem, 5vw, 1.5rem) !important; line-height: 1.25 !important; }
  h4 { font-size: 1.125rem !important; }
  p, li, td, th, label { font-size: 1rem; line-height: 1.6; }

  small, .text-xs, .text-sm {
    font-size: 0.875rem !important;
  }

  .container, main, section, article {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  [style*="width:"][style*="px"],
  [style*="min-width:"][style*="px"] {
    max-width: 100% !important;
  }

  .grid-2, .grid-3, .grid-4,
  [class*="grid-cols-2"]:not(.sm\:grid-cols-2):not(.md\:grid-cols-2),
  [class*="grid-cols-3"]:not(.sm\:grid-cols-3):not(.md\:grid-cols-3),
  [class*="grid-cols-4"]:not(.sm\:grid-cols-4):not(.md\:grid-cols-4) {
    grid-template-columns: 1fr !important;
  }

  .flex-row:not(.flex-nowrap),
  [class*="flex"]:not([class*="flex-col"]):not([class*="flex-nowrap"]) {
    flex-wrap: wrap;
  }

  button, .btn, a.button, input[type="button"],
  input[type="submit"], input[type="reset"],
  .glow-button, [role="button"] {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    touch-action: manipulation;
  }

  nav a, header a, footer a, .menu a, .nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
  }

  input[type="text"], input[type="email"], input[type="password"],
  input[type="tel"], input[type="number"], input[type="search"],
  input[type="url"], textarea, select {
    width: 100%;
    min-height: 44px;
    font-size: 16px !important;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    box-sizing: border-box;
  }

  textarea {
    min-height: 88px;
  }

  label {
    display: block;
    margin-bottom: 0.375rem;
  }

  header, nav {
    width: 100%;
    max-width: 100vw;
  }

  .mobile-menu, .nav-menu.active, .nav-menu.open {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .hamburger, .menu-toggle, .nav-toggle,
  [class*="hamburger"], [aria-label*="menu" i] {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    touch-action: manipulation;
    cursor: pointer;
  }

  .wrapper, .content, main, article, section, .container {
    max-width: 100%;
    box-sizing: border-box;
  }

  [style*="position: absolute"],
  [style*="position:absolute"] {
    max-width: 100vw;
  }

  .card, [class*="card"] {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  [class*="p-16"], [class*="p-20"], [class*="p-24"] {
    padding: 1rem !important;
  }

  [class*="px-16"], [class*="px-20"], [class*="px-24"] {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  header img[src*="logo"], nav img[src*="logo"] {
    max-height: 60px;
    width: auto;
  }

  .admin-panel, .dashboard, .stats,
  [class*="admin"], [class*="dashboard"] {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* FOOTER v9 - final */
  footer, footer * {
    text-align: center !important;
  }

  footer .footer-inner {
    display: block !important;
    padding: 2rem 1rem !important;
  }

  footer .footer-inner > div {
    width: 100% !important;
    max-width: 380px !important;
    margin: 0 auto !important;
  }

  footer .footer-inner img[alt="AVTA"],
  footer .footer-inner img[src*="logo"] {
    display: block !important;
    margin: 0 auto 0.25rem auto !important;
    height: 48px !important;
    float: none !important;
  }

  footer .footer-inner > div:first-child > p:first-of-type {
    margin: 0 !important;
    padding: 0 !important;
  }

  footer .footer-inner .footer-contact {
    margin: 1.25rem 0 0 0 !important;
    padding: 0 !important;
  }

  footer .footer-inner .footer-email {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  footer .footer-inner > div:nth-child(2) {
    margin-top: 1.5rem !important;
  }

  footer .footer-inner .footer-nl-title {
    margin: 0 !important;
    padding: 0 !important;
  }

  footer .footer-inner .footer-nl-sub {
    margin: 0 0 0.5rem 0 !important;
    padding: 0 !important;
  }

  footer .footer-inner .footer-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  footer .footer-inner .footer-input {
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  footer .footer-inner .footer-submit {
    margin: 0.25rem 0 0 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  footer .hp-field {
    display: none !important;
  }

  footer .footer-bottom {
    margin-top: 1.5rem !important;
    padding-top: 1rem !important;
  }

  footer .footer-links {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 1rem !important;
    margin-top: 0.5rem !important;
  }

  .modal, .popup, [role="dialog"] {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 0 auto;
  }
}

@media (max-width: 374px) {
  body { font-size: 15px; }
  h1 { font-size: 1.5rem !important; }
  h2 { font-size: 1.25rem !important; }
  button, .btn { padding: 0.625rem 1rem; font-size: 0.9375rem; }
  .container, main, section { padding-left: 0.75rem; padding-right: 0.75rem; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@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;
  }
}

a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #e8000a;
  outline-offset: 2px;
}

@media print {
  nav, header, footer, .no-print { display: none !important; }
  body { background: white !important; color: black !important; }
}
