/* ==========================================================================
   VARIÁVEIS DE COR E TEMAS (GLOBAL)
   ========================================================================== */

html[data-bs-theme="light"] {
  --bg-body: #f4f4f0; /* MODO PAPEL FOSCO: Absorve a luz e descansa os olhos */
  --bg-card: #eeeeeeb4;
  --text-main: #2d3135; /* Grafite suave: evita o contraste excessivo do preto puro */
  --text-muted: #5a6066;
  --bg-marrastack: #006437;
  --bg-luci: #ff6600;
  --bg-emige: #222e5a;
  --bg-finance: #0397fa;
  --bg-icon: #ffffff3f;
  --watermark-opacity: 0.22; /* Calibrado para dar presença no tema claro */
  --brand-cyan: #0077b6;
}

html[data-bs-theme="dark"] {
  --bg-body: #0f172a;
  --bg-card: #2929299a;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --bg-marrastack: #006437;
  --bg-luci: #ff6600;
  --bg-emige: #222e5a;
  --bg-finance: #0397fa;
  --bg-icon: #ffffff3f;
  --watermark-opacity: 0.1;
  --brand-cyan: #00b4d8;
}

/* ==========================================================================
   CONTROLE DE BRILHO PERSONALIZADO
   ========================================================================== */
/* Container de Controles Alinhados */
.navigation-controls {
    flex-wrap: wrap;
    justify-content: center;
}
@media (max-width: 375px) {
    .brightness-wrapper {
        width: 100%; /* O wrapper ocupa a largura total se a tela for muito pequena */
        justify-content: space-between;
    }
}

/* Container de Controles (Ajuste para Light Mode) */
/* Container que envolve o slider e o botão */
.brightness-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background-color: rgba(0, 0, 0, 0.04);
}

/* Modo Light: Ajuste visual */
html[data-bs-theme="light"] .brightness-wrapper {
    background-color: transparent !important;
    border: 1.5px solid #2d3135 !important;
}

html[data-bs-theme="light"] .brightness-wrapper i {
    color: #2d3135 !important;
}

/* Responsividade do Wrapper */
@media (max-width: 375px) {
    .navigation-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    .brightness-wrapper {
        width: 100%;
        justify-content: space-between;
    }
}

@media (min-width: 768px) {
    .brightness-wrapper {
        height: 38px;
        padding: 8px 16px;
        max-width: 160px;
    }
}

/* Customização do Slider */
.brightness-slider {
    display: flex;
    align-items: center;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    height: 100%;
    margin: 0;
    padding: 0;
}

