/* =============================================================================
   KubeIntellect Documentation — Custom Theme
   Material for MkDocs overrides and enhancements
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. Color Palette — Kubernetes Blue (#326CE5) + Cyan accent
   ----------------------------------------------------------------------------- */

[data-md-color-primary="custom"] {
  --md-primary-fg-color:        #326CE5;
  --md-primary-fg-color--light: #5B8FF9;
  --md-primary-fg-color--dark:  #1A56C4;
  --md-primary-bg-color:        #FFFFFF;
  --md-primary-bg-color--light: rgba(255, 255, 255, 0.70);
}

[data-md-color-accent="custom"] {
  --md-accent-fg-color:              #00BCD4;
  --md-accent-fg-color--transparent: rgba(0, 188, 212, 0.10);
  --md-accent-bg-color:              #FFFFFF;
  --md-accent-bg-color--light:       rgba(255, 255, 255, 0.70);
}

/* Dark mode */
[data-md-color-scheme="slate"] {
  --md-hue: 220;
}

[data-md-color-scheme="slate"][data-md-color-primary="custom"] {
  --md-primary-fg-color:        #5B8FF9;
  --md-primary-fg-color--light: #7BA7FB;
  --md-primary-fg-color--dark:  #326CE5;
  --md-primary-bg-color:        #FFFFFF;
}

/* -----------------------------------------------------------------------------
   2. Hero Section (Home Page)
   ----------------------------------------------------------------------------- */

.hero-section {
  text-align: center;
  padding: 4rem 2rem 3.5rem;
  background: linear-gradient(135deg, #EEF4FF 0%, #F5F9FF 50%, #EAF6FB 100%);
  border-radius: 16px;
  margin-bottom: 2.5rem;
  border: 1px solid rgba(50, 108, 229, 0.12);
}

[data-md-color-scheme="slate"] .hero-section {
  background: linear-gradient(
    135deg,
    rgba(50, 108, 229, 0.12) 0%,
    rgba(91, 143, 249, 0.08) 50%,
    rgba(0, 188, 212, 0.06) 100%
  );
  border-color: rgba(91, 143, 249, 0.20);
}

.hero-section h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #326CE5 30%, #00BCD4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.hero-section > .md-typeset p:first-of-type {
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 680px;
  margin: 0 auto 1.75rem;
  opacity: 0.88;
}

.hero-cta {
  margin: 0.35rem !important;
}

/* Badge row */
.hero-section p img {
  margin: 0 0.2rem;
  vertical-align: middle;
}

/* -----------------------------------------------------------------------------
   3. Feature Cards — Hover Lift Effect
   ----------------------------------------------------------------------------- */

.md-typeset .grid.cards > :is(ul, ol) > li {
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 12px;
  transition:
    transform 0.20s ease,
    box-shadow 0.20s ease,
    border-color 0.20s ease;
}

.md-typeset .grid.cards > :is(ul, ol) > li:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(50, 108, 229, 0.14);
  border-color: var(--md-primary-fg-color);
}

/* Card heading color */
.md-typeset .grid.cards > :is(ul, ol) > li > p strong a {
  color: var(--md-primary-fg-color);
}

/* -----------------------------------------------------------------------------
   4. Code Blocks
   ----------------------------------------------------------------------------- */

.md-typeset pre {
  border-radius: 10px;
}

.md-typeset pre > code {
  border-radius: 10px;
  font-size: 0.83em;
}

/* Copy button polish */
.md-code__content .md-clipboard {
  border-radius: 6px;
}

/* -----------------------------------------------------------------------------
   5. Mermaid Diagram Container
   ----------------------------------------------------------------------------- */

.md-typeset .mermaid {
  background: var(--md-code-bg-color);
  border-radius: 12px;
  padding: 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--md-default-fg-color--lightest);
  margin: 1.5rem 0;
  text-align: center;
}

.md-typeset .mermaid svg {
  max-width: 100%;
  height: auto;
}

/* -----------------------------------------------------------------------------
   6. Tables
   ----------------------------------------------------------------------------- */

.md-typeset table:not([class]) {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset table:not([class]) th {
  background-color: var(--md-primary-fg-color);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.md-typeset table:not([class]) tr:nth-child(even) td {
  background-color: rgba(50, 108, 229, 0.03);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:nth-child(even) td {
  background-color: rgba(91, 143, 249, 0.06);
}

/* -----------------------------------------------------------------------------
   7. Admonitions — Kubernetes blue for tip/info
   ----------------------------------------------------------------------------- */

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-color: var(--md-primary-fg-color);
}

.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary {
  background-color: rgba(50, 108, 229, 0.08);
}

.md-typeset .tip > .admonition-title::before,
.md-typeset .tip > summary::before {
  background-color: var(--md-primary-fg-color);
  -webkit-mask-image: var(--md-admonition-icon--tip);
  mask-image: var(--md-admonition-icon--tip);
}

/* -----------------------------------------------------------------------------
   8. Navigation
   ----------------------------------------------------------------------------- */

/* Bolder active nav item */
.md-nav__item--active > .md-nav__link {
  font-weight: 600;
}

/* Tabs active indicator */
.md-tabs__link--active {
  border-bottom: 2px solid var(--md-primary-fg-color);
  font-weight: 600;
}

/* -----------------------------------------------------------------------------
   9. Announcement Banner (if used)
   ----------------------------------------------------------------------------- */

.md-banner {
  background-color: var(--md-primary-fg-color);
  color: #fff;
  font-weight: 500;
}

.md-banner a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* -----------------------------------------------------------------------------
   10. Footer
   ----------------------------------------------------------------------------- */

.md-footer {
  border-top: 1px solid var(--md-default-fg-color--lightest);
}

.md-footer-meta {
  background-color: rgba(50, 108, 229, 0.06);
}

[data-md-color-scheme="slate"] .md-footer-meta {
  background-color: rgba(0, 0, 0, 0.25);
}

/* -----------------------------------------------------------------------------
   11. Table of Contents — narrow accent line
   ----------------------------------------------------------------------------- */

.md-nav--secondary .md-nav__link--active {
  color: var(--md-primary-fg-color);
  font-weight: 600;
  border-left: 2px solid var(--md-primary-fg-color);
  padding-left: 0.5rem;
  margin-left: -2px;
}

/* -----------------------------------------------------------------------------
   12. Search Highlight
   ----------------------------------------------------------------------------- */

.md-search-result mark {
  background-color: rgba(50, 108, 229, 0.18);
  border-radius: 3px;
  padding: 0 2px;
}

/* -----------------------------------------------------------------------------
   13. Keyboard Keys (kbd)
   ----------------------------------------------------------------------------- */

.md-typeset kbd {
  background-color: var(--md-default-fg-color--lightest);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.78em;
}

/* -----------------------------------------------------------------------------
   14. Inline Code Highlight
   ----------------------------------------------------------------------------- */

.md-typeset code {
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 0.85em;
}

/* -----------------------------------------------------------------------------
   15. Back-to-top button
   ----------------------------------------------------------------------------- */

.md-top {
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(50, 108, 229, 0.30);
}
