/* Pathary Brand Colors */
:root {
  --pathary-purple: #7D49A8;
  --pathary-gold: #FAC54E;
  --pathary-cream: #F7EED2;
  --pathary-purple-light: #9B6BC4;
  --pathary-purple-dark: #5D2F7E;
  --pathary-gold-light: #FFDB8B;
  --pathary-gold-dark: #E5AD2F;
  --pathary-gold-darker: #C89825;
}

/* Light mode - Gold primary with purple accents */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: var(--pathary-gold-dark);
  --md-primary-fg-color--light: var(--pathary-gold);
  --md-primary-fg-color--dark: var(--pathary-gold-darker);
  --md-accent-fg-color: var(--pathary-purple);
  --md-accent-fg-color--transparent: rgba(125, 73, 168, 0.1);
}

/* Dark mode - Gold primary with purple accents */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: var(--pathary-gold);
  --md-primary-fg-color--light: var(--pathary-gold-light);
  --md-primary-fg-color--dark: var(--pathary-gold-dark);
  --md-accent-fg-color: var(--pathary-purple-light);
  --md-accent-fg-color--transparent: rgba(155, 107, 196, 0.1);
}

/* Header styling with gradient - warm gold tones */
.md-header {
  background: linear-gradient(135deg, var(--pathary-gold-dark) 0%, var(--pathary-gold-darker) 100%);
}

/* Logo styling - make it pop */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Navigation tabs with subtle gradient */
.md-tabs {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), transparent);
}

/* Search bar enhancement */
.md-search__input {
  border-radius: 0.5rem;
}

.md-search__input:focus {
  box-shadow: 0 0 0 0.2rem rgba(250, 197, 78, 0.35);
}

/* Links with Pathary gold on hover */
.md-typeset a {
  transition: color 0.2s ease;
}

.md-typeset a:hover {
  color: var(--pathary-gold-dark);
}

/* Code blocks with subtle cream theme */
.md-typeset code {
  background-color: rgba(247, 238, 210, 0.15);
  border: 1px solid rgba(250, 197, 78, 0.2);
  border-radius: 0.25rem;
}

[data-md-color-scheme="slate"] .md-typeset code {
  background-color: rgba(250, 197, 78, 0.08);
  border-color: rgba(250, 197, 78, 0.15);
}

/* Admonitions with gold and cream colors */
.md-typeset .admonition.note,
.md-typeset details.note {
  border-left-color: var(--pathary-gold-dark);
}

.md-typeset .note > .admonition-title,
.md-typeset .note > summary {
  background-color: rgba(250, 197, 78, 0.12);
}

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-left-color: var(--pathary-gold);
}

.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary {
  background-color: rgba(250, 197, 78, 0.15);
}

/* Footer styling with warm tones */
.md-footer {
  background: linear-gradient(135deg, var(--pathary-gold-darker) 0%, var(--pathary-gold-dark) 100%);
}

/* Table of contents styling */
.md-sidebar--secondary {
  border-left: 1px solid rgba(250, 197, 78, 0.15);
}

/* Active navigation items - gold emphasis */
.md-nav__item--active > .md-nav__link {
  color: var(--pathary-gold-dark);
  font-weight: 600;
}

[data-md-color-scheme="slate"] .md-nav__item--active > .md-nav__link {
  color: var(--pathary-gold);
}

/* Buttons with gold theme */
.md-typeset .md-button--primary {
  background-color: var(--pathary-gold-dark);
  border-color: var(--pathary-gold-dark);
  color: #1a1a1a;
  font-weight: 600;
}

.md-typeset .md-button--primary:hover {
  background-color: var(--pathary-gold-darker);
  border-color: var(--pathary-gold-darker);
}

/* Scrollbar styling (webkit browsers) - gold tones */
::-webkit-scrollbar {
  width: 0.5rem;
  height: 0.5rem;
}

::-webkit-scrollbar-thumb {
  background-color: var(--pathary-gold-dark);
  border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--pathary-gold-darker);
}

::-webkit-scrollbar-track {
  background-color: rgba(250, 197, 78, 0.08);
}

/* Progress bar for page loading */
.md-progress {
  background-color: var(--pathary-gold);
}

/* Tags styling with gold tones */
.md-tag {
  background-color: rgba(250, 197, 78, 0.15);
  color: var(--pathary-gold-darker);
  border: 1px solid rgba(250, 197, 78, 0.3);
}

[data-md-color-scheme="slate"] .md-tag {
  background-color: rgba(250, 197, 78, 0.12);
  color: var(--pathary-gold-light);
  border-color: rgba(250, 197, 78, 0.25);
}

/* Hero section with gold emphasis */
.md-typeset h1:first-child {
  color: var(--pathary-gold-darker);
  font-weight: 700;
}

[data-md-color-scheme="slate"] .md-typeset h1:first-child {
  color: var(--pathary-gold);
}

/* Enhance SVG badge images */
.md-typeset img[src$=".svg"] {
  vertical-align: middle;
  max-height: 1.5rem;
}

