  /* all-projects.css */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  html {
    font-size: 16px;
  }

  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }
      
  body {
    padding-top: 50px;
    font-family: 'Crimson Pro', serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    width: 100%;
  }

  .sub-header {
    background-image: url('../images/background-image.jpg');
    background-size: cover;
    background-position: center;
    height: 180px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Crimson Pro', serif;
    position: relative;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }
      
  .sub-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
  }
      
  .sub-header h1 {
    z-index: 1;
    font-family: 'Crimson Pro', serif;
    font-style: italic;
    font-weight: normal;
    font-size: 50px !important;
    color: #ffffff;
    text-align: center;
    margin: 0;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
  }

  /* Category Filter Section - Sticky */
  .category-filter-section {
    background-color: #f9f6f0;
    border-bottom: 2px solid #d4c4a8;
    position: sticky;
    top: 50px;
    z-index: 40;
    box-shadow: 0 2px 6px rgba(59, 31, 15, 0.08);
  }

  .category-filter-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
  }

  .project-categories {
    margin: 0;
    padding: 18px 0;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 10px;
    align-items: center;
  }

  .category-link {
    font-size: 13px;
    font-family: 'Montserrat', sans-serif;
    color: #5a4a3a;
    text-decoration: none;
    padding: 10px 20px;
    transition: all 0.3s ease;
    border-radius: 25px;
    position: relative;
    letter-spacing: 1px;
    font-weight: 500;
    background-color: transparent;
    border: 1px solid transparent;
  }

  .category-link:hover {
    color: #3b1f0f;
    background-color: #ffffff;
    border-color: #d4c4a8;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(59, 31, 15, 0.12);
  }

  .category-link.active-category {
    color: #ffffff;
    font-weight: 600;
    background-color: #3b1f0f;
    border-color: #3b1f0f;
    box-shadow: 0 3px 10px rgba(59, 31, 15, 0.25);
  }

  .sub-header p {
    z-index: 1;
    font-size: 1.2rem;
    color: #ffffff;
    margin: 0;
  }
      
  .projects {
    padding: 40px 20px 60px;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }
      
  .container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0;
    justify-content: flex-start;
    align-items: flex-start;
    align-content: flex-start;
  }

  /* Card Wrapper for Hover Effect */
  .card-wrapper {
    flex: 0 1 calc(33.333% - 10px);
    min-width: 280px;
    max-width: calc(33.333% - 10px);
    transition: flex 0.35s ease, max-width 0.35s ease;
    position: relative;
    height: 460px;
    align-self: flex-start;
    will-change: flex, max-width;
  }

  .card-wrapper.is-hovered {
  flex: 0 1 calc(50% - 10px);
  max-width: calc(50% - 10px);
}

.card-wrapper.is-shrunk {
  flex: 0 1 calc(25% - 10px);
  max-width: calc(25% - 10px);
}

/* Prevent hover expand when row has only 1 card */
.card-wrapper.solo-row.is-hovered {
  flex: 0 1 calc(33.333% - 10px);
  max-width: calc(33.333% - 10px);
}

