
.projects{
    padding: 4rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

.projects h1 {
    text-align: center;
    margin-bottom: 4rem;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}


  .githubWrapper {
    display: flex;
    justify-content: center;
    padding: 25px;
  }

  .item {
    display: block;
    
}
/* 
.item {
    display: none;
    
} */

/*👆dit deselecteren als je wil dat ze verborgen zijn bij het inlezen van de pagina👆*/



  .filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
  }
  
  .filter-buttons button {
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 1rem 2rem;
    border: 2px solid rgba(50, 140, 193, 0.3);
    background: linear-gradient(135deg, rgba(50, 140, 193, 0.1), rgba(50, 140, 193, 0.05));
    border-radius: 50px;
    /* cursor: pointer; */
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
  }
  
  .filter-buttons button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
  }
  
  .filter-buttons button:hover {
    color: white;
    transform: translateY(-3px) scale(1.05);
    /* box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); */
  }
  
  .filter-buttons button:hover::before {
    left: 100%;
  }

  .filter-buttons button:nth-child(1):hover {
    /* background: linear-gradient(135deg, var(--primary), var(--accent)); */
    border-color: var(--primary);
    /* box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); */
  }

  .filter-buttons button:nth-child(2):hover {
    /* background: linear-gradient(135deg, var(--accent), var(--primary)); */
    border-color: var(--primary);
    /* box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); */
  }

  .filter-buttons button:nth-child(3):hover {
    /* background: linear-gradient(135deg, var(--secondary), #f59e0b); */
    border-color: var(--primary);
    /* box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); */
  }

  .filter-buttons button:nth-child(4):hover {
    /* background: linear-gradient(135deg, #9333ea, #c084fc); */
    border-color: var(--primary);
    /* box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); */
  }


.nonFeatured figure{
display: none;
}