/* ============================================
   ENHANCED VISUAL ELEMENTS FOR FUN DOCS
   ============================================ */

/* Grid cards with warm gold theme and hover effects */
.md-typeset .grid.cards > * {
  border: 1px solid rgba(250, 197, 78, 0.25);
  border-radius: 0.5rem;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, rgba(250, 197, 78, 0.05), rgba(247, 238, 210, 0.08));
}

.md-typeset .grid.cards > *:hover {
  border-color: var(--pathary-gold-dark);
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(250, 197, 78, 0.25);
  background: linear-gradient(135deg, rgba(250, 197, 78, 0.12), rgba(247, 238, 210, 0.15));
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards > * {
  background: linear-gradient(135deg, rgba(250, 197, 78, 0.08), rgba(247, 238, 210, 0.05));
  border-color: rgba(250, 197, 78, 0.2);
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards > *:hover {
  border-color: var(--pathary-gold);
  box-shadow: 0 8px 16px rgba(250, 197, 78, 0.3);
  background: linear-gradient(135deg, rgba(250, 197, 78, 0.15), rgba(247, 238, 210, 0.12));
}

/* Material icons in cards - gold accent */
.md-typeset .grid.cards .twemoji,
.md-typeset .grid.cards .material-icons {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--pathary-gold-dark);
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards .twemoji,
[data-md-color-scheme="slate"] .md-typeset .grid.cards .material-icons {
  color: var(--pathary-gold);
}

/* Tabbed content with gold accents */
.md-typeset .tabbed-set {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(250, 197, 78, 0.15);
}

.md-typeset .tabbed-labels > label {
  font-weight: 600;
  transition: all 0.2s ease;
}

.md-typeset .tabbed-labels > label:hover {
  background-color: rgba(250, 197, 78, 0.1);
  color: var(--pathary-gold-dark);
}

/* Admonition enhancements with warm tones */
.md-typeset .admonition {
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.md-typeset .admonition:hover {
  box-shadow: 0 4px 12px rgba(250, 197, 78, 0.2);
  transform: translateY(-2px);
}

/* Success callout with popcorn theme */
.md-typeset .admonition.success {
  border-left-color: var(--pathary-gold);
}

.md-typeset .success > .admonition-title {
  background-color: rgba(250, 197, 78, 0.1);
}

.md-typeset .success > .admonition-title::before {
  background-color: var(--pathary-gold);
}

/* Example callouts with gold */
.md-typeset .admonition.example {
  border-left-color: var(--pathary-gold-dark);
}

.md-typeset .example > .admonition-title {
  background-color: rgba(250, 197, 78, 0.12);
}

/* Hero section styling with gold gradient */
.md-typeset h1:first-child + div[style*="text-align: center"] h2 {
  background: linear-gradient(135deg, var(--pathary-gold), var(--pathary-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* Comparison tables with gold header */
.md-typeset table {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.md-typeset table thead {
  background: linear-gradient(135deg, var(--pathary-gold-dark), var(--pathary-gold-darker));
  color: #1a1a1a;
  font-weight: 600;
}

.md-typeset table tbody tr:hover {
  background-color: rgba(250, 197, 78, 0.08);
}

[data-md-color-scheme="slate"] .md-typeset table tbody tr:hover {
  background-color: rgba(250, 197, 78, 0.12);
}

/* Emoji sizing and spacing */
.md-typeset h2 .twemoji,
.md-typeset h3 .twemoji {
  height: 1.2em;
  vertical-align: -0.15em;
  margin-right: 0.2em;
}

/* Code blocks with gold accent border */
.md-typeset pre > code {
  border-left: 3px solid var(--pathary-gold-dark);
  border-radius: 0.25rem;
}

/* Hover effect on navigation cards with gold */
.md-typeset .grid.cards a {
  text-decoration: none;
  color: inherit;
}

.md-typeset .grid.cards a:hover {
  color: var(--pathary-gold-dark);
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards a:hover {
  color: var(--pathary-gold);
}

/* Animated underline for inline links */
.md-typeset a {
  position: relative;
}

.md-typeset a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, var(--pathary-gold-dark), var(--pathary-gold-light));
  transition: width 0.3s ease;
}

.md-typeset a:hover::after {
  width: 100%;
}

/* Remove underline for card links */
.md-typeset .grid.cards a::after {
  display: none;
}

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

/* Add subtle animation to page load */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.md-content__inner {
  animation: fadeIn 0.5s ease-out;
}

/* Highlight important content */
.md-typeset mark {
  background: linear-gradient(135deg, rgba(250, 197, 78, 0.3), rgba(250, 197, 78, 0.1));
  padding: 0.1em 0.3em;
  border-radius: 0.2em;
}

/* Better blockquote styling with gold accent */
.md-typeset blockquote {
  border-left: 4px solid var(--pathary-gold-dark);
  background: linear-gradient(90deg, rgba(250, 197, 78, 0.08), transparent);
  border-radius: 0.25rem;
  padding: 1rem 1.5rem;
}

/* Horizontal rules with gold gradient */
.md-typeset hr {
  background: linear-gradient(90deg, transparent, var(--pathary-gold), transparent);
  height: 2px;
  border: none;
  margin: 2rem 0;
}

/* Call-to-action buttons */
.md-typeset .md-button {
  transition: all 0.3s ease;
  font-weight: 600;
}

.md-typeset .md-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(250, 197, 78, 0.4);
}

/* ============================================
   PARALLAX AND SCROLL EFFECTS
   ============================================ */

/* Smooth parallax scroll for hero section */
.md-content__inner > article > h1:first-child {
  transform: translateZ(0);
  will-change: transform;
  transition: transform 0.2s ease-out;
}

/* Parallax effect for first content div after h1 */
.md-content__inner > article > h1:first-child + div {
  transform: translateZ(0);
  will-change: transform, opacity;
}

/* Layered parallax for grid cards */
.md-typeset .grid.cards > *:nth-child(1) { animation-delay: 0ms; }
.md-typeset .grid.cards > *:nth-child(2) { animation-delay: 50ms; }
.md-typeset .grid.cards > *:nth-child(3) { animation-delay: 100ms; }
.md-typeset .grid.cards > *:nth-child(4) { animation-delay: 150ms; }
.md-typeset .grid.cards > *:nth-child(5) { animation-delay: 200ms; }
.md-typeset .grid.cards > *:nth-child(6) { animation-delay: 250ms; }

/* Staggered fade-in animation for cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.md-typeset .grid.cards > * {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

/* Floating animation for hero section */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.md-typeset h1:first-child .twemoji {
  animation: float 3s ease-in-out infinite;
  display: inline-block;
}

/* Subtle background gradient animation */
@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Animated gradient background for header */
.md-header {
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

/* 3D card lift effect on hover */
.md-typeset .grid.cards > *:hover {
  transform: translateY(-8px) scale(1.02);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Depth effect for admonitions on scroll */
.md-typeset .admonition {
  transform: translateZ(0);
  will-change: transform;
}

/* Smooth scroll reveal for sections */
@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.md-typeset h2 {
  animation: slideInFromLeft 0.6s ease-out;
}

/* Parallax table rows */
.md-typeset table tbody tr {
  transition: transform 0.2s ease;
}

.md-typeset table tbody tr:hover {
  transform: scale(1.01);
}

/* ============================================
   HOMEPAGE SPECIFIC STYLES
   ============================================ */

/* Make comparison table centered with reasonable width */
.md-typeset__table {
  display: flex !important;
  justify-content: center !important;
}

.md-typeset table {
  display: table !important;
  width: auto;
  max-width: 800px;
  table-layout: auto;
}

/* Ensure entire card is clickable in grid cards - ONLY on homepage */
.md-content article > .grid.cards > li {
  position: relative;
}

.md-content article > .grid.cards > li:hover {
  cursor: pointer;
}

.md-content article > .grid.cards > li > p > a::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

/* ============================================
   ADMONITION BOX STYLING - GOLD THEME
   ============================================ */

/* Override default admonition borders to match gold theme */
.md-typeset .admonition.tip {
  border-left-color: var(--pathary-gold-dark);
  border-color: var(--pathary-gold-dark);
}

.md-typeset .admonition.tip > .admonition-title {
  background-color: rgba(197, 159, 68, 0.1);
}

.md-typeset .admonition.success {
  border-left-color: var(--pathary-gold-dark);
  border-color: var(--pathary-gold-dark);
}

.md-typeset .admonition.success > .admonition-title {
  background-color: rgba(197, 159, 68, 0.1);
}

.md-typeset .admonition.example {
  border-left-color: var(--pathary-gold-dark);
  border-color: var(--pathary-gold-dark);
}

.md-typeset .admonition.example > .admonition-title {
  background-color: rgba(197, 159, 68, 0.1);
}

.md-typeset .admonition.question {
  border-left-color: var(--pathary-gold-dark);
  border-color: var(--pathary-gold-dark);
}

.md-typeset .admonition.question > .admonition-title {
  background-color: rgba(197, 159, 68, 0.1);
}

.md-typeset .admonition.info {
  border-left-color: var(--pathary-gold-dark);
  border-color: var(--pathary-gold-dark);
}

.md-typeset .admonition.info > .admonition-title {
  background-color: rgba(197, 159, 68, 0.1);
}

/* ============================================
   LOGO STYLING AND HERO SECTION
   ============================================ */

/* Keep hero section in normal content flow - simpler approach */
.md-content__inner > div[style*="text-align: center"] {
  /* Just let it be centered within the content area */
}

/* Ensure logo displays properly in hero section - using transform for perfect centering */
.md-typeset img[alt="Pathary Logo"] {
  display: block !important;
  width: 200px !important;
  height: 200px !important;
  max-height: none !important;
  margin-bottom: 1.5rem !important;
  object-fit: contain;
  position: relative !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}
