.tarjetas {
  display: none;
  position: relative;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  padding: 3rem;
  min-height: 400px;
  width: 100%;
  box-sizing: border-box;
  will-change: transform, opacity; /* Optimización para animaciones */
  
  /* Estilos para móviles */
  @media (max-width: 768px) {
    flex-direction: column;
    padding: 1rem;
    gap: 1.5rem;
    min-height: auto;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    border-radius: 10px;
    margin-top: 30px;
    z-index: 5;
  }
}

.tarjetas.active {
  display: flex;
  
  /* Ajustes para móviles */
  @media (max-width: 768px) {
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    padding-bottom: 20px;
  }
}
  
  .tarjetas .glass {
    position: relative;
    width: 280px;
    height: 384px;
    background: linear-gradient(#fff2, transparent);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 25px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 15px;
    margin: 0 15px;
    backdrop-filter: blur(10px);
    transform: rotate(calc(var(--r) * 1deg));
    cursor: pointer;
    padding: 20px;
    box-sizing: border-box;
    
    /* Ajustes para móviles */
    @media (max-width: 768px) {
      width: 240px;
      height: 336px;
      margin: 0;
      transform: none !important;
      margin-bottom: 1.5rem;
      background: linear-gradient(#fff3, rgba(0, 0, 0, 0.2));
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
      padding: 15px;
    }
    
    /* Efecto hover solo en desktop */
    @media (min-width: 769px) {
      &:hover {
        transform: translateY(-10px) scale(1.05);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
        z-index: 10;
      }
    }
  }
  
  /* Efecto hover para desktop */
  @media (min-width: 769px) {
    .tarjetas:hover .glass:not(.github-card) {
      transform: rotate(0deg) translateY(-10px);
      margin: 0 10px;
    }
    
    .tarjetas .glass:not(.github-card):hover {
      transform: translateY(-15px) scale(1.1) !important;
      z-index: 20;
    }
    
    /* Mantener la tarjeta de GitHub estática */
    .tarjetas .github-card {
      transform: none !important;
    }
    
    .tarjetas:hover .github-card {
      transform: none !important;
    }
    
    .tarjetas .github-card:hover {
      transform: none !important;
      box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    }
  }
  
  .tarjetas .glass::before {
    content: attr(data-text);
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
  }
  
  .tarjetas .glass:hover::before {
    background: rgba(0, 0, 0, 0.7);
    height: 45px;
  }
  
  .tarjetas .glass svg {
    width: 80px;
    height: 80px;
    fill: #fff;
    transition: transform 0.3s ease;
    margin-bottom: 20px;
  }
  
  .tarjetas .glass:hover svg {
    transform: scale(1.1);
  }
  
  /* Estilos para el contenido de las tarjetas */
  .github-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
  }
  
  .github-repos {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    flex: 1;
    justify-content: center;
  }
  
  .repo-link {
    color: #A8FF60;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .repo-link:hover {
    background: rgba(168, 255, 96, 0.15);
    color: #B8FF70;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 255, 96, 0.3);
  }
  
  /* Ajustes adicionales para móviles */
  @media (max-width: 768px) {
    .tarjetas .glass::before {
      font-size: 0.85rem;
      height: 40px;
    }
    
    .tarjetas .glass svg {
      width: 60px;
      height: 60px;
      margin-bottom: 15px;
    }
    
    .github-repos {
      gap: 10px;
    }
    
    .repo-link {
      font-size: 0.9rem;
      padding: 6px 10px;
    }
  }
  