/* ==========================================================================
   Software directory - Windows XP theme
   Loaded after vendor/xp/XP.css and xp.css. The page uses the XP styling
   without the interactive desktop: every window here is static.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.xp-desktop.software-page {
  --software-header-height: 45px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 0;
  color: #000;
}

.software-page img {
  max-width: 100%;
}

/* ---------- Skip link ---------- */
.software-page .skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 6px 10px;
  z-index: 1200;
}

.software-page .skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Header ---------- */
.software-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: var(--software-header-height);
  padding: 6px clamp(12px, 2.5vw, 28px);
  background: linear-gradient(180deg, #fdfdfd 0%, #f4f2e9 45%, #e4e0d2 100%);
  border-bottom: 1px solid #8b8878;
  box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(0, 0, 0, 0.24);
  font-family: Tahoma, "Pixelated MS Sans Serif", Arial, sans-serif;
}

.software-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #000;
}

.software-brand__home {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #000;
  text-decoration: none;
}

.software-brand__home:hover,
.software-brand__home:focus-visible {
  text-decoration: none;
}

.software-brand__flag {
  flex: none;
  display: block;
}

.software-brand__name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.software-brand__divider {
  width: 1px;
  height: 18px;
  background: #aca899;
  box-shadow: 1px 0 0 #fff;
}

.software-brand__section {
  color: #1c3f8f;
  font-size: 11px;
  white-space: nowrap;
}

.software-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-wrap: wrap;
}

.software-nav a {
  padding: 4px 7px;
  border-radius: 2px;
  color: #1a1a1a;
  font-size: 11px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.software-nav a:hover {
  background: #dbe5fa;
  color: #000;
  text-decoration: none;
}

.software-nav a[aria-current="page"] {
  background: #316ac5;
  color: #fff;
  box-shadow: inset 0 0 0 1px #1c4fa8;
}

.software-nav a[aria-current="page"]:hover {
  background: #2f63b8;
  color: #fff;
}

.software-nav a:focus-visible,
.software-brand__home:focus-visible,
.software-footer a:focus-visible {
  outline: 1px dotted #000;
  outline-offset: 1px;
}

/* Burger */
.software-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 30px;
  margin-left: auto;
  padding: 5px 7px;
  border: 1px solid #7f9db9;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #ecebe5 45%, #d8d0c4 100%);
  box-shadow: inset 0 0 0 1px #fff;
  cursor: pointer;
}

.software-menu-toggle:not(:disabled):active {
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.25);
}

.software-menu-toggle__icon,
.software-menu-toggle__icon::before,
.software-menu-toggle__icon::after {
  display: block;
  width: 16px;
  height: 2px;
  background: #215dc6;
}

.software-menu-toggle__icon {
  position: relative;
}

.software-menu-toggle__icon::before,
.software-menu-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.software-menu-toggle__icon::before { top: -5px; }
.software-menu-toggle__icon::after { top: 5px; }

.software-menu-toggle.active .software-menu-toggle__icon { background: transparent; }
.software-menu-toggle.active .software-menu-toggle__icon::before { top: 0; transform: rotate(45deg); }
.software-menu-toggle.active .software-menu-toggle__icon::after { top: 0; transform: rotate(-45deg); }

.software-menu-toggle:focus-visible {
  outline: 1px dotted #000;
  outline-offset: 1px;
}

/* Mobile navigation reuses the XP start menu styles from xp.css. */
.xp-desktop.software-page .mobile-menu {
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0s linear 0.12s;
}

.xp-desktop.software-page .mobile-menu.active {
  visibility: visible;
  transition: opacity 0.12s ease, visibility 0s;
}

.xp-desktop.software-page .mobile-nav a[aria-current="page"] {
  background: #316ac5;
  color: #fff;
}

.xp-desktop.software-page .mobile-nav a:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -3px;
}

.xp-desktop.software-page .mobile-nav a[aria-current="page"]:focus-visible {
  outline-color: #fff;
}

/* ---------- Main / windows ---------- */
.software-main {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(20px, 4vw, 40px) 0;
}

.software-windows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 2.5vw, 24px);
  width: 100%;
}

.software-window {
  display: flex;
  flex-direction: column;
  padding: 0 0 3px;
  background: #ece9d8;
  border-radius: 8px 8px 0 0;
  box-shadow:
    inset -1px -1px #00138c,
    inset 1px 1px #0831d9,
    inset -2px -2px #001ea0,
    inset 2px 2px #166aee,
    inset -3px -3px #003bda,
    inset 3px 3px #0855dd,
    0 18px 44px rgba(0, 0, 0, 0.35);
  font-family: Tahoma, "Pixelated MS Sans Serif", Arial, sans-serif;
}

.software-window--info {
  width: 100%;
}

.software-window--tool {
  position: relative;
  width: min(860px, 100%);
  color: #000;
}

