/* Alaigned Documentation Site Styles */

/* CSS Custom Properties - Brand Design Tokens */
:root {
  /* Brand Colors */
  --primary-50: #E8F7F1;
  --primary-100: #D1EFE3;
  --primary-200: #A3DFC7;
  --primary-300: #75CFAB;
  --primary-400: #47AF8E;
  --primary-500: #19A072;
  --primary-600: #118E64;
  --primary-700: #0E7A56;
  --primary-800: #0A6447;
  --primary-900: #074E38;
  
  /* Gray Colors */
  --gray-50: #F5F8F9;
  --gray-100: #EBEDEF;
  --gray-200: #D7DADD;
  --gray-300: #C2C6CB;
  --gray-400: #AEB3B9;
  --gray-500: #999FA7;
  --gray-600: #6C7179;
  --gray-700: #5A5E65;
  --gray-800: #45474B;
  --gray-900: #30323A;
  --gray-950: #1A1C24;
  
  /* Alaigned Brand Colors */
  --alaigned-top-bar: #333531;
  --alaigned-light-gray: #F5F7F8;
  --alaigned-gray-200: #E7EBEF;
  --alaigned-gray-300: #D0D6DF;
  --alaigned-gray-800: #787B88;
  --alaigned-product-labels: #6A7389;
  --alaigned-text: #232426;
  
  /* Typography */
  --font-family-base: 'Host Grotesk', 'Host Grotesk Variable', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  /* Spacing */
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;
  --spacing-20: 5rem;
  
  /* Shadows */
  --shadow-card: 0px 4px 11px 0px rgba(0, 0, 0, 0.06), 0px 0.5px 2.59px 0px rgba(0, 0, 0, 0.05);
  --shadow-sidebar: 0px 100px 80px 0px rgba(0, 0, 0, 0.07), 0px 22px 17px 0px rgba(0, 0, 0, 0.04), 0px 7px 5px 0px rgba(0, 0, 0, 0.03);
}

/* Import Host Grotesk font */
@import url('https://fonts.googleapis.com/css2?family=Host+Grotesk:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap');

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family-base);
  font-size: 0.875rem; /* 14px - body-product */
  line-height: 1.5;
  font-weight: 400;
  color: var(--alaigned-text);
  background-color: var(--gray-50);
  margin: 0;
  padding: 0;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-4);
}

/* Header and Navigation */
header {
  background-color: var(--alaigned-top-bar);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-card);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-4) 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--spacing-4);
  padding-right: var(--spacing-4);
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-brand img {
  height: 32px;
  width: auto;
}

.nav-brand-text {
  color: white;
  font-size: 1.125rem; /* 18px - h3-product */
  font-weight: 500;
  margin-left: var(--spacing-3);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-6);
}

.nav-links a {
  color: var(--gray-200);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem; /* 14px - body-medium */
  transition: color 0.2s ease;
}

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

.nav-links a.active {
  color: var(--primary-300);
}

/* Main Content */
main {
  background-color: white;
  min-height: calc(100vh - 140px);
  padding: var(--spacing-8) 0;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-4);
}

/* Typography */
h1 {
  font-size: 1.875rem; /* 30px - h1-product */
  line-height: normal;
  font-weight: 700;
  color: var(--alaigned-text);
  margin: 0 0 var(--spacing-6) 0;
  border-bottom: 2px solid var(--primary-100);
  padding-bottom: var(--spacing-3);
}

h2 {
  font-size: 1.375rem; /* 22px - h2-product */
  line-height: 1.5;
  font-weight: 700;
  color: var(--alaigned-text);
  margin: var(--spacing-8) 0 var(--spacing-4) 0;
}

h3 {
  font-size: 1.125rem; /* 18px - h3-product */
  line-height: 1.5;
  font-weight: 400;
  color: var(--alaigned-text);
  margin: var(--spacing-6) 0 var(--spacing-3) 0;
}

h4 {
  font-size: 0.9375rem; /* 15px - h4-product */
  line-height: 1.333;
  font-weight: 700;
  color: var(--alaigned-text);
  margin: var(--spacing-4) 0 var(--spacing-2) 0;
}

p {
  margin: 0 0 var(--spacing-4) 0;
  color: var(--alaigned-text);
}

/* Links */
a {
  color: var(--primary-600);
  text-decoration: none;
}

a:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

/* Lists */
ul, ol {
  margin: 0 0 var(--spacing-4) 0;
  padding-left: var(--spacing-5);
}

li {
  margin-bottom: var(--spacing-1);
}

/* Code */
code {
  background-color: var(--gray-100);
  color: var(--gray-800);
  padding: var(--spacing-1) var(--spacing-2);
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem; /* 12px - body-caption */
}

pre {
  background-color: var(--gray-100);
  padding: var(--spacing-4);
  border-radius: 8px;
  overflow-x: auto;
  margin: var(--spacing-4) 0;
}

