/* ================================================================
   FLEET TRACKER – Globe & Ship Positions
   ================================================================ */

/* ── Page Layout ──────────────────────────────────────────────── */
.fleet-page {
  background: radial-gradient(ellipse at 50% 30%, #0a1020, #040608);
  min-height: 100vh;
  color: #e8e4dc;
  overflow-x: hidden;
}

.fleet-hero {
  text-align: center;
  padding: 120px 24px 32px;
}

.fleet-hero__subline {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #D4A853;
  margin-bottom: 12px;
  opacity: 0.8;
}

.fleet-hero__title {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 300;
  color: #fff;
  margin: 0 0 16px;
  line-height: 1.15;
}

.fleet-hero__meta {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 0.9rem;
  color: rgba(212, 168, 83, 0.7);
  letter-spacing: 1px;
}

.fleet-hero__meta span {
  margin: 0 6px;
  opacity: 0.4;
}

/* ── Main Content Area ────────────────────────────────────────── */
.fleet-main {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 40px;
  min-height: 600px;
}

/* ── Globe Container ──────────────────────────────────────────── */
.globe-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
}

.globe-svg {
  width: 100%;
  max-width: 700px;
  height: auto;
  cursor: grab;
  user-select: none;
}

.globe-svg:active {
  cursor: grabbing;
}

/* Globe Elements */
.globe-ocean {
  fill: url(#ocean-gradient);
}

.globe-land {
  fill: #162035;
  stroke: rgba(212, 168, 83, 0.2);
  stroke-width: 0.5px;
}

.globe-graticule {
  fill: none;
  stroke: rgba(212, 168, 83, 0.08);
  stroke-width: 0.3px;
}

.globe-border {
  fill: none;
  stroke: rgba(212, 168, 83, 0.25);
  stroke-width: 1px;
}

/* Ship Points */
.ship-point {
  cursor: pointer;
  transition: r 0.2s ease;
}

.ship-point:hover {
  r: 6;
}

.ship-glow {
  pointer-events: none;
}

/* Pulse Animation */
@keyframes shipPulse {
  0%, 100% { opacity: 0.6; r: 8; }
  50% { opacity: 0; r: 16; }
}

.ship-pulse {
  animation: shipPulse 2.5s ease-in-out infinite;
  pointer-events: none;
}

/* ── Ship Info Card (on globe) ────────────────────────────────── */
.ship-card {
  position: absolute;
  background: rgba(15, 20, 24, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 12px;
  padding: 20px;
  min-width: 260px;
  max-width: 320px;
  z-index: 100;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.ship-card--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ship-card__close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.ship-card__close:hover {
  color: #D4A853;
}

.ship-card__reederei {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #D4A853;
  margin-bottom: 4px;
}

.ship-card__name {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: #fff;
  margin: 0 0 12px;
}

.ship-card__details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.ship-card__detail {
  font-size: 0.78rem;
}

.ship-card__detail-label {
  color: rgba(255, 255, 255, 0.4);
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.ship-card__detail-value {
  color: #e8e4dc;
}

.ship-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #D4A853;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: gap 0.2s ease;
}

.ship-card__link:hover {
  gap: 10px;
}

/* ── Tooltip (Desktop hover) ──────────────────────────────────── */
.ship-tooltip {
  position: absolute;
  background: rgba(15, 20, 24, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 168, 83, 0.25);
  border-radius: 8px;
  padding: 8px 14px;
  pointer-events: none;
  z-index: 90;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ship-tooltip--visible {
  opacity: 1;
}

.ship-tooltip__name {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  color: #fff;
  font-weight: 500;
}

.ship-tooltip__reederei {
  font-size: 0.7rem;
  color: rgba(212, 168, 83, 0.7);
}

/* ── Sidebar (Ship List) ─────────────────────────────────────── */
.fleet-sidebar {
  background: rgba(10, 14, 20, 0.6);
  border-left: 1px solid rgba(212, 168, 83, 0.12);
  padding: 24px;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
  position: sticky;
  top: 80px;
}

.fleet-sidebar__title {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  color: #fff;
  margin: 0 0 8px;
  font-weight: 400;
}

.fleet-sidebar__subtitle {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 20px;
}

/* Reederei Groups */
.fleet-group {
  margin-bottom: 20px;
}

.fleet-group__label {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(212, 168, 83, 0.15);
}

/* Ship Items */
.fleet-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.fleet-item:hover,
.fleet-item--active {
  background: rgba(212, 168, 83, 0.08);
}

.fleet-item--active {
  border-left: 3px solid #D4A853;
  padding-left: 9px;
}

.fleet-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fleet-item__dot--online {
  box-shadow: 0 0 6px currentColor;
}

.fleet-item__dot--offline {
  opacity: 0.3;
}

.fleet-item__info {
  flex: 1;
  min-width: 0;
}

.fleet-item__name {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 0.95rem;
  color: #fff;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fleet-item__location {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ship Details (expanded in sidebar) */
.fleet-item__details {
  display: none;
  padding: 8px 12px 4px 30px;
  font-size: 0.78rem;
}

.fleet-item--active + .fleet-item__details,
.fleet-item__details--open {
  display: block;
}

.fleet-item__detail-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  color: rgba(255, 255, 255, 0.5);
}

.fleet-item__detail-row span:last-child {
  color: #e8e4dc;
}

.fleet-item__detail-link {
  display: inline-block;
  margin-top: 8px;
  color: #D4A853;
  text-decoration: none;
  font-size: 0.78rem;
}

.fleet-item__detail-link:hover {
  text-decoration: underline;
}

/* ── Footer Stats & CTA ──────────────────────────────────────── */
.fleet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  gap: 32px;
  flex-wrap: wrap;
}

.fleet-stats {
  display: flex;
  gap: 40px;
}

.fleet-stat {
  text-align: center;
}

.fleet-stat__number {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 300;
  color: #D4A853;
  display: block;
}

.fleet-stat__label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.fleet-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: transparent;
  border: 1px solid #D4A853;
  color: #D4A853;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease;
}

.fleet-cta:hover {
  background: #D4A853;
  color: #0a1020;
}

.fleet-cta svg {
  width: 18px;
  height: 18px;
}

/* ── Loading State ────────────────────────────────────────────── */
.fleet-loading {
  text-align: center;
  padding: 60px 24px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
}

@keyframes fleetSpin {
  to { transform: rotate(360deg); }
}

.fleet-loading__spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(212, 168, 83, 0.2);
  border-top-color: #D4A853;
  border-radius: 50%;
  animation: fleetSpin 1s linear infinite;
  margin: 0 auto 12px;
}

/* ── Update indicator ─────────────────────────────────────────── */
.fleet-update-hint {
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.25);
  padding: 8px 0 0;
}

