/* =============================================
   DOWNLOADS PAGE — PyroMaster Pro
   ============================================= */

/* ---- Hero ---- */
.downloads-hero {
  position: relative;
  padding: 140px 0 80px;
  background: linear-gradient(160deg, #0A0A0F 0%, #12121A 40%, #1a0f00 100%);
  overflow: hidden;
  text-align: center;
}
.downloads-hero::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(255,107,26,0.10) 0%, transparent 65%);
  pointer-events: none;
}
.downloads-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(255,107,26,0.12);
  border: 1px solid rgba(255,107,26,0.3);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #FF6B1A;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.downloads-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin: 0 auto 1rem;
  max-width: 700px;
}
.downloads-hero h1 span { color: #FF6B1A; }
.downloads-hero-desc {
  color: #B0B0C3;
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-stats-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
}
.hero-stat .stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: #FF6B1A;
  line-height: 1;
}
.hero-stat .stat-lbl {
  font-size: 0.78rem;
  color: #B0B0C3;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.25rem;
}

/* ---- Tab Bar ---- */
.downloads-tabs {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 72px;
  z-index: 100;
  backdrop-filter: blur(16px);
}
.downloads-tabs-inner {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.downloads-tabs-inner::-webkit-scrollbar { display: none; }
.dl-tab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.75rem;
  border: none;
  background: transparent;
  color: #B0B0C3;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.dl-tab:hover { color: #fff; }
.dl-tab.active {
  color: #FF6B1A;
  border-bottom-color: #FF6B1A;
}
.dl-tab-icon {
  width: 18px;
  height: 18px;
}
.dl-tab-count {
  background: rgba(255,107,26,0.15);
  color: #FF6B1A;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1em 0.45em;
  border-radius: 100px;
}
.dl-tab.active .dl-tab-count {
  background: rgba(255,107,26,0.25);
}

/* ---- Downloads Section ---- */
.downloads-section {
  padding: 4rem 0 6rem;
}
.dl-panel { display: none; }
.dl-panel.active { display: block; }

/* ---- Category Header ---- */
.dl-cat-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}
.dl-cat-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}
.dl-cat-desc {
  color: #B0B0C3;
  font-size: 0.9rem;
  margin-top: 0.25rem;
  line-height: 1.5;
}
.dl-cat-count {
  font-size: 0.85rem;
  color: #B0B0C3;
  white-space: nowrap;
}

/* ---- Manual Cards (3-col grid) ---- */
.manuals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 1024px) { .manuals-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .manuals-grid { grid-template-columns: 1fr; } }

