:root {
  --fx-glass: rgba(255, 255, 255, 0.82);
  --fx-line: rgba(26, 54, 93, 0.14);
}

/* ---------- Filtre çubuğu ---------- */
.fx-pf-bar {
  position: relative;
  z-index: 50;
  margin: 0 0 var(--spacing-8);
  padding: 12px 14px;
  background: var(--fx-glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--fx-line);
  border-radius: var(--radius-xl);
  box-shadow: 0 6px 24px rgba(6, 30, 54, 0.08);
}

@media (min-width: 992px) {
  .fx-pf-bar {
    position: sticky;
    top: 92px;
  }
}

.fx-pf-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.fx-pf-chips {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.fx-pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  background: rgba(26, 54, 93, 0.06);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.fx-pf-chip:hover {
  background: rgba(200, 157, 59, 0.16);
  border-color: rgba(200, 157, 59, 0.45);
}

.fx-pf-chip:focus-visible,
.fx-pf-input:focus-visible,
.fx-pf-clear:focus-visible,
.fx-pf-reset:focus-visible,
.fx-pm-navbtn:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.fx-pf-chip[aria-pressed="true"] {
  color: var(--primary-deeper);
  background: var(--accent-gradient-gold, linear-gradient(135deg, #c89d3b, #e0b54a));
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(200, 157, 59, 0.35);
}

.fx-pf-chip-count {
  min-width: 22px;
  padding: 1px 7px;
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
  color: var(--primary-color);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
}

.fx-pf-search {
  position: relative;
  flex: 0 0 280px;
}

.fx-pf-search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--gray-500);
  pointer-events: none;
}

.fx-pf-input {
  width: 100%;
  padding: 10px 40px 10px 38px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--gray-800);
  background: #fff;
  border: 1px solid var(--fx-line);
  border-radius: 999px;
}

.fx-pf-input::placeholder {
  color: var(--gray-500);
}

.fx-pf-clear {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--gray-600);
  background: var(--gray-100);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.fx-pf-clear[hidden],
.fx-pf-empty[hidden] {
  display: none;
}

.fx-pf-clear:hover {
  color: #fff;
  background: var(--primary-color);
}

.fx-pf-result {
  margin-top: 8px;
  padding-left: 4px;
  font-size: 0.82rem;
  color: var(--gray-600);
}

.fx-pf-empty {
  margin: var(--spacing-8) 0;
  padding: var(--spacing-10, 40px) var(--spacing-6);
  text-align: center;
  background: var(--fx-glass);
  border: 1px dashed rgba(200, 157, 59, 0.55);
  border-radius: var(--radius-xl);
}

.fx-pf-empty-text {
  margin: 0 0 16px;
  font-size: 1.05rem;
  color: var(--primary-color);
}

.fx-pf-reset {
  padding: 10px 22px;
  font: inherit;
  font-weight: 600;
  color: var(--primary-deeper);
  background: var(--accent-gradient-gold, linear-gradient(135deg, #c89d3b, #e0b54a));
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.fx-pf-none {
  display: none;
}

.projects-grid .fx-pf-hidden {
  display: none;
}

.projects-grid .fx-pf-leave {
  animation: fx-pf-out 0.22s ease forwards;
  pointer-events: none;
}

.projects-grid .fx-pf-enter {
  animation: fx-pf-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(var(--fx-i, 0) * 45ms);
}

@keyframes fx-pf-out {
  to {
    opacity: 0;
    transform: scale(0.94);
  }
}

@keyframes fx-pf-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
}

@media (max-width: 991px) {
  .fx-pf-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .fx-pf-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .fx-pf-chips::-webkit-scrollbar {
    display: none;
  }

  .fx-pf-chip {
    flex: 0 0 auto;
  }

  .fx-pf-search {
    flex: 0 0 auto;
    width: 100%;
  }
}

/* ---------- Kapak paralaksı ---------- */
.project-image img.project-cover.fx-par {
  transform: translate3d(var(--fx-px, 0px), var(--fx-py, 0px), 0) scale(1);
  transition: transform 0.35s ease-out;
  will-change: transform;
}

.project-card:hover .project-image img.project-cover.fx-par {
  transform: translate3d(var(--fx-px, 0px), var(--fx-py, 0px), 0) scale(1.06);
}

/* ---------- CANLI nabzı ---------- */
.fx-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.65);
  animation: fx-live-pulse 1.8s ease-out infinite;
}

@keyframes fx-live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.65);
    opacity: 1;
  }
  70% {
    box-shadow: 0 0 0 7px rgba(52, 211, 153, 0);
    opacity: 0.55;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
    opacity: 1;
  }
}

/* ---------- Detay penceresi ---------- */
#projectModal.fx-pm-open {
  animation: fx-pm-fade 0.25s ease-out;
}

#projectModal.fx-pm-open .project-modal {
  animation: fx-pm-pop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#modalProjectContent.fx-pm-swap {
  animation: fx-pm-swap 0.3s ease-out;
}

@keyframes fx-pm-fade {
  from {
    opacity: 0;
  }
}

@keyframes fx-pm-pop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}

@keyframes fx-pm-swap {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
}

#projectModal .project-modal {
  width: min(600px, calc(100% - 2 * var(--spacing-4)));
}

.fx-pm-cover {
  position: relative;
  height: 260px;
  margin-bottom: var(--spacing-6);
  overflow: hidden;
  background: var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 22px rgba(6, 30, 54, 0.18);
}

.fx-pm-cover-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.fx-pm-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 90px;
  background: linear-gradient(to top, rgba(6, 30, 54, 0.72), transparent);
  pointer-events: none;
}

.fx-pm-cover-tags {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fx-pm-status,
.fx-pm-domain {
  padding: 4px 11px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #fff;
  background: rgba(6, 30, 54, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.fx-pm-domain {
  background: rgba(200, 157, 59, 0.9);
  color: var(--primary-deeper);
  border-color: transparent;
}

.fx-pm-bar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px var(--spacing-6);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--gray-200);
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}

.fx-pm-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fx-pm-navbtn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.fx-pm-navbtn:hover {
  color: #fff;
  background: var(--primary-color);
}

.fx-pm-count {
  min-width: 48px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  color: var(--gray-600);
}

.fx-pm-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fx-pm-btn {
  padding: 9px 16px;
  font-size: 0.88rem;
}

@media (max-width: 520px) {
  .fx-pm-cover {
    height: 190px;
  }

  .fx-pm-bar {
    padding: 10px 12px;
  }

  .fx-pm-acts {
    flex: 1 1 100%;
  }

  .fx-pm-btn {
    flex: 1 1 0;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }
}

/* ---------- Azaltılmış hareket ---------- */
@media (prefers-reduced-motion: reduce) {
  .fx-live-dot {
    animation: none;
    box-shadow: none;
  }

  .projects-grid .fx-pf-leave,
  .projects-grid .fx-pf-enter,
  #projectModal.fx-pm-open,
  #projectModal.fx-pm-open .project-modal,
  #modalProjectContent.fx-pm-swap {
    animation: none;
  }

  .fx-pf-chip,
  .fx-pm-navbtn,
  .project-image img.project-cover.fx-par {
    transition: none;
  }
}
