/* ==========================================================================
   PROJECTS CATALOGUE STYLESHEET
   ========================================================================== */
.catalogue-page {
  background-color: #08090b;
  color: #ffffff;
  min-height: 100vh;
}

.catalogue-wrapper {
  max-width: 1360px;
  margin: 0 auto;
  padding: 6.5rem 2rem 5rem;
}

/* Header & Banner */
.catalogue-header {
  margin-bottom: 3rem;
  padding: 3rem;
  background: rgba(18, 19, 24, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-accent-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.back-link:hover {
  transform: translateX(-4px);
  color: #ffffff;
}

.catalogue-title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.catalogue-desc {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 720px;
  line-height: 1.6;
  margin-bottom: 2.25rem;
}

/* Top Search Bar */
.search-bar-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

#project-search {
  width: 100%;
  background: rgba(10, 11, 14, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  padding: 1rem 3.5rem 1rem 3.25rem;
  color: #ffffff;
  font-size: 1.05rem;
  font-family: var(--font-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#project-search:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(255, 87, 34, 0.2);
}

#project-search::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.clear-btn {
  position: absolute;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.clear-btn:hover {
  background: rgba(255, 87, 34, 0.3);
  color: #ffffff;
}

.search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.92rem;
  padding: 0 0.5rem;
}

.search-meta strong {
  color: #ffffff;
}

.btn-filter-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

/* Two-Column Layout */
.catalogue-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 2.5rem;
  align-items: flex-start;
}

/* Sidebar Filters */
.catalogue-sidebar {
  position: sticky;
  top: 5.5rem;
  background: rgba(18, 19, 24, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 1.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.btn-reset {
  background: transparent;
  border: none;
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-reset:hover {
  text-decoration: underline;
}

.filter-group {
  margin-bottom: 1.75rem;
}

.filter-group-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent-soft);
  margin-bottom: 0.85rem;
}

.filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
  cursor: pointer;
  user-select: none;
}

.filter-checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.filter-checkbox-label:hover .custom-checkbox {
  border-color: var(--color-accent);
}

.filter-checkbox-label input:checked ~ .custom-checkbox {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}

.filter-checkbox-label input:checked ~ .custom-checkbox::after {
  content: '✓';
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
}

.filter-checkbox-label .label-text {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s;
}

.filter-checkbox-label:hover .label-text {
  color: #ffffff;
}

/* Catalogue Cards Grid */
.catalogue-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.catalogue-card {
  background: rgba(18, 19, 24, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.catalogue-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55);
}

.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111216;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.catalogue-card:hover .card-thumb img {
  transform: scale(1.05);
}

.card-pill {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(10, 11, 14, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.card-pill.fintech { border-color: rgba(255, 153, 0, 0.5); color: #ffb74d; }
.card-pill.backend { border-color: rgba(0, 229, 255, 0.5); color: #80deea; }
.card-pill.cloud   { border-color: rgba(255, 87, 34, 0.5); color: #ff8a65; }
.card-pill.ml      { border-color: rgba(179, 136, 255, 0.5); color: #d1c4e9; }

.card-details {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-client {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.65rem;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-tags span {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(18, 19, 24, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 24px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.5rem;
}

/* Modal / Lightbox */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.project-modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
}

.modal-box {
  position: relative;
  z-index: 10;
  background: #111216;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  max-width: 760px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 20;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.modal-media img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

.modal-body {
  padding: 2.25rem;
}

.modal-client {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.4rem;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.modal-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.5rem;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.modal-tags span {
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.catalogue-footer {
  text-align: center;
  padding: 3rem 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.catalogue-footer a {
  color: var(--color-accent-soft);
  text-decoration: none;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .catalogue-layout {
    grid-template-columns: 240px 1fr;
    gap: 1.75rem;
  }
  .catalogue-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .catalogue-wrapper {
    padding: 1.5rem 1rem 3rem;
  }
  
  .catalogue-header {
    padding: 1.75rem 1.25rem;
    border-radius: 24px;
  }

  .btn-filter-toggle {
    display: inline-flex;
  }

  .catalogue-layout {
    grid-template-columns: 1fr;
  }

  .catalogue-sidebar {
    display: none;
    position: static;
    margin-bottom: 1.5rem;
  }

  .catalogue-sidebar.mobile-open {
    display: block;
    animation: fadeIn 0.3s ease;
  }

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

