/* ==========================================================================
   ProMED Solutions - Lightweight Universal Responsive & Performance Stylesheet
   Mobile, Tablet, and PC optimization with minimal code footprint.
   ========================================================================== */

/* Base Viewport & Media Guards */
html, body {
  max-width: 100%;
  overflow-x: clip !important;
}

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

table {
  width: 100%;
  max-width: 100%;
}

.table-responsive, [style*="overflow-x"] {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --------------------------------------------------------------------------
   GPU HARDWARE ACCELERATION & RENDER PERFORMANCE
   -------------------------------------------------------------------------- */
.hero-video, .card-3d, .ocard, .benefit-card, .sitem, .trust-video, .infinity-video {
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

/* --------------------------------------------------------------------------
   UNIVERSAL STICKY NAVY BLUE HEADER (ALL PAGES)
   -------------------------------------------------------------------------- */
nav, .navbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 2147483647 !important;
  isolation: isolate !important;
  background: #031428 !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3) !important;
}

.topbar {
  background: #020d1c !important;
  color: #b0bdcd !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.topbar a {
  color: #00E5FF !important;
}

/* Brand Name & Tagline */
nav .nav-brand-name, nav .logo-name, .navbar .nav-brand-name, .navbar .logo-name {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 229, 255, 0.2) !important;
}

nav .nav-brand-tag, nav .logo-tagline, .navbar .nav-brand-tag, .navbar .logo-tagline {
  color: #00E5FF !important;
}

/* Nav Links */
nav .nav-links a, .navbar .nav-links a, .nav-link {
  color: #ffffff !important;
  font-weight: 600 !important;
}

nav .nav-links a:hover, .navbar .nav-links a:hover,
nav .nav-links a.active, .navbar .nav-links a.active,
.nav-link.active {
  color: #00E5FF !important;
}

/* Navigation CTA Button */
.nav-cta {
  background: linear-gradient(135deg, #19569B, #00E5FF) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(0, 229, 255, 0.3) !important;
}

.nav-cta:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.45) !important;
}

/* --------------------------------------------------------------------------
   DESKTOP DROPDOWN MENU STYLING (PC > 900px)
   -------------------------------------------------------------------------- */
@media (min-width: 901px) {
  .nav-item {
    position: relative !important;
  }
  
  .drop, .nav-item-drop, .promed-shared-subpages {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    background: #031428 !important;
    border: 1px solid rgba(0, 229, 255, 0.25) !important;
    border-radius: 10px !important;
    min-width: 250px !important;
    padding: 10px 0 !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(8px) !important;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    z-index: 2147483647 !important;
  }

  .nav-item:hover > .drop,
  .nav-item:focus-within > .drop,
  .nav-item:hover > .promed-shared-subpages {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  .drop-item {
    display: block !important;
    padding: 10px 18px !important;
    color: #e2e8f0 !important;
    text-decoration: none !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    border-left: 3px solid transparent !important;
  }

  .drop-item:hover {
    background: rgba(0, 229, 255, 0.08) !important;
    color: #00E5FF !important;
    border-left-color: #00E5FF !important;
  }

  .drop-title {
    font-weight: 700 !important;
    color: #ffffff !important;
    font-size: 13.5px !important;
  }

  .drop-label {
    font-size: 10px !important;
    color: #00E5FF !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
  }

  .drop-desc {
    font-size: 11.5px !important;
    color: #94a3b8 !important;
    margin-top: 2px !important;
  }
}

/* --------------------------------------------------------------------------
   Hamburger Toggle Button & Mobile Navigation Styling
   -------------------------------------------------------------------------- */
.promed-hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 2147483647;
  border-radius: 6px;
}

.promed-hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background-color: #ffffff !important;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.promed-hamburger.is-active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.promed-hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.promed-hamburger.is-active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Tablet & Medium Screens (max-width: 900px)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .promed-hamburger {
    display: flex !important;
  }

  .nav-inner, .navbar {
    position: relative !important;
    justify-content: space-between !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .nav-links {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: #031428 !important;
    padding: 20px 24px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4) !important;
    z-index: 2147483646 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
  }

  .nav-links.mobile-open {
    display: flex !important;
    animation: promedNavSlideDown 0.3s ease forwards;
  }

  .nav-links a {
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    padding: 8px 0 !important;
    width: 100% !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .nav-links a:hover, .nav-links a.active {
    color: #00E5FF !important;
  }

  .drop, .nav-item-drop, .promed-shared-subpages {
    display: flex !important;
    flex-direction: column !important;
    position: static !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 8px !important;
    margin: 4px 0 8px 12px !important;
    padding: 6px 14px !important;
    border-left: 2px solid #00E5FF !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  .drop-item {
    padding: 6px 0 !important;
    font-size: 13.5px !important;
    color: #cbd5e1 !important;
    border: none !important;
  }

  .drop-item:hover {
    color: #00E5FF !important;
  }

  .nav-cta {
    display: none !important;
  }
}

@keyframes promedNavSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Tablet & Medium Grid Layouts (max-width: 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .topbar, .hero-content, .offices, .footer,
  section, .section, .service-benefits, .trust-video-section {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .benefits-grid, .vals-grid, .values-grid, .svc-grid, .turnkey-grid,
  .sla-grid, .rental-grid, .gallery-grid, .div-grid, .services-grid,
  .review-list, .who-proof, .stats-row, .expertise-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  .offices-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  div[style*="grid-template-columns: repeat(3,"],
  div[style*="grid-template-columns: repeat(4,"],
  div[style*="grid-template-columns: repeat(5,"],
  div[style*="grid-template-columns: repeat(6,"],
  div[style*="grid-template-columns:repeat(3,"],
  div[style*="grid-template-columns:repeat(4,"],
  div[style*="grid-template-columns:repeat(5,"],
  div[style*="grid-template-columns:repeat(6,"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}

/* --------------------------------------------------------------------------
   Mobile & Small Screens (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .topbar {
    flex-direction: column !important;
    gap: 6px !important;
    text-align: center !important;
  }

  .benefits-grid, .vals-grid, .values-grid, .svc-grid, .turnkey-grid,
  .sla-grid, .rental-grid, .gallery-grid, .div-grid, .services-grid,
  .review-list, .who-proof, .stats-row, .offices-grid, .expertise-grid,
  .footer-grid, .stats-strip {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .benefits-grid {
    flex-direction: column !important;
  }

  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  h1, .hero h1, .hero-content h1, .sec-heading {
    font-size: clamp(1.8rem, 7vw, 2.5rem) !important;
    line-height: 1.2 !important;
  }

  h2 {
    font-size: clamp(1.5rem, 5vw, 2rem) !important;
  }

  .hero-sub, .hero-subtitle, .hero-desc {
    font-size: 0.95rem !important;
  }
}

/* --------------------------------------------------------------------------
   Extra Small Mobile Screens (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .logo-name, .nav-brand-name {
    font-size: 18px !important;
  }

  .logo-tagline, .nav-brand-tag {
    font-size: 9px !important;
  }
}
