.navbar a {
  color: black;
}

.navbar {
  background-color: white;
  padding: 30px;
}

/* Dropdown Slide Banner */
.nav-banner {
  background-color: white;
  color: black;
  text-align: center;
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
  box-shadow: 0 1px rgba(0, 0, 0, 0.1);

  position: absolute;
  top: 100%; /* right under nav */
  left: 0;
  width: 100%;

  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s ease, opacity 0.5s ease;
  z-index: 998;
}

/* Show state */
.nav-banner.show {
  transform: translateY(0);
  opacity: 1;
}

/* Content: slide in from left */
.nav-banner-content {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: 0.3s;
}

.nav-banner.show .nav-banner-content {
  opacity: 1;
  transform: translateY(0);
}

@media screen and (max-width: 500px) {
  .full-msg {
    display: none;
  }

  .projects-note {
    font-size: 0.8rem;
    padding: 0.6rem 1.2rem;
  }
}

/* Projects Heading */
#projects-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  line-height: 50px;
}

.p-header {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.5em;
}

.p-description {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 3em;
}

/* Filter Buttons Container */
.filter-buttons {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.6rem;
  padding: 10px;
  justify-content: center;
  text-align: center;
  scrollbar-width: none; /* Firefox */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.filter-buttons::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Filter Button Styling */
.filter-btn {
  flex: 0 0 auto;
  padding: 0.6rem 1.2rem;
  background-color: white;
  color: black;
  font-family: "Arial", sans-serif;
  font-size: 1em;
  border: none;
  border-radius: 30px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  scroll-snap-align: start;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInFilter 0.4s ease forwards;
}

/* Hover State */
.filter-btn:hover {
  background-color: #f4c430;
  color: white;
}

/* Active State */
.filter-btn.active {
  background-color: #f4c430;
  color: white;
  font-weight: 600;
}

/* Category Color Variants */
.filter-btn.video:hover,
.filter-btn.video.active {
  background-color: #f49f30;
  color: white;
}

.filter-btn.graphic:hover,
.filter-btn.graphic.active {
  background-color: #00c896;
  color: white;
}

.filter-btn.web:hover,
.filter-btn.web.active {
  background-color: #7d5fff;
  color: white;
}

/* Search button (icon) */
.filter-btn.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 44px;
}

/* Advanced Search Panel */
.advanced-search {
  width: 100%;
  padding: 0 10px;
  margin-top: 1.5rem;

  display: none; /* hidden by default */
  flex-direction: column;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transition: opacity 0.25s ease;
}

.advanced-search.open {
  display: flex;
  opacity: 1;
}

/* Input + dropdown container */
.advanced-search-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  width: 100%;
  max-width: 700px;
}

/* Clear button inside search bar */
.clear-search-btn {
  position: absolute;
  align-items: center;
  justify-content: center;
  right: 20px;
  top: 56%;
  transform: translateY(-50%);

  font-size: 25px;
  font-weight: 300;
  color: #888;
  cursor: pointer;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;

  user-select: none;
}

.advanced-search-row {
  position: relative;
}

/* When active, make the X clickable */
.clear-search-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Search input pill */
.advanced-search-input {
  box-sizing: border-box;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #444;
  padding: 0 1rem;
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
  line-height: 1;
  color: #000;
  background-color: #fff;
  outline: none;

  flex: 1 1 auto;
  width: 100%;
  max-width: 700px;
  min-width: 200px;
}

.advanced-search-input:focus {
  border-color: #f4c430;
  box-shadow: none;
}

/* Custom scope dropdown */
.scope-dropdown {
  position: relative;
  display: inline-flex;
}

/* Visible scope pill */
.scope-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;

  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #f9f9f9;
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;

  height: auto;
}

.scope-label {
  white-space: nowrap;
}

.scope-arrow {
  font-size: 0.75rem;
  transform: translateY(1px);
}

/* Dropdown menu */
.scope-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 180px;

  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  padding: 4px 0;

  opacity: 0;
  pointer-events: none;
  transform-origin: top center;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9999;
}

.scope-dropdown.open .scope-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Scope options */
.scope-option {
  display: block;
  width: 100%;
  padding: 0.45rem 1rem;
  border: none;
  background: transparent;
  text-align: left;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
}

