/* ============================================
   KEPLER AEROSPACE — subsystems.css
   Page-specific styles for Explore Subsystems
   ============================================ */

/* Reuses gsaas.css for:
   - .gsaas-hero, .gsaas-hero-inner, .gsaas-hero-content, .gsaas-hero-image
   - .hero-badge
   - .infra-section, .infra-inner, .infra-content, .infra-stack-col
   - .infra-stack-list, .infra-stack-item, .stack-icon, .stack-label
   - .page-label, .section-label, .closing-line
   - .header-border, .header-cta
*/

/* ============================================
   ATTITUDE & NAVIGATION
   ============================================ */
.nav-section {
  padding: clamp(80px, 9vw, 120px) 0;
  background: var(--bg);
}

.nav-section .section-title { margin-bottom: 52px; }
.nav-section .section-title h2 span { color: var(--accent2); }

.nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.nav-card {
  position: relative;
  padding: 34px 26px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  overflow: hidden;
}

/* Top accent line animates in on hover */
.nav-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.nav-card:hover::before { transform: scaleX(1); }

.nav-card:hover {
  background: rgba(35,165,220,0.06);
  border-color: rgba(35,165,220,0.22);
  transform: translateY(-4px);
}

.nav-card-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(35,165,220,0.1);
  border: 1px solid rgba(35,165,220,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--accent);
  margin-bottom: 20px;
  transition: background 0.3s, transform 0.3s;
}
.nav-card:hover .nav-card-icon {
  background: rgba(35,165,220,0.22);
  transform: scale(1.08) rotate(-5deg);
}

.nav-card h3 {
  font-size: 16px; font-weight: 700;
  color: var(--primary); margin-bottom: 10px; line-height: 1.35;
}
.nav-card p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.6; }

/* ============================================
   OBDH
   ============================================ */
.obdh-section {
  padding: clamp(80px, 9vw, 120px) 0;
  background: linear-gradient(88deg, #041E2A, #000);
}

.obdh-section .section-title { margin-bottom: 56px; }
.obdh-section .section-title h2 span { color: var(--accent2); }

.obdh-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: start;
}

/* Image col */
.obdh-image figure {
  border-radius: 4px; overflow: hidden;
  border: 1px solid rgba(35,165,220,0.15);
  margin-bottom: 20px;
}
.obdh-image img {
  width: 100%; aspect-ratio: 1/0.85; object-fit: cover;
  display: block; transition: transform 0.5s ease;
}
.obdh-image figure:hover img { transform: scale(1.04); }

.obdh-caption {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px;
  background: rgba(35,165,220,0.06);
  border: 1px solid rgba(35,165,220,0.18);
  border-left: 2px solid var(--accent);
}
.obdh-caption i { color: var(--accent); font-size: 16px; margin-top: 2px; flex-shrink: 0; }
.obdh-caption span { font-size: 13px; color: rgba(255,255,255,0.7); line-height: 1.6; }

/* Items col */
.obdh-items {
  display: flex; flex-direction: column; gap: 3px;
}

.obdh-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px 22px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.obdh-item:hover {
  background: rgba(35,165,220,0.07);
  border-color: rgba(35,165,220,0.25);
  transform: translateX(4px);
}

.obdh-item-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  background: rgba(35,165,220,0.1);
  border: 1px solid rgba(35,165,220,0.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--accent);
  transition: background 0.3s;
}
.obdh-item:hover .obdh-item-icon { background: rgba(35,165,220,0.22); }

.obdh-item-text h4 {
  font-size: 14px; font-weight: 700;
  color: var(--primary); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.obdh-item-text p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.55; }

/* ============================================
   GROUND SEGMENT ELECTRONICS
   ============================================ */
.ground-section {
  padding: clamp(80px, 9vw, 120px) 0;
  background: var(--bg);
}

.ground-section .section-title { margin-bottom: 52px; }
.ground-section .section-title h2 span { color: var(--accent2); }

.ground-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.ground-card {
  position: relative;
  padding: 36px 28px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

/* Radial glow on hover */
.ground-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at top left, rgba(35,165,220,0.1) 0%, transparent 65%);
  opacity: 0; transition: opacity 0.4s;
}
.ground-card:hover::after { opacity: 1; }

