/* Shared design tokens + components for the FsRdp section (Default.aspx,
   Server.aspx, InstallingOnLinux.aspx). Previously each page carried its own
   near-identical copy of this CSS (fsrdp-hero / fsrdp-server-hero /
   fsrdp-linux-hero, three fsrdp-step copies, five differently-colored
   "pastel" boxes) - consolidated here so there is exactly one navy hero,
   one white card language (color lives in a small icon badge, not the card
   background), and one neutral note style, shared by all three pages. */

:root {
  --fsrdp-navy-950: #17202b;
  --fsrdp-navy-700: #244a73;
  --fsrdp-blue-600: #336699;
  --fsrdp-ink-soft: #495057;
  --fsrdp-paper: #f4f7fc;
  --fsrdp-line: #d7dee7;
  --fsrdp-shadow: 0 0.35rem 1.25rem rgba(20, 42, 68, 0.14);
  --fsrdp-shadow-hover: 0 0.75rem 1.75rem rgba(20, 42, 68, 0.22);
  --fsrdp-radius: 12px;
}

/* ---------- Page header ---------- */

.fsrdp-hero {
  background: linear-gradient(135deg, var(--fsrdp-navy-950), var(--fsrdp-navy-700));
  border-radius: var(--fsrdp-radius);
  color: #fff;
  padding: 2rem;
}

/* ---------- Base white card (downloads, packages, feature cards) ---------- */

.fsrdp-card {
  border: 0;
  border-radius: var(--fsrdp-radius);
  box-shadow: var(--fsrdp-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fsrdp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--fsrdp-shadow-hover);
}

.fsrdp-platform {
  color: var(--fsrdp-blue-600);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ---------- Download matrix (compact reference table) ---------- */

.fsrdp-download-matrix {
  background: #fff;
  border: 1px solid var(--fsrdp-line);
  border-radius: var(--fsrdp-radius);
  box-shadow: var(--fsrdp-shadow);
  overflow: hidden;
}

.fsrdp-download-matrix-header {
  background: var(--fsrdp-navy-700);
  color: #fff;
  font-weight: 700;
  padding: 0.6rem 1rem;
}

.fsrdp-download-matrix-table { margin: 0; }

.fsrdp-download-matrix-table th,
.fsrdp-download-matrix-table td {
  padding: 0.5rem 0.85rem;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
}

@media (max-width: 768px) {
  .fsrdp-download-matrix-table th,
  .fsrdp-download-matrix-table td {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .fsrdp-download-matrix {
    overflow-x: auto;
  }
  .fsrdp-download-matrix-table th,
  .fsrdp-download-matrix-table td {
    padding: 0.3rem 0.35rem;
    font-size: 0.7rem;
  }
}

.fsrdp-download-matrix-table tr > *:first-child { text-align: left; }
.fsrdp-download-matrix-table thead th { color: var(--fsrdp-ink-soft); font-weight: 600; }
.fsrdp-download-matrix-table tbody th { font-weight: 600; text-align: left; }
.fsrdp-download-matrix-table a { color: var(--fsrdp-navy-700); font-weight: 600; text-decoration: none; }
.fsrdp-download-matrix-table a:hover { text-decoration: underline; }
.fsrdp-download-matrix-table .btn { color: #fff; }

/* ---------- Download boxes (mobile-only replacement for the table above) ----------
   A 5-column table (Downloads/Windows/Linux ARM64/Linux x64/Anleitung) has no
   honest way to fit a portrait phone even scrolled - swapped below 481px for
   three stacked one-platform-each boxes reusing the same card look. */

.fsrdp-download-boxes { display: none; }

@media (max-width: 480px) {
  .fsrdp-download-table-wrap { display: none; }
  .fsrdp-download-boxes { display: block; }
}

.fsrdp-download-box-body { padding: 0.9rem 1.1rem; }

.fsrdp-download-box-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--fsrdp-line);
}

.fsrdp-download-box-row:last-of-type { border-bottom: 0; }

.fsrdp-download-box-row span {
  font-weight: 600;
  color: var(--fsrdp-ink-soft);
  font-size: 0.85rem;
}

.fsrdp-download-box-row a {
  color: var(--fsrdp-navy-700);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
}

.fsrdp-download-box-row a:hover { text-decoration: underline; }

.fsrdp-download-box-links {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--fsrdp-line);
  font-size: 0.8rem;
}

.fsrdp-download-box-links a {
  color: var(--fsrdp-navy-700);
  font-weight: 600;
  text-decoration: none;
}

.fsrdp-download-box-links a:hover { text-decoration: underline; }