.manual-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.manual-card:hover {
  border-color: rgba(255,107,26,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(255,107,26,0.1);
}
.manual-cover {
  position: relative;
  height: 120px;
  background: linear-gradient(135deg, #1C1C2E 0%, #12121A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.manual-cover-icon {
  width: 56px;
  height: 72px;
  background: linear-gradient(160deg, #FF6B1A 0%, #FF4500 100%);
  border-radius: 6px 6px 0 0;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
  box-shadow: 0 8px 24px rgba(255,69,0,0.35);
}
.manual-cover-icon::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 14px 14px 0;
  border-color: transparent rgba(0,0,0,0.3) transparent transparent;
}
.manual-cover-icon svg { opacity: 0.9; }
.manual-badge {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2em 0.6em;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.manual-badge.badge-updated { background: rgba(59,130,246,0.2); color: #3B82F6; border: 1px solid rgba(59,130,246,0.3); }
.manual-badge.badge-new { background: rgba(34,197,94,0.15); color: #22C55E; border: 1px solid rgba(34,197,94,0.3); }
.manual-badge.badge-essential { background: rgba(255,107,26,0.15); color: #FF6B1A; border: 1px solid rgba(255,107,26,0.3); }
.manual-badge.badge-critical { background: rgba(239,68,68,0.15); color: #EF4444; border: 1px solid rgba(239,68,68,0.3); }
.manual-badge.badge-recommended { background: rgba(245,158,11,0.15); color: #F59E0B; border: 1px solid rgba(245,158,11,0.3); }
.manual-badge.badge-latest { background: rgba(34,197,94,0.15); color: #22C55E; border: 1px solid rgba(34,197,94,0.3); }

.manual-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.manual-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.25rem;
}
.manual-subtitle {
  font-size: 0.78rem;
  color: #B0B0C3;
  margin: 0 0 0.75rem;
}
.manual-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}
.manual-meta-tag {
  font-size: 0.7rem;
  padding: 0.2em 0.6em;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: #B0B0C3;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.manual-meta-tag.highlight { background: rgba(255,107,26,0.1); color: #FF6B1A; }
.manual-desc {
  font-size: 0.78rem;
  color: #808097;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}
.manual-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.btn-download {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, #FF6B1A 0%, #FF4500 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-download:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  cursor: pointer;
  color: #B0B0C3;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.btn-preview:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ---- Spec Cards (2-col list) ---- */
.specs-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.spec-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
}
.spec-card:hover {
  border-color: rgba(255,107,26,0.35);
  background: rgba(255,107,26,0.03);
  transform: translateX(4px);
}
.spec-icon {
  flex-shrink: 0;
  width: 52px; height: 64px;
  background: linear-gradient(160deg, #FF6B1A 0%, #c43400 100%);
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 6px 18px rgba(255,69,0,0.25);
}
.spec-icon::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 12px 12px 0;
  border-color: transparent rgba(0,0,0,0.25) transparent transparent;
}
.spec-info { flex: 1; min-width: 0; }
.spec-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.spec-subtitle { font-size: 0.82rem; color: #B0B0C3; margin: 0 0 0.6rem; }
.spec-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.spec-tag {
  font-size: 0.7rem;
  padding: 0.2em 0.6em;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: #B0B0C3;
}
.spec-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

/* ---- Software Cards ---- */
.software-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 768px) { .software-grid { grid-template-columns: 1fr; } }

.software-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  gap: 1.25rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.software-card:hover {
  border-color: rgba(255,107,26,0.4);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(255,107,26,0.08);
}
.sw-icon {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}
.sw-icon.ios { background: linear-gradient(135deg, #1C1C1E 0%, #2C2C2E 100%); border: 1px solid rgba(255,255,255,0.12); }
.sw-icon.android { background: linear-gradient(135deg, #0f3d0f 0%, #1a6b1a 100%); border: 1px solid rgba(34,197,94,0.2); }
.sw-icon.windows { background: linear-gradient(135deg, #003780 0%, #0078D4 100%); border: 1px solid rgba(0,120,212,0.3); }
.sw-icon.macos { background: linear-gradient(135deg, #1C1C1E 0%, #3A3A3C 100%); border: 1px solid rgba(255,255,255,0.12); }
.sw-icon.firmware { background: linear-gradient(135deg, #1a0a00 0%, #3d1a00 100%); border: 1px solid rgba(255,107,26,0.25); }

.sw-body { flex: 1; min-width: 0; }
.sw-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.sw-subtitle { font-size: 0.8rem; color: #B0B0C3; margin: 0 0 0.5rem; }
.sw-desc { font-size: 0.78rem; color: #808097; line-height: 1.55; margin-bottom: 1rem; }
.sw-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.sw-meta-item {
  font-size: 0.7rem;
  padding: 0.2em 0.6em;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: #B0B0C3;
}
.sw-actions { display: flex; gap: 0.75rem; }
.btn-dl-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(135deg, #FF6B1A 0%, #FF4500 100%);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-dl-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-dl-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #B0B0C3;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-dl-secondary:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ---- Release Notes Banner ---- */
.release-notes-banner {
  background: rgba(255,107,26,0.06);
  border: 1px solid rgba(255,107,26,0.2);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.release-notes-banner p { color: #B0B0C3; font-size: 0.85rem; margin: 0; }
.release-notes-banner a { color: #FF6B1A; text-decoration: none; font-weight: 600; }
.release-notes-banner a:hover { text-decoration: underline; }

/* ---- CTA Section ---- */
.downloads-cta {
  background: linear-gradient(160deg, #1C1C2E 0%, #12121A 100%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 24px;
  padding: 4rem 3rem;
  text-align: center;
  margin: 0 0 4rem;
}
.downloads-cta h2 { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 0.75rem; }
.downloads-cta p { color: #B0B0C3; font-size: 1rem; max-width: 480px; margin: 0 auto 2rem; }
.cta-action-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
