/* ===== AJUSTES FINOS E COMPATIBILIDADE ===== */

/* Garantir que elementos específicos herdem corretamente as cores do tema */

/* Alinhamento vertical do menu */
header .grid-layout nav .nav-list {
  display: flex;
  align-items: center;
}

header .grid-layout nav .nav-list li {
  display: flex;
  align-items: center;
}

/* Botão de tema no header */
header .theme-toggle {
  color: var(--text-primary);
  border-color: var(--border-color);
}

header .theme-toggle:hover {
  border-color: var(--btn-primary);
  background: rgba(0, 123, 255, 0.1);
}

[data-theme="dark"] header .theme-toggle {
  color: var(--text-primary);
  border-color: var(--border-color);
}

[data-theme="dark"] header .theme-toggle:hover {
  background: rgba(35, 137, 255, 0.15);
}

/* Cards de experiência */
.experience-card {
  background-color: var(--bg-header);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.experience-card:hover {
  border-color: var(--btn-primary);
  background: rgba(0, 123, 255, 0.05);
}

.experience-card.activeExperience {
  background: rgba(0, 123, 255, 0.08);
  border-color: var(--btn-primary) !important;
  color: var(--btn-primary);
}

/* Ícones de experiência */
.experience-icon {
  filter: grayscale(0);
  transition: filter 0.3s ease, transform 0.3s ease;
}

.experience-card:hover .experience-icon {
  transform: scale(1.1);
}

/* Modo escuro - ajustes de imagem */
[data-theme="dark"] img {
  opacity: 0.95;
}

[data-theme="dark"] img:hover {
  opacity: 1;
}

/* Links no conteúdo */
#s-about .grid-layout #about-text #link-sobre-mim {
  color: var(--link-color);
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

#s-about .grid-layout #about-text #link-sobre-mim::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--link-color);
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease;
}

#s-about .grid-layout #about-text #link-sobre-mim:hover {
  color: var(--btn-primary);
}

#s-about .grid-layout #about-text #link-sobre-mim:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
  background: var(--btn-primary);
}

/* Typewriter cursor */
.typewriter:after {
  color: var(--btn-primary);
}

/* Cards de curso - bordas específicas */
.teslabank {
  border-color: var(--btn-primary) !important;
}

.teslabank:hover {
  box-shadow: 0 8px 24px rgba(0, 123, 255, 0.25) !important;
}

.naped {
  border-color: var(--link-color) !important;
}

.naped:hover {
  box-shadow: 0 8px 24px rgba(0, 194, 209, 0.25) !important;
}

/* GitHub button */
.btgithub {
  background-color: var(--accent-color);
  color: #FFFFFF;
}

.btgithub:hover {
  background-color: var(--btn-primary);
  color: #FFFFFF;
}

/* Figuras flutuantes de tecnologia */
[data-theme="dark"] .about-figure {
  background-color: var(--bg-header);
  box-shadow: 0 4px 12px rgba(155, 107, 255, 0.2);
}

/* Mobile menu ajustes */
[data-theme="dark"] .mobile-menu div {
  background-color: var(--text-primary);
}

[data-theme="dark"] .nav-list {
  background-color: var(--bg-header);
  border-left: 1px solid var(--border-color);
}

/* Strong text */
strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Footer - garantir que links sejam sempre brancos */
footer .footer-links a {
  color: #FFFFFF !important;
}

footer .footer-content p {
  color: var(--text-primary);
}

footer {
  padding: 2rem 1rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-info p {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  text-decoration: none;
  padding: 0.8rem 1.6rem;
  font-size: 1.4rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  footer {
    padding: 1.5rem 1rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .footer-links a {
    width: 100%;
    max-width: 300px;
    font-size: 1.3rem;
  }

  .footer-info p {
    font-size: 1.2rem;
  }
}

/* WhatsApp hover específico */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5 {
  color: var(--text-primary);
}

[data-theme="dark"] p {
  color: var(--text-secondary);
}

/* Cards de produto na loja */
#s-store .grid-layout #store #store-cards article {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
}

#s-store .grid-layout #store #store-cards article:hover {
  border-color: var(--btn-primary);
  box-shadow: 
    0 12px 24px rgba(0, 123, 255, 0.15),
    inset 0 0 20px rgba(0, 123, 255, 0.05);
}

/* Ícones de produtos */
.store-icons {
  filter: brightness(1);
  transition: filter 0.3s ease, transform 0.3s ease;
}

[data-theme="dark"] .store-icons {
  filter: brightness(0.9);
}

#s-store .grid-layout #store #store-cards article:hover .store-icons {
  filter: brightness(1.1);
  transform: scale(1.1);
}

/* Inputs e forms (se houver) */
input,
textarea,
select {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--btn-primary);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Placeholder */
::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

/* Loading states */
.loading {
  color: var(--text-secondary);
}

/* Hover em links do menu */
@media screen and (max-width: 992px) {
  [data-theme="dark"] .nav-list {
    background-color: var(--bg-header);
  }
  
  header .grid-layout nav .nav-list li a {
    color: var(--text-primary);
  }
}

/* Animação suave no carregamento da página */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  animation: fadeIn 0.3s ease-in;
}

/* Ajustes de acessibilidade */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible para acessibilidade */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--btn-primary);
  outline-offset: 4px;
}

/* Ajuste fino do toggle em diferentes tamanhos */
@media screen and (max-width: 992px) {
  .theme-toggle {
    font-size: 1.6rem;
    padding: 12px 24px;
  }
  
  .theme-toggle-icon {
    font-size: 2.4rem;
  }
}

/* Transição suave entre temas */
html {
  transition: background-color 0.3s ease;
}

/* Garantir que códigos/pre mantenham legibilidade */
code,
pre {
  background-color: var(--bg-header);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: 'Courier New', monospace;
}

pre {
  padding: 16px;
  overflow-x: auto;
}

/* Divisores */
hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 32px 0;
}

/* Badges/Tags (se houver) */
.badge,
.tag {
  background-color: var(--bg-header);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 1.2rem;
  font-weight: 500;
}

/* Tooltip (se houver) */
.tooltip {
  background-color: var(--bg-header);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}