/* ---------- Feature icon strip (Default.aspx "at a glance" row) ---------- */

.fsrdp-feature-strip {
  text-align: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Replaces the old per-item inline style="flex: 1 1 calc(100% / 10) ..." -
   an inline style has higher specificity than any class selector here and
   silently defeated every breakpoint below (10 items always stayed at their
   inline 10% basis, no matter the media query). Sizing now lives only here.

   Each basis below is calc((100% - (N-1) * gap) / N) for N columns, matching
   the container's gap: 0.5rem exactly - a plain "calc(X% - 4px)" leaves the
   wrong amount of slack once an explicit gap is also reserved between items,
   which is what silently pushed one item too many onto the next line. */
.fsrdp-feature-strip-item {
  flex: 1 1 calc((100% - 9 * 0.5rem) / 10);
  min-width: 0;
  padding: 0 5px;
}

.fsrdp-feature-icon {
  color: var(--fsrdp-blue-600);
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.fsrdp-feature-strip .fsrdp-feature-label {
  font-size: 0.85rem;
  color: var(--fsrdp-ink-soft);
  overflow-wrap: break-word;
  hyphens: auto;
}

@media (max-width: 1200px) {
  /* 4 per row */
  .fsrdp-feature-strip-item {
    flex: 1 1 calc((100% - 3 * 0.5rem) / 4);
  }
}

@media (max-width: 768px) {
  /* 3 per row */
  .fsrdp-feature-strip-item {
    flex: 1 1 calc((100% - 2 * 0.5rem) / 3);
  }
  .fsrdp-feature-icon { font-size: 1.3rem; }
  .fsrdp-feature-label { font-size: 0.7rem; }
}

@media (max-width: 480px) {
  /* 10 icons total -> 5 per row = exactly 2 rows */
  .fsrdp-feature-strip-item {
    flex: 1 1 calc((100% - 4 * 0.5rem) / 5);
    padding: 0 2px;
  }
  .fsrdp-feature-icon { font-size: 1rem; margin-bottom: 0.3rem; }
  .fsrdp-feature-label { font-size: 0.6rem; line-height: 1.15; }
}

/* Highlighted strip tile: the browser entry is a real link and deliberately
   pops out of the row (replaces a former inline orange border). Same color
   language as the icon badges - blue, not a foreign accent color. */
.fsrdp-feature-highlight {
  display: block;
  text-decoration: none;
  background: rgba(51, 102, 153, 0.08);
  border: 1px solid var(--fsrdp-blue-600);
  border-radius: var(--fsrdp-radius);
  padding: 0.6rem 0.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fsrdp-feature-highlight:hover,
.fsrdp-feature-highlight:focus-visible {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--fsrdp-shadow);
}

.fsrdp-feature-highlight .fsrdp-feature-badge {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--fsrdp-blue-600);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}

/* ---------- Neutral note (checklists, prerequisites - not a pitch) ---------- */

.fsrdp-note {
  background: var(--fsrdp-paper);
  border-left: 4px solid var(--fsrdp-blue-600);
  border-radius: 8px;
  padding: 1.5rem;
}

.fsrdp-note h2 { font-size: 1.05rem; }

/* ---------- Section panel (one calm neutral break in an otherwise white page) ---------- */

.fsrdp-panel {
  background: var(--fsrdp-paper);
  border-radius: calc(var(--fsrdp-radius) + 4px);
  padding: 2.25rem;
}

@media (max-width: 768px) {
  .fsrdp-panel {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .fsrdp-panel {
    padding: 1rem;
  }
}

/* ---------- Feature card: white card, color lives only in the icon badge ---------- */

.fsrdp-feature-card {
  background: #fff;
  border: 1px solid var(--fsrdp-line);
  border-radius: var(--fsrdp-radius);
  box-shadow: var(--fsrdp-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fsrdp-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--fsrdp-shadow-hover);
}

.fsrdp-feature-card-shot {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  cursor: zoom-in;
  border: 0;
  padding: 0;
}

@media (max-width: 768px) {
  .fsrdp-feature-card-shot {
    height: 150px;
  }
}

@media (max-width: 480px) {
  .fsrdp-feature-card-shot {
    height: 120px;
  }
}

.fsrdp-feature-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

@media (max-width: 480px) {
  .fsrdp-feature-card-body {
    padding: 1.25rem;
  }
}

.fsrdp-feature-icon-badge {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(51, 102, 153, 0.1);
  color: var(--fsrdp-blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
  flex: 0 0 auto;
}

.fsrdp-feature-card h2 { font-size: 1.15rem; }

.fsrdp-feature-card .badge {
  background-color: var(--fsrdp-blue-600);
  color: #fff;
  letter-spacing: 0.03em;
}

/* ---------- Contact CTA banner ---------- */

.fsrdp-contact-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--fsrdp-line);
  border-radius: var(--fsrdp-radius);
  box-shadow: var(--fsrdp-shadow);
  padding: 1.5rem 1.75rem;
}

.fsrdp-contact-banner-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: rgba(51, 102, 153, 0.1);
  color: var(--fsrdp-blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex: 0 0 auto;
}

.fsrdp-contact-banner-body { flex: 1 1 260px; }
.fsrdp-contact-banner-body p { margin-bottom: 0.15rem; }

@media (max-width: 640px) {
  .fsrdp-contact-banner {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
  }
  .fsrdp-contact-banner-icon {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.2rem;
    margin: 0 auto;
  }
  .fsrdp-contact-banner-body { flex: 1 1 auto; }
  .fsrdp-contact-banner .btn {
    flex: 0 1 auto;
    width: 100%;
  }
}

/* Responsive buttons in general */
.btn {
  white-space: normal;
  word-wrap: break-word;
}

/* Tablet: Buttons noch nebeneinander, aber mit kleinerer Schrift */
@media (max-width: 768px) {
  .btn {
    font-size: 0.9rem;
    padding: 0.5rem 0.85rem;
  }
}

/* Mobile: Stack buttons vertically, smaller font */
@media (max-width: 480px) {
  .btn {
    width: 100%;
    display: block;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }

  /* Stack buttons in flex containers on mobile */
  .d-flex .btn {
    flex: 1 1 100%;
  }

  /* Last button in a card needs space from content below */
  .card-body .btn:last-child {
    margin-bottom: 1rem;
  }

  /* Alert box buttons stack on mobile */
  .alert .btn {
    width: 100%;
    display: block;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .alert .btn:last-child {
    margin-bottom: 0;
  }

  /* Hide card metadata on mobile (version numbers, small text) */
  .card-text.text-muted.small {
    display: none;
  }

  /* Reduce card title size on mobile */
  .card-title {
    font-size: 1rem !important;
  }

  /* Compact card text descriptions on mobile */
  .card-text {
    font-size: 0.9rem;
    line-height: 1.4;
  }
}

/* ---------- Numbered install steps (Server.aspx, InstallingOnLinux.aspx) ---------- */

.fsrdp-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.fsrdp-step-number {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--fsrdp-blue-600);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fsrdp-step-body h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }

.fsrdp-platform-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.fsrdp-platform-heading i { color: var(--fsrdp-blue-600); }

/* ---------- Clickable screenshot (inline figures) ---------- */

.fsrdp-shot {
  width: 100%;
  border: 0;
  padding: 0;
  border-radius: var(--fsrdp-radius);
  box-shadow: var(--fsrdp-shadow);
  display: block;
  cursor: zoom-in;
  transition: box-shadow 0.15s ease;
}

.fsrdp-shot:hover,
.fsrdp-shot:focus-visible {
  box-shadow: var(--fsrdp-shadow-hover);
}

.fsrdp-shot-caption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--fsrdp-ink-soft);
  text-align: center;
}