pre code {
  background: none;
  padding: 0;
}

/* Cards and Content Blocks */
.changelog-entry {
  background-color: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: var(--spacing-6);
  margin-bottom: var(--spacing-6);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease;
}

.changelog-entry:hover {
  box-shadow: var(--shadow-sidebar);
}

.changelog-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-4);
  margin-bottom: var(--spacing-4);
  padding-bottom: var(--spacing-3);
  border-bottom: 1px solid var(--gray-100);
}

.changelog-version {
  background-color: var(--primary-50);
  color: var(--primary-700);
  padding: var(--spacing-1) var(--spacing-3);
  border-radius: 20px;
  font-size: 0.75rem; /* 12px - body-caption */
  font-weight: 600;
}

.changelog-date {
  color: var(--alaigned-product-labels);
  font-size: 0.75rem; /* 12px - body-caption */
}

/* Section Lists */
.section-list {
  display: grid;
  gap: var(--spacing-4);
  margin-top: var(--spacing-4);
}

.section-item {
  background-color: var(--alaigned-light-gray);
  border: 1px solid var(--alaigned-gray-200);
  border-radius: 8px;
  padding: var(--spacing-4);
  transition: border-color 0.2s ease;
}

.section-item:hover {
  border-color: var(--primary-300);
}

.section-item h3 {
  margin-top: 0;
  margin-bottom: var(--spacing-2);
}

/* Breadcrumb Navigation */
.breadcrumb {
  background-color: var(--alaigned-light-gray);
  padding: var(--spacing-3) 0;
  margin-bottom: var(--spacing-6);
  border-radius: 8px;
}

.breadcrumb-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-4);
}

.breadcrumb a {
  color: var(--alaigned-product-labels);
  font-size: 0.75rem; /* 12px - body-caption */
}

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

/* Footer */
footer {
  background-color: var(--alaigned-top-bar);
  color: var(--gray-300);
  text-align: center;
  padding: var(--spacing-8) 0;
  margin-top: var(--spacing-16);
}

footer p {
  margin: 0;
  font-size: 0.75rem; /* 12px - body-caption */
}

footer a {
  color: var(--primary-300);
}

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

/* Responsive Design */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: var(--spacing-4);
    padding: var(--spacing-4);
  }
  
  .nav-links {
    gap: var(--spacing-4);
  }
  
  h1 {
    font-size: 1.625rem; /* 26px - h1-content */
  }
  
  h2 {
    font-size: 1.375rem; /* 22px - h2-content */
  }
  
  .changelog-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-2);
  }
}

@media (max-width: 480px) {
  .container,
  .content-wrapper,
  .breadcrumb-content {
    padding-left: var(--spacing-2);
    padding-right: var(--spacing-2);
  }
  
  .changelog-entry {
    padding: var(--spacing-4);
  }
  
  h1 {
    font-size: 1.375rem; /* 22px */
  }
}

/* Image Styling for Content */
.page-content img {
  max-width: 80%;
  height: auto;
  display: block;
  margin: 2rem 0;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease;
}

.page-content img:hover {
  box-shadow: var(--shadow-sidebar);
}

/* Side-by-side Images Shortcode */
.side-by-side-images {
  display: flex;
  gap: var(--spacing-4);
  margin: var(--spacing-8) 0;
  align-items: flex-start;
  justify-content: flex-start;
}

.side-by-side-image {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.side-by-side-image img {
  height: auto;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease;
  margin: 0;
}

.side-by-side-image img:hover {
  box-shadow: var(--shadow-sidebar);
}

.image-caption {
  text-align: center;
  font-size: 0.75rem; /* 12px - body-caption */
  color: var(--alaigned-product-labels);
  margin-top: var(--spacing-2);
  margin-bottom: 0;
  font-style: italic;
}

.content-wrapper img.inline-icon {
  display: inline-block;
  vertical-align: middle;
/*  width: 24px;
  height: 24px;*/
  margin: 0 0.2rem;
  border: none;
  box-shadow: none;
}


/* Responsive behavior for side-by-side images */
@media (max-width: 768px) {
  .side-by-side-images {
    flex-direction: column;
    gap: var(--spacing-6);
  }
  
  .side-by-side-image img {
    max-width: 90%;
    margin: 0 auto;
    display: block;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--alaigned-product-labels);
}

.mb-0 {
  margin-bottom: 0;
}

.mt-0 {
  margin-top: 0;
}

/* Search functionality styling (if enabled) */
.search-container {
  position: relative;
  margin-bottom: var(--spacing-6);
}

.search-input {
  width: 100%;
  padding: var(--spacing-3) var(--spacing-4);
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-family: var(--font-family-base);
  font-size: 0.875rem;
  background-color: white;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}

.search-result-item {
  padding: var(--spacing-3) var(--spacing-4);
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
}

.search-result-item:hover {
  background-color: var(--primary-50);
}

.search-result-item:last-child {
  border-bottom: none;
}
