/* ========================================
   IDENTIDADE VISUAL LAVORO
   Cores, botões e estilos customizados
   ======================================== */

/* ========== VARIÁVEIS DE COR LAVORO ========== */
:root {
  --lavoro-primary: #a0397c;     /* Roxo principal */
  --lavoro-secondary: #d4457c;   /* Rosa/magenta */
  --lavoro-dark: #7a2d5f;        /* Roxo escuro */
  --lavoro-light: #f5f5f5;       /* Cinza claro */
  --lavoro-accent: #ff6b9d;      /* Rosa claro para destaques */
}

/* ========== TEMA PRINCIPAL ========== */
[data-md-color-primary="custom"] {
  --md-primary-fg-color: var(--lavoro-primary);
  --md-primary-fg-color--light: var(--lavoro-secondary);
  --md-primary-fg-color--dark: var(--lavoro-dark);
  --md-primary-bg-color: #ffffff;
  --md-accent-fg-color: var(--lavoro-secondary);
}

/* ========== HEADER E NAVEGAÇÃO ========== */
.md-header {
  background-color: white !important;
  color: #333 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.md-header__title {
  color: var(--lavoro-dark) !important;
  font-weight: 600;
}

.md-tabs {
  background-color: var(--lavoro-primary) !important;
}

.md-tabs__link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
}

.md-tabs__link:hover {
  color: white !important;
  opacity: 1;
}

.md-tabs__link--active {
  color: white !important;
  opacity: 1;
  font-weight: 600;
}

/* ========== NAVEGAÇÃO LATERAL ========== */
/* Título principal da aba (DATALAKE, BUSINESS INTELLIGENCE, SALESFORCE) */
.md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link {
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  color: var(--lavoro-primary) !important;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 1rem 0.6rem 0.6rem !important;
  margin-bottom: 0.4rem;
}

/* Seções de grupo (Arquitetura & Infraestrutura, Padrões & Governança, etc) */
.md-nav__item--nested > .md-nav__link {
  font-weight: 700 !important;
  color: var(--lavoro-primary) !important;
  font-size: 0.7rem !important;
  padding: 0.6rem 0.6rem !important;
  padding-left: 0.6rem !important;
  margin-top: 0.5rem;
  margin-left: 0 !important;
  transition: color 0.2s ease;
}

.md-nav__item--nested > .md-nav__link:hover {
  color: var(--lavoro-secondary) !important;
}

/* Itens dentro das seções (Arquitetura Técnica, Orquestração, etc) */
/* Itens que NÃO são nested (não têm filhos) */
.md-nav__item--nested .md-nav__list .md-nav__item:not(.md-nav__item--nested) > .md-nav__link {
  font-weight: 400 !important;
  font-size: 0.75rem !important;
  color: #666 !important;
  padding: 0.35rem 0.6rem 0.35rem 1.2rem !important;
  transition: all 0.2s ease;
}

.md-nav__item--nested .md-nav__list .md-nav__item:not(.md-nav__item--nested) > .md-nav__link:hover {
  color: var(--lavoro-primary) !important;
  background-color: rgba(160, 57, 124, 0.04);
  border-radius: 3px;
}

/* Link ativo */
.md-nav__link--active {
  color: var(--lavoro-primary) !important;
  font-weight: 600 !important;
}

/* ========== BOTÕES ESTILO LAVORO ========== */
.md-button {
  background-color: var(--lavoro-primary) !important;
  color: white !important;
  border-radius: 6px !important;
  padding: 10px 30px !important;
  font-weight: 600 !important;
  border: none !important;
  transition: all 0.3s ease !important;
  text-transform: none !important;
  box-shadow: 0 2px 4px rgba(160, 57, 124, 0.2);
}

.md-button:hover {
  background-color: var(--lavoro-secondary) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(160, 57, 124, 0.3);
}

.md-button:active {
  transform: translateY(0);
}

.md-button--primary {
  background-color: var(--lavoro-primary) !important;
}

a.md-button,
.md-content a.md-button {
  color: white !important;
  text-decoration: none !important;
  border-bottom: none !important;
}

/* Botões secundários */
.md-button--secondary {
  background-color: transparent !important;
  color: var(--lavoro-primary) !important;
  border: 2px solid var(--lavoro-primary) !important;
}

.md-button--secondary:hover {
  background-color: var(--lavoro-primary) !important;
  color: white !important;
}

/* ========== TÍTULOS ========== */
.md-content h1 {
  color: var(--lavoro-primary) !important;
  font-weight: 700 !important;
  font-size: 1.5rem !important;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--lavoro-primary) 0%, var(--lavoro-secondary) 50%, transparent 100%);
  border-image-slice: 1;
  position: relative;
  line-height: 1.4;
}

.md-content h1::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--lavoro-primary), var(--lavoro-secondary));
  border-radius: 2px;
}

