/* Projects Listing Page Styles */

/* Header Styles */
.projects-header {
  padding: 120px 40px 40px;
  background-color: var(--bg-color);
}

.header-content {
  max-width: 900px;
  margin: 0 auto;
}

.projects-header h1 {
  font-size: 4.5rem;
  font-weight: 700;
  margin-bottom: 30px;
}

.intro-text {
  font-size: 1.3rem;
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 800px;
  color:#666;
}

.project-count {
  font-size: 1.1rem;
  opacity: 0.7;
  font-weight: 500;
  margin-top: 20px;
}

/* Filter Section Styles */
.filter-section {
  padding: 0 40px 40px;
  position: sticky;
  top: 0;
  z-index: 800;
  background-color: var(--bg-color);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: box-shadow 0.3s;
}

.filter-section.sticky {
  box-shadow: 0 5px 15px rgba(0,0,0,0.03);
  padding-top: 20px;
}

.filter-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Search Bar */
.search-container {
  position: relative;
  width: 100%;
  max-width: 350px;
}

#project-search {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border: 1px solid rgba(0,0,0,0.1);
  font-size: 0.9rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#project-search:focus {
  outline: none;
  border-color: var(--accent-color);
}

.search-clear {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  padding: 5px;
  transition: opacity 0.3s;
  display: none;
}

.search-clear.visible {
  display: block;
}

.search-clear:hover {
  opacity: 1;
}

/* Filter Groups */
.filter-group {
  margin-bottom: 15px;
}

.filter-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-weight: 600;
  color: #666;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  padding: 8px 15px;
  border: 1px solid rgba(0,0,0,0.1);
  background: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}

.filter-btn:hover {
  border-color: rgba(0,0,0,0.3);
}

.filter-btn.active {
  background-color: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

/* Sort Dropdown */
.sort-container {
  display: flex;
  align-items: center;
}

.sort-label {
  margin-right: 10px;
  font-size: 0.9rem;
  opacity: 0.7;
}

#sort-select {
  padding: 8px 15px;
  border: 1px solid rgba(0,0,0,0.1);
  background: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.3s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 30px;
}

#sort-select:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* Projects Grid */
.projects-grid-section {
  padding: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-bottom: 60px;
}

/* Project Card Styles */
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-color);
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: transform 0.5s, opacity 0.5s;
}

.project-card.appear {
  opacity: 1;
  transform: translateY(0);
}

.card-image-container {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0, 0.2, 1);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s;
}

.view-project {
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 1px;
  transform: translateY(20px);
  transition: transform 0.4s;
}

.project-card:hover .card-image,
.project-card:focus-within .card-image {
  transform: scale(1.05);
}

.project-card:hover .card-overlay,
.project-card:focus-within .card-overlay {
  opacity: 1;
}

.project-card:hover .view-project,
.project-card:focus-within .view-project {
  transform: translateY(0);
}

.card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.client {
  font-weight: 500;
}

.industry {
  opacity: 0.7;
}

.card-tags {
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 4px 10px;
  background-color: var(--secondary-color);
  border-radius: 0px;
  font-size: 0.8rem;
  font-weight: 500;
}

.card-description {
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.8;
  flex-grow: 1;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.9rem;
}

.external-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary-color);
  transition: background-color 0.3s, transform 0.3s;
}

.external-link:hover,
.external-link:focus {
  background: var(--accent-color);
  color: white;
  transform: translateY(-3px);
}

/* No Results Message */
.no-results {
  padding: 80px 20px;
  text-align: center;
}

.no-results.hidden {
  display: none;
}

.no-results-content {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.no-results svg {
  opacity: 0.5;
}

.no-results h3 {
  font-size: 1.8rem;
  font-weight: 700;
}

.no-results p {
  opacity: 0.7;
  margin-bottom: 20px;
}

.btn-reset {
  padding: 10px 25px;
  background-color: var(--secondary-color);
  color: var(--text-color);
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-reset:hover,
.btn-reset:focus {
  background-color: var(--accent-color);
  color: white;
}

/* Animation Classes */
.fade-out {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
}

.fade-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s, transform 0.5s;
}

/* Responsive Design */
/* Large Desktop: 1200px+ (default styles) */

/* Tablet and small desktop */
@media (max-width: 1024px) {
  .projects-header {
    padding: 140px 40px 70px;
  }

  .projects-header h1 {
    font-size: 3.8rem;
  }

  .intro-text {
    font-size: 1.4rem;
  }

  .filter-container {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .search-container {
    max-width: 100%;
  }

  .filter-group {
    width: 100%;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }
}

/* Mobile landscape and small tablets */
@media (max-width: 768px) {
  .projects-header {
    padding: 80px 20px 16px;
  }

  .projects-header h1 {
    font-size: 2.8rem;
  }

  .intro-text {
    font-size: 1.1rem;
  }

  .filter-section {
    padding: 0 20px 20px;
  }

  .filter-buttons {
    overflow-x: auto;
    padding-bottom: 5px;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .filter-btn {
    min-width: auto;
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  .projects-grid-section {
    padding: 0px 20px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .card-title {
    font-size: 1.4rem;
  }

  .card-description {
    font-size: 0.95rem;
  }
  .card-content {
    padding: 25px 0;
  }
}

/* Mobile portrait */
@media (max-width: 480px) {
  .projects-header {
    padding: 80px 20px 0px;
  }

  .projects-header h1 {
    font-size: 2.2rem;
  }

  .intro-text {
    font-size: 1rem;
  }

  .filter-buttons {
    gap: 6px;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .projects-grid-section {
    padding: 25px 15px;
  }

  .projects-grid {
    gap: 20px;
  }

  .card-content {
    padding: 20px;
  }

  .card-title {
    font-size: 1.3rem;
  }

  .card-description {
    font-size: 0.9rem;
  }

  .card-meta {
    font-size: 0.8rem;
  }
  .card-content {
    padding: 20px 0;
  }
}

/* Very small mobile screens */
@media (max-width: 375px) {
  .projects-header h1 {
    font-size: 2rem;
  }

  .intro-text {
    font-size: 0.95rem;
  }

  .card-title {
    font-size: 1.2rem;
  }

  .card-description {
    font-size: 0.85rem;
  }
}