/* Custom styles for Hooked API documentation */

/* Top bar styling */
.top-bar {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.top-bar a {
  color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Text navigation links */
.top-bar .text-link {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.top-bar .text-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

/* Icon buttons (GitHub, downloads) */
.top-bar a:not(.text-link) {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.top-bar a:not(.text-link):hover {
  color: white;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.top-bar svg {
  fill: currentColor;
}

/* Make the top bar responsive */
@media screen and (max-width: 768px) {
  .top-bar {
    top: 0.5rem;
    right: 0.5rem;
    gap: 0.4rem;
  }
  
  .top-bar .text-link {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }
  
  .top-bar a:not(.text-link) {
    width: 32px;
    height: 32px;
  }
  
  .top-bar svg {
    width: 18px;
    height: 18px;
  }
}

/* On very small screens, stack the navigation */
@media screen and (max-width: 500px) {
  .top-bar {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
  }
  
  .top-bar .text-link {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* Enhanced header */
.page-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1.5rem 2rem;
}

.project-name {
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.project-tagline {
  opacity: 0.95;
  font-size: 1.25rem;
  margin-bottom: 0;
}

/* Better buttons */
.btn {
  border-radius: 6px;
  font-weight: 600;
  text-transform: none;
  font-size: 1.1rem;
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease-in-out;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Enhanced code blocks */
.language-javascript {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

pre {
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
}

code {
  font-size: 0.9em;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* Feature grid styling */
h3 {
  color: #2c3e50;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

h4 {
  color: #34495e;
  margin-bottom: 0.4rem;
  margin-top: 1rem;
}

/* Links */
a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Main content adjustments */
.main-content {
  max-width: 1200px;
  font-size: 1.05rem;
  line-height: 1.6;
  padding: 2rem 2rem 1rem;
}

.main-content h1 {
  color: #2c3e50;
  font-weight: 700;
  border-bottom: 3px solid #667eea;
  padding-bottom: 0.4rem;
  margin-bottom: 1.25rem;
  margin-top: 1.5rem;
}

.main-content h2 {
  color: #34495e;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Blockquotes for testimonials */
blockquote {
  border-left: 4px solid #667eea;
  padding-left: 1.25rem;
  font-style: italic;
  color: #586069;
  margin: 1.25rem 0;
  background: #f8f9fa;
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
}

blockquote p {
  margin: 0;
}

blockquote em {
  display: block;
  text-align: right;
  font-size: 0.9em;
  margin-top: 0.5rem;
  color: #667eea;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .page-header {
    padding: 1.25rem 1rem;
  }
  
  .project-name {
    font-size: 1.75rem;
    margin-bottom: 0.3rem;
  }
  
  .project-tagline {
    font-size: 1rem;
  }
  
  .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }
}

/* Custom divs in the content */
div[style*="background: #f8f9fa"] {
  border: 1px solid #e1e4e8;
}

div[style*="background: #e8f5e9"],
div[style*="background: #e3f2fd"],
div[style*="background: #fff3e0"],
div[style*="background: #fce4ec"] {
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

div[style*="background: #e8f5e9"]:hover,
div[style*="background: #e3f2fd"]:hover,
div[style*="background: #fff3e0"]:hover,
div[style*="background: #fce4ec"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Footer styling */
.site-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e1e4e8;
}

/* Syntax highlighting improvements */
.highlight {
  background: #f6f8fa;
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
}

.highlight .k { color: #d73a49; } /* keywords */
.highlight .s1, .highlight .s2 { color: #032f62; } /* strings */
.highlight .c1 { color: #6a737d; } /* comments */
.highlight .n { color: #005cc5; } /* names */
.highlight .o { color: #d73a49; } /* operators */

/* Additional vertical space reduction */
p {
  margin-bottom: 1rem;
}

ul, ol {
  margin-bottom: 1rem;
}

pre {
  margin: 1rem 0;
}

.main-content > *:first-child {
  margin-top: 0 !important;
}

/* Reduce spacing in feature boxes */
div[style*="padding: 2rem"] {
  padding: 1.25rem !important;
}

/* Reduce spacing between code blocks and text */
.highlight + p,
pre + p {
  margin-top: 1rem;
}

/* Tighter spacing for lists */
li {
  margin-bottom: 0.25rem;
}

li:last-child {
  margin-bottom: 0;
}

/* Documentation card hover effects */
a[href$=".html"][style*="display: block"] {
  transition: all 0.2s ease !important;
}

a[href$=".html"][style*="display: block"]:hover {
  border-color: #0366d6 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-decoration: none !important;
}

a[href$=".html"][style*="display: block"] h3 {
  transition: color 0.2s ease;
}

a[href$=".html"][style*="display: block"]:hover h3 {
  color: #764ba2 !important;
}