@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  /* Brand Colors Override */
  --md-primary-fg-color:        #4A148C;
  --md-primary-fg-color--light: #6A1B9A;
  --md-primary-fg-color--dark:  #311b92;
  --md-accent-fg-color:         #FF9100;

  --hero-gradient: linear-gradient(135deg, #4A148C 0%, #7C4DFF 50%, #ea80fc 100%);
  --header-gradient: linear-gradient(135deg, #ffffff 0%, #f4f0ff 50%, #ffffff 100%);
  --header-text-color: #4A148C;
  --card-border-radius: 14px;
  --card-hover-shadow: 0 16px 40px rgba(106, 27, 154, 0.15);
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.3);
  
  /* Redesign Vars */
  --blob-color-1: rgba(124, 77, 255, 0.4);
  --blob-color-2: rgba(255, 145, 0, 0.3);
  --blob-color-3: rgba(234, 128, 252, 0.4);
}

[data-md-color-scheme="slate"] {
  --hero-gradient: linear-gradient(135deg, #1a0033 0%, #4a148c 50%, #7c4dff 100%);
  --header-gradient: linear-gradient(135deg, #15002b 0%, #291147 50%, #15002b 100%);
  --header-text-color: #ffffff;
  --card-hover-shadow: 0 16px 40px rgba(124, 77, 255, 0.2);
  --glass-bg: rgba(30, 30, 46, 0.7);
  --glass-border: rgba(124, 77, 255, 0.2);
}

/* ============================================================
   HEADER
   ============================================================ */
.md-header {
  background: linear-gradient(90deg, #4A148C 0%, #7C4DFF 50%, #4A148C 100%) !important;
  background-attachment: fixed !important;
  background-size: 200% 100% !important;
  animation: calmGradient 30s ease infinite alternate;
  box-shadow: none;
  backdrop-filter: none;
}

@keyframes calmGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.md-header[data-md-state="shadow"] {
  box-shadow: 0 5px 25px rgba(0,0,0,0.4);
}

/* Fix mobile search Z-index overlay */
.md-search__overlay,
.md-search__inner,
.md-search-result {
  z-index: 100 !important;
}

/* ============================================================
   NAVIGATION TABS — MATCH HEADER TONE
   ============================================================ */
.md-tabs {
  background: linear-gradient(90deg, #4A148C 0%, #7C4DFF 50%, #4A148C 100%) !important;
  background-attachment: fixed !important;
  background-size: 200% 100% !important;
  animation: calmGradient 30s ease infinite alternate;
  border-top: 0;
  border-bottom: 0;
  box-shadow: none;
}

.md-tabs__inner,
.md-tabs__list {
  border-top: 0;
  box-shadow: none;
  background: transparent;
}

.md-tabs__list > li {
  background: transparent;
}

.md-tabs__link {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
}

.md-tabs__link:hover,
.md-tabs__link:focus,
.md-tabs__link--active {
  color: #ffffff;
}

/* ============================================================
   HERO SECTION  (uses .md-hero class on a div in index.md)
   ============================================================ */
.md-hero {
  background: var(--hero-gradient);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  margin: 1rem 0 2.5rem 0;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: heroFadeIn 0.8s ease-out;
}

.md-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  animation: heroShimmer 8s ease-in-out infinite;
}

.md-hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
  position: relative;
  color: #fff !important;
}

.md-hero p {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
  position: relative;
}

.md-hero .hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  padding: 0.35rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
  letter-spacing: 0.04em;
  position: relative;
}

.md-hero .hero-actions {
  margin-top: 1.8rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
}

/* O Markdown injeta um <p> dentro da div. O display: contents anula ele visualmente */
.md-hero .hero-actions > p {
  display: contents;
}

.md-hero .md-button {
  border-radius: 50px;
  padding: 0.7rem 2rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition-smooth);
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #fff;
}

