/* TD Classic - Projects styles (archive & single) */

.project-post .card-img-top,
.project-post .ratio img {
  transition: transform 0.35s ease;
}

.project-post a:hover .card-img-top,
.project-post a:hover .ratio img {
  transform: scale(1.04);
}

.project-post .card-title {
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.project-post .object-fit-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Single project spacing tweaks */
.entry-content img {
  border-radius: 0.375rem;
}

.widget .widget-title {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

/* Buttons: modern, clear, balanced */
.project-post .btn,
.post-navigation .btn,
.project-cta .btn {
  --td-btn-radius: 0.5rem;
  --td-btn-py: 0.5rem;
  --td-btn-px: 0.875rem;
  --td-btn-fs: 0.9375rem; /* 15px */
  border-radius: var(--td-btn-radius);
  padding: var(--td-btn-py) var(--td-btn-px);
  font-weight: 600;
  font-size: var(--td-btn-fs);
  line-height: 1.2;
}

/* Primary = dark theme-aligned */
.project-post .btn-primary,
.post-navigation .btn-primary,
.project-cta .btn-primary {
  background-color: #111;
  border-color: #111;
}
.project-post .btn-primary:hover,
.post-navigation .btn-primary:hover,
.project-cta .btn-primary:hover {
  background-color: #000;
  border-color: #000;
}

/* Outline primary = subtle gray outline, fill on hover */
.project-post .btn-outline-primary,
.post-navigation .btn-outline-primary {
  color: #111;
  border-color: #c9c9c9;
}
.project-post .btn-outline-primary:hover,
.post-navigation .btn-outline-primary:hover {
  background-color: #111;
  border-color: #111;
  color: #fff;
}

/* Light button in CTA card */
.project-cta .btn-light {
  color: #111;
  background-color: #fff;
  border-color: #e5e5e5;
}
.project-cta .btn-light:hover {
  background-color: #f2f2f2;
  border-color: #d9d9d9;
}

/* Small variant normalization */
.project-post .btn-sm {
  --td-btn-py: 0.45rem;
  --td-btn-px: 0.75rem;
  --td-btn-fs: 0.875rem;
}

/* Minimal gaps preference */
.row.g-3 {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}
.row.g-4 {
  --bs-gutter-x: 1.25rem;
  --bs-gutter-y: 1.25rem;
}

/* Breadcrumb */
.breadcrumb {
  --bs-breadcrumb-margin-bottom: 0;
  font-size: 0.875rem;
}
.breadcrumb-item + .breadcrumb-item::before {
  color: #9aa0a6;
}
.breadcrumb a {
  color: #555;
  text-decoration: none;
}
.breadcrumb a:hover {
  color: #111;
  text-decoration: underline;
}

/* Sticky sidebar */
.sticky-sidebar {
  position: sticky;
  top: 2rem;
}

/* Projects hero */
.projects-hero {
  padding: 3rem 0 1.5rem;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}
.projects-hero .hero-title {
  margin: 0;
  font-size: 2rem;
}
.projects-hero .hero-title,
.project-title a,
.entry-title {
  color: #000;
}
.projects-hero .hero-subtitle {
  color: #6b7280;
  margin: 0.25rem 0 0;
}

/* Filter */
.projects-filter {
  padding: 1rem 0 0.5rem;
}
.filter-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.filter-tab {
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
}
.filter-tab:hover {
  border-color: #d1d5db;
}
.filter-tab.active {
  background: #111;
  color: #fff;
  border-color: #111;
}
.filter-search {
  position: relative;
  display: flex;
  align-items: center;
}
.filter-search input {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}
.filter-search svg {
  position: absolute;
  right: 0.5rem;
  color: #9aa0a6;
}

/* Project cards grid */
.projects-grid {
  padding: 1rem 0 2rem;
}
.projects-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 991.98px) {
  .projects-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 575.98px) {
  .projects-container {
    grid-template-columns: 1fr;
  }
}

.project-card {
  border: 1px solid #eee;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s ease;
}
.project-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.project-image {
  position: relative;
}
.project-placeholder {
  height: 0;
  padding-bottom: 75%;
  background: #f3f4f6;
}
.project-description-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 35%,
    rgba(0, 0, 0, 0.55) 100%
  );
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #fff;
  display: flex;
  align-items: end;
}
.project-card:hover .project-description-overlay {
  opacity: 1;
}
.project-description-overlay .description-content {
  padding: 0.75rem;
}
.project-description-overlay h4 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
}
.project-description-overlay .description-text {
  font-size: 0.875rem;
  opacity: 0.95;
}

.project-content {
  padding: 0.75rem 0.75rem 1rem;
}
.project-title {
  font-size: 1rem;
  margin: 0 0 0.25rem;
}
.project-title a {
  color: #111;
  text-decoration: none;
}
.project-title a:hover {
  text-decoration: underline;
}
.project-meta {
  margin: 0.25rem 0 0.25rem;
}
.project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.375rem;
}
.badge-tag {
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 0.5rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  border: 1px solid #e2e8f0;
}
.project-category-highlight {
  margin: 0.25rem 0 0.5rem;
}
.category-badge {
  background: #f3f4f6;
  color: #111;
  border-radius: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}
.project-excerpt {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}
.project-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.btn-view-details {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: #111;
  text-decoration: none;
  font-weight: 600;
}
.btn-view-details:hover {
  text-decoration: underline;
}

/* Focus states for accessibility */
.filter-tab:focus,
.btn-view-details:focus,
.projects-pagination a:focus,
.post-navigation .btn:focus {
  outline: 2px solid #111;
  outline-offset: 2px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .project-post .card-img-top,
  .project-post .ratio img,
  .project-card,
  .project-description-overlay {
    transition: none;
  }
}

/* Section helpers */
#case-studies .card img {
  object-fit: cover;
}
#projects-woo-featured .card img {
  object-fit: cover;
}
#projects-news .card img {
  object-fit: cover;
}
#projects-woo-featured .card {
  border: 1px solid rgba(255, 255, 255, 0.06);
}
#projects-news .card {
  border: 1px solid rgba(255, 255, 255, 0.06);
}