.card-wrapper.solo-row.is-shrunk {
  flex: 0 1 calc(33.333% - 10px);
  max-width: calc(33.333% - 10px);
}

  /* Card Styling */
  .card {
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
  }
      
  .card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  }
      
  .card-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #f5f5f5;
    flex-shrink: 0;
  }
      
  .card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
    will-change: opacity;
    backface-visibility: hidden;
  }
      
  .card-image .hover-img {
    opacity: 0;
    pointer-events: none;
  }

  .card:hover .card-image .default-img {
    opacity: 0;
  }
      
  .card:hover .card-image .hover-img {
    opacity: 1;
  }

  /* Card Content with Animation - Overlay on Image */
  .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
    overflow: hidden;
    min-height: 40%;
    z-index: 10;
  }

  .card-content .title {
    font-family: 'Crimson Pro', serif;
    font-size: 22px;
    text-decoration: none;
    color: #ffffff;
    display: block;
    margin-bottom: 8px;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(20px);
  }

  .card-wrapper:hover .card-content .title {
    opacity: 1;
    transform: translateY(0);
    animation: slideUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  }

  .card-content .location {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #e0e0e0;
    margin-bottom: 10px;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(20px);
    animation-delay: 0.1s;
  }

  .card-wrapper:hover .card-content .location {
    opacity: 1;
    transform: translateY(0);
    animation: slideUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  }

  .card-content .category-label {
    display: inline-block;
    padding: 6px 14px;
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    border-radius: 20px;
    margin-top: 10px;
    text-transform: uppercase;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    transform: translateY(20px);
    animation-delay: 0.2s;
  }

  .card-wrapper:hover .card-content .category-label {
    opacity: 1;
    transform: translateY(0);
    animation: slideUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  }

  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Category Label Colors */
  .category-label.site {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
  }

  .category-label.residential {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
  }

  .button {
    display: block;
    padding: 12px 30px;
    background-color: #3b1f0f;
    color: white;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    margin: 30px auto;
    font-size: 13px;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    text-align: center;
    width: fit-content;
    border-radius: 2px;
  }
      
  .button:hover {
    background-color: #241700;
    color: white;
  }

  /* Cabinet Cost Section */
  .cabinet-cost-section {
    margin-bottom: 10px;
    background-color: #3b1f0f;
    padding: 40px 20px;
    color: white;
  }
      
  .cabinet-content {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
  }
      
  .cabinet-text {
    flex: 1;
    min-width: 300px;
  }
      
  .cabinet-text h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 35px;
    font-weight: bold;
  }
      
  .cabinet-text p {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #f0f0f0;
  }

  .cabinet-btn {
    display: inline-block;
    padding: 10px 18px;
    font-family: 'Montserrat', sans-serif;
    background-color: white;
    color: #3b1f0f;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 3px;
    text-decoration: none;
    border-radius: 2px;
    transition: 0.3s;
  }
      
  .cabinet-btn:hover {
    background-color: #f0f0f0;
  }
      
  .cabinet-image {
    display: grid;
    flex: 1;
    min-width: 300px;
    justify-content: end;
  }
      
  .cabinet-image img {
    width: 100%;
    max-width: 500px;
  }

  .project-heading {
    margin-bottom: 10px;
    padding: 0;
  }

  .heading-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
  }

  .project-heading h1 {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px;
    font-weight: normal;
    font-size: 16px;
    color: #3b1f0f;
    margin: 25px 0 15px;
  }

  /* Search Container */
  .search-container {
    max-width: 100%;
    margin: 10px 0;
    position: relative;
  }

  .search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s ease;
  }

  .search-input:focus {
    border-color: #3b1f0f;
  }

  .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 18px;
    pointer-events: none;
  }

  /* Search Suggestions */
  .search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 40;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  .search-suggestions.active {
    display: block;
  }

  .suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
  }

  .suggestion-item:last-child {
    border-bottom: none;
  }

  .suggestion-item:hover {
    background-color: #f9f9f9;
  }

  .suggestion-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
  }

  .suggestion-content {
    flex: 1;
  }

  .suggestion-title {
    font-family: 'Crimson Pro', serif;
    font-size: 16px;
    color: #3b1f0f;
    margin-bottom: 4px;
  }

  .suggestion-location {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
  }

  .suggestion-location i {
    margin-right: 4px;
    font-size: 12px;
  }

  .no-suggestions {
    padding: 20px;
    text-align: center;
    color: #999;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
  }

  #project-title-prefix {
    color: #3b1f0f;
    font-weight: 400;
  }

  #project-title-category {
    color: #3b1f0f;
    font-weight: 600;
    padding-left: 5px;
  }

  /* Hide cards by default when filtering */
  .card-wrapper[data-category] {
    display: flex;
  }

  .card-wrapper.hidden {
    display: none;
  }

  .card-wrapper.filtered-out {
    display: none;
  }

  /* Empty state */
  .no-projects {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
    width: 100%;
  }

  .no-projects i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
    display: block;
  }

  .no-projects h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    margin-bottom: 10px;
    color: #3b1f0f;
  }

  .no-projects p {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #666;
  }

  /* ===== PAGINATION ===== */
  .pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 50px auto 30px;
    flex-wrap: wrap;
    padding: 0 20px;
  }

  .page-btn {
    min-width: 42px;
    height: 42px;
    padding: 0 10px;
    border: 1.5px solid #d4c4a8;
    background: white;
    color: #3b1f0f;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  }

  .page-btn:hover:not(.disabled) {
    background: #3b1f0f;
    color: white;
    border-color: #3b1f0f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59,31,15,0.2);
  }

  .page-btn.active-page {
    background: #3b1f0f;
    color: white;
    border-color: #3b1f0f;
    box-shadow: 0 4px 10px rgba(59,31,15,0.3);
    transform: translateY(-1px);
  }

  .page-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
  }

  .page-btn i {
    font-size: 18px;
  }

  .page-ellipsis {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #999;
    padding: 0 4px;
    user-select: none;
    line-height: 42px;
  }

  /* Responsive Design */
  @media (max-width: 1024px) {
    .card-wrapper {
      flex: 0 1 calc(50% - 10px);
      max-width: calc(50% - 10px);
    }

    .card-wrapper.is-hovered {
      flex: 0 1 calc(60% - 10px);
      max-width: calc(60% - 10px);
    }

    .card-wrapper.is-shrunk {
      flex: 0 1 calc(40% - 10px);
      max-width: calc(40% - 10px);
    }
  }

  @media (max-width: 768px) {
    .sub-header {
      height: 160px;
      padding: 30px 20px;
    }

    .sub-header h1 {
      font-size: 2rem !important;
    }

    .project-categories {
      gap: 10px;
      font-size: 11px;
    }

    .category-link {
      font-size: 10px;
      padding: 7px 10px;
      letter-spacing: 0.5px;
      white-space: nowrap;
    }

    .container {
      display: grid;
      grid-template-columns: 1fr;
      gap: 20px;
      width: 100%;
    }

    .card-wrapper {
      flex: none !important;
      display: block;
      height: 300px;
      min-width: unset;
      max-width: 100% !important;
      width: 100%;
    }

    .card-wrapper:hover {
      flex: none;
    }

    .card-wrapper:hover ~ .card-wrapper {
      flex: none;
    }

    .card {
      height: 100%;
    }

    .card-content {
      min-height: 50%;
    }

    .card-content .title {
      opacity: 1;
      transform: translateY(0);
      animation: none;
      font-size: 18px;
    }

    .card-content .location {
      opacity: 1;
      transform: translateY(0);
      animation: none;
      font-size: 11px;
    }

    .card-content .category-label {
      opacity: 1;
      transform: translateY(0);
      animation: none;
      font-size: 9px;
    }

    .cabinet-content {
      flex-direction: column;
    }

    .cabinet-text h2 {
      font-size: 28px;
    }

    .cabinet-image {
      justify-content: center;
    }

    .heading-container {
      padding: 0 20px;
    }
    
    .search-container {
      max-width: 100%;
    }
  }

  @media (max-width: 480px) {
    .sub-header h1 {
      font-size: 1.5rem !important;
    }

    .project-heading h1 {
      font-size: 14px;
    }

    .search-input {
      font-size: 13px;
      padding: 10px 35px 10px 12px;
    }
    
    .suggestion-item {
      padding: 10px;
    }
    
    .suggestion-image {
      width: 45px;
      height: 45px;
      margin-right: 10px;
    }
  }

  @media (max-width: 768px) {
    .category-filter-section {
      top: 50px;
    }
    
    .category-filter-container {
      padding: 0 20px;
    }
    
    .project-categories {
      gap: 12px;
      padding: 14px 0;
    }

    .category-link {
      font-size: 11px;
      padding: 8px 16px;
    }

    .projects {
      padding: 30px 15px 60px;
    }

    .project-heading h1 {
      font-size: 14px;
      margin: 20px 0 12px;
    }

    .search-input {
      font-size: 13px;
      padding: 10px 35px 10px 12px;
    }
    
    .suggestion-image {
      width: 50px;
      height: 50px;
    }
    
    .suggestion-title {
      font-size: 14px;
    }
  }

  @media (max-width: 480px) {
    .project-categories {
      gap: 8px;
      padding: 12px 0;
    }
    
    .category-link {
      font-size: 10px;
      padding: 7px 14px;
    }

    .container {
      padding: 0;
    }

    .card-wrapper {
      height: 280px;
    }

    .card-content {
      min-height: 55%;
      padding: 18px;
    }

    .card-content .title {
      font-size: 16px;
      margin-bottom: 6px;
    }

    .card-content .location {
      font-size: 10px;
      margin-bottom: 8px;
    }

    .card-content .category-label {
      font-size: 8px;
      padding: 4px 10px;
      margin-top: 6px;
    }

    .search-input {
      font-size: 13px;
      padding: 10px 35px 10px 12px;
    }
    
    .suggestion-item {
      padding: 10px;
    }
    
    .suggestion-image {
      width: 45px;
      height: 45px;
      margin-right: 10px;
    }

    .suggestion-title {
      font-size: 14px;
    }
  }