/* ==========================================================================
   Nelson Surgical - Responsive Design Stylesheets
   Fixes mobile/tablet navigation menu toggle & header content overlap
   ========================================================================== */

/* Tablet & Smaller Screens (< 1200px) */
@media (max-width: 1199px) {
  .container {
    max-width: 960px;
  }
  .nav-link {
    padding: 9px 12px !important;
  }
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mega-menu {
    width: 94vw;
  }
  .hero h1, .hero h2 {
    font-size: 52px;
  }
  .image-frame img {
    height: 450px;
  }
}

/* Tablet Portrait & Mobile Landscape (< 992px) */
@media (max-width: 991px) {
  /* Topbar Adjustments */
  .topbar {
    position: relative;
    height: auto;
    min-height: 36px;
    padding: 6px 0;
    font-size: 13px;
    background: #0c100e;
    z-index: 1001;
  }
  .topbar-right {
    display: none;
  }
  .topbar-left {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  .topbar span {
    margin-right: 0;
  }

  /* Header Positioning: Flow naturally below topbar to prevent content overlap */
  .site-header {
    position: relative !important;
    top: 0 !important;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: background 0.3s ease, box-shadow 0.3s ease;
  }
  .site-header.scrolled {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12) !important;
  }

  .site-header .navbar {
    padding: 10px 0 !important;
    background: #ffffff !important;
  }

  /* Navbar Brand & Hamburger Toggler */
  .navbar-brand img {
    width: 135px;
    height: auto;
  }

  .navbar-toggler {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 6px 8px;
    background: transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }
  .navbar-toggler span {
    display: block;
    width: 25px;
    height: 2.5px;
    background-color: var(--dark);
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  .navbar-toggler.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }
  .navbar-toggler.active span:nth-child(2) {
    opacity: 0;
  }
  .navbar-toggler.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }

  /* Mobile Navigation Menu Panel */
  .navbar-collapse {
    display: none !important;
    background: #ffffff !important;
    color: var(--dark);
    padding: 15px 0 10px !important;
    margin-top: 10px !important;
    border-top: 1px solid #f0f0f0;
    width: 100%;
    max-height: calc(80vh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .navbar-collapse.show {
    display: block !important;
  }

  .navbar-nav .nav-link {
    padding: 12px 10px !important;
    font-size: 16px !important;
    font-weight: 600;
    color: var(--dark) !important;
    border-bottom: 1px solid #f5f7f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .navbar-nav .nav-item:last-child .nav-link {
    border-bottom: none;
  }
  .navbar-nav .nav-link.active,
  .navbar-nav .nav-link:hover {
    color: var(--green) !important;
  }

  /* Dropdown Chevron Indicator */
  .products-dropdown > .dropdown-toggle::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 13px;
    margin-left: 8px;
    transition: transform 0.3s ease;
    border: none;
    vertical-align: middle;
  }
  .products-dropdown.open > .dropdown-toggle::after {
    transform: rotate(180deg);
    color: var(--green);
  }

  /* Mobile Mega Menu Layout */
  .mega-menu {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    padding: 15px !important;
    margin: 8px 0 12px !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: none;
    background: #f8faf9 !important;
    border: 1px solid var(--border);
  }
  .products-dropdown.open .mega-menu {
    display: block !important;
  }
  .mega-intro {
    border-right: none !important;
    border-bottom: 1px solid var(--border);
    padding-right: 0 !important;
    padding-bottom: 12px;
    margin-bottom: 15px;
  }
  .mega-intro h3 {
    font-size: 18px;
  }
  .mega-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .mega-columns h5 {
    font-size: 15px;
    margin-bottom: 8px;
  }
  .mega-columns a {
    padding: 5px 0;
    font-size: 13.5px;
  }

  .nav-cta {
    display: inline-block;
    margin-top: 12px;
    text-align: center;
    width: 100%;
  }

  /* Header & Inner Banner Content Spacing (Zero Overlap) */
  .inner-banner {
    padding-top: 35px !important;
    padding-bottom: 30px !important;
  }
  .carousel-inner img {
    min-height: 220px;
    object-fit: cover;
  }

  /* Hero & Section Layout */
  .hero, .hero-slide {
    height: auto;
    min-height: 520px;
  }
  .hero h1, .hero h2 {
    font-size: 46px;
  }
  .hero-scroll {
    display: none;
  }
  .section {
    padding: 65px 0;
  }
  .quality-image img {
    height: 450px;
  }
  .cta-box {
    padding: 35px;
    display: block;
  }
  .cta-actions {
    margin-top: 20px;
  }
  .footer-bottom {
    display: block;
  }
  .footer-bottom span {
    display: block;
    margin: 4px 0;
  }
}

