/* =========================================
   1. BARRA DE FERRAMENTAS
   ========================================= */

.toolbar-wrapper {
  background: rgba(22, 24, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.toolbar-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 10px 40px rgba(255, 122, 24, 0.15);
}

.toolbar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  width: 100%;
}

.toolbar-input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.95rem;
  width: 100%;
  padding: 0.5rem 0;
  outline: none;
  box-shadow: none !important;
}

.toolbar-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 0 10px;
  flex-shrink: 0;
}

.filter-group {
  display: flex;
  align-items: center;
  width: 100%;
}

.input-group-text {
  background: transparent !important;
  border: none !important;
  color: var(--accent);
  padding-left: 0;
}

/* =========================================
   2. CUSTOM SELECT
   ========================================= */

.custom-select-wrapper {
  position: relative;
  width: 100%;
  cursor: pointer;
  user-select: none;
  font-family: var(--font-sans);
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  transition: all 0.3s;
}

.custom-select-wrapper.open .custom-select-trigger {
  color: var(--accent);
}

.custom-select-trigger i {
  transition: transform 0.3s ease;
}

.custom-select-wrapper.open .custom-select-trigger i {
  transform: rotate(180deg);
}

.custom-options {
  position: absolute;
  top: 160%;
  left: -10px;
  right: -10px;
  background: rgba(15, 17, 21, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1000;
  padding: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.custom-select-wrapper.open .custom-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.option {
  padding: 10px 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
  margin-bottom: 2px;
}

.option:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  padding-left: 20px;
}

.option.selected {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.custom-options::-webkit-scrollbar {
  width: 4px;
}
.custom-options::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
.custom-options::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

/* =========================================
   3. RESPONSIVIDADE (MOBILE)
   ========================================= */
@media (max-width: 991px) {
  .toolbar-wrapper {
    flex-direction: column;
    border-radius: 20px;
    padding: 1.5rem;
    gap: 1.2rem;
    align-items: stretch;
  }

  .toolbar-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.8rem;
  }

  .toolbar-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    justify-content: center;
  }

  .toolbar-input,
  .custom-select-trigger {
    font-size: 1rem;
    padding: 5px 0;
  }
}

/* =========================================
   4. CARD DE PROJETO
   ========================================= */

.portfolio-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition:
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s ease;
  position: relative;
  height: 100%;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 122, 24, 0.3);
}

.card-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  border-bottom: 1px solid var(--border);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.portfolio-card:hover .card-img {
  transform: scale(1.08);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 13, 16, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
  z-index: 2;
}

.portfolio-card:hover .card-overlay {
  opacity: 1;
}

.category-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 3; /* Fica acima do overlay */
}

.tech-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.portfolio-card:hover .tech-badge {
  background: rgba(255, 122, 24, 0.1);
  color: var(--accent);
  border-color: rgba(255, 122, 24, 0.2);
}

.projeto-finalizado:hover .tech-badge {
  background: rgba(7, 255, 69, 0.1);
  color: rgba(7, 255, 69, 0.623);
  border-color: rgba(7, 255, 69, 0.3);
}

.social-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
}