.md-hero .md-button--primary {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.md-hero .md-button--primary:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.md-hero .md-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   NEW REDESIGN HERO (replaces default md-hero)
   ============================================================ */
.animated-hero {
  position: relative;
  border-radius: 24px;
  padding: 5rem 3rem;
  margin: 2rem 0 4rem 0;
  text-align: center;
  overflow: hidden;
  background: var(--hero-gradient);
  background-attachment: fixed;
  background-size: 200% 200%;
  animation: calmGradient 30s ease infinite alternate;
  border: none;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* Animated Background Blobs */
.animated-hero::before,
.animated-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  animation: float-blobs 25s infinite alternate ease-in-out;
  opacity: 0.5; /* Calmer blobs */
}

.animated-hero::before {
  top: -30%;
  left: -20%;
  width: 700px;
  height: 700px;
  background: var(--blob-color-1);
}

.animated-hero::after {
  bottom: -30%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: var(--blob-color-2);
  animation-delay: -10s;
}

/* Typography for new hero */
.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: #ffffff !important;
  animation: contentSlideUp 0.8s ease-out backwards;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.85) !important;
  max-width: 800px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
  animation: contentSlideUp 0.8s ease-out backwards;
  animation-delay: 0.2s;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  animation: contentSlideUp 0.8s ease-out backwards;
  animation-delay: 0.4s;
}

/* O Markdown injeta um <p> dentro da div. O display: contents anula ele visualmente */
.hero-cta > p {
  display: contents;
}

.md-typeset .hero-cta .md-button {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: linear-gradient(135deg, var(--md-primary-fg-color), var(--md-accent-fg-color), var(--md-primary-fg-color));
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite;
  backdrop-filter: blur(8px);
  border: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  color: #ffffff !important;
}

.md-typeset .hero-cta .md-button:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 30px rgba(255, 145, 0, 0.3);
}

.md-typeset .hero-cta .md-button--primary {
  background: linear-gradient(135deg, var(--md-accent-fg-color), var(--md-primary-fg-color), var(--md-accent-fg-color));
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: none;
  color: #ffffff !important;
}

.md-typeset .hero-cta .md-button--primary:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 40px rgba(124, 77, 255, 0.4);
  filter: none;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float-blobs {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroShimmer {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(2%, 2%) rotate(1deg); }
}

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

/* ============================================================
   GRID CARDS — ENHANCED
   ============================================================ */
.md-typeset .grid.cards > ul > li {
  border-radius: var(--card-border-radius);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
  animation: cardSlideUp 0.6s ease-out backwards;
  position: relative;
  overflow: hidden;
}

.md-typeset .grid.cards > ul > li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #7c4dff, #ea80fc);
  border-radius: 4px 0 0 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.md-typeset .grid.cards > ul > li:hover::before {
  opacity: 1;
}

.md-typeset .grid.cards > ul > li:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-hover-shadow);
  border-color: rgba(124, 77, 255, 0.3);
}

/* Stagger card animations */
.md-typeset .grid.cards > ul > li:nth-child(1) { animation-delay: 0.05s; }
.md-typeset .grid.cards > ul > li:nth-child(2) { animation-delay: 0.12s; }
.md-typeset .grid.cards > ul > li:nth-child(3) { animation-delay: 0.19s; }
.md-typeset .grid.cards > ul > li:nth-child(4) { animation-delay: 0.26s; }
.md-typeset .grid.cards > ul > li:nth-child(5) { animation-delay: 0.33s; }
.md-typeset .grid.cards > ul > li:nth-child(6) { animation-delay: 0.40s; }

