/*
 * Shared extras for the NVGL content site:
 *  - Document cards (.docs-grid/.doc-card) so the "Wichteg Dokumenter" section
 *    on the homepage looks like the cards on the downloads page (whose own
 *    hashed CSS bundle is not loaded on index.html).
 *  - Partner meta blocks (.partner-meta) shown at the top of each partner
 *    section on the downloads page: logo + contact details.
 */

/* --- Document cards --- */
.docs-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
}
.doc-card {
  position: relative;
  background: #fff;
  border: 1px solid #d7dde7;
  border-radius: 5px;
  padding: 1rem 1.1rem 1.05rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .6rem;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
/* Sharp accent bar on the left edge, reveals on hover. */
.doc-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #1e3a8a;
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform .18s ease;
}
.doc-card:hover {
  border-color: #1e3a8a;
  box-shadow: 0 10px 22px -14px rgba(15, 23, 42, .45);
  transform: translateY(-2px);
}
.doc-card:hover::before { transform: scaleY(1); }
.doc-type {
  margin: 0;
  display: inline-flex;
  align-items: center;
  border-radius: 3px;
  background: #0f172a;
  color: #fff;
  border: 1px solid #0f172a;
  padding: .2rem .5rem;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.doc-title {
  margin: 0;
  width: 100%;
  font-size: .98rem;
  line-height: 1.3;
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
/* Push the download glyph to the right edge as a clear affordance. */
.doc-title .download-icon { order: 2; margin-left: auto; }
.doc-title:hover { color: #1e3a8a; }
.download-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  opacity: .55;
  transition: opacity .18s ease, transform .18s ease;
}
.doc-card:hover .download-icon { opacity: 1; transform: translateY(1px); }
@media (max-width: 64rem) { .docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 44rem) { .docs-grid { grid-template-columns: 1fr; } }

/* --- Partner section layout: partner info left, download links right --- */
.partner-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
  gap: 1.75rem 2rem;
  align-items: start;
}
/* DOM order is downloads-then-meta; pull the meta card into the left column. */
.partner-layout__meta { order: -1; }
.partner-layout__downloads { order: 0; min-width: 0; }
/* Inside the two-column layout the cards auto-fill the downloads column. */
.partner-layout .docs-grid {
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
}
@media (max-width: 56rem) {
  .partner-layout { grid-template-columns: 1fr; gap: 1.25rem; }
  .partner-layout__meta { order: -1; }            /* partner card on top on mobile */
  .partner-layout .docs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 44rem) {
  .partner-layout .docs-grid { grid-template-columns: 1fr; }
}

/* --- Partner meta block: vertical card in the right column --- */
.partner-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .85rem;
  margin: 0;
  padding: 1.15rem 1.25rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: .8rem;
  position: sticky;
  top: 1rem;
}
.partner-meta__logo {
  height: 52px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  flex-shrink: 0;
}
.partner-meta__logo--mark { height: 60px; max-width: 64px; }
.partner-meta__contact {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .9rem;
  line-height: 1.45;
  color: #475569;
}
.partner-meta__contact a { font-weight: 600; color: #1e3a8a; text-decoration: none; }
.partner-meta__contact a:hover { text-decoration: underline; }
.partner-meta__contact span { color: #64748b; }
@media (max-width: 56rem) {
  .partner-meta { position: static; flex-direction: row; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
}

/* ============================================================
   Service cards — simple hover (added 2026-06-21; loads after
   index-*.css so it overrides)

   No scale-up / window-expand mechanic. At rest each card shows a
   COLOURED, BLURRED illustration (background-size: auto 115%), placed
   at a different RANDOM position per card via the inline --svc-pos
   variable. On hover the only motion is: the image sharpens (blur
   removed) and the card lifts a few px with a navy-blue border —
   nothing grows or zooms.
   ============================================================ */
.svc-list__item {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 10px;
  transform: translateY(0);
  transition: transform .25s ease, border-color .25s ease,
    box-shadow .3s ease;
}
.svc-list__item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  transform: none;
  background-image: var(--svc-bg, none);
  background-position: var(--svc-pos, center);   /* random per card */
  background-repeat: no-repeat;
  background-size: auto 115%;     /* a bit bigger than before, random position */
  filter: blur(3px) opacity(.85); /* COLOURED (no grayscale) + blurred at rest */
  transition: filter .3s ease;
  pointer-events: none;
}
/* Neutralise any scrim coming from the bundled stylesheet. */
.svc-list__item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  pointer-events: none;
}
.svc-list__item:hover {
  background: #fff;              /* override the bundle's yellow hover fill */
  border-color: #1e3a8a;         /* navy, no more yellow */
  box-shadow: 0 10px 24px -12px rgba(15, 23, 42, .4);
  transform: translateY(-3px);   /* simple lift, no scale */
}
.svc-list__item:hover::before {
  filter: blur(0) opacity(1);    /* sharpen + full colour on hover */
}

/* Berodung: scale the background image up 4x (4 x 115%). */
.svc-list__item--berodung::before {
  background-size: auto 460%;
}
/* Air Rescue: scaled up more so the helicopter reads clearly. */
.svc-list__item[style*="airrescue"]::before {
  background-size: auto 600%;
}

.svc-list__link {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 4px rgba(255, 255, 255, .9);
}

@media (prefers-reduced-motion: reduce) {
  .svc-list__item { transition: border-color .2s ease; transform: none; }
  .svc-list__item:hover { transform: none; }
}

/* ============================================================
   Studio Rodrigues lockup — wide horizontal wordmark
   (monogram + studiorodrigues.lu + WEB · FILM · AI tagline)
   The partner strip caps cell width and applies a grayscale/.75
   wash that turns the black type grey; the downloads card sizes
   logos to a fixed height. For this one wide logo we let the cell
   size to its content, give it more height, and render it crisp.
   ============================================================ */
/* Keep the card the same size as the other partners; the wide wordmark
   just fills the card width and centres, rendered crisp (no grey wash). */
.partners-grid img[src*="studio-rodrigues-lockup"],
.partners-grid .partner-logo:hover img[src*="studio-rodrigues-lockup"] {
  width: 100%;
  height: auto;
  max-height: none;
  opacity: 1;
  filter: none;
  transform: none;
}
/* Downloads-page partner card: same lockup, a touch larger. */
.partner-meta__logo[src*="studio-rodrigues-lockup"] { height: 46px; }
