/* ========================================
   Nexus Documentation - Custom Styles
   Beautiful, modern, and production-ready
   ======================================== */

:root {
  /* Brand colors - matching logo gradient */
  --nexus-cyan: #4FC3F7;
  --nexus-blue: #5C6BC0;
  --nexus-purple: #AB47BC;
  --nexus-pink: #EC407A;
  --nexus-orange: #FF7043;

  /* Primary colors */
  --nexus-primary: #5C6BC0;
  --nexus-primary-light: #7986CB;
  --nexus-primary-dark: #3949AB;
  --nexus-accent: #AB47BC;

  /* Utility colors */
  --nexus-green: #66BB6A;
  --nexus-red: #EF5350;

  /* Gradients - matching logo */
  --gradient-primary: linear-gradient(135deg, #4FC3F7 0%, #5C6BC0 50%, #AB47BC 100%);
  --gradient-hero: linear-gradient(135deg, #4FC3F7 0%, #5C6BC0 25%, #AB47BC 75%, #EC407A 100%);
  --gradient-accent: linear-gradient(135deg, #FF7043 0%, #EC407A 50%, #AB47BC 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-section {
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.1) 0%, rgba(92, 107, 192, 0.1) 25%, rgba(171, 71, 188, 0.1) 75%, rgba(236, 64, 122, 0.05) 100%);
  padding: 5rem 2rem;
  margin: -2rem -2rem 4rem -2rem;
  text-align: center;
  border-bottom: 2px solid transparent;
  border-image: var(--gradient-primary) 1;
  position: relative;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border: none;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: #555;
}

.hero-description {
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  color: #666;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.hero-cta {
  font-size: 1.1rem !important;
  padding: 0.75rem 2rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  transition: all 0.2s ease !important;
  background: var(--gradient-primary) !important;
  color: white !important;
  border: none !important;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(92, 107, 192, 0.4) !important;
  filter: brightness(1.1);
}

.hero-secondary {
  font-size: 1.1rem !important;
  padding: 0.75rem 2rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  transition: all 0.2s ease !important;
  border: 2px solid transparent !important;
  background: white !important;
  background-clip: padding-box !important;
  position: relative !important;
  color: var(--nexus-blue) !important;
}

.hero-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 8px;
  padding: 2px;
  background: var(--gradient-primary);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-secondary:hover {
  transform: translateY(-2px);
  background: var(--gradient-primary) !important;
  color: white !important;
}

/* ========================================
   FEATURE CARDS
   ======================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-card {
  background: var(--gradient-card);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.05);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transition: transform var(--transition-base);
  border-radius: 12px 0 0 12px;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
  transform: scaleY(1);
}

.feature-card h3 {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.75rem !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feature-card h3 .twemoji,
.feature-card h3 svg {
  width: 1.5rem;
  height: 1.5rem;
}

.feature-card p {
  color: #555;
  line-height: 1.6;
  margin: 0;
}

/* ========================================
   BENEFITS GRID
   ======================================== */

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0;
}

.benefit-card {
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  border-top: 4px solid transparent;
}

