/* RepoGate Documentation - Main Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --border-color: #e5e7eb;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.25rem;
}

.logo img {
  height: 32px;
  width: auto;
}

nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--primary-color);
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
  padding: 3rem 0;
}

.hero {
  text-align: center;
  margin-bottom: 4rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

/* Documentation Cards */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.doc-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 2rem;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.doc-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.doc-card-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: white;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.doc-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.doc-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.doc-card-link {
  color: var(--primary-color);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.doc-card-link:after {
  content: '→';
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.breadcrumb-separator {
  color: var(--text-secondary);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 500;
}

/* Documentation Page */
.doc-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.doc-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.doc-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.doc-sidebar a {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--text-secondary);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.doc-sidebar a:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
}

.doc-sidebar a.active {
  background: var(--bg-secondary);
  color: var(--primary-color);
  font-weight: 600;
}

.doc-content {
  max-width: 900px;
}

.doc-header {
  margin-bottom: 3rem;
}

.doc-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.doc-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.doc-content h2 {
  font-size: 1.875rem;
  font-weight: 600;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.doc-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.doc-content p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.doc-content ul, .doc-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.doc-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.doc-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.doc-content code {
  background: var(--bg-secondary);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'Monaco', 'Courier New', monospace;
}

.doc-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

.doc-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

.doc-content th,
.doc-content td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.doc-content th {
  font-weight: 600;
  background: var(--bg-secondary);
}

/* IDE Cards */
.ide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.ide-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.ide-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.ide-card img {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: block;
  border: none;
  box-shadow: none;
}

.ide-card h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.ide-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.ide-card-link {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 0.875rem;
}

/* Installation Tabs */
.install-tabs {
  margin: 2rem 0;
}

.tab-buttons {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.tab-button {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.tab-button:hover {
  color: var(--primary-color);
}

.tab-button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Footer */
footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
}

footer .container {
  text-align: center;
}

footer p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .doc-layout {
    grid-template-columns: 200px 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  nav {
    gap: 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .docs-grid {
    grid-template-columns: 1fr;
  }
  
  .doc-header h1 {
    font-size: 1.875rem;
  }
  
  .doc-layout {
    grid-template-columns: 1fr;
  }
  
  .doc-sidebar {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
  }
  
  .doc-sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