.nonFeatured{
  max-height: 350px;
}

  .article22 {
    --img-scale: 1.001;
    --title-color: var(--text-primary);
    --link-icon-translate: -20px;
    --link-icon-opacity: 0;
    position: relative;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(50, 140, 193, 0.08), rgba(72, 216, 213, 0.05));
    backdrop-filter: blur(25px);
    border: 2px solid rgba(50, 140, 193, 0.15);
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); */
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  .article22::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }
  
  .article22 a::after {
    position: absolute;
    inset-block: 0;
    inset-inline: 0;
    cursor: pointer;
    content: "";
  }
  
  /* basic article elements styling */
  .article22 h2 {
    margin: 0 0 1rem 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--title-color);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--text-primary), rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  
  figure {
    margin: 0;
    padding: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    position: relative;
  }
  
  figure::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
  }
  
  .article22 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center;
    transform: scale(var(--img-scale));
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }
  
  .article-body {
    padding: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
  }
  
  .article-body p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
  }
  
  .article22 .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--primary);
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(50, 140, 193, 0.1);
    border: 2px solid rgba(50, 140, 193, 0.3);
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  
  .article22 .read-more::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: none;
    transition: all 0.3s ease;
    border-radius: 50px;
    transform: translate(-50%, -50%);
    z-index: -1;
  }
  
  .article22 .read-more:hover {
    color: white;
    transform: translateY(-2px);
    /* box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); */
    border-color: var(--primary);
  }
  
  .article22 .read-more:hover::before {
    width: 100%;
    height: 100%;
  }
  
  .article22 a:focus {
    outline: 1px dotted #eeede4;
  }
  
  .article22 a .icon {
    min-width: 24px;
    width: 24px;
    height: 24px;
    margin-left: 5px;
    transform: translateX(var(--link-icon-translate));
    opacity: var(--link-icon-opacity);
    transition: all 0.3s;
  }
  
  /* Enhanced hover effects */
  .article22:has(:hover, :focus) {
    --img-scale: 1.08;
    --title-color: var(--text-primary);
    --link-icon-translate: 0;
    --link-icon-opacity: 1;
  }

  .article22:hover{
    transform: translateY(-8px) scale(1.02);
    background: linear-gradient(135deg, rgba(50, 140, 193, 0.15), rgba(72, 216, 213, 0.1));
    border-color: rgba(50, 140, 193, 0.4);
    /* box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2); */
  }
  
  .article22:hover::before {
    opacity: 1;
  }

  .article22.categoryWebDev:hover{
      border-color: rgba(59, 130, 246, 0.6);
      /* box-shadow: 0 25px 50px rgba(59, 130, 246, 0.2); */
  }

  .article22.categoryPrograms:hover{
      border-color: rgba(16, 185, 129, 0.6);
      /* box-shadow: 0 25px 50px rgba(16, 185, 129, 0.2); */
  }

  .article22.categoryOther:hover{
      border-color: rgba(245, 158, 11, 0.6);
      /* box-shadow: 0 25px 50px rgba(245, 158, 11, 0.2); */
  }
  
  
  /************************ 
  Generic layout (demo looks)
  **************************/
  

  
  .articles {
    display: grid;
    max-width: 1400px;
    margin-inline: auto;
    padding-inline: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
    align-items: stretch;
  }
  
  @media screen and (max-width: 1200px) {
    .articles {
      grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
      gap: 2rem;
    }
  }

  @media screen and (max-width: 768px) {
    .projects {
      padding: 3rem 0;
    }
    
    .articles {
      grid-template-columns: 1fr;
      gap: 1.5rem;
      padding-inline: 1rem;
    }
    
    .filter-buttons {
      gap: 0.8rem;
      margin-bottom: 2rem;
      flex-direction: column;
      align-items: center;
    }
    
    .filter-buttons button {
      font-size: 0.9rem;
      padding: 1rem 2rem; /* Better touch targets */
      min-width: 120px;
      min-height: 48px; /* Standard mobile touch target */
      border-radius: 25px;
      font-weight: 600;
    }
    
    .filter-buttons button:active {
      transform: scale(0.95);
      background: linear-gradient(135deg, var(--primary), var(--accent));
      color: white;
    }
    
    /* Hide filter buttons on mobile for cleaner interface */
    .filter-buttons {
      display: none;
    }
    
    /* Show only first 3 projects on mobile */
    .article22:nth-child(n+4) {
      display: none;
    }
    
    .article22 {
      border-radius: 20px;
    }
    
    .article-body {
      padding: 1.5rem;
    }
    
    .article22 h2 {
      font-size: 1.5rem;
    }
    
    figure {
      border-radius: 16px 16px 0 0;
    }
    
    .nonFeatured figure {
      display: none;
    }
    
    .nonFeatured {
      max-height: none;
    }
  }
  
  @container card (min-width: 380px) {
    .article-wrapper {
      display: grid;
      grid-template-columns: 100px 1fr;
      gap: 16px;
    }
    .article-body {
      padding-left: 0;
    }
    figure {
      width: 100%;
      height: 100%;
      overflow: hidden;
    }
    figure img {
      height: 100%;
      aspect-ratio: 1;
      object-fit: cover;
    }
  }
  
  .sr-only:not(:focus):not(:active) {
    clip: rect(0 0 0 0); 
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap; 
    width: 1px;
  }

  /* GitHub CTA Button */
  .github-cta-container {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
  }

  .github-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    /* background: linear-gradient(135deg, var(--primary), var(--accent)); */
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  }

  .github-cta-button:hover {
    transform: translateY(-2px);
    /* box-shadow: 0 12px 40px rgba(50, 140, 193, 0.2); */
    /* background: linear-gradient(135deg, var(--accent), var(--primary)); */
  }

  .github-cta-button .github-icon {
    width: 24px;
    height: 24px;
  }

  .github-cta-button .arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
  }

  .github-cta-button:hover .arrow-icon {
    transform: translateX(4px);
  }

  /* GitHub CTA Button Responsiveness */
  @media screen and (max-width: 768px) {
    .github-cta-container {
      margin: 2rem 0;
      padding: 0 1rem;
    }
    
    .github-cta-button {
      font-size: 1rem;
      padding: 0.85rem 1.5rem;
      gap: 0.6rem;
    }
    
    .github-cta-button .github-icon {
      width: 20px;
      height: 20px;
    }
    
    .github-cta-button .arrow-icon {
      width: 18px;
      height: 18px;
    }
  }
  
  @media screen and (max-width: 480px) {
    /* Keep filter buttons hidden on small mobile too */
    .filter-buttons {
      display: none !important;
    }
    
    /* Ensure only 3 projects show on very small screens */
    .article22:nth-child(n+4) {
      display: none !important;
    }
    
    .github-cta-container {
      margin: 1.5rem 0;
    }
    
    .github-cta-button {
      font-size: 0.9rem;
      padding: 1rem 1.5rem; /* Increased for better mobile touch */
      gap: 0.5rem;
      min-height: 48px;
    }
    
    .github-cta-button .github-icon {
      width: 18px;
      height: 18px;
    }
    
    .github-cta-button .arrow-icon {
      width: 16px;
      height: 16px;
    }
  }