.scope-option:hover {
  background: #f4f4f4;
}

.scope-option.active {
  font-weight: 600;
}

/* Container for tags + future filters */
.advanced-search-tags {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* First row: all pills in one line */
.tag-header-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
  text-align: center;
}

/* All fields dropdown pill */
.scope-dropdown {
  display: inline-flex;
}

.scope-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #f9f9f9;
  font-size: 0.85rem;
  cursor: pointer;
}

.scope-arrow {
  font-size: 0.75rem;
  transform: translateY(1px);
}

/* Popular tags pill (styled to match scope-toggle) */
.tag-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #f9f9f9;
  font-size: 0.85rem;
  cursor: pointer;
}

.tag-toggle-arrow {
  font-size: 0.75rem;
  transform: translateY(1px);
}

/* Disabled meta filters */
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #eee;
  background: #f5f5f5;
  font-size: 0.8rem;
  cursor: default;
  color: #999;
}

.disabled-pill {
  opacity: 0.7;
}

.pill-icon {
  font-size: 0.8rem;
}

/* Collapsible popular tag row */
.tag-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;

  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

/* When open, show the popular tags */
.advanced-search-tags.open .tag-chip-row {
  max-height: 200px;
  opacity: 1;
}

/* Individual tag chips */
.search-tag {
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  border: none;
  font-size: 0.85rem;
  background: #f4f4f4;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.search-tag:hover {
  background: #f4c430;
  color: white;
  transform: translateY(-1px);
}

/* Mobile layout for filters + search */
@media (max-width: 768px) {
  /* Filter buttons: wrap and stay centered on mobile */
  .filter-buttons {
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    overflow-x: visible;
    padding-inline: 12px;
  }

  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8em;
  }

  .advanced-search {
    width: 100%;
    padding-inline: 12px;
    align-items: stretch;
  }

  /* Stack search input above everything */
  .advanced-search-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    gap: 0.6rem;
  }

  .advanced-search-input {
    width: 100%;
    max-width: 100%;
  }

  /* Tags section: centre pills + tags */
  .advanced-search-tags {
    align-items: center;
    text-align: center;
    padding-inline: 12px;
  }

  .tag-header-row {
    justify-content: center;
  }

  .tag-chip-row {
    justify-content: center;
  }

  .advanced-search-tags .search-tag {
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .scope-toggle {
    padding: 0.25rem 0.8rem;
  }

  .tag-toggle {
    padding: 0.25rem 0.8rem;
  }
}

/* Animation */
@keyframes fadeInFilter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Projects */
.projects {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  min-height: auto;
  padding: 20px 0 40px;
  box-sizing: border-box;
}

.project-item {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-item.hide {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
}

.wrapper {
  position: relative;
  height: 300px;
  width: 600px;
  margin: 35px 0;

  display: flex;
  justify-content: center;
  align-items: center;

  transition: all 200ms ease-in-out;
}

.image-wrapper {
  height: 300px;
  width: 450px;
  overflow: hidden;
  border-radius: 5px;
  transition: all 200ms ease-in-out;
}

img {
  height: 300px;
  width: 450px;
  object-fit: cover;
  object-position: top;
  transition: all 200ms ease-in-out;
}

.book-design-image {
  object-position: center;
}

.header-wrapper {
  display: flex;
  flex-direction: column;
  position: absolute;
  height: 300px;
  width: 300px;
  left: 380px;
  transition: all 200ms ease-in-out;
  overflow: hidden;
}

.h1-title {
  position: relative;
  bottom: 0;
  height: 300px;
  margin: 50px 0;
  color: black;
  font-size: 60px;
  cursor: pointer;
  text-transform: uppercase;
  line-height: 1.25;
  transition: all 200ms ease-in-out;
}

.wrapper:hover img {
  transform: scale(2);
  object-position: left;
}

.wrapper:hover .h1-title {
  bottom: 300px;
  transform: scale(0.4);
}

.wrapper:hover .image-wrapper {
  width: 900px;
}

/* Web Overlay */
.web-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: all 400ms ease;
  z-index: 1100;
}

