/* ===== OPENPIV WEBSITE STYLES ===== */
/* Bootstrap 5.3 Compatible */

/* Global Styles */
body { 
  padding-top: 70px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
  line-height: 1.6;
}

.content-wrapper {
  min-height: calc(100vh - 250px);
}

/* Navigation */
.navbar {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.5rem;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #667eea !important;
}

.nav-link i {
  margin-right: 5px;
}

.dropdown-item i {
  margin-right: 8px;
  width: 16px;
}

@media (max-width: 991px) {
  .navbar-nav {
    padding: 20px 0;
  }
  
  .nav-link {
    padding: 10px 0 !important;
  }
}

/* Hero Banner (Homepage) */
.hero-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  margin: -20px 0 0 0;
}

.hero-banner h1 {
  color: white;
}

.hero-banner .btn-primary {
  background-color: white;
  color: #667eea;
  border-color: white;
}

.hero-banner .btn-primary:hover {
  background-color: #f8f9fa;
  border-color: #f8f9fa;
}

.hero-banner .btn-outline-primary {
  color: white;
  border-color: white;
}

.hero-banner .btn-outline-primary:hover {
  background-color: rgba(255,255,255,0.2);
  color: white;
}

/* Page Header */
.page-header h2 {
  color: #333;
  font-weight: 600;
  border-bottom: 3px solid #667eea;
  padding-bottom: 10px;
}

/* Software Package Cards */
.software-card {
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
}

.software-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.software-card .card-header {
  border-bottom: none;
  padding: 1.5rem;
}

.software-card .card-header h4 {
  margin: 0;
  font-size: 1.5rem;
  display: inline-block;
}

.software-card .card-header i {
  margin-right: 8px;
}

.software-card .card-header .badge {
  float: right;
  margin-top: 5px;
}

.software-card .card-body {
  padding: 1.5rem;
}

.feature-list li {
  padding: 5px 0;
}

.feature-list i {
  margin-right: 8px;
}

.github-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.github-stats img {
  height: 20px;
}

/* List Groups */
.list-group-item {
  border-left: 4px solid transparent;
  transition: all 0.2s;
}

.list-group-item:hover {
  border-left-color: #667eea;
  background-color: #f8f9fa;
}

.list-group-item h5 {
  color: #333;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.list-group-item h5 i {
  margin-right: 10px;
  color: #667eea;
}

/* Fix alignment for list group items with varying content */
.list-group-item .d-flex {
  align-items: flex-start !important;
}

.list-group-item .d-flex > div:first-child {
  flex: 1;
  min-height: 0;
}

.list-group-item .badge {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.25rem;
}

.list-group-item p {
  margin-bottom: 0.5rem;
}

.list-group-item small {
  display: block;
  margin-top: 0.25rem;
  color: #6c757d;
}

/* Info Sections */
.info-section {
  background-color: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
  margin: 30px 0;
}

.platform-section {
  padding: 20px;
  background-color: #fff;
  border-left: 4px solid #667eea;
  border-radius: 4px;
  margin-bottom: 20px;
}

.platform-section h3,
.platform-section h4 {
  color: #333;
  font-weight: 600;
}

/* Footer */
.footer {
  background-color: #212529 !important;
  margin-top: auto;
}

.footer h5 {
  color: #fff;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer a {
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  color: #667eea !important;
}

.footer i {
  margin-right: 5px;
}

/* Responsive iframe */
iframe {
  max-width: 100%;
  border: 0;
  overflow: hidden;
}

/* Alerts */
.alert {
  border-radius: 8px;
}

.alert h5 {
  margin-bottom: 10px;
  font-weight: 600;
}

.alert i {
  margin-right: 8px;
}

/* Badges */
.badge {
  font-weight: 500;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
}

