/* ─── Home V3 — Telemetry & Command sections ─────────────────────────────── */

/* ── Pulsing label dot (mirrors contact.css for pages that don't load it) ── */
.label-pulse {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-label);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}
.label-pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
}
.label-pulse-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-green);
}
.label-pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--color-green);
  opacity: 0;
  animation: hv3-pulse 2s ease-out infinite;
}
@keyframes hv3-pulse {
  0%   { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ── Shared section typography ─────────────────────────────────────────────── */
.hv3-section-heading {
  font-size: clamp(2rem, 4vw, var(--text-5xl));
  font-weight: var(--weight-medium);
  color: var(--color-heading);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-5) 0;
}

.hv3-section-body {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: var(--leading-normal);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TELEMETRY SECTION
═══════════════════════════════════════════════════════════════════════════ */
.hv3-telemetry-section {
  padding: var(--space-20) 0 var(--space-20);
  background: var(--color-bg);
  overflow: hidden;
}

/* Centered heading block */
.hv3-section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-16);
}

/* Three-column grid: left card | drone | right cards */
.hv3-telemetry-visual {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  align-items: center;
  gap: var(--space-4);
}

.hv3-tel-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-5);
}

.hv3-tel-drone-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hv3-tel-drone {
  width: 100%;
  height: auto;
  display: block;
}

.hv3-tel-card {
  width: 100%;
  display: block;
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  padding: 16px 20px;
}

.hv3-tel-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.hv3-tel-card-value {
  font-size: 30px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 8px;
}

.hv3-tel-card-status {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hv3-tel-card-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.hv3-tel-status-ok {
  color: #4ade80;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMMAND & CONTROL SECTION
═══════════════════════════════════════════════════════════════════════════ */
.hv3-command-section {
  padding: var(--space-20) 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

/* Two-column layout: text left (narrow), image right (wide) */
.hv3-command-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2.2fr;
  gap: var(--space-12);
  align-items: start;
}

.hv3-command-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hv3-command-content .hv3-section-body {
  max-width: 44ch;
  margin-bottom: var(--space-8);
}

.hv3-command-visual {
  min-width: 0;
}

/* Stack bg glow and table image — bg is absolutely positioned so it
   never inflates the row height beyond what the main image needs. */
.hv3-command-image-stack {
  position: relative;
  width: 100%;
}

.hv3-table-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: blur(24px);
  transform: scale(1.08);
}

.hv3-table-main {
  position: relative; /* sit above the absolute bg */
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xs);
  border: 1px solid var(--color-border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SOFTWARE PANEL — replaces the hv3-table-main image
═══════════════════════════════════════════════════════════════════════════ */
.hv3-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.hv3-panel-card {
  padding: 24px 28px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* Remove right border on every second card (right column) */
.hv3-panel-card:nth-child(2n) {
  border-right: none;
}

/* Remove bottom border on the last two cards (bottom row) */
.hv3-panel-card:nth-last-child(-n+2) {
  border-bottom: none;
}

.hv3-panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.hv3-panel-card-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
}

.hv3-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hv3-status-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.hv3-status-active {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
}

.hv3-panel-card-desc {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 960px) {
  .hv3-telemetry-visual {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .hv3-tel-left  { order: 2; flex-direction: row; }
  .hv3-tel-drone-wrap { order: 1; }
  .hv3-tel-right { order: 3; flex-direction: row; justify-content: center; }

  .hv3-tel-card  { max-width: 240px; }

  .hv3-command-layout {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .hv3-command-content {
    max-width: 600px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .hv3-telemetry-section { padding-top: var(--space-16); }
  .hv3-command-section   { padding: var(--space-16) 0; }

  .hv3-tel-left,
  .hv3-tel-right {
    flex-direction: column;
    align-items: center;
  }

  .hv3-tel-card { max-width: 90%; }

  .hv3-section-heading { font-size: var(--text-3xl); }

  /* Stack software panel to single column on mobile */
  .hv3-panel {
    grid-template-columns: 1fr;
  }

  /* Remove right border since there's only one column */
  .hv3-panel-card:nth-child(2n) {
    border-right: 1px solid var(--color-border);
  }

  /* Restore bottom border on all cards, remove only on the last one */
  .hv3-panel-card:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--color-border);
  }

  .hv3-panel-card:last-child {
    border-bottom: none;
  }
}