.web-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.web-popup {
  position: fixed;
  width: 80%;
  height: 80vh;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -200%);
  transition: all 400ms ease;
  z-index: 1101;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 10px;
  overflow: hidden;
}

.web-popup::-webkit-scrollbar {
  display: none;
}

.web-popup {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.web-overlay.active .web-popup {
  transform: translate(-50%, -50%);
}

.web-popup iframe {
  width: 100%;
  flex: 1;
  border: none;
}

.visit-site-btn {
  background: #f4c430;
  text-align: center;
  padding: 15px;
}

.visit-site-btn:hover {
  background: #ecb409;
  cursor: default;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.text:hover {
  cursor: pointer;
}

.visit-site-btn a {
  font-family: Arial, sans-serif;
  font-weight: bold;
  color: black;
  text-decoration: none;
}

/* Gallery Overlay */
.gallery-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  z-index: 1100;
  transition: 0.3s ease;
}

.gallery-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.gallery-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.gallery-popup::-webkit-scrollbar {
  display: none;
}

.gallery-popup {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.gallery-images img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 15px;
  border-radius: 5px;
  box-sizing: border-box;
}

.close-gallery {
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
  font-size: 24px;
}

/* Player Overlay */
.player-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: all 400ms ease;
  z-index: 1100;
}

.player-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.player-popup {
  position: fixed;
  width: 80%;
  margin: 80px 0;
  left: 50%;
  transform: translate(-50%, -200%);
  transition: all 400ms ease;
  z-index: 1101;
}

.player-overlay.active .player-popup {
  transform: translate(-50%, 0);
}

.player-popup iframe {
  width: 100%;
  aspect-ratio: 16/9;
}

/* Responsive Design */
/* Mobile Styles */
@media screen and (max-width: 768px) {
  /* Section: Projects Hero (Heading & Description) */
  #projects-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    line-height: 40px;
  }

  .p-header {
    font-size: 1.2em;
    flex-wrap: nowrap;
    overflow-x: none;
  } */

  .p-description {
    font-size: 0.9em;
    flex-wrap: nowrap;
    overflow-x: none;
  }

  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8em;
  }

  /* Project Card Wrapper Layout */
  .wrapper {
    position: relative;
    width: 100%;
    max-width: 90vw;
    height: auto;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Image Styling */
  .image-wrapper {
    width: 100%;
    height: 500px;
    overflow: hidden;
    position: relative;
    border-radius: 5px;
  }

  .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
    filter: brightness(0.85);
  }

  .wrapper:hover .image-wrapper img {
    transform: scale(1.05);
  }

  /* Text Over Image */
  .header-wrapper {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 90%;
    color: white;
    z-index: 2;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    pointer-events: auto;
  }

  .h1-title {
    font-size: clamp(2rem, 2.5vw, 2.8rem);
    margin: 0.3rem 0;
    line-height: 1.4;
    color: white;
    transition: none !important;
    bottom: auto !important;
    transform: none !important;
  }

  .wrapper:hover .h1-title {
    transform: none !important;
    bottom: auto !important;
  }

  .wrapper:hover .image-wrapper {
    width: 100%;
  }
}

/* Only apply hover effects on desktop */
@media (hover: hover) and (pointer: fine) {
  .wrapper:hover img {
    transform: scale(2);
    object-position: left;
  }

  .wrapper:hover .h1-title {
    bottom: 300px;
    transform: scale(0.4);
  }

  .wrapper:hover .image-wrapper {
    width: 900px;
  }
}

/* --- Force widgets to match gallery sizing --- */

.floating-widget-stack .stats-panel,
.floating-widget-stack .changelog-box {
  width: 240px;        /* adjust to taste, 240–260 will look like your narrow version */
  max-width: 260px;
  padding: 10px 12px;  /* keeps them tight, not stretched */
  box-sizing: border-box;
  text-align: left;
}

/* Keep text compact inside widgets */
.floating-widget-stack .stats-panel p,
.floating-widget-stack #changelog-content li {
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 8px 0 10px;
  text-align: left;
}

/* Optional: keep headings consistent */
.floating-widget-stack .stats-panel h4,
.floating-widget-stack #changelog-content h4 {
  font-size: 1rem;
}