.software-window__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
}

.xp-desktop.software-page .software-window__link:focus-visible {
  outline: 2px dotted #000;
  outline-offset: 3px;
}

.software-window--tool:hover .software-titlebar {
  filter: brightness(1.08);
}

.software-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  padding: 0 5px;
  background: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #06f 88%, #06f 93%, #005bff 95%, #003dd7 96%, #003dd7 100%);
  border-top: 1px solid #0831d9;
  border-left: 1px solid #0831d9;
  border-right: 1px solid #001ea0;
  border-radius: 8px 7px 0 0;
  color: #fff;
  text-shadow: 1px 1px #0f1089;
}

.software-titlebar__title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
  font: 700 13px/1.2 Tahoma, "Pixelated MS Sans Serif", Arial, sans-serif;
}

.software-titlebar__title > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.software-titlebar__icon {
  flex: none;
  display: block;
  width: 16px;
  height: 16px;
}

.software-titlebar__controls {
  display: flex;
  flex: none;
  gap: 0;
}

.software-titlebar .title-bar-controls button {
  pointer-events: none;
}

.software-window__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
  background: #ece9d8;
  border: 1px solid #aca899;
  border-top: 0;
}

.software-window--info .software-titlebar {
  min-height: 34px;
  padding: 0 6px;
}

.software-window--info .software-titlebar__title {
  gap: 8px;
  font-size: 16px;
}

.software-window--info .software-titlebar__icon {
  width: 20px;
  height: 20px;
}

.software-window--info .software-window__body {
  padding: clamp(20px, 2.5vw, 28px) clamp(18px, 2.5vw, 30px);
}

/* ---------- Info window ---------- */
.software-info {
  gap: 12px;
}

.software-info__lead {
  max-width: 56ch;
  margin: 0 0 8px;
  color: #000;
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 700;
  line-height: 1.35;
}

.software-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: auto 0 0;
}

.software-meta > div {
  padding-top: 10px;
  border-top: 1px solid #c9c4b6;
}

.software-meta dt {
  color: #4a5f8f;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.software-meta dd {
  margin: 3px 0 0;
  color: #1c3f8f;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

/* ---------- Tool window ---------- */
.software-tool {
  align-items: stretch;
}

.software-tool--more {
  gap: 16px;
}

.software-tool--more .software-tool__name {
  margin-bottom: 0;
}

.software-tool--more .software-tool__cta {
  margin-top: 0;
}

.software-tool__name {
  margin: 0 0 6px;
  color: #000;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.software-tool__desc {
  margin: 0 0 16px;
  color: #333;
  font-size: 12px;
  line-height: 1.5;
}

.software-tool__cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding: 4px 14px;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #ecebe5 45%, #d8d0c4 100%);
  box-shadow: inset 0 0 0 1px #fff;
  color: #000;
  font-size: 11px;
  line-height: 1.2;
}

.software-tool__cta span {
  transition: transform 0.12s ease;
}

.software-window--tool:hover .software-tool__cta {
  background: linear-gradient(180deg, #fff 0%, #f5f3ec 45%, #e4ddd2 100%);
}

.software-window--tool:hover .software-tool__cta span {
  transform: translateX(3px);
}

/* ---------- Footer ---------- */

.software-footer {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: auto;
  padding: 8px clamp(12px, 2.5vw, 28px);
  background: linear-gradient(180deg, #fdfdfd 0%, #f4f2e9 45%, #e4e0d2 100%);
  border-top: 1px solid #8b8878;
  box-shadow: inset 0 1px 0 #fff;
  color: #333;
  font-family: Tahoma, "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
}

.software-footer__links {
  display: flex;
  gap: 16px;
}

.software-footer a {
  color: #215dc6;
  text-decoration: none;
}

.software-footer a:hover {
  color: #1c3f8f;
  text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .software-nav {
    display: none;
  }

  .software-menu-toggle {
    display: flex;
  }
}

@media (max-width: 760px) {
  .software-main {
    width: calc(100% - 16px);
    align-items: flex-start;
    padding: 16px 0;
  }

  .software-windows {
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .software-brand__name,
  .software-brand__divider {
    display: none;
  }

  .software-window__body {
    padding: 13px 14px 15px;
  }

  .software-window--info .software-window__body {
    padding: 16px 16px 18px;
  }
}

@media (max-width: 420px) {
  .software-titlebar__title {
    font-size: 12px;
  }

  .software-tool__name {
    font-size: 15px;
  }

  .software-window__body {
    padding: 11px 12px 13px;
  }

  .software-footer {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .software-tool__cta span {
    transition: none;
  }

  .software-window--tool:hover .software-tool__cta span {
    transform: none;
  }

  .xp-desktop.software-page .mobile-menu,
  .xp-desktop.software-page .mobile-menu.active,
  .xp-desktop.software-page .mobile-nav {
    transition: none;
  }
}
