@font-face {
  font-family: 'MyHeadingFont';
  src: url('../fonts/heading-font.otf') format('opentype');
}

@font-face {
  font-family: 'MyBodyFont';
  src: url('../fonts/body-font.ttf') format('truetype');
}

:root {
  --desk-wood: #11140e;
  --amber: #c59b63;
  --pine-light: #2b7747;
  --text-main: #f2eee9;
  --text-muted: #9ba195;
  --border-subtle: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--desk-wood);
  background-image: 
    linear-gradient(rgba(11, 13, 10, 0.75), rgba(11, 13, 10, 0.75)),
    url('../assets/background/terminal-bg.jpg');
  background-size: auto;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'MyBodyFont', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Nav */
.desk-nav {
  padding: 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(11, 13, 10, 0.88);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.nav-back {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  transition: color 0.3s;
}

.nav-back:hover {
  color: var(--amber);
}

.desk-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: monospace;
  font-size: 0.78rem;
  color: var(--amber);
  letter-spacing: 1px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pine-light);
  box-shadow: 0 0 10px var(--pine-light);
}

/* Page Wrapper */
.desk-wrapper {
  flex: 1;
  max-width: 1540px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 80px 24px;
}

.desk-header {
  text-align: center;
  margin-bottom: 45px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Welcome Tag */
.desk-welcome-tag {
  font-family: monospace;
  font-size: 0.85rem;
  letter-spacing: 5px;
  color: var(--amber);
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.9;
}

/* Brand Title */
.desk-brand-title {
  font-family: 'MyHeadingFont', serif;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  letter-spacing: 4px;
  color: #f7f3ec;
  line-height: 1.05;
  text-shadow: 
    0 4px 15px rgba(0, 0, 0, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.8);
  margin-bottom: 12px;
}

/* Basecamp Badge */
.desk-hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.badge-text {
  font-family: monospace;
  font-size: 1.8rem;
  letter-spacing: 6px;
  font-weight: 700;
  color: #c59b63;
  background: rgba(18, 22, 16, 0.85);
  border: 1px solid rgba(197, 155, 99, 0.5);
  padding: 4px 20px;
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.badge-line {
  width: 45px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(197, 155, 99, 0.5), transparent);
}

/* ============================================================
   CONTAINER: LEFT DIRECTORY + RIGHT CANVAS
   ============================================================ */
.desk-layout-container {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  position: relative;
  width: 100%;
}

/* Left Manifest / Directory */
.desk-manifest {
  width: 420px;
  flex-shrink: 0;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  backdrop-filter: none;
  position: relative;
  z-index: 20;
  margin-top: -60px;
  margin-left: -60px;
}

/* Μεγέθυνση Τίτλων Manifest */
.manifest-header {
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(197, 155, 99, 0.3);
  padding-bottom: 14px;
}

.manifest-tag {
  display: block;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--amber);
  letter-spacing: 4px;
}

.manifest-title {
  font-family: 'MyHeadingFont', serif;
  font-size: 2.1rem;
  letter-spacing: 4px;
  color: var(--text-main);
  margin-top: 6px;
}

.manifest-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.manifest-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 4px 0;
  text-decoration: none !important;
  outline: none;
  background: transparent;
  border: none;
  transition: transform 0.25s ease;
}

.manifest-num {
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 2px;
}

.manifest-label {
  font-family: 'MyHeadingFont', serif;
  font-size: 1.55rem;
  letter-spacing: 2px;
  color: #c9c3b8;
  line-height: 1.15;
  text-decoration: none !important;
  transition: color 0.25s ease, transform 0.25s ease;
}

.manifest-item:hover,
.manifest-item.is-active {
  background: transparent;
  transform: translateX(8px);
}

.manifest-item:hover .manifest-label,
.manifest-item.is-active .manifest-label {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(197, 155, 99, 0.4);
}

.manifest-item:hover .manifest-num,
.manifest-item.is-active .manifest-num {
  color: #e5b374;
}

/* ============================================================
   DESK CANVAS & POSITIONS
   ============================================================ */
.desk-grid {
  position: relative;
  flex: 1;
  min-height: 1250px;
  width: 100%;
}

/* 1. Red String SVG Overlay (Level: 14) */
.thread-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 14;
}

.red-string {
  stroke: #8f1919;
  stroke-width: 2.2px;
  stroke-linecap: round;
  filter: drop-shadow(2px 5px 3px rgba(0, 0, 0, 0.75));
  opacity: 0.95;
}

.red-string-fiber {
  stroke: #e04b4b;
  stroke-width: 1.2px;
  stroke-linecap: round;
  stroke-dasharray: 4 2;
  opacity: 0.85;
}