.brightness-slider::-webkit-slider-thumb {
    background: var(--bg-marrastack) !important;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.brightness-slider::-moz-range-thumb {
    background: var(--bg-marrastack) !important;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* Botão de Reset */
.btn-reset-theme {
    background-color: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (min-width: 768px) {
    .btn-reset-theme {
        width: 38px;
        height: 38px;
    }
}

.btn-reset-theme:hover {
    color: var(--bg-marrastack);
    border-color: var(--bg-marrastack);
    transform: rotate(-45deg);
}

html[data-bs-theme="light"] .btn-reset-theme {
    background-color: transparent !important;
    border: 1.5px solid #2d3135 !important;
    color: #2d3135 !important;
}

@media (max-width: 576px) {
    .navigation-controls {
        display: none !important;
    }
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  overflow-x: hidden;
  width: 100%;
}

/* Configuração do título com gradiente adaptável */
.text-gradient-marra {
    color: var(--text-main);
    display: block;
}

html[data-bs-theme="dark"] .text-gradient-marra {
    background: linear-gradient(45deg, #ffffff, var(--bg-marrastack));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

html[data-bs-theme="light"] .text-gradient-marra {
    background: linear-gradient(45deg, var(--text-main), var(--bg-marrastack));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* MARCA D'ÁGUA ADAPTÁVEL */
.watermark-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95vw;
  max-width: 1100px;
  z-index: 0;
  pointer-events: none;
  opacity: var(--watermark-opacity);
  filter: blur(3px);
  transition: opacity 0.3s ease;
}

/* NAVBAR RESPONSIVA */
.hub-header {
  padding: 16px;
}

@media (min-width: 768px) {
  .hub-header {
    padding: 24px 32px;
  }
}

.marrastack-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  text-decoration: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  font-family: "Fira Code", "JetBrains Mono", monospace;
}

.brand-title {
  margin: 0;
  padding: 0;
  font-size: 20px;
  font-weight: 300;
  color: var(--text-main);
  letter-spacing: -0.5px;
  line-height: 1;
}

@media (min-width: 576px) {
  .brand-title {
    font-size: 20px;
  }
}

@media (min-width: 768px) {
  .brand-title {
    font-size: 32px;
  }
}

.brand-title .highlight {
  font-weight: 700;
  color: var(--bg-marrastack);
}

.brand-title .dot {
  color: var(--bg-luci);
  font-weight: 500;
  font-size: 14px;
}

@media (min-width: 768px) {
  .brand-title .dot {
    font-size: 18px;
  }
}

.brand-subtitle {
  margin: 2px 0 0 0;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1px;
}

@media (min-width: 768px) {
  .brand-subtitle {
    font-size: 11px;
    letter-spacing: 2px;
  }
}

/* CARDÁPIO DE APLICAÇÕES */
.hub-container {
  position: relative;
  z-index: 5;
  max-width: 1200px;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .hub-container {
    margin-top: 40px;
  }
}

.app-card {
  background-color: var(--bg-card);
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.app-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border-color: var(--bg-marrastack);
}

.app-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

/* Cores dos Cards */
.card-marrastack {
  border-left: 4px solid var(--bg-marrastack);
}
.card-marrastack .app-icon-wrapper {
  color: var(--bg-marrastack);
}

.card-finance {
  border-left: 4px solid var(--bg-finance);
}
.card-finance .app-icon-wrapper {
  color: var(--bg-finance);
}

.card-emige {
  border-left: 4px solid var(--bg-emige);
}
.card-emige .app-icon-wrapper {
  color: var(--bg-emige);
}

.card-luci {
  border-left: 4px solid var(--bg-luci);
}
.card-luci .app-icon-wrapper {
  color: var(--bg-luci);
}

.app-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.app-description {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.app-action-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-finance:hover .app-action-text,
.card-emige:hover .app-action-text,
.card-luci:hover .app-action-text,
.card-marrastack:hover .app-action-text {
  color: var(--bg-marrastack);
}

.app-card:hover .app-action-text i {
  transform: translateX(4px);
  transition: transform 0.2s ease;
}

/* Botão do Tema Responsivo */
.theme-btn {
  border: 1px solid var(--text-muted);
  background-color: var(--bg-card);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (min-width: 768px) {
  .theme-btn {
    padding: 8px 16px;
    font-size: 14px;
    gap: 8px;
  }
}
/* Customização do Rodapé */
.style-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html[data-bs-theme="light"] .style-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.footer-link {
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--bg-marrastack) !important; /* Link dinâmico acende no verde */
}

.footer-social-link {
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social-link i {
  font-size: 18px;
  transition: transform 0.25s ease;
}

/* Efeito Hover: Muda para o Verde Marrastack e faz o ícone flutuar */
.footer-social-link:hover {
  color: var(--bg-marrastack) !important;
}

.footer-social-link:hover i {
  transform: translateY(-3px);
}

/* Variáveis para o Logo */
:root {
  --logo-text: #34383C;
  --logo-accent: #0682B4;
  --logo-primary: #31B7E9;
}

[data-bs-theme="dark"] {
  --logo-text: #E0E0E0;
  --logo-accent: #00A3E0;
  --logo-primary: #51D1FF;
}

/* Aplicando as variáveis às classes do seu SVG */
.ssst1 { fill: var(--logo-text) !important; }
.st007 { fill: var(--logo-text) !important; }
.ssst2 { fill: var(--logo-accent) !important; }
.ssst3 { fill: var(--logo-primary) !important; }

/* Ajuste de tamanho e alinhamento */
.logo svg {
  height: 25px;
  width: auto;
  vertical-align: middle;
}
.left-side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-svg {
    height: 30px; /* Ajuste a altura conforme necessário para alinhar ao texto */
    width: auto;
    vertical-align: middle;
    transition: fill 0.3s ease;
}

/* Garante que o container do logo não crie espaçamentos estranhos */
.footer-logo-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

/* Estilo de inputs minimalistas */
.form-control, .form-select {
    border: 1.5px solid #cbd5e1 !important; 
    border-radius: 8px !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease-in-out;
    padding: 0.75rem 1rem !important;
}

.form-select {
    background-color: transparent !important;
    color: var(--text-main) !important; /* Certifique-se que essa variável exista no seu tema */
}

.form-select option {
    background-color: #1a1a1a !important; /* Cor de fundo do seu tema escuro */
    color: #ffffff !important;           /* Cor do texto dentro do select */
}

.form-select option:hover,
.form-select option:checked {
    background-color: var(--bg-marrastack) !important;
    color: #ffffff !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bg-marrastack) !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 100, 55, 0.1) !important;
    outline: none;
}

.form-label {
    font-weight: 500;
    color: #475569 !important; /* Um cinza um pouco mais escuro que o padrão */
}

/* Transição suave para o botão */
.btn-outline-success {
    border-color: var(--bg-marrastack);
    color: var(--bg-marrastack);
}

.btn-outline-success:hover {
    background-color: var(--bg-marrastack);
    color: white;
}


/* Ajuste Fino para o Rodapé em Mobile */
@media (max-width: 575px) {
    .style-footer .d-flex.flex-column {
        gap: 15px !important; /* Espaçamento mais confortável no mobile */
    }
    
    .footer-social-link span {
        display: none !important; /* Esconde texto dos contatos no mobile, mantém só ícone */
    }

    .footer-logo-svg {
        height: 22px !important; /* Logo menor em telas de 320px */
    }
}