/* ---------- Lightbox (Bootstrap modal, custom image-viewing chrome) ---------- */

#fsrdpLightbox .modal-content { background: var(--fsrdp-navy-950); border: 0; }
#fsrdpLightbox .modal-body { position: relative; padding: 1.5rem; text-align: center; }

#fsrdpLightbox img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 8px;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.4);
}

#fsrdpLightbox figcaption { color: #e7edf8; margin-top: 0.85rem; font-size: 0.95rem; }
#fsrdpLightbox .btn-close { filter: invert(1) grayscale(1) brightness(2); }

.fsrdp-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
}

.fsrdp-lightbox-arrow:hover { background: rgba(255, 255, 255, 0.22); }
.fsrdp-lightbox-arrow.prev { left: 0.75rem; }
.fsrdp-lightbox-arrow.next { right: 0.75rem; }

@media (max-width: 768px) {
  .fsrdp-note {
    padding: 1.25rem;
  }
  .fsrdp-note h2 { font-size: 0.95rem; }
}

@media (max-width: 640px) {
  .fsrdp-lightbox-arrow { width: 2.4rem; height: 2.4rem; font-size: 1.1rem; }
}

/* Mobile-optimized hero section */
@media (max-width: 768px) {
  .fsrdp-hero {
    padding: 1.5rem;
  }
  .fsrdp-hero h1 { font-size: 1.5rem !important; }
  .fsrdp-hero .lead { font-size: 0.95rem; }
}