/* ── noscript fallback ────────────────────────────────────────── */
.fleet-noscript {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}

.fleet-noscript h2 {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  color: #fff;
  font-weight: 400;
  margin-bottom: 24px;
}

.fleet-noscript ul {
  list-style: none;
  padding: 0;
}

.fleet-noscript li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

.fleet-noscript a {
  color: #D4A853;
  text-decoration: none;
}

.fleet-noscript a:hover {
  text-decoration: underline;
}

/* ── Mobile Bottom Drawer ─────────────────────────────────────── */
@media (max-width: 900px) {
  .fleet-main {
    grid-template-columns: 1fr;
    padding: 0;
    padding-bottom: 140px; /* Platz fuer Drawer-Preview */
  }

  .globe-container {
    min-height: 340px;
    padding: 0 8px 20px;
  }

  .fleet-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 70vh;
    border-left: none;
    border-top: 1px solid rgba(212, 168, 83, 0.25);
    background: rgba(10, 14, 20, 0.97);
    backdrop-filter: blur(20px);
    z-index: 200;
    transform: translateY(calc(100% - 130px)); /* Preview: Handle + Schiffsliste sichtbar */
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px 16px 0 0;
    padding: 0 16px 24px;
    top: auto;
    overflow: hidden;
    touch-action: none; /* Wir steuern Touch selbst */
  }

  .fleet-sidebar--open {
    transform: translateY(0);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Drawer Handle mit Label */
  .fleet-sidebar__handle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 0 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .fleet-sidebar__handle::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: rgba(212, 168, 83, 0.4);
    border-radius: 2px;
  }

  .fleet-sidebar__handle::after {
    content: '18 Schiffe – nach oben wischen';
    font-size: 0.7rem;
    color: rgba(212, 168, 83, 0.5);
    letter-spacing: 0.5px;
  }

  .fleet-sidebar--open .fleet-sidebar__handle::after {
    content: 'Nach unten wischen zum Schließen';
  }

  /* Titel/Subtitle im Drawer kompakter */
  .fleet-sidebar__title {
    font-size: 1.1rem;
    margin: 4px 0 4px;
  }

  .fleet-sidebar__subtitle {
    display: none; /* Platz sparen auf Mobil */
  }

  .fleet-hero {
    padding: 100px 16px 20px;
  }

  .fleet-hero__title {
    font-size: clamp(24px, 6vw, 36px);
  }

  .fleet-footer {
    flex-direction: column;
    text-align: center;
    padding: 40px 24px 160px; /* Genug Platz fuer Drawer */
  }

  .fleet-stats {
    justify-content: center;
  }

  /* Ship Card als zentriertes Overlay */
  .ship-card {
    position: fixed;
    left: 16px !important;
    right: 16px !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%);
    max-width: none;
    min-width: 0;
    z-index: 300;
  }

  .ship-card--visible {
    transform: translateY(-50%);
  }

  /* Dunkler Backdrop hinter Ship Card */
  .ship-card-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 250;
  }

  .ship-card-backdrop--visible {
    display: block;
  }
}

/* ── Desktop: hide drawer handle ──────────────────────────────── */
@media (min-width: 901px) {
  .fleet-sidebar__handle {
    display: none;
  }

  .ship-card-backdrop {
    display: none !important;
  }
}

/* ── Reduced Motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ship-pulse,
  .fleet-loading__spinner {
    animation: none;
  }
}