/* Icon styling inside cards */
.md-typeset .grid.cards > ul > li .twemoji,
.md-typeset .grid.cards > ul > li .emojione {
  width: 1.6rem;
  height: 1.6rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.md-typeset .md-button {
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  letter-spacing: 0.02em;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(124, 77, 255, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.md-typeset .md-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(74, 20, 140, 0.2);
  border-color: rgba(124, 77, 255, 0.4);
}

.md-typeset .md-button--primary {
  background: linear-gradient(135deg, var(--md-primary-fg-color), var(--md-accent-fg-color));
  color: white !important;
  border: none;
  box-shadow: 0 6px 18px rgba(106, 27, 154, 0.25);
}

.md-typeset .md-button--primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 30px rgba(106, 27, 154, 0.4);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.md-typeset h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.md-typeset h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
}

.md-typeset h3 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.md-typeset p {
  line-height: 1.75;
}

/* ============================================================
   SECTION HEADINGS — DECORATIVE
   ============================================================ */
.section-heading {
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-heading h2 {
  display: inline-block;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-heading h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #7c4dff, #ea80fc);
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--md-default-fg-color--light);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  margin-top: 0;
}

/* ============================================================
   TABLES — POLISHED
   ============================================================ */
.md-typeset table:not([class]) {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.md-typeset table:not([class]) thead {
  background: linear-gradient(135deg, #4a148c, #7c4dff);
}

.md-typeset table:not([class]) th {
  color: #fff;
  font-weight: 600;
  padding: 0.9rem 1.2rem;
}

.md-typeset table:not([class]) td {
  padding: 0.75rem 1.2rem;
}

.md-typeset table:not([class]) tbody tr {
  transition: background 0.2s ease;
}

.md-typeset table:not([class]) tbody tr:hover {
  background: rgba(124, 77, 255, 0.04);
}

/* ============================================================
   ADMONITIONS — ROUNDED GLASSMORPHISM
   ============================================================ */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  transition: var(--transition-smooth);
}
.md-typeset .admonition:hover,
.md-typeset details:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 77, 255, 0.1);
}

/* ============================================================
   CONTENT TABS — SMOOTH
   ============================================================ */
.md-typeset .tabbed-labels > label {
  border-radius: 8px 8px 0 0;
  font-weight: 600;
  transition: var(--transition-smooth);
}

/* ============================================================
   FOOTER
   ============================================================ */