/* Buttons */
.btn {
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn i {
  margin-right: 5px;
}

.btn-primary {
  background-color: #667eea;
  border-color: #667eea;
}

.btn-primary:hover {
  background-color: #5568d3;
  border-color: #5568d3;
}

.btn-outline-primary {
  color: #667eea;
  border-color: #667eea;
}

.btn-outline-primary:hover {
  background-color: #667eea;
  border-color: #667eea;
  color: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  body {
    padding-top: 60px;
  }
  
  .hero-banner h1 {
    font-size: 2rem;
  }
  
  .software-card {
    margin-bottom: 20px;
  }
}

/* ===== PHASE 3B: UX ENHANCEMENTS ===== */

/* Search Modal */
#searchResultsModal mark {
  background-color: #fff3cd;
  padding: 2px 4px;
  border-radius: 3px;
}

/* FAQ Accordion */
.accordion-button {
  font-weight: 600;
  padding: 1.25rem 1.5rem;
}

.accordion-button:not(.collapsed) {
  background-color: #667eea;
  color: white;
}

.accordion-button i {
  margin-right: 8px;
}

.accordion-body h6 {
  color: #667eea;
  font-weight: 600;
  margin-top: 15px;
}

.accordion-body code {
  background-color: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  color: #d63384;
}

.accordion-body pre {
  background-color: #2d2d2d;
  color: #f8f8f2;
  padding: 12px;
  border-radius: 5px;
}

.accordion-body pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* Quick Start Steps */
.step-card {
  display: flex;
  gap: 30px;
  margin-bottom: 40px;
  padding: 30px;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border-radius: 12px;
  border-left: 5px solid #667eea;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s;
}

.step-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.step-number {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
}

.step-content h3 {
  color: #333;
  font-weight: 600;
  margin-bottom: 15px;
}

/* Code Blocks with Copy */
.code-block {
  position: relative;
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 20px;
  padding-right: 70px;
  border-radius: 8px;
  margin: 15px 0;
  overflow-x: auto;
}

.code-block pre,
.code-block code {
  background: transparent;
  color: inherit;
  margin: 0;
  padding: 0;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #667eea;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: #5568d3;
}

/* Next Steps Cards */
.next-steps {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid #e0e0e0;
}

.next-step-card {
  text-align: center;
  padding: 40px 30px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  height: 100%;
  transition: all 0.3s;
}

.next-step-card:hover {
  border-color: #667eea;
  box-shadow: 0 8px 20px rgba(102,126,234,0.15);
  transform: translateY(-5px);
}

.next-step-card i {
  font-size: 3rem;
  color: #667eea;
  margin-bottom: 20px;
}

.next-step-card h4 {
  font-weight: 600;
  margin-bottom: 15px;
}

/* Tabs */
.nav-tabs .nav-link {
  border: none;
  color: #666;
  font-weight: 500;
}

.nav-tabs .nav-link.active {
  color: #667eea;
  border-bottom: 3px solid #667eea;
  background: transparent;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .step-card {
    flex-direction: column;
    text-align: center;
  }
  
  .step-number {
    margin: 0 auto 20px;
  }
  
  .copy-btn {
    position: static;
    display: block;
    width: 100%;
    margin-top: 10px;
  }
  
  .code-block {
    padding-right: 20px;
  }
}

/* ===== PHASE 4: PERFORMANCE OPTIMIZATIONS ===== */

/* Hardware acceleration for animations - only on hover/active states */
.software-card:hover,
.step-card:hover,
.next-step-card:hover,
.list-group-item:hover {
  will-change: transform;
}

.software-card,
.step-card,
.next-step-card,
.list-group-item {
  transform: translateZ(0);
}

/* Optimize font loading */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Optimize repaints */
.navbar,
.footer {
  contain: layout style paint;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 3px solid #667eea;
  outline-offset: 2px;
}

/* Skip to main content link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #667eea;
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Print styles */
@media print {
  .navbar,
  .footer,
  .copy-btn,
  #site-search-input,
  #site-search-button {
    display: none !important;
  }
  
  body {
    padding-top: 0;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
  }
}
