/*
 * GCM Documentation Website - Main Styles
 * Built with Arrow Electronics branding
 */

/* Import Arrow theme */
@import url('arrow-theme.css');

/* Import IBM Plex fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ============================================================================
   Layout
   ========================================================================= */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* ============================================================================
   Navigation
   ========================================================================= */

.navbar {
  background-color: var(--white);
  border-bottom: 1px solid var(--gray-20);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  max-width: 1280px;
  margin: 0 auto;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  text-decoration: none;
}

.navbar-logo {
  height: 32px;
  width: auto;
}

.navbar-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--gray-900);
  margin: 0;
}

.navbar-subtitle {
  font-size: var(--text-sm);
  color: var(--gray-600);
  font-weight: var(--font-normal);
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-menu a {
  color: var(--gray-700);
  font-weight: var(--font-medium);
  font-size: var(--text-base);
  transition: color var(--transition-fast);
}

.navbar-menu a:hover {
  color: var(--arrow-blue);
  text-decoration: none;
}

.navbar-menu a.active {
  color: var(--arrow-blue);
  border-bottom: 2px solid var(--arrow-blue);
  padding-bottom: 2px;
}

.navbar-search {
  position: relative;
}

.navbar-search input {
  padding: var(--space-2) var(--space-4);
  padding-left: var(--space-10);
  border: 1px solid var(--gray-30);
  border-radius: 0;
  font-size: var(--text-sm);
  width: 250px;
  transition: all var(--transition-base);
}

.navbar-search input:focus {
  outline: none;
  border-color: var(--link-primary);
  width: 300px;
}

.navbar-search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

.navbar-toggle-icon {
  width: 24px;
  height: 2px;
  background-color: var(--gray-700);
  display: block;
  position: relative;
}

.navbar-toggle-icon::before,
.navbar-toggle-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--gray-700);
  left: 0;
}

.navbar-toggle-icon::before {
  top: -8px;
}

.navbar-toggle-icon::after {
  bottom: -8px;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    padding: var(--space-4);
    border-top: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
  }
  
  .navbar-menu.active {
    display: flex;
  }
  
  .navbar-toggle {
    display: block;
  }
  
  .navbar-search input {
    width: 200px;
  }
  
  .navbar-search input:focus {
    width: 220px;
  }
}

/* ============================================================================
   Hero Section
   ========================================================================= */

.hero {
  background: var(--arrow-blue);
  color: var(--white);
  padding: var(--space-20) var(--space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-4);
  color: var(--white);
}

.hero-subtitle {
  font-size: var(--text-xl);
  margin-bottom: var(--space-8);
  opacity: 0.95;
  line-height: var(--leading-relaxed);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-actions .btn {
  min-width: 180px;
}

.btn-hero-primary {
  background-color: var(--white);
  color: var(--arrow-blue);
  border-color: var(--white);
}

.btn-hero-primary:hover {
  background-color: var(--gray-100);
  border-color: var(--gray-100);
  color: var(--arrow-blue-dark);
}

.btn-hero-secondary {
  background-color: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-hero-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .hero {
    padding: var(--space-12) var(--space-4);
  }
  
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-lg);
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  .hero-image {
    order: -1;
  }
  
  .hero-img {
    max-width: 400px;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: var(--space-4);
  }
}

/* Hero Container and Image */
.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  max-width: 1280px;
  margin: 0 auto;
  align-items: center;
}

.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img {
  width: 100%;
  height: auto;
  max-width: 600px;
  border-radius: var(--radius);
  transition: transform 0.3s ease;
}

.hero-img:hover {
  transform: scale(1.02);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: var(--space-8);
  justify-content: center;
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--white);
  margin-bottom: var(--space-2);
}

.stat-label {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================================
   Features Section
   ========================================================================= */

.features {
  padding: var(--space-16) var(--space-6);
  background-color: var(--gray-10);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
  max-width: 1280px;
  margin: 0 auto;
}

.feature-card {
  background-color: var(--white);
  padding: var(--space-8);
  border-radius: 0;
  transition: background var(--transition-base);
  border: 1px solid var(--gray-20);
}

.feature-card:hover {
  background-color: var(--gray-10);
  border-color: var(--gray-30);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--arrow-blue);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--white);
  font-size: var(--text-2xl);
}

.feature-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-3);
  color: var(--gray-900);
}

.feature-description {
  color: var(--gray-600);
  line-height: var(--leading-relaxed);
  margin-bottom: 0;
}

/* ============================================================================
   Content Section
   ========================================================================= */

.content-section {
  padding: var(--space-16) var(--space-6);
}

.content-section.bg-light {
  background-color: var(--gray-10);
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-12);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-4);
  color: var(--gray-900);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--gray-600);
  line-height: var(--leading-relaxed);
}

/* ============================================================================
   Documentation Layout
   ========================================================================= */

.docs-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: var(--space-8);
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

.docs-sidebar {
  position: sticky;
  top: 80px;
  height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: var(--space-4);
}

.docs-sidebar-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-4);
  color: var(--gray-900);
}

.docs-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-nav li {
  margin-bottom: var(--space-2);
}

.docs-nav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--gray-700);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}

.docs-nav a:hover {
  background-color: var(--gray-100);
  color: var(--arrow-blue);
  text-decoration: none;
}

.docs-nav a.active {
  background-color: var(--arrow-blue);
  color: var(--white);
}

.docs-content {
  max-width: 800px;
}

.docs-content h1,
.docs-content h2,
.docs-content h3,
.docs-content h4 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

.docs-content h1:first-child,
.docs-content h2:first-child {
  margin-top: 0;
}

.docs-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: var(--space-6) 0;
}

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
}

.docs-content th,
.docs-content td {
  padding: var(--space-3);
  border: 1px solid var(--gray-300);
  text-align: left;
}

.docs-content th {
  background-color: var(--gray-100);
  font-weight: var(--font-semibold);
}

@media (max-width: 768px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  
  .docs-sidebar {
    position: static;
    height: auto;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-6);
  }
}

/* ============================================================================
   Footer
   ========================================================================= */

.footer {
  background-color: var(--gray-900);
  color: var(--gray-300);
  padding: var(--space-12) var(--space-6) var(--space-6);
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-section h3 {
  color: var(--white);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: var(--space-2);
}

.footer-section a {
  color: var(--gray-300);
  transition: color var(--transition-fast);
}

.footer-section a:hover {
  color: var(--white);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding-top: var(--space-6);
  text-align: center;
  color: var(--gray-400);
  font-size: var(--text-sm);
}

.footer-logo {
  height: 24px;
  width: auto;
  margin-bottom: var(--space-4);
  filter: brightness(0) invert(1);
}

/* ============================================================================
   Loading States
   ========================================================================= */

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--gray-300);
  border-radius: 50%;
  border-top-color: var(--arrow-blue);
  animation: spin 1s linear infinite;
}

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

.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================================
   Scrollbar Styling
   ========================================================================= */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* ============================================================================
   Print Styles
   ========================================================================= */

@media print {
  .navbar,
  .footer,
  .docs-sidebar,
  #gcm-chat-widget {
    display: none !important;
  }
  
  .docs-content {
    max-width: 100%;
  }
  
  a {
    text-decoration: underline;
  }
  
  a[href^="http"]:after {
    content: " (" attr(href) ")";
  }
}

/* Made with Bob */
