/* 6-Block Special Grid CSS with prefixed classes and labels up by default */
.sb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: transparent;
  }
  
  .sb-container h1 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 50px;
    color: white;
  }
  
  .sb-projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    grid-auto-rows: 1fr; /* This ensures all rows have equal height */
  }
  
  .sb-project-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease;
    grid-column: span 1;
    background-color: #1b1b1b;
  }
  
  /* Make the first and last card span 2 columns */
  .sb-wide-card {
    grid-column: span 2;
  }
  
  .sb-project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  }
  
  .sb-project-card img {
    width: 100%;
    display: block;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
  }
  
  .sb-project-card:hover img {
    transform: scale(1.05);
  }
  
  .sb-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 10px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    border-radius: 0 0 10px 10px;
    transition: opacity 0.4s ease, transform 0.4s ease;
    /* Labels up by default */
    opacity: 1;
    transform: translateY(0);
  }
  
  /* On hover, labels dissolve */
  .sb-project-card:hover .sb-card-label {
    opacity: 0;
    transform: translateY(100%);
  }
  
  /* Alternating colors for the cards */
  .sb-project-card:nth-child(odd) .sb-card-label {
    background-color: #ad008abd; /* Semi-transparent Purple */
  }
  
  .sb-project-card:nth-child(even) .sb-card-label {
    background-color: #00aca6bd; /* Semi-transparent Teal */
  }
  
  /* Enhanced hover effects for desktop */
  @media (min-width: 769px) {
    .sb-project-card::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(to bottom, rgba(0,0,0,0) 70%, rgba(0,0,0,0.7) 100%);
      opacity: 0;
      transition: opacity 0.3s ease;
    }
    
    .sb-project-card:hover::after {
      opacity: 1;
    }
  }
  
  /* Mobile Responsiveness */
  @media (max-width: 768px) {
    .sb-projects-grid {
      grid-template-columns: repeat(2, 1fr);
    }
    
    /* On mobile, make the wide cards full width */
    .sb-wide-card {
      grid-column: span 2;
    }
    
    /* Regular cards take one column each */
    .sb-project-card:not(.sb-wide-card) {
      grid-column: span 1;
    }
    
    /* New scroll-based animation classes */
    .sb-hidden {
      opacity: 0;
      transform: translateY(30px);
    }
    
    .sb-visible {
      opacity: 1;
      transform: translateY(0);
      transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    /* On mobile, don't dissolve labels on hover for better UX */
    .sb-project-card:hover .sb-card-label {
      opacity: 1;
      transform: translateY(0);
    }
    
    /* Style enhancements for mobile */
    .sb-project-card:nth-child(odd) .sb-card-label {
      border-left: 4px solid #ad0089bd;
    }
    
    .sb-project-card:nth-child(even) .sb-card-label {
      border-left: 4px solid #00aca6bd;
    }
  }