.benefit-card:nth-child(1) { border-top-color: #5C6BC0; }
.benefit-card:nth-child(2) { border-top-color: #EC407A; }
.benefit-card:nth-child(3) { border-top-color: #AB47BC; }
.benefit-card:nth-child(4) { border-top-color: #66BB6A; }
.benefit-card:nth-child(5) { border-top-color: #42A5F5; }
.benefit-card:nth-child(6) { border-top-color: #FF7043; }

.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.benefit-card h3 {
  font-size: 1.3rem !important;
  margin-bottom: 1rem !important;
  color: #333 !important;
  font-weight: 700 !important;
}

.benefit-card p {
  color: #666;
  line-height: 1.7;
  margin: 0;
  font-size: 0.95rem;
}

@media screen and (max-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .benefits-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   VALUE PROPOSITIONS - v2.0 updated
   ======================================== */

.value-props {
  background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
  padding: 4rem 5%;
  border-radius: 16px;
  margin: 3rem 0;
  box-shadow: var(--shadow-md);
}

.value-props h2 {
  text-align: center;
  font-size: 2.5rem !important;
  color: var(--nexus-primary) !important;
  margin-bottom: 3rem !important;
}

.value-prop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
  margin-top: 2rem;
  width: 100%;
  max-width: none;
}

.value-prop {
  padding: 3rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border-left: 4px solid transparent;
  min-height: 200px;
  width: 100%;
  min-width: 400px;
}

.value-prop:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-left-color: var(--nexus-primary);
}

.value-prop h4 {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.3rem !important;
  margin-bottom: 1.25rem !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.4;
}

.value-prop p {
  color: #555;
  line-height: 1.8;
  margin: 0;
  font-size: 1.05rem;
  max-width: 100%;
}

/* ========================================
   STATS GRID
   ======================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.stat-card {
  text-align: center;
  padding: 2rem;
  background: var(--gradient-primary);
  color: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.stat-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.stat-card h3 {
  font-size: 3rem !important;
  font-weight: 800 !important;
  color: white !important;
  margin: 0 !important;
  border: none !important;
}

.stat-card p {
  font-size: 1rem;
  margin: 0.5rem 0 0 0;
  opacity: 0.95;
  font-weight: 600;
}

/* ========================================
   EXAMPLE CARDS
   ======================================== */

.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 2.5rem;
  margin: 3rem 0;
}

.example-card {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.08);
  transition: all var(--transition-base);
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.example-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.example-card h3 {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.3rem !important;
  margin-bottom: 1rem !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700 !important;
}

.example-card > p {
  color: #666;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.example-card pre {
  margin: 0 !important;
  border-radius: 8px !important;
  padding: 1.5rem !important;
  flex-grow: 1;
  background: #f8f9fa !important;
  overflow-x: auto;
}

.example-card pre code {
  padding: 0 !important;
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre;
}

/* ========================================
   COMPARISON TABLE
   ======================================== */

.comparison-table table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.comparison-table thead {
  background: var(--gradient-primary) !important;
}

.comparison-table th {
  color: white !important;
  font-weight: 700 !important;
  padding: 1rem !important;
  text-align: center !important;
}

.comparison-table td {
  text-align: center !important;
  padding: 1rem !important;
  border-bottom: 1px solid #e0e0e0;
}

.comparison-table td:first-child {
  font-weight: 600;
  text-align: left !important;
  background: #f8f9fa;
}

.comparison-table tbody tr:hover {
  background: #f0f7ff !important;
}

/* ========================================
   CTA SECTION
   ======================================== */

.cta-section {
  text-align: center;
  padding: 4rem 3rem;
  background: linear-gradient(135deg, rgba(79, 195, 247, 0.08) 0%, rgba(92, 107, 192, 0.08) 50%, rgba(171, 71, 188, 0.08) 100%);
  border-radius: 16px;
  margin: 3rem 0;
  border: 2px solid transparent;
  border-image: var(--gradient-primary) 1;
}

.cta-description {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #555;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section h2 {
  font-size: 2.5rem !important;
  color: var(--nexus-primary) !important;
  margin-bottom: 2rem !important;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.cta-buttons p {
  margin: 0;
  display: inline-block;
}

.cta-large {
  font-size: 1.1rem !important;
  padding: 0.9rem 2rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  box-shadow: var(--shadow-md) !important;
  transition: all var(--transition-base) !important;
  background: var(--gradient-primary) !important;
  color: white !important;
  border: none !important;
}

.cta-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(92, 107, 192, 0.4) !important;
  filter: brightness(1.1);
}

/* ========================================
   FOOTER LINKS
   ======================================== */

.footer-links {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 2px solid #e0e0e0;
  width: 100%;
  max-width: 100%;
  clear: both;
  display: block;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 100%;
  max-width: 100%;
}

@media screen and (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-grid strong {
  color: var(--nexus-primary);
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.75rem;
}

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

.footer-grid li {
  margin: 0.5rem 0;
}

/* ========================================
   FEATURE SPOTLIGHT
   ======================================== */

.feature-spotlight {
  margin: 3rem 0;
}

.feature-spotlight .admonition {
  border-left: 4px solid var(--nexus-green) !important;
  background: linear-gradient(145deg, #f1f8f4 0%, #ffffff 100%) !important;
}

/* ========================================
   IMPROVED CONTENT STYLING
   ======================================== */

.md-content {
  max-width: 100% !important;
  padding-bottom: 2rem;
}

.md-content__inner {
  max-width: 1400px !important;
  margin: 0 auto;
  min-height: auto;
}

/* Add spacing between major sections */
.md-content > h2 {
  margin-top: 3rem !important;
  margin-bottom: 2rem !important;
}

/* Fix content height to prevent infinite scroll */
.md-main__inner {
  min-height: auto;
}

.md-typeset h1 {
  font-weight: 700;
  color: var(--nexus-primary);
  border-bottom: 3px solid var(--nexus-primary);
  padding-bottom: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
}

.md-typeset h2 {
  font-weight: 600;
  color: var(--nexus-accent);
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0.3rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.md-typeset h3 {
  font-weight: 600;
  color: var(--nexus-blue);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Code block styling */
.md-typeset pre {
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: var(--shadow-sm);
  padding: 1rem !important;
  margin: 1rem 0 !important;
}

.md-typeset code {
  background-color: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--nexus-primary);
  font-weight: 500;
}

.md-typeset pre code {
  background-color: transparent;
  padding: 1rem;
  color: inherit;
  font-weight: 400;
  display: block;
}

/* Table styling */
.md-typeset table {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.md-typeset table thead {
  background: var(--gradient-primary);
  color: white;
}

.md-typeset table th {
  font-weight: 600;
  padding: 0.75rem;
  color: white !important;
}

.md-typeset table td {
  padding: 0.75rem;
}

.md-typeset table tbody tr:nth-child(odd) {
  background-color: #fafafa;
}

.md-typeset table tbody tr:hover {
  background-color: #f0f7ff;
}

/* Admonition styling */
.md-typeset .admonition {
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  margin: 1.5rem 0;
  border: none;
}

.md-typeset .admonition.note {
  border-left: 4px solid var(--nexus-blue);
}

.md-typeset .admonition.warning {
  border-left: 4px solid var(--nexus-orange);
}

.md-typeset .admonition.tip {
  border-left: 4px solid var(--nexus-green);
}

.md-typeset .admonition.danger {
  border-left: 4px solid var(--nexus-red);
}

/* Link styling */
.md-typeset a {
  color: var(--nexus-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom var(--transition-fast);
}

.md-typeset a:hover {
  border-bottom: 1px solid var(--nexus-blue);
}

/* Navigation improvements */
.md-tabs {
  background: var(--gradient-primary);
  box-shadow: var(--shadow-md);
}

/* Footer styling */
.md-footer {
  background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
}

/* Tab styling */
.tabbed-set {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 2rem 0;
  background: white;
}

.tabbed-labels {
  background: #f8f9fa;
}

.tabbed-labels > label {
  font-weight: 600;
  transition: all var(--transition-fast);
}

.tabbed-labels > label:hover {
  background: rgba(94, 53, 177, 0.1);
}

.tabbed-content {
  padding: 1rem;
}

.tabbed-block pre {
  margin: 0.5rem 0 !important;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media screen and (max-width: 1024px) {
  .value-prop-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media screen and (max-width: 768px) {
  .hero-section {
    padding: 3rem 1.5rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .features-grid,
  .value-prop-grid,
  .stats-grid,
  .example-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-buttons,
  .cta-buttons {
    flex-direction: column;
  }

  .md-typeset h1 {
    font-size: 1.8rem;
  }

  .md-typeset h2 {
    font-size: 1.5rem;
  }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Selection styling */
::selection {
  background: var(--nexus-primary);
  color: white;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--nexus-primary);
  outline-offset: 2px;
}

/* ========================================
   LOGO FIXES
   ======================================== */

/* Fix logo white background and alignment */
.md-header__button.md-logo img,
.md-logo img {
  mix-blend-mode: multiply;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  vertical-align: middle;
}

/* Fix header logo alignment */
.md-header__button.md-logo {
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
}

/* Align logo with Nexus text in sidebar */
.md-nav__button.md-logo {
  display: flex;
  align-items: center;
  padding: 0;
}

.md-nav__button.md-logo img {
  width: 2.5rem;
  height: 2.5rem;
  vertical-align: middle;
}

/* Fix header title alignment */
.md-header__title {
  display: flex;
  align-items: center;
}
