@font-face {
  font-family: "Nunito";
  src: url("/docs/Nunito.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

@keyframes fadeSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-15px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideLeft {
  0% {
    opacity: 0;
    transform: translateX(15px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

a {
  text-decoration: none;
  color: inherit;
}

.com-brilho {
  position: relative;
  overflow: hidden;
}

.post-card.com-brilho::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  pointer-events: none;
  background: radial-gradient(circle,
      rgba(88, 62, 142, 0.15) 0%,
      rgba(255, 255, 255, 0.05) 40%,
      transparent 80%);
  transform: translate(-50%, -50%);
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.com-brilho:hover::before {
  opacity: 1;
}

.divisor {
  animation: fadeSlideLeft 0.6s ease-out forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.botoes {
  animation: fadeSlideDown 0.6s ease-out forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

@media (max-width: 768px) {
  .botoes {
    opacity: 1;
    animation: none;
  }
}

.container {
  animation: fadeSlideDown 0.3s ease-out forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.card {
  opacity: 0;
  animation: fadeSlideDown 0.6s ease-out forwards;
}

.card:first-child {
  animation-delay: 0.4s;
}

.card:last-child {
  animation-delay: 0.55s;
}

.categoria {
  opacity: 0;
  animation: fadeSlideLeft 0.4s ease-out forwards;
}

.categoria:nth-child(1) {
  animation-delay: 0.1s;
}

.categoria:nth-child(2) {
  animation-delay: 0.2s;
}

.categoria:nth-child(3) {
  animation-delay: 0.3s;
}

.categoria:nth-child(4) {
  animation-delay: 0.4s;
}

.forum-container .animar {
  opacity: 0;
  animation: fadeSlideLeft 0.4s ease-out forwards;
}

.left-image {
  animation-delay: 0.1s;
}

.right-content h1 {
  animation-delay: 0.3s;
}

.right-content .descricao {
  animation-delay: 0.5s;
}

.right-content .mensagem:nth-of-type(1) {
  animation-delay: 0.7s;
}

.right-content .mensagem:nth-of-type(2) {
  animation-delay: 0.9s;
}

.botao-nova {
  animation: fadeSlideDown 0.6s ease-out forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.cadastro-container {
  animation: fadeSlideDown 0.6s ease-out forwards;
  opacity: 0;
}

.form2-container {
  animation: fadeSlideDown 0.6s ease-out forwards;
  opacity: 0;
}

.detalhe-lateral {
  animation: fadeSlideLeft 0.6s ease-out forwards;
  opacity: 0;
}

.forum-container {
  animation: fadeSlideLeft 0.6s ease-out forwards;
  opacity: 0;
}


.articles-grid {
  animation: fadeSlideLeft 0.4s ease-out forwards;
  opacity: 0;
}

.event-list.horizontal {
  animation: fadeSlideLeft 0.6s ease-out forwards;
  opacity: 0;
}

.content {
  animation: fadeSlideLeft 0.4s ease-out forwards;
  opacity: 0;
}

.eventos-hero {
  animation: fadeSlideLeft 0.4s ease-out forwards;
  opacity: 0;
}

.eventos-grid {
  animation: fadeSlideDown 0.6s ease-out forwards;
  opacity: 0;
}

.artigo-wrapper {
  animation: fadeSlideDown 0.6s ease-out forwards;
  opacity: 0;
}

/* ==== POPUP GLOBAL ==== */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
}

.popup.hidden {
  display: none;
}

.popup-content {
  background: #fff;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  max-width: 400px;
  text-align: center;
  font-family: 'Nunito', sans-serif;
  position: relative;
  animation: popupFade 0.3s ease;
}

#popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 20px;
  cursor: pointer;
  color: #888;
}

#popup-close:hover {
  color: #000;
}

@keyframes popupFade {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .top-header {
    height: auto;
    padding: 12px 8px;
  }

  .search-box {
    width: 220px;
  }

  .company-name {
    font-size: 16px;
  }

  .user-avatar img {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .top-header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    width: 100%;
    padding: 12px 8px;
    gap: 8px;
    align-items: start;
  }

  .left-section {
    grid-column: 1 / 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .user-avatar {
    grid-column: 2 / 3;
    grid-row: 1;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding-top: 2px;
  }

  .search-box {
    grid-column: 1 / 3;
    grid-row: 2;
    width: 100%;
  }
}

/* === Autocomplete box === */
.search-results {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 999;
  transition: all 0.2s ease;
}

.search-results.hidden {
  display: none;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background 0.2s ease;
}

.result-item:last-child {
  border-bottom: none;
}

.result-item:hover {
  background: #f8f9fa;
}

.result-icon {
  font-size: 18px;
  color: #666;
  width: 24px;
  text-align: center;
}

.result-text {
  flex: 1;
}

.tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: bold;
}

.tag-posts {
  background: #e3f2fd;
  color: #1976d2;
}

.tag-artigos {
  background: #f3e5f5;
  color: #6a1b9a;
}

.tag-eventos {
  background: #fff3e0;
  color: #e65100;
}

.tag-perfis {
  background: #e8f5e9;
  color: #2e7d32;
}

.animate-in {
  animation: fadeSlide 0.25s ease forwards;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-menu {
  position: absolute;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 10px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform-origin: top;
  animation: dropdown 0.25s ease;
  z-index: 1000;
}

.filter-menu.hidden {
  display: none;
}

.filter-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.filter-menu input[type="checkbox"] {
  align-items: left;

  margin: 0;
  accent-color: #644c9a;
}

.filter-menu input {
  accent-color: #644c9a;
  transform: scale(1.1);
}

.filter-menu label:hover {
  color: #644c9a;
}

@keyframes dropdown {
  from {
    opacity: 0;
    transform: scaleY(0.9);
  }

  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

.loader {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.loader .dot {
  width: 10px;
  height: 10px;
  margin: 0 4px;
  background-color: #644c9a; 
  border-radius: 50%;
  animation: bounce 0.6s infinite alternate;
}

.loader .dot:nth-child(2) {
  animation-delay: 0.2s;
}
.loader .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounce {
  from {
    transform: translateY(0);
    opacity: 0.5;
  }
  to {
    transform: translateY(-10px);
    opacity: 1;
  }
}