.md-content h2 {
  color: var(--lavoro-dark) !important;
  font-weight: 600 !important;
  font-size: 1.17rem !important;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  padding-left: 0.8rem;
  padding-bottom: 0.5rem;
  padding-top: 0.5rem;
  padding-right: 0.8rem;
  border-left: 3px solid var(--lavoro-primary);
  border-bottom: 2px solid var(--lavoro-light);
  background: linear-gradient(90deg, rgba(160, 57, 124, 0.04) 0%, transparent 100%);
  border-radius: 0 3px 0 0;
}

.md-content h3 {
  color: var(--lavoro-primary) !important;
  font-weight: 600 !important;
  font-size: 1.05rem !important;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

.md-content h4 {
  color: var(--lavoro-dark) !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
}

.md-content h5 {
  color: var(--lavoro-primary) !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.md-content h6 {
  color: #666 !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  margin-top: 0.8rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========== LINKS ========== */
.md-content a {
  color: var(--lavoro-primary) !important;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.md-content a:hover {
  color: var(--lavoro-secondary) !important;
  border-bottom-color: var(--lavoro-secondary);
}

/* ========== ABAS (TABS) ========== */
.tabbed-set {
  border-radius: 8px;
  overflow: hidden;
}

.tabbed-labels {
  background-color: var(--lavoro-light);
  border-radius: 8px 8px 0 0;
}

.tabbed-labels > label {
  color: #666 !important;
  border-bottom: 3px solid transparent;
  font-weight: 500;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
}

.tabbed-labels > label:hover {
  color: var(--lavoro-primary) !important;
  background-color: rgba(160, 57, 124, 0.05);
}

.tabbed-labels > label[aria-selected="true"] {
  color: var(--lavoro-primary) !important;
  border-bottom-color: var(--lavoro-primary) !important;
  background-color: white;
  font-weight: 600;
}

/* ========== ADMONITIONS (CARDS/ALERTAS) ========== */
.md-typeset .admonition {
  border-left: 4px solid var(--lavoro-primary);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.md-typeset .admonition-title {
  background-color: rgba(160, 57, 124, 0.1);
  color: var(--lavoro-dark);
  font-weight: 600;
}

/* Tipos específicos de admonitions */
.md-typeset .tip {
  border-left-color: var(--lavoro-secondary);
}

.md-typeset .tip > .admonition-title {
  background-color: rgba(212, 69, 124, 0.1);
}

.md-typeset .info {
  border-left-color: #4285f4;
}

.md-typeset .warning {
  border-left-color: #ff9800;
}

.md-typeset .danger {
  border-left-color: #f44336;
}

/* ========== CARDS CUSTOMIZADOS ========== */
.project-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-left: 4px solid var(--lavoro-primary);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(160, 57, 124, 0.2);
}

.project-card h3 {
  margin-top: 0;
  color: var(--lavoro-primary) !important;
}

/* ========== TABELAS ========== */
.md-typeset table:not([class]) {
  border: 1px solid var(--lavoro-light);
  border-radius: 8px;
  overflow: hidden;
}

.md-typeset table:not([class]) th {
  background-color: var(--lavoro-primary);
  color: white;
  font-weight: 600;
  padding: 1rem;
}

.md-typeset table:not([class]) tr:hover {
  background-color: rgba(160, 57, 124, 0.05);
}

/* ========== CÓDIGO ========== */
.md-typeset code {
  background-color: rgba(160, 57, 124, 0.1);
  color: var(--lavoro-dark);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
}

.highlight {
  border-radius: 8px;
  overflow: hidden;
}

/* ========== BUSCA ========== */
.md-search__input {
  border-radius: 6px;
}

.md-search__input:focus {
  border-color: var(--lavoro-primary);
}

/* ========== SIDEBAR/TOC ========== */
.md-nav__link--active {
  color: var(--lavoro-primary) !important;
  font-weight: 600;
}

.md-nav__link:hover {
  color: var(--lavoro-secondary) !important;
}

/* ========== FOOTER ========== */
.md-footer {
  background-color: var(--lavoro-dark) !important;
}

.md-footer-meta {
  background-color: var(--lavoro-primary) !important;
}

/* ========== RESPONSIVIDADE ========== */
@media screen and (max-width: 76.1875em) {
  .md-header {
    background-color: var(--lavoro-primary) !important;
  }
  
  .md-header__title {
    color: white !important;
  }
}

/* ========== ANIMAÇÕES ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ========== UTILITÁRIOS ========== */
.text-center {
  text-align: center;
}

.text-lavoro {
  color: var(--lavoro-primary) !important;
}

.bg-lavoro {
  background-color: var(--lavoro-primary) !important;
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.badge-lavoro {
  display: inline-block;
  background-color: var(--lavoro-primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
}