.md-footer {
  background: linear-gradient(135deg, #1a0033, #4a148c);
}

/* ============================================================
   STATUS BADGE
   ============================================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #ff6d00, #ff9100);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(255, 109, 0, 0.3);
}

/* ============================================================
   TEAM SECTION
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

a.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--card-border-radius);
  padding: 1.4rem 1rem;
  text-align: center;
  transition: var(--transition-smooth);
  animation: cardSlideUp 0.6s ease-out backwards;
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer;
  gap: 0;
}

a.team-card:nth-child(1) { animation-delay: 0.05s; }
a.team-card:nth-child(2) { animation-delay: 0.10s; }
a.team-card:nth-child(3) { animation-delay: 0.15s; }
a.team-card:nth-child(4) { animation-delay: 0.20s; }
a.team-card:nth-child(5) { animation-delay: 0.25s; }
a.team-card:nth-child(6) { animation-delay: 0.30s; }

a.team-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
  border-color: rgba(124, 77, 255, 0.4);
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50% !important;
  object-fit: cover;
  border: 3px solid var(--md-accent-fg-color);
  box-shadow: 0 0 15px rgba(255, 145, 0, 0.3);
  margin-bottom: 0.8rem;
  transition: var(--transition-smooth);
}

a.team-card:hover .team-avatar {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(255, 145, 0, 0.6);
  border-color: #ffffff;
}

.team-card .team-name {
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.3;
}

.team-card .team-role {
  font-size: 0.75rem;
  color: var(--md-default-fg-color--light);
  font-weight: 600;
  margin-top: 0.15rem;
}

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

/* Smartwatches / Very Small Screens (up to 360px) */
@media (max-width: 360px) {
  :root {
    --md-text-size: 1.1rem;
  }
  .md-hero {
    padding: 1rem 0.5rem;
    border-radius: 8px;
  }
  .md-hero h1 {
    font-size: 1.4rem;
    line-height: 1.1;
  }
  .md-hero p {
    font-size: 0.95rem;
  }
  .md-typeset .grid.cards > ul > li {
    padding: 0.6rem;
  }
  .md-typeset .md-button {
    width: 100%;
    text-align: center;
    padding: 0.8rem;
    font-size: 1.1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
  }
  .md-sidebar {
    display: none !important; /* Esconder lateral para focar no conteúdo */
  }
}

/* Mobile Phones (Portrait - up to 480px) */
@media (max-width: 480px) {
  .md-hero, .animated-hero {
    padding: 2rem 1rem;
    margin: 0.5rem 0 1.5rem 0;
    background-size: cover;
  }
  .md-hero h1, .hero-title {
    font-size: 1.8rem;
    word-break: break-word;
  }
  .md-hero p, .hero-subtitle {
    font-size: 1.05rem;
  }
  .md-hero .hero-actions, .hero-cta {
    flex-direction: column;
    gap: 1rem;
  }
  .md-hero .md-button, .hero-cta .md-button {
    width: 100%;
    box-sizing: border-box;
    padding: 0.9rem 1rem;
    font-size: 1.05rem;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablets and Large Phones (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .md-hero {
    padding: 2.5rem 1.5rem;
  }
  .md-hero h1 {
    font-size: 2.2rem;
  }
  .md-hero p {
    font-size: 1.1rem;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .md-typeset .grid.cards > ul > li {
    padding: 1.2rem;
  }
}

/* Laptops / Desktops (769px to 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .md-hero .md-button {
    display: inline-block;
    min-width: 200px;
  }
}

/* Ultrawide / Large Desktops (1200px to 1599px) */
@media (min-width: 1200px) and (max-width: 1599px) {
  :root {
    --md-text-container-width: 70rem; /* Expands MkDocs default max-width for better reading */
  }
  .md-hero {
    padding: 4rem 3rem;
  }
  .md-hero h1 {
    font-size: 3rem;
  }
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Super Ultrawide & TVs (1600px and up) */
@media (min-width: 1600px) {
  :root {
    --md-text-container-width: 90rem; /* Expansive layout */
    --md-text-size: 1.15rem; /* Better readability from distance */
  }
  
  /* Auto-force layout limits for comfort on large bright screens */
  .md-main__inner {
    margin-top: 2rem;
  }

  .md-hero {
    padding: 6rem 4rem;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  }
  .md-hero h1 {
    font-size: 4.5rem;
    letter-spacing: -0.04em;
  }
  .md-hero p {
    font-size: 1.5rem;
    max-width: 1200px;
    line-height: 1.8;
  }
  .team-grid {
    grid-template-columns: repeat(6, 1fr); /* All cards in one row! */
  }
  
  .md-typeset .grid.cards > ul {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

/* ============================================================
   MERMAID DIAGRAMS — POLISHED
   ============================================================ */
/* ============================================================
   MERMAID DIAGRAMS — PREMIUM QUALITY
   ============================================================ */
.md-typeset .mermaid {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2.5rem 0;
  padding: 1.5rem;
  background: var(--glass-bg);
  border-radius: var(--card-border-radius);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(12px);
  overflow-x: auto;
}

[data-md-color-scheme="slate"] .md-typeset .mermaid {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.md-typeset .mermaid svg {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  max-width: 100%;
  height: auto !important;
  max-height: 500px;
}

/* Garante que os rótulos de relacionamento (setas) fiquem sempre legíveis e não sobreponham as linhas confusamente */
.md-typeset .mermaid svg .edgeLabel,
.md-typeset .mermaid svg foreignObject div {
  background-color: var(--md-default-bg-color) !important;
  color: var(--md-default-fg-color) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  font-size: 0.9em !important;
  font-weight: 600 !important;
}

/* Ajustes para diagramas no Modo Escuro (Foca apenas em corrigir legibilidade) */
[data-md-color-scheme="slate"] .md-typeset .mermaid svg .messageText,
[data-md-color-scheme="slate"] .md-typeset .mermaid svg .labelText {
  fill: var(--md-default-fg-color) !important;
}

[data-md-color-scheme="slate"] .md-typeset .mermaid svg rect.boundary {
  fill: rgba(255, 255, 255, 0.03) !important;
  stroke: rgba(255, 255, 255, 0.15) !important;
}

[data-md-color-scheme="slate"] .md-typeset .mermaid svg text.boundaryLabel {
  fill: var(--md-default-fg-color) !important;
}

/* ============================================================
   TIMELINE DIAGRAM FIXES
   ============================================================ */
/* Título geral do Timeline (Product Roadmap Macro) - branco no modo escuro */
[data-md-color-scheme="slate"] .timeline-diagram .mermaid svg .titleText,
[data-md-color-scheme="slate"] .timeline-diagram .mermaid svg .timeline-title {
  fill: #ffffff !important;
  color: #ffffff !important;
}

/* Força *todo e qualquer* texto regular gerado pelo Timeline a ficar grafite,
   já que o Mermaid não tem classes fixas e mantém os fundos pastéis claros. */
.timeline-diagram .mermaid svg text {
  fill: #1a1a1a !important;
  color: #1a1a1a !important;
}

/* ============================================================
   SMOOTH SCROLL
   ============================================================ */
html {
  scroll-behavior: smooth;
}

/* ============================================================
   CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7c4dff, #ea80fc);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #651fff, #d500f9);
  background-clip: padding-box;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4a148c, #7c4dff);
  background-clip: padding-box;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #7c4dff transparent;
}

/* ============================================================
   TEXT SELECTION
   ============================================================ */
::selection {
  background: rgba(124, 77, 255, 0.25);
  color: inherit;
}

[data-md-color-scheme="slate"] ::selection {
  background: rgba(124, 77, 255, 0.35);
}

/* ============================================================
   CODE BLOCKS — ENHANCED
   ============================================================ */
.md-typeset code {
  border-radius: 6px;
  transition: background 0.2s ease;
}

.md-typeset pre {
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

[data-md-color-scheme="slate"] .md-typeset pre {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* ============================================================
   LINKS — ANIMATED UNDERLINE
   ============================================================ */
.md-typeset a:not(.md-button):not(.md-nav__link):not(.md-header__button):not(.md-tabs__link):not(.team-card):not(.headerlink):not(.glightbox) {
  text-decoration: none;
  background-image: linear-gradient(90deg, #7c4dff, #ea80fc);
  background-size: 0% 2px;
  background-position: left bottom;
  background-repeat: no-repeat;
  transition: background-size 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding-bottom: 1px;
}

.md-typeset a:not(.md-button):not(.md-nav__link):not(.md-header__button):not(.md-tabs__link):not(.team-card):not(.headerlink):not(.glightbox):hover {
  background-size: 100% 2px;
}

/* ============================================================
   IMAGES — ROUNDED AND HOVER ZOOM
   ============================================================ */
.md-typeset img:not(.team-avatar):not(.twemoji) {
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.md-typeset img:not(.team-avatar):not(.twemoji):hover {
  transform: scale(1.02);
  box-shadow: 0 16px 32px rgba(124, 77, 255, 0.15);
  z-index: 10;
  position: relative;
}

/* ============================================================
   TASK LIST CHECKBOXES
   ============================================================ */
.md-typeset [type="checkbox"]:checked {
  accent-color: #7c4dff;
}

.md-typeset .task-list-indicator::before {
  border-color: #7c4dff;
}

/* ============================================================
   TABBED CONTENT — ACTIVE INDICATOR
   ============================================================ */
.md-typeset .tabbed-labels > label.tabbed-active {
  border-bottom: 3px solid;
  border-image: linear-gradient(90deg, #7c4dff, #ea80fc) 1;
  color: var(--md-accent-fg-color);
}

/* ============================================================
   GLOBAL PAGE ANIMATIONS (ALL DIRECTORIES)
   ============================================================ */
@keyframes contentSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Applying a subtle cascade (staggering) effect to all standard markdown elements */
.md-typeset h1 {
  animation: contentSlideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.05s both;
}

.md-typeset h2, 
.md-typeset h3 {
  animation: contentSlideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.10s both;
}

.md-typeset p, 
.md-typeset ul, 
.md-typeset ol {
  animation: contentSlideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both;
}

.md-typeset .admonition,
.md-typeset details {
  animation: contentSlideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.20s both;
}

.md-typeset table,
.md-typeset .mermaid {
  animation: contentSlideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s both;
}

/* Make sure the main content block itself doesn't clash with the Instant Navigation fade */
.md-content {
  animation: contentSlideUp 0.4s ease-out both;
}

/* ============================================================
   RICH PICTURE — IMAGE FOCUS
   ============================================================ */
.rich-picture {
  margin: 2rem auto;
  text-align: center;
  animation: richPictureFade 0.8s ease-out both;
}

.rich-picture__image {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  cursor: zoom-in;
}

.rich-picture__image:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.rich-picture__caption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--md-default-fg-color--light);
}

.rich-picture__overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 16, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2rem;
}

.rich-picture__overlay.is-open {
  display: flex;
}

.rich-picture__overlay img {
  max-width: min(92vw, 1400px);
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  cursor: zoom-out;
}

@keyframes richPictureFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   ACCESSIBILITY: REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   MKDOCS GLOSSARY / ABBREVIATION (ABBR) STYLE
   ============================================================ */
.md-typeset abbr {
  text-decoration: none;
  border-bottom: 2px dotted var(--md-primary-color);
  cursor: help;
  position: relative;
  transition: all 0.3s ease;
  font-weight: 500;
}

.md-typeset abbr:hover {
  background-color: var(--md-primary-fg-color--transparent);
  border-bottom: 2px solid var(--md-primary-color);
  border-radius: 2px;
}



/* ============================================================
   MATHJAX ARITHMATEX STYLING
   ============================================================ */
.md-typeset .arithmatex {
  overflow-x: auto;
  padding: 0.5rem 0;
}
.md-typeset div.arithmatex {
  margin: 1.5em 0 !important;
  padding: 1rem;
  background-color: var(--glass-bg);
  border-left: 4px solid var(--md-primary-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* -------------------------------------------------------------------------
 * LARGE DISPLAY OPTIMIZATIONS (Ultrawides & TVs)
 * Expand the max-width of MkDocs from the default 1220px to utilize more space
 * ------------------------------------------------------------------------- */
@media screen and (min-width: 1600px) {
  .md-grid {
    max-width: 1600px;
  }
}

@media screen and (min-width: 1920px) {
  .md-grid {
    max-width: 1920px;
  }
}

@media screen and (min-width: 2560px) {
  .md-grid {
    max-width: 2560px;
  }
}

/* Center tables when inside align="center" */
div[align="center"] .md-typeset__table {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   GLOBAL CREATIVE EFFECTS & ANIMATIONS
   Adds "life" across all documentation pages
   ============================================================ */

/* Page Load Content Fade & Slide Up */
.md-content {
  animation: pageFadeIn 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sidebar Links Interaction */
.md-nav__link {
  transition: all 0.3s ease-out;
}
.md-nav__link:hover {
  transform: translateX(6px);
  color: var(--md-primary-fg-color);
}
.md-nav__item .md-nav__link--active {
  animation: linkPulse 3s infinite;
}
@keyframes linkPulse {
  0% { text-shadow: 0 0 0 transparent; }
  50% { text-shadow: 0 0 8px rgba(124, 77, 255, 0.5); }
  100% { text-shadow: 0 0 0 transparent; }
}

/* Code Blocks Polish */
.md-typeset pre {
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
  border: 1px solid transparent;
}
.md-typeset pre:hover {
  transform: translateY(-3px) scale(1.005);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
  border-color: rgba(124, 77, 255, 0.3);
}

/* Images Zoom on Hover */
.md-typeset img:not(.twemoji):not(.emojione) {
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
  border-radius: 8px;
}
.md-typeset img:not(.twemoji):not(.emojione):hover {
  transform: scale(1.03);
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
  z-index: 10;
  position: relative;
}

/* Admonitions (Callouts) Pop & Lift */
.md-typeset .admonition {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  animation: calloutPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
  animation-delay: 0.3s;
}
.md-typeset .admonition:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}
@keyframes calloutPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Table Rows Hover Highlight */
.md-typeset table tbody tr {
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.md-typeset table tbody tr:hover {
  background-color: var(--glass-bg);
  transform: scale(1.01);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  z-index: 2;
  position: relative;
}

/* Custom Text Selection */
::selection {
  background: rgba(124, 77, 255, 0.3);
  color: inherit;
}
::-moz-selection {
  background: rgba(124, 77, 255, 0.3);
  color: inherit;
}
