/* Additions for the server-rendered pages (the design only had client-side listings). */
.pagination a, .pagination span {
  display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px;
  border: 1px solid #CDD1D0; border-radius: var(--r-sm); background: #fff; font-weight: 700;
}
.pagination a:hover { border-color: var(--ink); }
.pagination span[aria-current="page"] { background: var(--asphalt); border-color: var(--asphalt); color: #fff; }
.pagination span[aria-disabled="true"] { opacity: .4; }
.prose { max-width: 72ch; line-height: 1.9; }
.prose h2, .prose h3 { margin: 1.6em 0 .5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul { list-style: disc; padding-inline-start: 1.4em; }
.prose ol { list-style: decimal; padding-inline-start: 1.4em; }
.prose img { max-width: 100%; height: auto; border-radius: var(--r-sm); }
.prose a { color: var(--gold-ink); text-decoration: underline; }
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 10px; }
.prose blockquote { border-inline-start: 4px solid var(--gold); margin: 1em 0; padding: 4px 16px; color: var(--steel); }
.post-cover { width: 100%; max-width: 860px; height: auto; border-radius: var(--r-sm); margin: 0 0 24px; }
.video-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.video-grid iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r-sm); }
.gallery-thumb-img { width: 100%; height: 100%; object-fit: cover; }
.status-note { padding: 12px 16px; border-radius: var(--r-sm); background: var(--concrete); margin: 0 0 16px; }
.card-media .eq { width: 40%; height: auto; aspect-ratio: 1; color: #B4B9BB; }
.cat .eq { display: block; }

/* Drop-down menus in the header (one level). Desktop: opens on hover or keyboard focus; drawer: shown nested. */
.main-nav li.has-sub { position: relative; }
.main-nav li.has-sub > a { padding-inline-end: 24px; }
.main-nav li.has-sub > a::before {
  content: ""; position: absolute; inset-inline-end: 9px; top: 50%; margin-top: -3px;
  border: 5px solid transparent; border-top-color: currentColor; border-bottom: 0;
}
.main-nav ul.sub-menu {
  display: none; position: absolute; top: 100%; inset-inline-start: 0; z-index: 60;
  min-width: 220px; padding: 8px; flex-direction: column; align-items: stretch; gap: 0;
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-md);
  box-shadow: 0 18px 40px -16px rgb(0 0 0 / .25);
}
.main-nav ul.sub-menu a { padding: 10px 12px; font-size: 15px; white-space: nowrap; }
.main-nav ul.sub-menu a[aria-current="page"]::after { display: none; }
.main-nav ul.sub-menu a[aria-current="page"] { color: var(--gold-ink); }
.main-nav li.has-sub:hover > ul.sub-menu,
.main-nav li.has-sub:focus-within > ul.sub-menu { display: flex; }
@media (max-width: 1199px) {
  .main-nav li.has-sub > a::before { display: none; }
  .main-nav ul.sub-menu {
    display: flex; position: static; min-width: 0; padding: 0 16px 0 0; border: 0; box-shadow: none; background: none;
  }
  html[dir="ltr"] .main-nav ul.sub-menu { padding: 0 0 0 16px; }
  .main-nav ul.sub-menu a { font-size: 15px; padding: 11px 6px; }
}

/* Site search in the top bar, next to the language switch (with a microphone from voice-search.js) */
.topbar-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.site-search { position: relative; display: flex; align-items: center; --vs-color: #B9B7AE; --vs-hover: var(--gold-hi); }
.site-search input {
  width: 260px; height: 32px; padding-inline: 12px 36px; border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--r-sm); background: rgba(255, 255, 255, .06); color: #fff; font-size: 13px;
}
.site-search input::placeholder { color: #A9A79E; }
.site-search input:focus { outline: 2px solid var(--gold); outline-offset: 1px; background: rgba(255, 255, 255, .1); }
.site-search input::-webkit-search-cancel-button { display: none; }
.site-search button[type="submit"] {
  position: absolute; inset-inline-end: 4px; display: grid; place-items: center; width: 28px; height: 28px;
  border: 0; background: none; color: var(--gold); cursor: pointer;
}
/* The microphone takes the end of the field, so the search button moves before it */
.site-search .vs-btn ~ button[type="submit"], .site-search input[data-voice-watched] ~ button[type="submit"] { inset-inline-end: 34px; }
.site-search input[data-voice-watched] { padding-inline-end: 66px !important; }
@media (max-width: 960px) { .site-search input { width: 190px; } }
@media (max-width: 640px) { .site-search input { width: 150px; } }
@media (max-width: 420px) { .site-search input { width: 120px; } }

/* Equipment search panel: on a computer the whole form shows at full height (no scrolling inside it) */
@media (min-width: 961px) {
  .filters { position: static; max-height: none; overflow: visible; }
}
.check input { accent-color: var(--black); }
.results[aria-busy="true"] { opacity: .55; transition: opacity .15s; pointer-events: none; }

/* 404 */
.not-found .page-hero-inner { padding-block: 56px 72px; }
.not-found-code { font-size: clamp(72px, 14vw, 140px); font-weight: 800; line-height: 1; color: var(--gold); letter-spacing: .02em; }
.not-found .hero-actions { margin-top: 24px; }


/* Menu items stay on one line; the English labels are longer, so they get a slightly tighter size on desktop */
.main-nav a { white-space: nowrap; }
@media (min-width: 1200px) {
  html[lang="en"] .main-nav a { font-size: 14.5px; padding-inline: 9px; }
  html[lang="en"] .main-nav a[aria-current="page"]::after { inset-inline: 9px; }
}

/* "Sell your equipment": WhatsApp button below the steps box */
.contact-info .steps + p { margin-top: 20px; }

/* Full-size photo viewer on the listing page (native <dialog>): the whole photo is shown, tall ones included */
.gallery-main > img { cursor: zoom-in; }
.gallery-zoom {
  position: absolute; bottom: 14px; inset-inline-start: 14px; display: grid; place-items: center;
  width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(26, 26, 24, .7); color: #fff;
}
.gallery-zoom:hover { background: rgba(26, 26, 24, .9); }
.lightbox {
  position: fixed; inset: 0; width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(10, 10, 9, .94); color: #fff; overflow: hidden;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; animation: lightbox-in .2s ease-out; }
.lightbox::backdrop { background: transparent; }
.lightbox img {
  max-width: calc(100% - 32px); max-height: calc(100% - 96px); width: auto; height: auto;
  object-fit: contain; border-radius: 4px; user-select: none; -webkit-user-drag: none;
}
.lightbox-close, .lightbox-arrow {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .14); color: #fff;
}
.lightbox-close:hover, .lightbox-arrow:hover { background: rgba(255, 255, 255, .28); }
.lightbox-close { top: 16px; inset-inline-end: 16px; }
.lightbox-arrow { top: 50%; translate: 0 -50%; }
.lightbox-arrow.prev { inset-inline-start: 16px; }
.lightbox-arrow.next { inset-inline-end: 16px; }
.lightbox-count {
  position: absolute; top: 26px; inset-inline-start: 50%; translate: -50% 0; font-size: 14px; font-weight: 600;
  direction: ltr; opacity: .85;
}
html[dir="rtl"] .lightbox-count { translate: 50% 0; }
@media (max-width: 640px) {
  .lightbox img { max-width: 100%; max-height: calc(100% - 160px); border-radius: 0; }
  .lightbox-arrow { top: auto; bottom: 20px; translate: none; }
}
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lightbox[open] { animation: none; } }
html[dir="ltr"] .lightbox-arrow .ico { transform: scaleX(-1); }
