/*
 * Responsive styles - ARTech Lubricants theme.
 *
 * All @media blocks live here, moved out of style.css (same order).
 * Enqueued after style.css so breakpoint overrides win. Keep ONLY media
 * queries in this file.
 */

@media (min-width: 1200px) {
  .container,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .container-xxl {
    max-width: 1400px;
  }
}

@media (max-width: 991.98px) {
  .site-navbar .navbar-nav .nav-link--ghost {
    margin-left: 0;
    margin-top: 8px;
  }
}

/* Hero title forced to 2 lines on desktop only (font size unchanged). */
@media (min-width: 992px) {
  .hero__title-br {
    display: inline;
  }
}

@media (min-width: 992px) {
  .site-navbar .navbar-nav .nav-link--icon + .nav-item--signin .nav-link--icon,
  .site-navbar
    .navbar-nav
    .nav-item--signin
    + .nav-item--signin
    .nav-link--icon {
    margin-left: 5.6px;
  }
}

@media (min-width: 992px) {
  .site-navbar .nav-item.dropdown > .dropdown-menu {
    display: block;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition:
      opacity 0.22s ease,
      transform 0.22s ease;
    visibility: hidden;
  }

  .site-navbar .nav-item.dropdown:hover > .dropdown-menu,
  .site-navbar .nav-item.dropdown > .dropdown-menu.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }
}

@media (min-width: 992px) {
  /* Invisible hover bridge so cursor can travel link → menu without closing */
  .site-navbar .nav-item.dropdown::after {
    content: "";
    height: 14px;
    left: 0;
    position: absolute;
    right: 0;
    top: 100%;
  }
}

@media (min-width: 992px) {
  .site-navbar .nav-item.dropdown--mega {
    position: relative;
  }

  .site-navbar .nav-item.dropdown--mega > .mega-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    left: 50%;
    margin-top: 0;
    position: absolute;
    right: auto;
    top: calc(100% + 12px);
    transform: translate(-50%, 8px);
    width: 620px;
  }

  .site-navbar .nav-item.dropdown--mega:hover > .mega-menu,
  .site-navbar .nav-item.dropdown--mega:focus-within > .mega-menu,
  .site-navbar .nav-item.dropdown--mega > .mega-menu.show {
    transform: translate(-50%, 0);
  }
}

@media (max-width: 991.98px) {
  .site-navbar .primary-dropdown.mega-menu {
    border: 0;
    box-shadow: none;
    display: block;
    width: 100%;
  }

  .mega-menu__col,
  .mega-menu__col:first-child {
    border: 0;
    padding: 4px 0 4px 16px;
  }

  .mega-menu__col--alt {
    background: transparent;
  }

  .mega-menu__label {
    margin-top: 12px;
  }
}