/* 2. Base Card Container */
.desk-item {
  position: absolute;
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  outline: none;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Καθολικό Reset για links & κείμενα */
a.desk-item,
a.desk-item:link,
a.desk-item:visited,
a.desk-item:hover,
a.desk-item:active,
a.desk-item:focus {
  text-decoration: none !important;
  color: inherit !important;
  border-bottom: none !important;
}

.desk-item *,
.desk-item *:hover,
.desk-item *:focus {
  text-decoration: none !important;
  text-decoration-line: none !important;
  border-bottom: none !important;
}

/* --- ΣΥΝΤΕΤΑΓΜΕΝΕΣ ΚΑΡΤΩΝ --- */
.item-workout {
  top: 10px;
  left: 2%;
  width: 250px;
}
.item-workout .item-graphic-wrap {
  transform: rotate(-1.5deg);
}

.item-gear {
  top: -5px;
  right: -10%;
  width: 250px;
}
.item-gear .item-graphic-wrap {
  transform: rotate(1.2deg);
}

.item-messhall {
  top: 200px;
  left: 40%;
  width: 350px;
}
.item-messhall .item-graphic-wrap {
  transform: rotate(-0.8deg);
}

.item-routes {
  top: 400px;
  left: -5%;
  width: 250px;
}
.item-routes .item-graphic-wrap {
  transform: rotate(1.4deg);
}

.item-fieldlog {
  top: 380px;
  right: 0%;
  width: 250px;
}
.item-fieldlog .item-graphic-wrap {
  transform: rotate(-1.2deg);
}

/* ============================================================
   3. ΤΙΤΛΟΙ (Level: 20 - ΠΑΝΩ ΑΠΟ ΤΙΣ ΚΛΩΣΤΕΣ)
   ============================================================ */
.item-header {
  position: relative;
  z-index: 20;
  margin-bottom: 12px;
  text-align: left;
  pointer-events: auto;
}

.item-tag {
  display: block;
  font-family: monospace;
  color: var(--amber);
  font-size: 0.75rem;
  letter-spacing: 2px;
  margin-bottom: 2px;
  text-decoration: none !important;
}

.item-title {
  font-family: 'MyHeadingFont', serif;
  color: var(--text-main);
  font-size: 1.35rem;
  letter-spacing: 1.5px;
  text-decoration: none !important;
  transition: color 0.3s ease;
}

/* ============================================================
   4. RECON TARGET CROSSHAIR FRAMES (Level: 5)
   ============================================================ */
.item-graphic-wrap {
  position: relative;
  z-index: 5;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0px;
  padding: 4px;
  
  background: 
    linear-gradient(to right, #c59b63 12px, transparent 12px) 0 0,
    linear-gradient(to bottom, #c59b63 12px, transparent 12px) 0 0,
    linear-gradient(to left, #c59b63 12px, transparent 12px) 100% 0,
    linear-gradient(to bottom, #c59b63 12px, transparent 12px) 100% 0,
    linear-gradient(to right, #c59b63 12px, transparent 12px) 0 100%,
    linear-gradient(to top, #c59b63 12px, transparent 12px) 0 100%,
    linear-gradient(to left, #c59b63 12px, transparent 12px) 100% 100%,
    linear-gradient(to top, #c59b63 12px, transparent 12px) 100% 100%,
    rgba(14, 18, 12, 0.9);

  background-repeat: no-repeat;
  background-size: 
    14px 2px, 2px 14px,
    14px 2px, 2px 14px,
    14px 2px, 2px 14px,
    14px 2px, 2px 14px,
    auto;

  box-shadow: 
    inset 0 0 0 1px rgba(197, 155, 99, 0.25),
    0 16px 30px rgba(0, 0, 0, 0.85),
    0 6px 12px rgba(0, 0, 0, 0.7);

  transition: transform 0.35s ease, box-shadow 0.35s ease, z-index 0.35s ease;
}

.item-graphic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  border: 1px solid rgba(0, 0, 0, 0.6);
  filter: brightness(0.92) contrast(1.05);
  transition: transform 0.45s ease, filter 0.45s ease;
}

/* ============================================================
   5. REALISTIC 3D EXPEDITION PUSHPIN (Level: 25)
   ============================================================ */
.item-pin {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;

  background:
    radial-gradient(
      circle at 35% 30%,
      #ff5a5a 0%,
      #230505 35%,
      #000000 65%,
      #350303 90%
    );

  box-shadow:
    0 0 0 1px #2a1f0d,
    0 0 0 2.5px #a17832,
    0 0 0 3.5px #4a3411,
    inset 0 3px 5px rgba(255, 255, 255, 0.75),
    inset 0 -3px 6px rgba(0, 0, 0, 0.85),
    3px 6px 12px rgba(0, 0, 0, 0.95),
    1px 2px 4px rgba(0, 0, 0, 0.8);

  z-index: 25;
  pointer-events: none;
}

.item-pin::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 5px;
  width: 8px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 80%);
  transform: rotate(-30deg);
}

.item-pin::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 40% 35%,
      #fff4d0 0%,
      #c29443 45%,
      #593c0f 85%,
      #211504 100%
    );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 1px 3px rgba(0, 0, 0, 0.7);
}

/* Θέσεις Pin */
.pin-tl {
  top: 36px;
  left: 10px;
}

.pin-tr {
  top: 36px;
  right: 10px;
}

.pin-top-center {
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
}

.pin-br {
  bottom: 15px;
  right: 15px;
}

.pin-bottom-center {
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
}

.pin-right-middle {
  top: 50%;
  right: -10px;
  transform: translateY(-50%);
}

.pin-left-middle {
  top: 50%;
  left: -15px;
  transform: translateY(-50%);
}

/* ============================================================
   6. TACTICAL GAFFER TAPE (Level: 10)
   ============================================================ */
.tape-bottom-right::after,
.tape-top-right::after,
.tape-bottom-left::before {
  content: '';
  position: absolute;
  width: 95px;
  height: 24px;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.07) 0px,
      rgba(255, 255, 255, 0.07) 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(130, 110, 20, 0.85) 0px,
      rgba(155, 132, 25, 0.92) 2px,
      rgba(115, 98, 15, 0.85) 3px,
      rgba(145, 124, 22, 0.90) 5px
    );
  backdrop-filter: blur(1px);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom: 1px solid rgba(0, 0, 0, 0.45);
  border-left: none;
  border-right: none;
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.75),
    inset 0 1px 2px rgba(255, 255, 255, 0.25),
    inset 0 -1px 2px rgba(0, 0, 0, 0.4);
  z-index: 10;
  pointer-events: none;
}

.tape-bottom-right::after {
  bottom: -10px;
  right: -22px;
  transform: rotate(-35deg);
  clip-path: polygon(0% 5%, 95% 0%, 100% 95%, 5% 100%);
}

.tape-bottom-left::before {
  bottom: -10px;
  left: -22px;
  transform: rotate(35deg);
  clip-path: polygon(5% 0%, 100% 5%, 95% 100%, 0% 95%);
}

.tape-top-right::after {
  top: -10px;
  right: -22px;
  transform: rotate(35deg);
  clip-path: polygon(5% 0%, 100% 5%, 95% 100%, 0% 95%);
}

/* ============================================================
   7. HOVER STATE (Η ΕΙΚΟΝΑ ΠΑΝΩ ΑΠΟ ΚΛΩΣΤΕΣ ΚΑΙ ΠΙΝΕΖΕΣ)
   ============================================================ */
.desk-item:hover,
.desk-item.is-hovered {
  transform: translateY(-8px);
  z-index: 60; /* Ολόκληρη η κάρτα έρχεται μπροστά από όλες τις άλλες */
}

.desk-item:hover .item-title,
.desk-item.is-hovered .item-title {
  color: var(--amber);
}

.desk-item:hover .item-graphic-wrap,
.desk-item.is-hovered .item-graphic-wrap {
  z-index: 50; /* Πάνω από το pin (25), πάνω από τις κλωστές (14) και τίτλους (20) */
  transform: rotate(0deg) scale(1.03);
  box-shadow: 
    inset 0 0 0 1px rgba(197, 155, 99, 0.7),
    0 24px 38px rgba(0, 0, 0, 0.95),
    0 8px 16px rgba(0, 0, 0, 0.8);
}

.desk-item:hover .item-graphic,
.desk-item.is-hovered .item-graphic {
  transform: scale(1.03);
  filter: brightness(1) contrast(1.08);
}

/* Responsive: Mobile & Tablet */
@media (max-width: 1024px) {
  .thread-overlay {
    display: none;
  }
  .desk-layout-container {
    flex-direction: column;
    gap: 32px;
  }
  .desk-manifest {
    width: 100%;
    position: static;
    margin: 0;
  }
  .manifest-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
  }
  .manifest-item {
    flex: 1 1 45%;
  }
  .desk-grid {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 36px;
    min-height: auto;
  }
  .desk-item {
    position: static;
    width: 100% !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
  }
  .desk-wrapper {
    padding: 30px 16px 60px 16px;
  }
}