.ground-card:hover {
  background: rgba(35,165,220,0.07);
  border-color: rgba(35,165,220,0.28);
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.25);
}

.ground-card-icon {
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(35,165,220,0.1);
  border: 1px solid rgba(35,165,220,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--accent);
  margin-bottom: 20px;
  transition: background 0.3s, transform 0.3s;
  position: relative; z-index: 1;
}
.ground-card:hover .ground-card-icon {
  background: rgba(35,165,220,0.22);
  transform: scale(1.1);
}

.ground-card h3 {
  font-size: 16px; font-weight: 700;
  color: var(--primary); margin-bottom: 12px; line-height: 1.35;
  position: relative; z-index: 1;
}
.ground-card p {
  font-size: 13px; color: var(--muted); margin: 0; line-height: 1.65;
  position: relative; z-index: 1;
}

/* ============================================
   VALIDATION — TRL Badge
   ============================================ */
.validation-section .section-title h2 span { color: var(--accent2); }

/* Uses infra-section styles from gsaas.css + teal-accent overrides */
.validation-section .infra-stack-item {
  border-left-color: rgba(44,161,153,0.4);
}
.validation-section .infra-stack-item:hover {
  background: rgba(44,161,153,0.08);
  border-left-color: var(--accent2);
}
.validation-section .infra-stack-item .stack-icon {
  background: rgba(44,161,153,0.1);
  color: var(--accent2);
}
.validation-section .infra-stack-item:hover .stack-icon {
  background: rgba(44,161,153,0.22);
}

.trl-badge {
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: 22px;
  padding: 14px 22px;
  background: rgba(44,161,153,0.08);
  border: 1px solid rgba(44,161,153,0.3);
  border-radius: 3px;
}
.trl-num {
  font-size: 22px; font-weight: 800; color: var(--accent2); line-height: 1;
}
.trl-label {
  font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.4;
}

/* ============================================
   ENGINEERING PRINCIPLES — centered, bg image
   ============================================ */
.principles-section {
  position: relative;
  padding: clamp(80px, 9vw, 120px) 0;
  overflow: hidden;
}

/* Background image with dark overlay */
.principles-bg {
  position: absolute; inset: 0; z-index: 0;
  background: url('../images/engineering-principles.webp') center/cover no-repeat;
}
.principles-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    170deg,
    rgba(0,0,0,0.88) 0%,
    rgba(2,10,20,0.92) 60%,
    rgba(0,0,0,0.88) 100%
  );
}

.principles-section .container { position: relative; z-index: 1; }
.principles-section .section-title { margin-bottom: 52px; }
.principles-section .section-title h2 span { color: var(--accent2); }

/* 4-col centered card grid */
.principles-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-bottom: 40px;
}

/* Closing line */
.principles-closing {
  text-align: center;
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  font-style: italic;
  line-height: 1.7;
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 0 0;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.principles-closing strong { color: var(--accent2); font-style: normal; font-weight: 700; }

.principle-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 24px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.principle-card:hover {
  background: rgba(44,161,153,0.07);
  border-color: rgba(44,161,153,0.25);
  transform: translateY(-3px);
}

.principle-card-icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%;
  background: rgba(44,161,153,0.1);
  border: 1px solid rgba(44,161,153,0.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--accent2);
  transition: background 0.3s, transform 0.3s;
}
.principle-card:hover .principle-card-icon {
  background: rgba(44,161,153,0.22);
  transform: scale(1.1);
}

.principle-card-text h4 {
  font-size: 13px; font-weight: 700;
  color: var(--primary); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.3;
}
.principle-card-text p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.55; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
  .nav-grid { grid-template-columns: repeat(2, 1fr); }
  .obdh-inner { grid-template-columns: 1fr; gap: 36px; }
  .obdh-image { max-width: 520px; }
  .ground-grid { grid-template-columns: 1fr 1fr; }
  .principles-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .principles-inner { grid-template-columns: 1fr; gap: 36px; }
  .principles-image { max-width: 520px; }
  .principles-items { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-grid { grid-template-columns: 1fr; }
  .ground-grid { grid-template-columns: 1fr; }
  .principles-cards-grid { grid-template-columns: 1fr; }
  .principles-items { grid-template-columns: 1fr; }
  .obdh-inner { grid-template-columns: 1fr; }
}