/* Mobile Devices (< 767px) */
@media (max-width: 767px) {
  body {
    font-size: 14px;
  }
  .topbar-left span {
    margin-right: 8px;
  }
  .topbar-left span:last-child {
    display: inline-block;
  }
  .navbar-brand img {
    width: 130px;
  }
  .inner-banner {
    padding-top: 25px !important;
    padding-bottom: 25px !important;
  }
  .banner-content h2 {
    font-size: 28px;
  }
  .hero h1, .hero h2 {
    font-size: 38px;
    letter-spacing: -1px;
  }
  .hero-subtitle {
    font-size: 15px;
  }
  .hero-copy {
    font-size: 12px;
  }
  .carousel-control-prev, .carousel-control-next {
    display: none;
  }
  .carousel-indicators {
    left: 20px;
    bottom: 15px;
  }
  .section {
    padding: 55px 0;
  }
  .section-title {
    font-size: 32px;
  }
  .about-points {
    grid-template-columns: 1fr;
  }
  .experience-badge {
    right: 10px;
    bottom: 15px;
  }
  .category-media {
    height: 220px;
  }
  .product-media {
    height: 180px;
  }
  .product-body {
    padding: 12px;
  }
  .product-body h3 {
    font-size: 14px;
  }
  .product-body > div {
    display: block;
  }
  .product-body > div a {
    display: block;
    margin-top: 5px;
  }
  .catalog-cover {
    height: 240px;
  }
  .process-grid {
    grid-template-columns: 1fr;
  }
  .process-card {
    height: 320px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat {
    padding: 20px 12px;
  }
  .stat strong {
    font-size: 28px;
  }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-item {
    height: 190px;
  }
  .quality-image img {
    height: 380px;
  }
  .oem-section {
    padding: 55px 0;
  }
  .oem-section h2 {
    font-size: 30px;
  }
  .cta-box {
    padding: 30px 20px;
  }
  .cta-box h2 {
    font-size: 26px;
  }
  .cta-actions {
    white-space: normal;
  }
  .cta-actions .btn {
    margin-top: 8px;
  }
  .inquiry-form {
    padding: 20px;
  }
  .footer {
    padding-top: 50px;
  }
}

/* Small Mobile Devices (< 575px) */
@media (max-width: 575px) {
  .topbar {
    font-size: 11px;
    padding: 4px 0;
  }
  .navbar-brand img {
    width: 120px;
  }
  .inner-banner {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }
  .banner-content h2 {
    font-size: 24px;
  }
  .hero h1, .hero h2 {
    font-size: 32px;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .hero-eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .section-title {
    font-size: 26px;
  }
  .section-head {
    margin-bottom: 24px;
  }
  .category-media {
    height: 200px;
  }
  .category-body {
    padding: 16px;
  }
  .category-body h3 {
    font-size: 16px;
  }
  .category-footer {
    display: block;
  }
  .category-footer a {
    display: block;
    margin-top: 6px;
  }
  .product-media {
    height: 150px;
  }
  .sku {
    font-size: 8px;
  }
  .catalog-cover {
    height: 200px;
  }
  .catalog-card h3 {
    font-size: 13px;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-item {
    height: 240px;
  }
  .regions span {
    padding: 6px 10px;
  }
  .footer-bottom {
    text-align: center;
  }
  .footer-bottom span {
    font-size: 10px;
  }
  .mega-columns {
    grid-template-columns: 1fr;
  }
  .mega-columns h5 {
    margin-top: 10px;
  }
  .quality-step p {
    font-size: 10px;
  }
}