@media (max-width: 991.98px) {
  .site-navbar .primary-dropdown {
    background: transparent;
    border: 0;
    box-shadow: none;
    margin-top: 0;
    padding: 0 0 0 16px;
  }

  .site-navbar .primary-dropdown::before,
  .site-navbar .primary-dropdown::after {
    display: none;
  }

  .primary-dropdown__head {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .site-navbar .navbar-toggler {
    display: inline-flex;
  }
}

@media (min-width: 992px) {
  .site-navbar .navbar-toggler {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .site-navbar .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(124, 124, 124, 0.18);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin-top: 12px;
    padding: 16px;
  }

  .site-navbar .navbar-nav .nav-link {
    padding: 10.4px 8px;
  }

  .site-navbar .navbar-nav .nav-link::after {
    display: none;
  }

  .site-navbar .navbar-nav .nav-link--cta {
    display: inline-flex;
    margin: 8px 0 0;
  }

  .site-navbar .primary-dropdown {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 0 0 12px;
  }
}

@media (max-width: 575.98px) {
  .video-card__frame {
    aspect-ratio: 16 / 10;
  }

  .video-card__title {
    font-size: 16.8px;
  }
}

@media (max-width: 767.98px) {
  .site-footer__brand .custom-logo,
  .site-footer__brand .site-footer__brand-img {
    max-height: 88px;
    max-width: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 767.98px) {
  .hero {
    padding: 80px 0 112px;
  }

  .hero__title::after {
    margin-top: 12px;
  }

  .videos {
    padding: 72px 0 80px;
  }

  .videos__head {
    flex-direction: column;
    align-items: stretch;
  }

  .videos__toolbar {
    justify-content: flex-start;
  }

  .videos__search input {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .data-sheets {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .data-sheets__icon {
    margin: 0 auto;
  }
}

@media (max-width: 991.98px) {
  .tech-resources__visual {
    margin: 32px auto 0;
    max-width: 480px;
  }
}

@media (max-width: 991.98px) {
  .hero--inner {
    min-height: clamp(330px, 48vh, 440px);
  }
}

@media (max-width: 767.98px) {
  .hero--inner {
    min-height: 300px;
    padding: 72px 0 88px;
  }
}

@media (min-width: 992px) {
  .team-card--tall {
    padding: 36px;
  }
}

@media (max-width: 479.98px) {
  .auth-links {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 575.98px) {
  .contact-map {
    height: 300px;
  }
}

@media (max-width: 767.98px) {
  .hero-stats {
    gap: 20px 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .ds-grid {
    grid-template-columns: 1fr;
  }
}

/* Category filter slider: overlay the nav arrows on the slider edges below the
   desktop breakpoint (they no longer take layout space). Desktop (>=1200px)
   keeps the inline arrow layout. */
@media (max-width: 1199.98px) {
  .prod-rail {
    position: relative;
  }

  .prod-rail__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }

  .prod-rail__arrow--prev {
    left: 0;
  }

  .prod-rail__arrow--next {
    right: 0;
  }
  .prod-rail__arrow {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 991.98px) {
  .prod-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .prod-cat__hero {
    gap: 28px;
    grid-template-columns: 1fr;
  }

  .prod-cat__media {
    height: 260px;
    order: -1;
  }
}

@media (max-width: 767.98px) {
  .products-page .container {
    padding-left: 20px;
    padding-right: 20px;
  }

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

  .prod-cat__name {
    font-size: 30px;
  }

  .prod-cat__media {
    height: 220px;
  }

  .prod-cat__bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .prod-cta {
    padding: 32px 24px;
  }

  .prod-cta__actions {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .prod-search__input {
    font-size: 16px;
    padding: 16px 52px 16px 48px;
  }

  .prod-cat__cta {
    gap: 12px;
  }
}

@media (max-width: 520px) {
  .ms-tabs {
    gap: 8px;
  }

  .ms-tab {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .milspec-table-wrap {
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow-x: visible;
  }

  .milspec-table {
    min-width: 0;
  }

  .milspec-table thead {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }

  .milspec-table tbody tr {
    background: #fff;
    border: 1px solid #ece6e0;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(20, 16, 12, 0.05);
    display: block;
    margin-bottom: 14px;
    padding: 6px 4px;
  }

  .milspec-table tbody td {
    border: 0;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 8px 16px;
  }

  .milspec-table tbody td::before {
    color: var(--color-muted);
    content: attr(data-label);
    flex: 0 0 40%;
    font-family: var(--font-heading);
    font-size: 10.56px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .milspec-table tbody tr:hover td {
    background: transparent;
  }

  /* NSN list sits on the value side of the stacked row. */
  .milspec-table td .milspec-nsn {
    align-items: flex-end;
    text-align: right;
  }
}

@media (max-width: 600px) {
  .ms-std-card {
    padding: 18px;
  }
}

@media (max-width: 991.98px) {
  .cm-flow__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .cm-flow__grid {
    grid-template-columns: 1fr;
  }
}
